NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Problems sending array from NuSoap client


Joined: 03 Sep 2005
Posts: 3
Reply with quote
Firstly please accept my apologies for any misuse of terminology. I'm new to this, but learning. I am trying to convert a script from Perl to PHP. The script written in Perl makes use of SOAP:Lite. The first requests were very easy to get working with NuSoap, then I hit a stumbling block when trying to send an array. The relevent part of the WSDL is listed below..

Code:

<wsdl:part name="domains" type="impl:ArrayOf_xsd_anyType" />


When using SOAP::Lite the following request is sent and the server accepts the request..

Code:

<domains xsi:type="impl:ArrayOf_xsd_anyType" SOAP-ENC:arrayType="xsd:string[2]">
<item xsi:type="xsd:string">myserver</item>
<item xsi:type="xsd:string">test.com</item>
</domains>


When using NuSoap the following request is sent..

Code:

<domains xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:anyType[2]">
<item xsi:type="xsd:anyType">myserver</item>
<item xsi:type="xsd:anyType">test.com</item>
</domains>


The request generated by NuSoap causes the server to produce the following error..

Code:

soapenv:Server.generalException: [org.apache.axis.AxisFault : ; nested exception is:
org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType]; nested exception is:
coldfusion.xml.rpc.CFCInvocationException: [org.apache.axis.AxisFault : ; nested exception is:
org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType]


I know I could hard code the response, but I would like to keep it quite flexible with NuSoap generating the response. Could anyone advise me on how I could get NuSoap to handle this 'correctly' please?
View user's profileFind all posts by justbobetSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7881
Reply with quote
I'd recommend you to read this article
http://www.scottnichol.com/nusoapprog.htm
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Sep 2005
Posts: 3
Reply with quote
Hi ddmitrie. I have read the article you suggested, but it hasn't helped me work out where the problem is. Would NuSOAP support the handling of this array?
View user's profileFind all posts by justbobetSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7881
Reply with quote
sorry, forgot that sometimes the structures are complex...
Please proceed with this part
http://www.scottnichol.com/nusoapprog2.htm
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Sep 2005
Posts: 3
Reply with quote
In the end I used soapval on each element of the array. Thanks for you help.
View user's profileFind all posts by justbobetSend private message
Problems sending array from NuSoap client
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic