xml-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Nichol <snicholn...@scottnichol.com>
Subject Re: apacheSOAP & NuSOAP
Date Wed, 11 Sep 2002 16:50:08 GMT
xsd:ur-type exists, xsd:array does not.  The xsd prefix refers to the XML
schema, which defines the simple type ur-type.  The XML schema does not
define a type named array.

What do you mean by "multiple array"?  In your SOAP envelope, it looks like
you have a single dimensional array of some complex type (which you refer to
as "book-data").  If so, the XML should look like

<return xmlns:ns1="your-urn" xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="ns1:bookdata[8]">
<item xsi:type="ns1:bookdata">
<title xsi:type="xsd:string">Techniques for the measurement of
transpiration of individual plants</title>
<imprint xsi:type="xsd:string">^aParis^bUnesco^c-1965</imprint>
<collation xsi:type="xsd:string">^ap. 211-224^billus.</collation>
<authors xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[2]">
<item xsi:type="xsd:string">Magalhaes, A.C.</item>
<item xsi:type="xsd:string">Franco, C.M.</item>
</authors>
<series xsi:type="xsd:string">Methodology of plant eco-physiology:
proceedings of the Montpellier Symposium</series>
<notes xsi:type="xsd:string">Incl. bibl.</notes>
<keywords xsi:type="xsd:string">Paper on: &amp;lt;plant
physiology&amp;gt;&amp;lt;plant transpiration&amp;gt;&amp;lt;measurement
and instruments&amp;gt;</keywords>
</item>
<item xsi:type="ns1:bookdata"> ... (7 more alike the above here) </item>
</return>

Scott Nichol

----- Original Message -----
From: "Guntur N. Sarwohadi" <guntur_52@ugm.ac.id>
To: <soap-user@xml.apache.org>
Sent: Wednesday, September 11, 2002 12:09 PM
Subject: RE: apacheSOAP & NuSOAP


Hi Scott,..

The <item> should be a multiple array. The plot in PHP was that I will
retrieve a multiple array of book-data (authors, title, etc) from a
database and return the array through SOAP. Does that mean I need to map
the return value?

I am also trying to do the same plot in java (the big idea was,
php-soapserver returns a multiple array of strings & arrays and
java-soapclient recieves it, vice-versa), but recently notice that Java
can't create multiple array's of strings.. I'm learning to do it with
collections.. have any suggestions?

Sorry if I may be blunt, but I've seen something like this:

<SOAP-ENC:Array SOAP-ENC:arrayType="xsd:ur-type[4]">
   <thing xsi:type="xsd:int">12345</thing>
   <thing xsi:type="xsd:decimal">6.789</thing>
   <thing xsi:type="xsd:string">
      Of Mans First Disobedience, and the Fruit
      Of that Forbidden Tree, whose mortal tast
      Brought Death into the World, and all our woe,
   </thing>
   <thing xsi:type="xsd:uriReference">
      http://www.dartmouth.edu/~milton/reading_room/
   </thing>
</SOAP-ENC:Array>

in the SOAP spec from w3.org.. it says this is permitted and valid..
(correct me if I'm wrong).. how different is this code with mine?

Thanks a bunch..

Regards,
Guntur


-----Original Message-----
From: Scott Nichol [mailto:snicholnews@scottnichol.com]
Sent: Wednesday, September 11, 2002 7:47 PM
To: soap-user@xml.apache.org
Subject: Re: apacheSOAP & NuSOAP

There is no such thing as xsd:array.

What is the type of each <item>?  Is each a Book?

Look at the Authors element:

<authors xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[2]">
<item xsi:type="xsd:string">Magalhaes, A.C.</item>
<item xsi:type="xsd:string">Franco, C.M.</item>
</authors>

The SOAP-ENC:arrayType attribute give the type of each element.  In this
case, the elements are the simple type xsd:string.  In your return
value,
the elements would appear to be some complex type you define.

Scott Nichol

----- Original Message -----
From: "Guntur N. Sarwohadi" <guntur_52@ugm.ac.id>
To: <soap-user@xml.apache.org>
Sent: Wednesday, September 11, 2002 3:56 AM
Subject: RE: apacheSOAP & NuSOAP


Hi,...

In that case, if I set the <item> to <item xsi:type="xsd:array">, it
should work, shouldn't it? Because I've notice the output of a
successful SOAP-client/server using arrays and the return element had a
SOAP-ENC:arrayType="ns1:quotation[2]" attribut  and the item subelement
was something like: <item xsi:type="ns1:quotation">

Regards,
Guntur

-----Original Message-----
From: Scott Nichol [mailto:snicholnews@scottnichol.com]
Sent: Tuesday, September 10, 2002 11:45 AM
To: soap-user@xml.apache.org
Subject: Re: apacheSOAP & NuSOAP

There is no such thing as xsd:array.  In the element

    <return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:array[8]">

The arrayType should indicate the type of each array element, in this
case,
the type of each <item>.

Scott Nichol

----- Original Message -----
From: "Guntur N. Sarwohadi" <guntur_52@ugm.ac.id>
To: <soap-user@xml.apache.org>
Sent: Monday, September 09, 2002 11:46 PM
Subject: apacheSOAP & NuSOAP


Hello..

I am attempting to communicate an apacheSOAP SOAPclient with NuSOAP (PHP
backend) SOAPserver, but somehow the apacheSOAP keeps giving back a SOAP
Fault, something like:

Error SOAPException (SOAP-ENV:Client): No mapping found for
'http://www.w3.org/2001/XMLSchema:array' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'.

While the output of NuSOAP looks like:

<?xml version="1.0"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:si="http://soapinterop.org/xsd">
<SOAP-ENV:Body>
<searchJTEResponse>
<return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:array[8]">
<item>
<title xsi:type="xsd:string">Techniques for the measurement of
transpiration of individual plants</title>
<imprint xsi:type="xsd:string">^aParis^bUnesco^c-1965</imprint>
<collation xsi:type="xsd:string">^ap. 211-224^billus.</collation>
<authors xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[2]">
<item xsi:type="xsd:string">Magalhaes, A.C.</item>
<item xsi:type="xsd:string">Franco, C.M.</item>
</authors>
<series xsi:type="xsd:string">Methodology of plant eco-physiology:
proceedings of the Montpellier Symposium</series>
<notes xsi:type="xsd:string">Incl. bibl.</notes>
<keywords xsi:type="xsd:string">Paper on: &amp;lt;plant
physiology&amp;gt;&amp;lt;plant transpiration&amp;gt;&amp;lt;measurement
and instruments&amp;gt;</keywords>
</item>
<item> ... (7 more alike the above here) </item>
</return>
</searchJTEResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

is the problem generated by my Java SOAPclient or the PHP SOAPserver
needs to do something I should add to it?

Regards,
Guntur


--
To unsubscribe, e-mail:   <mailto:soap-user-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-user-help@xml.apache.org>




--
To unsubscribe, e-mail:   <mailto:soap-user-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-user-help@xml.apache.org>


--
To unsubscribe, e-mail:   <mailto:soap-user-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-user-help@xml.apache.org>




--
To unsubscribe, e-mail:   <mailto:soap-user-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-user-help@xml.apache.org>


--
To unsubscribe, e-mail:   <mailto:soap-user-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-user-help@xml.apache.org>




--
To unsubscribe, e-mail:   <mailto:soap-user-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-user-help@xml.apache.org>


Mime
View raw message