logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: ArrayOfITEM - how to return data (array): msg#00015

Subject: Re: ArrayOfITEM - how to return data (array)
One problem is xsd:ORDERRESPONSE_ITEM.  The xsd prefix asserts that the 
ORDERRESPONSE_ITEM type is defined in the XML Schema Definition, which it is 
not.  It is defined in the current namespace, which NuSOAP assigns the prefix 
tns.

Note that addComplexType only supports rpc/encoded service methods.  The 
definition you use,

 <xsd:complexType name="ArrayOfORDERRESPONSE_ITEM">
 <xsd:sequence>
 <xsd:element name="ORDERRESPONSE_ITEM" type="xsd:ORDERRESPONSE_ITEM" 
minOccurs="0" maxOccurs="unbounded" />
 </xsd:sequence>
 </xsd:complexType>

is more typically used in document/literal service methods.  It is valid for 
rpc/encoded, but the SOAP spec is not specific on how to handle it, compared to 

 <xsd:complexType name="ArrayOfORDERRESPONSE_ITEM">
 <xsd:complexContent>
 <xsd:restriction base="SOAP-ENC:Array">
 <xsd:attribute ref="SOAP-ENC:arrayType" 
wsdl:arrayType="tns:ORDERRESPONSE_ITEM[]"/>
 </xsd:restriction>
 </xsd:complexContent>
 </xsd:complexType>

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "frank dege" <fd@xxxxxxxxxxxxxxxxxx>
To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx>
Sent: Saturday, December 04, 2004 6:17 AM
Subject: RE: [Nusoap-general] ArrayOfITEM - how to return data (array)


hi scott,

we don´t use a file. we are using version 1.81 and 
$soap->wsdl->addComplexType()  to define the wsdl.

the client is a .net client. the problem is, that .net uses the ArrayOf in 
order to generate an array.

we tried to fill a structure like

$ot_new ["ORDERRESPONSE_ITEM_LIST"]["ORDERRESPONSE_ITEM"][0]["LINE_ITEMID"]
and return it to the client. the client only received a empty list. i don´t 
have a actual log of the xml the client
received.


..
<ORDERRESPONSE_ITEM_LIST><ORDERRESPONSE_ITEM></ORDERRESPONSE_ITEM></ORDERRESPONSE_ITEM_LIST>

i looked a the class nusoap.php and saw, that nusoap treats a typ with names 
like "ArrayOf" in a different way.
so i think we have to provide the data returned by the webservice also in 
special way or?


frank

>-----Ursprüngliche Nachricht-----
>Von: nusoap-general-admin@xxxxxxxxxxxxxxxxxxxxx
>[mailto:nusoap-general-admin@xxxxxxxxxxxxxxxxxxxxx]Im Auftrag von Scott
>Nichol
>Gesendet: Freitag, 3. Dezember 2004 20:20
>An: nusoap-general@xxxxxxxxxxxxxxxxxxxxx
>Betreff: Re: [Nusoap-general] ArrayOfITEM - how to return data (array)
>
>
>Is it correct that you are using an external WSDL file with
>your NuSOAP server, i.e. you have
>
>$wsdlfile = '/path/to/file';
>$server = new soap_server($wsdlfile);
>...
>
>What version of NuSOAP are you using?
>
>Do you know what XML the client is receiving?
>
>Scott Nichol
>
>Do not send e-mail directly to this e-mail address,
>because it is filtered to accept only mail from
>specific mail lists.
>----- Original Message -----
>From: "frank dege" <fd@xxxxxxxxxxxxxxxxxx>
>To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx>
>Sent: Friday, December 03, 2004 7:03 AM
>Subject: [Nusoap-general] ArrayOfITEM - how to return data (array)
>
>
>>
>> hi,
>>
>> we have a problem returning data for an array. the array is
>not transfered to the client.
>>
>> we try to use a wsdl-format on a nusoap-server connected to
>a .net client.  the ms-client needs a ArrayOfITEM
>> declaration.
>> nusoap treats a type containing "ArrayOf" in a special way.
>What structure is expected?
>>
>> how to we have to return the data for a ArrayOf?  $ot_new
>["ORDERRESPONSE_ITEM_LIST"]["ORDERRESPONSE_ITEM"][] does not
>> work!
>>
>>
>>
>> our wsdl looks like:
>>
>> - <xsd:complexType name="ORDERRESPONSE_ITEM">
>> - <xsd:sequence>
>>   <xsd:element name="LINE_ITEM_ID" type="xsd:string" />
>>   <xsd:element name="ARTICLE_ID" type="tns:ARTICLE_ID" />
>>   <xsd:element name="QUANTITY" type="xsd:decimal" />
>>   <xsd:element name="ORDER_UNIT" type="xsd:string" />
>>   <xsd:element name="ARTICLE_PRICE" type="tns:ARTICLE_PRICE"
>minOccurs="0" />
>>   <xsd:element name="DELIVERY_DATE" type="xsd:string"
>minOccurs="0" />
>>   <xsd:element name="REMARK" type="xsd:string" minOccurs="0" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>> - <xsd:complexType name="ArrayOfORDERRESPONSE_ITEM">
>> - <xsd:sequence>
>>   <xsd:element name="ORDERRESPONSE_ITEM"
>type="xsd:ORDERRESPONSE_ITEM" minOccurs="0" maxOccurs="unbounded" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>> - <xsd:complexType name="ORDERRESPONSE">
>> - <xsd:sequence>
>>   <xsd:element name="ORDERRESPONSE_HEADER"
>type="tns:ORDERRESPONSE_HEADER" minOccurs="0" maxOccurs="1" />
>>   <xsd:element name="ORDERRESPONSE_ITEM_LIST"
>type="tns:ArrayOfORDERRESPONSE_ITEM" minOccurs="0" maxOccurs="1" />
>>   <xsd:element name="ORDERRESPONSE_SUMMARY"
>type="tns:ORDERRESPONSE_SUMMARY" minOccurs="0" maxOccurs="1" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>>
>>
>> regards
>>
>> frank dege
>>
>>
>>
>>
>> -------------------------------------------------------
>> SF email is sponsored by - The IT Product Guide
>> Read honest & candid reviews on hundreds of IT Products from
>real users.
>> Discover which products truly live up to the hype. Start
>reading now.
>> http://productguide.itmanagersjournal.com/
>> _______________________________________________
>> Nusoap-general mailing list
>> Nusoap-general@xxxxxxxxxxxxxxxxxxxxx
>> https://lists.sourceforge.net/lists/listinfo/nusoap-general
>>
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from
>real users.
>Discover which products truly live up to the hype. Start reading now.
>http://productguide.itmanagersjournal.com/
>_______________________________________________
>Nusoap-general mailing list
>Nusoap-general@xxxxxxxxxxxxxxxxxxxxx
>https://lists.sourceforge.net/lists/listinfo/nusoap-general
>
>




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Nusoap-general mailing list
Nusoap-general@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/nusoap-general



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/


<Prev in Thread] Current Thread [Next in Thread>