PDA

View Full Version : soap client generating <multiRef> for short type


mmenti
06-28-2005, 04:59 AM
Hi,

I've found something that caused me a problem when attempting to integrate Laszlo with a web service: for some reason the Laszlo soap client seems to create a <multiRef> for data of type short, which causes the web service to return a SOAP Invalid Request error.

This is from the WSDL:

<message name="PostInterviewEventIn">
<part name="InterviewSessionToken" type="s:string"/>
<part name="ForceRestart" type="s:short"/>
<part name="PlayerXML" type="s:string"/>
</message>

When using a protocol sniffer, I can see that this is what is sent from the Laszlo application:

<soapenv:Envelope·xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"·xmlns:xsd="http://www.w3.org/2001/XMLSchema"·xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:PostInterviewEvent·soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"·xmlns:ns1="urn:mrIEngWS">
<InterviewSessionToken·xsi:type="xsd:string">6n234n2f2wrejlf3tl4x2iv4le5bmaqa</InterviewSessionToken>
<ForceRestart·href="#id0"/>
<PlayerXML·xsi:type="xsd:string">&lt;Page·SavePoint=&quot;single&quot;&gt;&lt;Question·QuestionName=&quot;s ingle&quot;&gt;&lt;Response&gt;&lt;Value&gt;{Yes}&lt;/Value&gt;&lt;/Response&gt;&lt;/Question&gt;&lt;Navigation·Type=&quot;Next&quot;·IsSelected=&quot;true&quot;/&gt;&lt;/Page&gt;</PlayerXML>
</ns1:PostInterviewEvent>
<multiRef·id="id0"·soapenc:root="0"·soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"·xsi:type="xsd:short"·xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1</multiRef>
</soapenv:Body>
</soapenv:Envelope>

If I do the same call in Perl (using SOAP::Lite), it sends this:

<?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>
<namesp7:PostInterviewEvent·xmlns:namesp7="urn:mrIEngWS">
<InterviewSessionToken·xsi:type="ns:string"·xmlns:ns="http://www.w3.org/2001/XMLSchema">vm2imiguzp4ulorzaurdink4qu2bmaqa</InterviewSessionToken>
<ForceRestart·xsi:type="ns:short"·xmlns:ns="http://www.w3.org/2001/XMLSchema">1</ForceRestart>
<PlayerXML·xsi:type="ns:string"·xmlns:ns="http://www.w3.org/2001/XMLSchema"><Page·SavePoint="single"><Question·QuestionName="single"><Response><Value>{Yes}</Value></Response></Question><Navigation·Type="Next"·IsSelected="true"/></Page></PlayerXML>
</namesp7:PostInterviewEvent>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

You can see that SOAP::Lite hasn't created the <multiRef>, and works with the web service, while the Laszlo client generates the <multiRef>, which appears to cause a SOAP error with the web service.

I can (sort of) work around this by editing the wsdl and change s:short to s:string, but was wondering if anyone knew what was going on here?

Many thanks for your help,
Mario.

mmenti
07-04-2005, 02:34 AM
I'm answering my own question here, but just in case anyone else comes across this:

adding ...

<globalConfiguration>
<parameter name="sendMultiRefs" value="false"/>
</globalConfiguration>

... to client-config.wsdd in Server\lps-3.0\WEB-INF\lps\config stops the SOAP client sending multiRefs, and makes it the Laszlo app work with .NET web services like the one I was using that don't like multiRefs.