[MOBY-dev] Perl API and BioMOBY Central WSDL: BioMOBY with new "stable" SOAP::Lite broken...

Pieter Neerincx Pieter.Neerincx at wur.nl
Mon Jan 30 16:53:09 UTC 2006


On 30-Jan-2006, at 5:03 PM, Mark Wilkinson wrote:

> Sounds to me like SOAP::Lite is not using namespaces correctly...  
> they're
> supposed to determine the meaning of the namespace from the document,
> rather than imposing it on the document.
>
> If that interpretation of the problem were true, then the fix  
> should be in
> S::L, not Moby::Central...  Am I mis-interpreting your bug report?

No I think you got it right. S::L shouldn't mess it up, but I can  
predict that fixing it by changing the prefix in BioMOBY is much  
faster than trying to get a fix into the next "stable" release of  
S::L. So unless changing this namespace prefix causes problems for  
BioMOBY, we might do it both... Anyone with objections!

>
> I read your post on the SOAP::Lite group - Eddie and I have noticed  
> that
> error before (though it was in the context of service-instance  
> response
> errors, not registry errors.  I can't recall how we fixed it... it  
> was in
> mid-october sometime (we were not having the conversation on-list,
> however...)
>
> Eddie, can you go back in time and see what we did to solve the anyURI
> problem?

I thought I had it up and running now, but found yet another issue :(.
S::L 0.66 and up now encodes <, >, &, etc. in strings. The execute  
sub in MOBY/Client/Service.pm does it as well:

     $data =~ s"&"&amp;"g;  # encode content in case it has CDATA
     $data =~ s"\<"&lt;"g;
     $data =~ s"\]\]\>"\]\]&gt;"g;

So now the data is encoded twice resulting in things like:

     &amp;lt;

which makes the parser choke. The simple solution is removing the 3  
lines mentioned above, but off course in that case it will no longer  
work with older versions of S::L and I don't think everyone has  
already welcomed S::L 0.66+ on their disks.

Cheers,

Pi


> M
>
>
>
>
>
> On Mon, 30 Jan 2006 05:32:04 -0800, Pieter Neerincx
> <Pieter.Neerincx at wur.nl> wrote:
>
>> Hi all,
>>
>> After quite some time there is finally an updated SOAP::Lite. I never
>> got the BioMOBY stuff working with the previous beta's, so I was
>> stuck on S::L 0.60. But now there is 0.66 and 0.67 was already
>> submitted to CPAN. And 0.68 might be there by the time you read this.
>> It's been a while since the last "stable" versions of S::L and now
>> they are popping up like mushrooms :). Unfortunately they don't work
>> with BioMOBY. I found 2 issues. One of them is clearly a S::L
>> problem, so I mailed to the corresponding list (And for those who are
>> interested, there's a temporary fix in that post as well). For the
>> other one I'm not sure, but I do now it can be fixed easily by a
>> small change in ~moby-live/Perl/MOBY/Central.pm. There is a problem
>> with the WSDL that BioMOBY Central generates. There are several
>> namespaces in this WSDL and on them is prefixed with "soap":
>>
>> $WSDL_TEMPLATE = <<END;
>> <?xml version="1.0"?>
>> <wsdl:definitions name="MOBY_Central_Generated_WSDL"
>>                  targetNamespace="http://biomoby.org/Central.wsdl"
>>                  xmlns:tns="http://biomoby.org/Central.wsdl"
>>                  xmlns:xsd1="http://biomoby.org/CentralXSDs.xsd"
>>                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>                  xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>>                  xmlns="http://schemas.xmlsoap.org/wsdl/"
>>                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>> etc.
>>
>> As far as I understand it (after browsing the specs for the different
>> versions of WSDL, SOAP, WSDL SOAP binding etc. that drove me nuts)
>> the "soap" prefixed namespace is for the SOAP binding described by
>> the WSDL document. Unfortunately when S::L is processing the response
>> from BioMOBY Central it thinks the "soap" prefixed namespace is for
>> the SOAP message eventhough the WSDL is wrapped in a CDATA block.
>> Since this namespace is not the valid one for SOAP version 1.1 or 1.2
>> S::L complains that the entire response is in an unsupported version
>> of SOAP :(. Either something has to change in S::L, or we change the
>> prefix of the namespace. As far as I understand the prefixes for
>> namespaces are not standardised and could be anything. In lots of
>> examples I found on the net I saw:
>> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/",
>> xmlns:soapwsdl="http://schemas.xmlsoap.org/wsdl/soap/" or
>> xmlns:wsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>> instead of:
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>
>> So what do the others think. Should this be patched in S::L or can we
>> change the prefix for this namespace from soap to for example wsoap?
>>
>> Cheers,
>>
>> Pieter
>>
>>
>>
>> Wageningen University and Research centre (WUR)
>> Laboratory of Bioinformatics
>> Transitorium (building 312) room 1034
>> Dreijenlaan 3
>> 6703 HA Wageningen
>> The Netherlands
>> phone: 0317-483 060
>> fax: 0317-483 584
>> mobile: 06-143 66 783
>> pieter.neerincx at wur.nl
>>
>>
>>
>> _______________________________________________
>> MOBY-dev mailing list
>> MOBY-dev at biomoby.org
>> http://biomoby.org/mailman/listinfo/moby-dev
>
>
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at biomoby.org
> http://biomoby.org/mailman/listinfo/moby-dev


Wageningen University and Research centre (WUR)
Laboratory of Bioinformatics
Transitorium (building 312) room 1034
Dreijenlaan 3
6703 HA Wageningen
The Netherlands
phone: 0317-483 060
fax: 0317-483 584
mobile: 06-143 66 783
pieter.neerincx at wur.nl






More information about the MOBY-dev mailing list