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

Mark Wilkinson markw at illuminae.com
Mon Aug 18 22:24:11 UTC 2003


EEEEEEEeeeeek!!  What a mess!  Okay...where to begin...

let's start with your question - it turns out that the object names that
I assigned while creating the RDF definitions do not translate happily
into XML.  the '/' character is, of course, not valid as an element
name.  Okay, so I need to re-name those objects.  I'll use a hyphen
instead of a slash (i.e. text/plain will become text-plain).  I'll post
a message to the list when this is done.  Give me a few minutes.

the line of code should read:
$response = responseHeader() . $objects . responseFooter()


Second issue - It looks like you are breaking the rules w.r.t. id's
(unless a medline article has multiple id's?).  One object, One id, as
per the API.  An object represents a data entity!  A data entity has an
ID number (not a dozen id numbers :-) )  If you want to talk about
multiple MEDLINE articles then you say:

<moby:Object namespace='MEDLINE_Article' id='12915779'/>
<moby:Object namespace='MEDLINE_Article' id='12915051'/>
<moby:Object namespace='MEDLINE_Article' id='12914938'/>
<moby:Object namespace='MEDLINE_Article' id='12913600'/>
<moby:Object namespace='MEDLINE_Article' id='12913452'/>
...etc...

each id gets its own object, because each id represents an 'entity'.


Third Issue:  You have created a new entry/name for a namespace that
already existed in the database!  The namespace 'MEDLINE' already
exists.  The namespace 'MEDLINE_Article' that you just added is
redundant to that (as far as I can tell - if it isn't, then you need to
be more descriptive in your definition of that namespace indicating
exactly what types of data entities are identified by your new namespace
compared to the original one).  Please check for the existence of a
namespace before creating a new one... and please delete the one you
created so that others don't get confused (if it really is redundant; if
not, the please de-register and re-register it with a more comprehensive
description of its intent).

A call to everyone - please check the existing Namespaces/Objects using
the CGI's on the biomoby homepage and pass new Namespaces/Objects
through this mailing list for everyone to see BEFORE you register them,
at least until you are very comfortable with the ins and outs of MOBY...
Remember, MOBY Central is a globally accessible registry already being
used for serious work by some people - we can't afford to mess it up
this early in the game!  At some point we may have enough funding to
hire our own curator, at which point I will be tempted to shut down
public access to registering/deregistering namespaces and objects, but
in the meantime... please be careful :-)

M

On Mon, 2003-08-18 at 15:40, Vijay Narayanasamy wrote:
> 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</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