how to serialze in soap::lite

R

Rushikesh Joshi

Problem:
Whenever i have called your stringArray method with argument of Array
for different style. It work like below...

#Pass XML without XML Serialiser & Vector by value
#Pass XML with XML Serialiser & Vector by value
#No any difference in both case
<namesp1:stringArrTest
xmlns:namesp1="com.logicboxes.foundation.sfnb.user.Test">
<stringArrParam xmlns:ns="com.logicboxes.foundation.sfnb.user.Test"
xsi:type="ns:ArrayOf_xsd_string">A</stringArrParam>
<c-gensym4 xsi:type="xsd:string">B</c-gensym4>
<c-gensym6 xsi:type="xsd:string">C</c-gensym6>
</namesp1:stringArrTest>

Error String
<faultstring>
org.xml.sax.SAXException: Deserializing parameter
&apos;stringArrParam&apos;: could not find deserializer for type
{com.logicboxes.foundation.sfnb.user.Test}ArrayOf_xsd_string
</faultstring>
-------------------------------------------------------------------------------------------------------------


#Pass XML with XML Serialiser & Vector by Reference
<namesp1:stringArrTest
xmlns:namesp1="com.logicboxes.foundation.sfnb.user.Test">
<stringArrParam xmlns:ns="com.logicboxes.foundation.sfnb.user.Test"
xsi:type="ns:ArrayOf_xsd_string">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;Vector xmlns="http://localhost/Schemas/VectorSchema.xsd"&gt;
&lt;item&gt;A&lt;/item&gt;
&lt;item&gt;B&lt;/item&gt;
&lt;item&gt;C&lt;/item&gt;
&lt;/Vector&gt;
</stringArrParam>
</namesp1:stringArrTest>

Error String
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>
org.xml.sax.SAXException: Deserializing parameter
&apos;stringArrParam&apos;: could not find deserializer for type
{com.logicboxes.foundation.sfnb.user.Test}ArrayOf_xsd_string
</faultstring>
-------------------------------------------------------------------------------------------------------------


#Pass XML without XML Serialiser & Vector by Reference
<namesp1:stringArrTest
xmlns:namesp1="com.logicboxes.foundation.sfnb.user.Test">
<stringArrParam SOAP-ENC:arrayType="xsd:string[3]"
xmlns:ns="com.logicboxes.foundation.sfnb.user.Test"
xsi:type="ns:ArrayOf_xsd_string">
<item xsi:type="xsd:string">A</item>
<item xsi:type="xsd:string">B</item>
<item xsi:type="xsd:string">C</item>
</stringArrParam>
</namesp1:stringArrTest>

Error String
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: No deserializer defined for
array type {http://www.w3.org/1999/XMLSchema}string</faultstring>
-------------------------------------------------------------------------------------------------------------

Problem
Now whenever i have called your IntArray method withour any arguments
it returns below error.

<faultcode>soapenv:Server.generalException</faultcode>
<faultstring>Method &apos;intArrTest&apos; does not match any of the
valid signatures for message-style service methods
</faultstring>
-------------------------------------------------------------------------------------------------------------

Problem
Now my question is how can i serialize this inputs actually the same
XML for PHP/JAVA & .NET works fine.
Once look at below input that works fine.

For PHP/JAVA
<stringArrParam xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="xsd:string[3]">
<item xsi:type="xsd:string">A</item>
<item xsi:type="xsd:string">B</item>
<item xsi:type="xsd:string">C</item>
</stringArrParam>

For .NET
<stringArrParam href="#id1" />
<soapenc:Array id="id1" soapenc:arrayType="xsd:string[3]">
<item xsi:type="xsd:string">A</item>
<item xsi:type="xsd:string">B</item>
<item xsi:type="xsd:string">C</item>
</soapenc:Array>

Thanks & Regards,
Rushikesh Joshi
Mega E-Services Pvt. Ltd.
AIM:MESRushikesh
(e-mail address removed)
Tel: +91 (22) 22023015/5837
Fax: +91 (22) 22843963
Cell: +91-98195-93095
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top