[MOBY-l] RE: [SOAP] XML Parser Error

Vijay Narayanasamy VNarayan at mail.brc.mcw.edu
Mon Aug 18 21:40:08 UTC 2003


Hi,

I have difficulties in getting the valid XML output when using "text/plain"
object. The forward slash is creating problems.

I tried using <![CDATA[  .... ]]. But no success

This is the code fragment.

$response ="<![CDATA[". responseHeader().$response. responseFooter()."]]>";

This is the XML that I get.

<![CDATA[<?xml version='1.0' encoding='UTF-8'?>
      <moby:MOBY xmlns:moby='http://www.biomoby.org/moby'>
        <moby:Response moby:authority='http://www.illuminae.com'>
        
        <moby:queryResponse>
            <Simple>
<moby:text/plain namespace='MEDLINE_Article'
id="12915779,12915051,12914938,12913600,12913452,12913322,12910760,12909652,
12906892,12906888,12906885">
UI  - 22797074
PMID- 12915779
OWN - NLM
STAT- in-process
DA  - 20030813
PST - ppublish
SO  - Toxicon 2003 Jul;42(1):21-7.

	</moby:text/plain>
	</Simple>
        </moby:queryResponse>
        
    </moby:Response>
      </moby:MOBY>
]]>

How to handle this error? 

Cheers,

-Vijay


-----Original Message-----
From: Mark Wilkinson [mailto:markw at illuminae.com] 
Sent: Monday, August 18, 2003 11:55 AM
To: Vijay Narayanasamy
Subject: Re: [SOAP] XML Parser Error

If you haven't CVS updated today, you will need to do so again.  I fixed
that error this morning (I created that error when I fixed your last
reported one :-)  I think it is all stable and working properly now...
and MUCH faster!)

M

On Mon, 2003-08-18 at 11:32, Vijay Narayanasamy wrote:
> Hi Mark,
> 
>  
> 
> I 'm getting the following  XML parser error after cvs update (using
> Local Moby Central)
> 
>  
> 
> "syntax error at line 1, column 0, byte 0 at
> /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/XML/Parser.pm line
> 185"
> 
>  
> 
> The following is the output using SOAP::Lite +trace when I tried to
> register a service locally. If I read the XML message it says
> "Registration successful" but the XML Parser fails.
> 
>  
> 
> What am I doing wrong?. Even the .cgi client is getting the similar
> error.
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> /usr/local/bin/perl -w "/pub_home/pf_de/cgi-bin/PubFetchRegister.pl" 
> 
> Unquoted string "trace" may clash with future reserved word at
> MOBY/Client/Central.pm line 5.
> 
> SOAP::Transport::new: ()
> 
> SOAP::Serializer::new: ()
> 
> SOAP::Deserializer::new: ()
> 
> SOAP::Parser::new: ()
> 
> SOAP::Lite::new: ()
> 
> SOAP::Transport::HTTP::Client::new: ()
> 
> SOAP::Lite::call: ()
> 
> SOAP::Serializer::envelope: ()
> 
> SOAP::Serializer::envelope: registerService 
> 
>                         <registerService>
> 
>                                     <Category>moby</Category>
> 
>                                    
> <serviceName>SearchPubmed3</serviceName>
> 
>                                    
> <serviceType>Retrieval</serviceType>
> 
>                                     <Description><![CDATA[Search
> PubMed for given query and get PMID Objects]]></Description>
> 
>                                    
>
<URL>http://prometheus.brc.mcw.edu:8082/pubfetch-bin/PubFetchService.pl</URL
>
> 
>                                    
> <authURI>http://prometheus.brc.mcw.edu/MOBY/Central</authURI>
> 
>                                    
>
<contactEmail>vnarayan at mail.brc.mcw.edu</contactEmail><outputObjects><Output
>
> 
> <Simple articleName='abcd'>
> 
> <objectType>Object</objectType>
> 
> <Namespace>PMID</Namespace>
> 
> </Simple>
> 
> </Output></outputObjects>
> 
> <inputObjects><Input>
> 
> <Simple articleName='abc'>
> 
> <objectType>Object</objectType>
> 
> <Namespace>Global_Keyword</Namespace>
> 
> </Simple>
> 
> </Input></inputObjects>
> 
> <secondaryArticles>
> 
> </secondaryArticles>
> 
> </registerService>
> 
> SOAP::Data::new: ()
> 
> SOAP::Data::new: ()
> 
> SOAP::Data::new: ()
> 
> SOAP::Data::new: ()
> 
> SOAP::Data::new: ()
> 
> SOAP::Transport::HTTP::Client::send_receive:
> HTTP::Request=HASH(0x6ede3c)
> 
> SOAP::Transport::HTTP::Client::send_receive: POST
> http://prometheus.brc.mcw.edu:8082/pubfetch-bin/MOBY-Central.pl
> 
> Accept: text/xml
> 
> Accept: multipart/*
> 
> Content-Length: 1457
> 
> Content-Type: text/xml; charset=utf-8
> 
> SOAPAction:
> "http://prometheus.brc.mcw.edu/MOBY/Central#registerService"
> 
>  
> 
> <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV
:Body><namesp1:registerService
xmlns:namesp1="http://prometheus.brc.mcw.edu/MOBY/Central"><c-gensym3
xsi:type="xsd:string">
> 
>                         &lt;registerService>
> 
>                                     &lt;Category>moby&lt;/Category>
> 
>                                    
> &lt;serviceName>SearchPubmed3&lt;/serviceName>
> 
>                                    
> &lt;serviceType>Retrieval&lt;/serviceType>
> 
>                                     &lt;Description>&lt;![CDATA[Search
> PubMed for given query and get PMID Objects]]&gt;&lt;/Description>
> 
>                                    
>
&lt;URL>http://prometheus.brc.mcw.edu:8082/pubfetch-bin/PubFetchService.pl&l
t;/URL>
> 
>                                    
> &lt;authURI>http://prometheus.brc.mcw.edu/MOBY/Central&lt;/authURI>
> 
>                                    
>
&lt;contactEmail>vnarayan at mail.brc.mcw.edu&lt;/contactEmail>&lt;outputObject
s>&lt;Output>
> 
> &lt;Simple articleName='abcd'>
> 
> &lt;objectType>Object&lt;/objectType>
> 
> &lt;Namespace>PMID&lt;/Namespace>
> 
> &lt;/Simple>
> 
> &lt;/Output>&lt;/outputObjects>
> 
> &lt;inputObjects>&lt;Input>
> 
> &lt;Simple articleName='abc'>
> 
> &lt;objectType>Object&lt;/objectType>
> 
> &lt;Namespace>Global_Keyword&lt;/Namespace>
> 
> &lt;/Simple>
> 
> &lt;/Input>&lt;/inputObjects>
> 
> &lt;secondaryArticles>
> 
> &lt;/secondaryArticles>
> 
>
&lt;/registerService></c-gensym3></namesp1:registerService></SOAP-ENV:Body><
/SOAP-ENV:Envelope>
> 
> SOAP::Transport::HTTP::Client::send_receive:
> HTTP::Response=HASH(0x7f08f4)
> 
> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
> 
> Connection: close
> 
> Date: Mon, 18 Aug 2003 17:25:50 GMT
> 
> Server: Apache/1.3.27 (Unix) PHP/4.3.2 mod_jk/1.2.0
> 
> Content-Length: 735
> 
> Content-Type: text/xml; charset=utf-8
> 
> Client-Date: Mon, 18 Aug 2003 17:25:51 GMT
> 
> Client-Peer: 141.106.96.20:8082
> 
> Client-Response-Num: 1
> 
> SOAPServer: SOAP::Lite/Perl/0.55
> 
>  
> 
> <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV
:Body><namesp1:registerServiceResponse
xmlns:namesp1="http://prometheus.brc.mcw.edu/MOBY/Central"><s-gensym3
xsi:type="xsd:string">&lt;MOBYRegistration>
> 
>                                                 &lt;id>256&lt;/id>
> 
>                                                
> &lt;success>1&lt;/success>
> 
>                                                
> &lt;message>&lt;![CDATA[Registration successful]]&gt;&lt;/message>
> 
>                                    
>
&lt;/MOBYRegistration></s-gensym3></namesp1:registerServiceResponse></SOAP-E
NV:Body></SOAP-ENV:Envelope>
> 
> SOAP::Deserializer::deserialize: ()
> 
> SOAP::Parser::decode: ()
> 
> SOAP::SOM::new: ()
> 
>  
> 
> syntax error at line 1, column 0, byte 0 at
> /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/XML/Parser.pm line
> 185
> 
> SOAP::Lite::DESTROY: ()
> 
> SOAP::SOM::DESTROY: ()
> 
> SOAP::Serializer::DESTROY: ()
> 
> SOAP::Data::DESTROY: ()
> 
> SOAP::Data::DESTROY: ()
> 
> SOAP::Data::DESTROY: ()
> 
> SOAP::Data::DESTROY: ()
> 
> SOAP::Data::DESTROY: ()
> 
> SOAP::Deserializer::DESTROY: ()
> 
> SOAP::Parser::DESTROY: ()
> 
> SOAP::Transport::DESTROY: ()
> 
> SOAP::Transport::HTTP::Client::DESTROY: ()
> 
>  
> 
> Compilation exited abnormally with code 255 at Mon Aug 18 12:25:51
> 
>  
> 
> Vijay Narayanasamy
> 
> Bioinformatics Research Center
> 
> Medical College of Wisconsin
> 
> 8701, W. Watertown Plank Road
> 
> Milwaukee, WI 53226
> 
>  
-- 
Mark Wilkinson <markw at illuminae.com>
Illuminae



More information about the moby-l mailing list