You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by s....@tin.it on 2002/07/23 12:34:25 UTC

Problems with complexTipe

hi!
I have to do un application that use a service which exploits a WSDL like
this:
- <types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://www.xml-webservices.net/services/maths">
- <s:element name="Add">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" /> 
  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" /> 
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:element name="AddResponse">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
/> 
  </s:sequence>
  </s:complexType>
  </s:element>
...
- <message name="AddSoapIn">
  <part name="parameters" element="s0:Add" /> 
  </message>
...
- <portType name="SimpleCalcSoap">
- <operation name="Add">
  <documentation>Add two numbers</documentation> 
  <input message="s0:AddSoapIn" /> 
  <output message="s0:AddSoapOut" /> 
  </operation>
...
- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"
/> 
- <operation name="Add">
  <soap:operation soapAction="http://www.xml-webservices.net/services/maths/Add"
style="document" /> 
- <input>
  <soap:body use="literal" /> 
  </input>
- <output>
  <soap:body use="literal" /> 
  </output>
  </operation>
...

How can I assign to the method "Add" the parameters?
If I do:
params.addElement(new Parameter("a", float.class, new Float(20), null));
params.addElement(new Parameter("b", float.class, new Float(20), null));
it doesn't work...
Where are the mistake?
Thanks.
Sonia


Re: Problems with complexTipe

Posted by Scott Nichol <sn...@scottnichol.com>.
In case you think I am simply punting by referring you to Axis, I thought I
would point out that the server used for MS SOAP interop uses rpc/encoded
messages (cf. http://www.mssoapinterop.org/asmx/simple.asmx?WSDL).  Simply
put, using rpc/encoded messages maximizes interoperability.  Services that
use doc/lit, such as the one at xml-webservices.net, will not interoperate
with as wide a set of other SOAP implementations.  What I personally find
amusing (sad, really) is that Microsoft chose doc/lit as the default
encoding when one uses VS.NET.  Unless all VS.NET programmers are trained to
override this to use rpc/encoded, there will be unnecessary interop
problems.

Scott Nichol

----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Tuesday, July 23, 2002 1:35 PM
Subject: Re: Problems with complexTipe


> I think your English is quite good; certainly excellent compared to my
> Italian!  Anyway, a wire dump is just what you sent.  I really don't
> understand the problem the server is having.
>
> To investigate, I wrote and ran my own client.  I got the same result as
> you.
>
> Then I checked the WSDL.  The operation is defined as
>
> - <operation name="Add">
>   <soap:operation
> soapAction="http://www.xml-webservices.net/services/maths/Add"
> style="document" />
> - <input>
>   <soap:body use="literal" />
>   </input>
> - <output>
>   <soap:body use="literal" />
>   </output>
>   </operation>
>
> I believe the problem is the document/literal encoding.  Apache SOAP is
> sending (and expecting) rpc/encoded messages.  My understanding is that
you
> should have success using Axis (http://xml.apache.org/axis) as a client,
> since it supports WSDL and doc/lit encoding.
>
> Scott Nichol
>
> ----- Original Message -----
> From: <s....@tin.it>
> To: <so...@xml.apache.org>
> Sent: Tuesday, July 23, 2002 11:30 AM
> Subject: Re: Problems with complexTipe
>
>
> ok, I have eliminated the problem of mix of schema 1999 and 2001 but it
> doesn't work anyway. I don't speak English very well so I don't know the
> meaning of "wire dump", however the message that I send is:
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:Add xmlns:ns1="http://www.xml-webservices.net/services/maths"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <a xmlns:ns2="http://www.w3.org/2001/XMLSchema"
> xsi:type="ns2:float">20.0</a>
> <b xmlns:ns3="http://www.w3.org/2001/XMLSchema"
> xsi:type="ns3:float">30.0</b>
> </ns1:Add>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> and this is the message I receive:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <soap:Body>
> <AddResponse xmlns="http://www.xml-webservices.net/services/maths">
> <AddResult>0</AddResult>
> </AddResponse>
> </soap:Body>
> </soap:Envelope>
>
> There are not fault.
>
> I've tryed sending the following message changing at runtime the value of
> playload  and the service has responsed me correctly with 50 as retur
value:
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <Add xmlns="http://www.xml-webservices.net/service/math">
>       <a>20</a>
>       <b>30</b>
>     </Add>
>   </soap:Body>
> </soap:Envelope>>
>
>
>
>
>
> >-- Messaggio originale --
> >Reply-To: soap-dev@xml.apache.org
> >Date: Tue, 23 Jul 2002 10:02:18 -0400
> >From: Scott Nichol <sn...@scottnichol.com>
> >Subject: Re: Problems with complexTipe
> >To: soap-dev@xml.apache.org
> >
> >
> >Well, you cannot get Apache SOAP to send exactly the message you show
using
> >the RPC code, because it will always sent xsi:type for the parameters.
>  That
> >should not be a problem, however.  One thing I notice is the mix of 1999
> >and
> >2001 XML schemas.  You might want to specify an encoding type of null in
> >the
> >Parameter constructor so that you will not have this mix.  Even so, if
> this
> >were a problem for the web service, I would expect it to return a fault,
> >not
> >an incorrect answer.  Do you have a wire dump of the response message?
> >
> >Scott Nichol
> >
> >----- Original Message -----
> >From: <s....@tin.it>
> >To: <so...@xml.apache.org>
> >Sent: Tuesday, July 23, 2002 9:34 AM
> >Subject: Re: Problems with complexTipe
> >
> >
> >thanks Scott.
> >I don't receive any error messages, but the response value is constantly
> >zero...
> >I know that the message i have to send is this:
> >
> ><?xml version="1.0" encoding="utf-8"?>
> ><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >  <soap:Body>
> >    <Add xmlns="http://www.xml-webservices.net/service/math">
> >      <a>20</a>
> >      <b>30</b>
> >    </Add>
> >  </soap:Body>
> ></soap:Envelope>>
> >
> >But I don't know how can I create this message with Apache SOAP 2.2
because
> >for every parameters I have to set the encodingStyle, the class, the
> >value...
> >So the message that I create is:
> >
> ><?xml version='1.0' encoding='UTF-8'?>
> ><SOAP-ENV:Envelope
> >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> >xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> ><SOAP-ENV:Body>
> ><ns1:Add xmlns:ns1="http://www.xml-webservices.net/service/math"
> >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> ><a xmlns:ns2="http://www.w3.org/2001/XMLSchema"
xsi:type="ns2:float">20</a>
> ><b xmlns:ns3="http://www.w3.org/2001/XMLSchema"
xsi:type="ns3:float">30</b>
> ></ns1:Add>
> ></SOAP-ENV:Body>
> ></SOAP-ENV:Envelope>
> >
> >Do you know how I can do.
> >
> >thanks again...
> >
> >
> >
> >-- Messaggio originale --
> >>Reply-To: soap-dev@xml.apache.org
> >>Date: Tue, 23 Jul 2002 08:45:17 -0400
> >>From: Scott Nichol <sn...@scottnichol.com>
> >>Subject: Re: Problems with complexTipe
> >>To: soap-dev@xml.apache.org
> >>
> >>
> >>Sonia,
> >>
> >>It would be helpful if you could post the error message you receive.
> Your
> >>parameter assignments look good, so I wonder whether there might be some
> >>other problem.
> >>
> >>Scott Nichol
> >>
> >>----- Original Message -----
> >>From: <s....@tin.it>
> >>To: <xm...@apache.org>
> >>Sent: Tuesday, July 23, 2002 6:34 AM
> >>Subject: Problems with complexTipe
> >>
> >>
> >>hi!
> >>I have to do un application that use a service which exploits a WSDL
like
> >>this:
> >>- <types>
> >>- <s:schema elementFormDefault="qualified"
> >>targetNamespace="http://www.xml-webservices.net/services/maths">
> >>- <s:element name="Add">
> >>- <s:complexType>
> >>- <s:sequence>
> >>  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
> >>  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
> >>  </s:sequence>
> >>  </s:complexType>
> >>  </s:element>
> >>- <s:element name="AddResponse">
> >>- <s:complexType>
> >>- <s:sequence>
> >>  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
> >>/>
> >>  </s:sequence>
> >>  </s:complexType>
> >>  </s:element>
> >>...
> >>- <message name="AddSoapIn">
> >>  <part name="parameters" element="s0:Add" />
> >>  </message>
> >>...
> >>- <portType name="SimpleCalcSoap">
> >>- <operation name="Add">
> >>  <documentation>Add two numbers</documentation>
> >>  <input message="s0:AddSoapIn" />
> >>  <output message="s0:AddSoapOut" />
> >>  </operation>
> >>...
> >>- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
> >>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> >>style="document"
> >>/>
> >>- <operation name="Add">
> >>  <soap:operation
> >>soapAction="http://www.xml-webservices.net/services/maths/Add"
> >>style="document" />
> >>- <input>
> >>  <soap:body use="literal" />
> >>  </input>
> >>- <output>
> >>  <soap:body use="literal" />
> >>  </output>
> >>  </operation>
> >>...
> >>
> >>How can I assign to the method "Add" the parameters?
> >>If I do:
> >>params.addElement(new Parameter("a", float.class, new Float(20), null));
> >>params.addElement(new Parameter("b", float.class, new Float(20), null));
> >>it doesn't work...
> >>Where are the mistake?
> >>Thanks.
> >>Sonia
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >>For additional commands, e-mail: <ma...@xml.apache.org>
> >>
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >>For additional commands, e-mail: <ma...@xml.apache.org>
> >>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >For additional commands, e-mail: <ma...@xml.apache.org>
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >For additional commands, e-mail: <ma...@xml.apache.org>
> >
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Problems with complexTipe

Posted by Scott Nichol <sn...@scottnichol.com>.
In case you think I am simply punting by referring you to Axis, I thought I
would point out that the server used for MS SOAP interop uses rpc/encoded
messages (cf. http://www.mssoapinterop.org/asmx/simple.asmx?WSDL).  Simply
put, using rpc/encoded messages maximizes interoperability.  Services that
use doc/lit, such as the one at xml-webservices.net, will not interoperate
with as wide a set of other SOAP implementations.  What I personally find
amusing (sad, really) is that Microsoft chose doc/lit as the default
encoding when one uses VS.NET.  Unless all VS.NET programmers are trained to
override this to use rpc/encoded, there will be unnecessary interop
problems.

Scott Nichol

----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Tuesday, July 23, 2002 1:35 PM
Subject: Re: Problems with complexTipe


> I think your English is quite good; certainly excellent compared to my
> Italian!  Anyway, a wire dump is just what you sent.  I really don't
> understand the problem the server is having.
>
> To investigate, I wrote and ran my own client.  I got the same result as
> you.
>
> Then I checked the WSDL.  The operation is defined as
>
> - <operation name="Add">
>   <soap:operation
> soapAction="http://www.xml-webservices.net/services/maths/Add"
> style="document" />
> - <input>
>   <soap:body use="literal" />
>   </input>
> - <output>
>   <soap:body use="literal" />
>   </output>
>   </operation>
>
> I believe the problem is the document/literal encoding.  Apache SOAP is
> sending (and expecting) rpc/encoded messages.  My understanding is that
you
> should have success using Axis (http://xml.apache.org/axis) as a client,
> since it supports WSDL and doc/lit encoding.
>
> Scott Nichol
>
> ----- Original Message -----
> From: <s....@tin.it>
> To: <so...@xml.apache.org>
> Sent: Tuesday, July 23, 2002 11:30 AM
> Subject: Re: Problems with complexTipe
>
>
> ok, I have eliminated the problem of mix of schema 1999 and 2001 but it
> doesn't work anyway. I don't speak English very well so I don't know the
> meaning of "wire dump", however the message that I send is:
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:Add xmlns:ns1="http://www.xml-webservices.net/services/maths"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <a xmlns:ns2="http://www.w3.org/2001/XMLSchema"
> xsi:type="ns2:float">20.0</a>
> <b xmlns:ns3="http://www.w3.org/2001/XMLSchema"
> xsi:type="ns3:float">30.0</b>
> </ns1:Add>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> and this is the message I receive:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <soap:Body>
> <AddResponse xmlns="http://www.xml-webservices.net/services/maths">
> <AddResult>0</AddResult>
> </AddResponse>
> </soap:Body>
> </soap:Envelope>
>
> There are not fault.
>
> I've tryed sending the following message changing at runtime the value of
> playload  and the service has responsed me correctly with 50 as retur
value:
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <Add xmlns="http://www.xml-webservices.net/service/math">
>       <a>20</a>
>       <b>30</b>
>     </Add>
>   </soap:Body>
> </soap:Envelope>>
>
>
>
>
>
> >-- Messaggio originale --
> >Reply-To: soap-dev@xml.apache.org
> >Date: Tue, 23 Jul 2002 10:02:18 -0400
> >From: Scott Nichol <sn...@scottnichol.com>
> >Subject: Re: Problems with complexTipe
> >To: soap-dev@xml.apache.org
> >
> >
> >Well, you cannot get Apache SOAP to send exactly the message you show
using
> >the RPC code, because it will always sent xsi:type for the parameters.
>  That
> >should not be a problem, however.  One thing I notice is the mix of 1999
> >and
> >2001 XML schemas.  You might want to specify an encoding type of null in
> >the
> >Parameter constructor so that you will not have this mix.  Even so, if
> this
> >were a problem for the web service, I would expect it to return a fault,
> >not
> >an incorrect answer.  Do you have a wire dump of the response message?
> >
> >Scott Nichol
> >
> >----- Original Message -----
> >From: <s....@tin.it>
> >To: <so...@xml.apache.org>
> >Sent: Tuesday, July 23, 2002 9:34 AM
> >Subject: Re: Problems with complexTipe
> >
> >
> >thanks Scott.
> >I don't receive any error messages, but the response value is constantly
> >zero...
> >I know that the message i have to send is this:
> >
> ><?xml version="1.0" encoding="utf-8"?>
> ><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >  <soap:Body>
> >    <Add xmlns="http://www.xml-webservices.net/service/math">
> >      <a>20</a>
> >      <b>30</b>
> >    </Add>
> >  </soap:Body>
> ></soap:Envelope>>
> >
> >But I don't know how can I create this message with Apache SOAP 2.2
because
> >for every parameters I have to set the encodingStyle, the class, the
> >value...
> >So the message that I create is:
> >
> ><?xml version='1.0' encoding='UTF-8'?>
> ><SOAP-ENV:Envelope
> >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> >xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> ><SOAP-ENV:Body>
> ><ns1:Add xmlns:ns1="http://www.xml-webservices.net/service/math"
> >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> ><a xmlns:ns2="http://www.w3.org/2001/XMLSchema"
xsi:type="ns2:float">20</a>
> ><b xmlns:ns3="http://www.w3.org/2001/XMLSchema"
xsi:type="ns3:float">30</b>
> ></ns1:Add>
> ></SOAP-ENV:Body>
> ></SOAP-ENV:Envelope>
> >
> >Do you know how I can do.
> >
> >thanks again...
> >
> >
> >
> >-- Messaggio originale --
> >>Reply-To: soap-dev@xml.apache.org
> >>Date: Tue, 23 Jul 2002 08:45:17 -0400
> >>From: Scott Nichol <sn...@scottnichol.com>
> >>Subject: Re: Problems with complexTipe
> >>To: soap-dev@xml.apache.org
> >>
> >>
> >>Sonia,
> >>
> >>It would be helpful if you could post the error message you receive.
> Your
> >>parameter assignments look good, so I wonder whether there might be some
> >>other problem.
> >>
> >>Scott Nichol
> >>
> >>----- Original Message -----
> >>From: <s....@tin.it>
> >>To: <xm...@apache.org>
> >>Sent: Tuesday, July 23, 2002 6:34 AM
> >>Subject: Problems with complexTipe
> >>
> >>
> >>hi!
> >>I have to do un application that use a service which exploits a WSDL
like
> >>this:
> >>- <types>
> >>- <s:schema elementFormDefault="qualified"
> >>targetNamespace="http://www.xml-webservices.net/services/maths">
> >>- <s:element name="Add">
> >>- <s:complexType>
> >>- <s:sequence>
> >>  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
> >>  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
> >>  </s:sequence>
> >>  </s:complexType>
> >>  </s:element>
> >>- <s:element name="AddResponse">
> >>- <s:complexType>
> >>- <s:sequence>
> >>  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
> >>/>
> >>  </s:sequence>
> >>  </s:complexType>
> >>  </s:element>
> >>...
> >>- <message name="AddSoapIn">
> >>  <part name="parameters" element="s0:Add" />
> >>  </message>
> >>...
> >>- <portType name="SimpleCalcSoap">
> >>- <operation name="Add">
> >>  <documentation>Add two numbers</documentation>
> >>  <input message="s0:AddSoapIn" />
> >>  <output message="s0:AddSoapOut" />
> >>  </operation>
> >>...
> >>- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
> >>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> >>style="document"
> >>/>
> >>- <operation name="Add">
> >>  <soap:operation
> >>soapAction="http://www.xml-webservices.net/services/maths/Add"
> >>style="document" />
> >>- <input>
> >>  <soap:body use="literal" />
> >>  </input>
> >>- <output>
> >>  <soap:body use="literal" />
> >>  </output>
> >>  </operation>
> >>...
> >>
> >>How can I assign to the method "Add" the parameters?
> >>If I do:
> >>params.addElement(new Parameter("a", float.class, new Float(20), null));
> >>params.addElement(new Parameter("b", float.class, new Float(20), null));
> >>it doesn't work...
> >>Where are the mistake?
> >>Thanks.
> >>Sonia
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >>For additional commands, e-mail: <ma...@xml.apache.org>
> >>
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >>For additional commands, e-mail: <ma...@xml.apache.org>
> >>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >For additional commands, e-mail: <ma...@xml.apache.org>
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >For additional commands, e-mail: <ma...@xml.apache.org>
> >
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>


Re: Problems with complexTipe

Posted by Scott Nichol <sn...@scottnichol.com>.
I think your English is quite good; certainly excellent compared to my
Italian!  Anyway, a wire dump is just what you sent.  I really don't
understand the problem the server is having.

To investigate, I wrote and ran my own client.  I got the same result as
you.

Then I checked the WSDL.  The operation is defined as

- <operation name="Add">
  <soap:operation
soapAction="http://www.xml-webservices.net/services/maths/Add"
style="document" />
- <input>
  <soap:body use="literal" />
  </input>
- <output>
  <soap:body use="literal" />
  </output>
  </operation>

I believe the problem is the document/literal encoding.  Apache SOAP is
sending (and expecting) rpc/encoded messages.  My understanding is that you
should have success using Axis (http://xml.apache.org/axis) as a client,
since it supports WSDL and doc/lit encoding.

Scott Nichol

----- Original Message -----
From: <s....@tin.it>
To: <so...@xml.apache.org>
Sent: Tuesday, July 23, 2002 11:30 AM
Subject: Re: Problems with complexTipe


ok, I have eliminated the problem of mix of schema 1999 and 2001 but it
doesn't work anyway. I don't speak English very well so I don't know the
meaning of "wire dump", however the message that I send is:
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:Add xmlns:ns1="http://www.xml-webservices.net/services/maths"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<a xmlns:ns2="http://www.w3.org/2001/XMLSchema"
xsi:type="ns2:float">20.0</a>
<b xmlns:ns3="http://www.w3.org/2001/XMLSchema"
xsi:type="ns3:float">30.0</b>
</ns1:Add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and this is the message I receive:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<AddResponse xmlns="http://www.xml-webservices.net/services/maths">
<AddResult>0</AddResult>
</AddResponse>
</soap:Body>
</soap:Envelope>

There are not fault.

I've tryed sending the following message changing at runtime the value of
playload  and the service has responsed me correctly with 50 as retur value:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Add xmlns="http://www.xml-webservices.net/service/math">
      <a>20</a>
      <b>30</b>
    </Add>
  </soap:Body>
</soap:Envelope>>





>-- Messaggio originale --
>Reply-To: soap-dev@xml.apache.org
>Date: Tue, 23 Jul 2002 10:02:18 -0400
>From: Scott Nichol <sn...@scottnichol.com>
>Subject: Re: Problems with complexTipe
>To: soap-dev@xml.apache.org
>
>
>Well, you cannot get Apache SOAP to send exactly the message you show using
>the RPC code, because it will always sent xsi:type for the parameters.
 That
>should not be a problem, however.  One thing I notice is the mix of 1999
>and
>2001 XML schemas.  You might want to specify an encoding type of null in
>the
>Parameter constructor so that you will not have this mix.  Even so, if
this
>were a problem for the web service, I would expect it to return a fault,
>not
>an incorrect answer.  Do you have a wire dump of the response message?
>
>Scott Nichol
>
>----- Original Message -----
>From: <s....@tin.it>
>To: <so...@xml.apache.org>
>Sent: Tuesday, July 23, 2002 9:34 AM
>Subject: Re: Problems with complexTipe
>
>
>thanks Scott.
>I don't receive any error messages, but the response value is constantly
>zero...
>I know that the message i have to send is this:
>
><?xml version="1.0" encoding="utf-8"?>
><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>  <soap:Body>
>    <Add xmlns="http://www.xml-webservices.net/service/math">
>      <a>20</a>
>      <b>30</b>
>    </Add>
>  </soap:Body>
></soap:Envelope>>
>
>But I don't know how can I create this message with Apache SOAP 2.2 because
>for every parameters I have to set the encodingStyle, the class, the
>value...
>So the message that I create is:
>
><?xml version='1.0' encoding='UTF-8'?>
><SOAP-ENV:Envelope
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/1999/XMLSchema">
><SOAP-ENV:Body>
><ns1:Add xmlns:ns1="http://www.xml-webservices.net/service/math"
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
><a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20</a>
><b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30</b>
></ns1:Add>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>Do you know how I can do.
>
>thanks again...
>
>
>
>-- Messaggio originale --
>>Reply-To: soap-dev@xml.apache.org
>>Date: Tue, 23 Jul 2002 08:45:17 -0400
>>From: Scott Nichol <sn...@scottnichol.com>
>>Subject: Re: Problems with complexTipe
>>To: soap-dev@xml.apache.org
>>
>>
>>Sonia,
>>
>>It would be helpful if you could post the error message you receive.
Your
>>parameter assignments look good, so I wonder whether there might be some
>>other problem.
>>
>>Scott Nichol
>>
>>----- Original Message -----
>>From: <s....@tin.it>
>>To: <xm...@apache.org>
>>Sent: Tuesday, July 23, 2002 6:34 AM
>>Subject: Problems with complexTipe
>>
>>
>>hi!
>>I have to do un application that use a service which exploits a WSDL like
>>this:
>>- <types>
>>- <s:schema elementFormDefault="qualified"
>>targetNamespace="http://www.xml-webservices.net/services/maths">
>>- <s:element name="Add">
>>- <s:complexType>
>>- <s:sequence>
>>  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
>>  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
>>  </s:sequence>
>>  </s:complexType>
>>  </s:element>
>>- <s:element name="AddResponse">
>>- <s:complexType>
>>- <s:sequence>
>>  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
>>/>
>>  </s:sequence>
>>  </s:complexType>
>>  </s:element>
>>...
>>- <message name="AddSoapIn">
>>  <part name="parameters" element="s0:Add" />
>>  </message>
>>...
>>- <portType name="SimpleCalcSoap">
>>- <operation name="Add">
>>  <documentation>Add two numbers</documentation>
>>  <input message="s0:AddSoapIn" />
>>  <output message="s0:AddSoapOut" />
>>  </operation>
>>...
>>- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
>>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>>style="document"
>>/>
>>- <operation name="Add">
>>  <soap:operation
>>soapAction="http://www.xml-webservices.net/services/maths/Add"
>>style="document" />
>>- <input>
>>  <soap:body use="literal" />
>>  </input>
>>- <output>
>>  <soap:body use="literal" />
>>  </output>
>>  </operation>
>>...
>>
>>How can I assign to the method "Add" the parameters?
>>If I do:
>>params.addElement(new Parameter("a", float.class, new Float(20), null));
>>params.addElement(new Parameter("b", float.class, new Float(20), null));
>>it doesn't work...
>>Where are the mistake?
>>Thanks.
>>Sonia
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>>For additional commands, e-mail: <ma...@xml.apache.org>
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>>For additional commands, e-mail: <ma...@xml.apache.org>
>>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>




Re: Problems with complexTipe

Posted by Indrasish N Basuroychowdhury <in...@fanniemae.com>.
Sonia,

Is your webservice written in .NET and client in Java? If yes, then this problem is typical and there is a solution.

Indrasish.

s.vignaroli@tin.it wrote:

> ok, I have eliminated the problem of mix of schema 1999 and 2001 but it
> doesn't work anyway. I don't speak English very well so I don't know the
> meaning of "wire dump", however the message that I send is:
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:Add xmlns:ns1="http://www.xml-webservices.net/services/maths" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20.0</a>
> <b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30.0</b>
> </ns1:Add>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> and this is the message I receive:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <soap:Body>
> <AddResponse xmlns="http://www.xml-webservices.net/services/maths">
> <AddResult>0</AddResult>
> </AddResponse>
> </soap:Body>
> </soap:Envelope>
>
> There are not fault.
>
> I've tryed sending the following message changing at runtime the value of
> playload  and the service has responsed me correctly with 50 as retur value:
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <Add xmlns="http://www.xml-webservices.net/service/math">
>       <a>20</a>
>       <b>30</b>
>     </Add>
>   </soap:Body>
> </soap:Envelope>>
>
> >-- Messaggio originale --
> >Reply-To: soap-dev@xml.apache.org
> >Date: Tue, 23 Jul 2002 10:02:18 -0400
> >From: Scott Nichol <sn...@scottnichol.com>
> >Subject: Re: Problems with complexTipe
> >To: soap-dev@xml.apache.org
> >
> >
> >Well, you cannot get Apache SOAP to send exactly the message you show using
> >the RPC code, because it will always sent xsi:type for the parameters.
>  That
> >should not be a problem, however.  One thing I notice is the mix of 1999
> >and
> >2001 XML schemas.  You might want to specify an encoding type of null in
> >the
> >Parameter constructor so that you will not have this mix.  Even so, if
> this
> >were a problem for the web service, I would expect it to return a fault,
> >not
> >an incorrect answer.  Do you have a wire dump of the response message?
> >
> >Scott Nichol
> >
> >----- Original Message -----
> >From: <s....@tin.it>
> >To: <so...@xml.apache.org>
> >Sent: Tuesday, July 23, 2002 9:34 AM
> >Subject: Re: Problems with complexTipe
> >
> >
> >thanks Scott.
> >I don't receive any error messages, but the response value is constantly
> >zero...
> >I know that the message i have to send is this:
> >
> ><?xml version="1.0" encoding="utf-8"?>
> ><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >  <soap:Body>
> >    <Add xmlns="http://www.xml-webservices.net/service/math">
> >      <a>20</a>
> >      <b>30</b>
> >    </Add>
> >  </soap:Body>
> ></soap:Envelope>>
> >
> >But I don't know how can I create this message with Apache SOAP 2.2 because
> >for every parameters I have to set the encodingStyle, the class, the
> >value...
> >So the message that I create is:
> >
> ><?xml version='1.0' encoding='UTF-8'?>
> ><SOAP-ENV:Envelope
> >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> >xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> ><SOAP-ENV:Body>
> ><ns1:Add xmlns:ns1="http://www.xml-webservices.net/service/math"
> >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> ><a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20</a>
> ><b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30</b>
> ></ns1:Add>
> ></SOAP-ENV:Body>
> ></SOAP-ENV:Envelope>
> >
> >Do you know how I can do.
> >
> >thanks again...
> >
> >
> >
> >-- Messaggio originale --
> >>Reply-To: soap-dev@xml.apache.org
> >>Date: Tue, 23 Jul 2002 08:45:17 -0400
> >>From: Scott Nichol <sn...@scottnichol.com>
> >>Subject: Re: Problems with complexTipe
> >>To: soap-dev@xml.apache.org
> >>
> >>
> >>Sonia,
> >>
> >>It would be helpful if you could post the error message you receive.
> Your
> >>parameter assignments look good, so I wonder whether there might be some
> >>other problem.
> >>
> >>Scott Nichol
> >>
> >>----- Original Message -----
> >>From: <s....@tin.it>
> >>To: <xm...@apache.org>
> >>Sent: Tuesday, July 23, 2002 6:34 AM
> >>Subject: Problems with complexTipe
> >>
> >>
> >>hi!
> >>I have to do un application that use a service which exploits a WSDL like
> >>this:
> >>- <types>
> >>- <s:schema elementFormDefault="qualified"
> >>targetNamespace="http://www.xml-webservices.net/services/maths">
> >>- <s:element name="Add">
> >>- <s:complexType>
> >>- <s:sequence>
> >>  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
> >>  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
> >>  </s:sequence>
> >>  </s:complexType>
> >>  </s:element>
> >>- <s:element name="AddResponse">
> >>- <s:complexType>
> >>- <s:sequence>
> >>  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
> >>/>
> >>  </s:sequence>
> >>  </s:complexType>
> >>  </s:element>
> >>...
> >>- <message name="AddSoapIn">
> >>  <part name="parameters" element="s0:Add" />
> >>  </message>
> >>...
> >>- <portType name="SimpleCalcSoap">
> >>- <operation name="Add">
> >>  <documentation>Add two numbers</documentation>
> >>  <input message="s0:AddSoapIn" />
> >>  <output message="s0:AddSoapOut" />
> >>  </operation>
> >>...
> >>- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
> >>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> >>style="document"
> >>/>
> >>- <operation name="Add">
> >>  <soap:operation
> >>soapAction="http://www.xml-webservices.net/services/maths/Add"
> >>style="document" />
> >>- <input>
> >>  <soap:body use="literal" />
> >>  </input>
> >>- <output>
> >>  <soap:body use="literal" />
> >>  </output>
> >>  </operation>
> >>...
> >>
> >>How can I assign to the method "Add" the parameters?
> >>If I do:
> >>params.addElement(new Parameter("a", float.class, new Float(20), null));
> >>params.addElement(new Parameter("b", float.class, new Float(20), null));
> >>it doesn't work...
> >>Where are the mistake?
> >>Thanks.
> >>Sonia
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >>For additional commands, e-mail: <ma...@xml.apache.org>
> >>
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >>For additional commands, e-mail: <ma...@xml.apache.org>
> >>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >For additional commands, e-mail: <ma...@xml.apache.org>
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >For additional commands, e-mail: <ma...@xml.apache.org>
> >
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Problems with complexTipe

Posted by Indrasish N Basuroychowdhury <in...@fanniemae.com>.
Sonia,

Is your webservice written in .NET and client in Java? If yes, then this problem is typical and there is a solution.

Indrasish.

s.vignaroli@tin.it wrote:

> ok, I have eliminated the problem of mix of schema 1999 and 2001 but it
> doesn't work anyway. I don't speak English very well so I don't know the
> meaning of "wire dump", however the message that I send is:
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:Add xmlns:ns1="http://www.xml-webservices.net/services/maths" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20.0</a>
> <b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30.0</b>
> </ns1:Add>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> and this is the message I receive:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <soap:Body>
> <AddResponse xmlns="http://www.xml-webservices.net/services/maths">
> <AddResult>0</AddResult>
> </AddResponse>
> </soap:Body>
> </soap:Envelope>
>
> There are not fault.
>
> I've tryed sending the following message changing at runtime the value of
> playload  and the service has responsed me correctly with 50 as retur value:
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <Add xmlns="http://www.xml-webservices.net/service/math">
>       <a>20</a>
>       <b>30</b>
>     </Add>
>   </soap:Body>
> </soap:Envelope>>
>
> >-- Messaggio originale --
> >Reply-To: soap-dev@xml.apache.org
> >Date: Tue, 23 Jul 2002 10:02:18 -0400
> >From: Scott Nichol <sn...@scottnichol.com>
> >Subject: Re: Problems with complexTipe
> >To: soap-dev@xml.apache.org
> >
> >
> >Well, you cannot get Apache SOAP to send exactly the message you show using
> >the RPC code, because it will always sent xsi:type for the parameters.
>  That
> >should not be a problem, however.  One thing I notice is the mix of 1999
> >and
> >2001 XML schemas.  You might want to specify an encoding type of null in
> >the
> >Parameter constructor so that you will not have this mix.  Even so, if
> this
> >were a problem for the web service, I would expect it to return a fault,
> >not
> >an incorrect answer.  Do you have a wire dump of the response message?
> >
> >Scott Nichol
> >
> >----- Original Message -----
> >From: <s....@tin.it>
> >To: <so...@xml.apache.org>
> >Sent: Tuesday, July 23, 2002 9:34 AM
> >Subject: Re: Problems with complexTipe
> >
> >
> >thanks Scott.
> >I don't receive any error messages, but the response value is constantly
> >zero...
> >I know that the message i have to send is this:
> >
> ><?xml version="1.0" encoding="utf-8"?>
> ><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >  <soap:Body>
> >    <Add xmlns="http://www.xml-webservices.net/service/math">
> >      <a>20</a>
> >      <b>30</b>
> >    </Add>
> >  </soap:Body>
> ></soap:Envelope>>
> >
> >But I don't know how can I create this message with Apache SOAP 2.2 because
> >for every parameters I have to set the encodingStyle, the class, the
> >value...
> >So the message that I create is:
> >
> ><?xml version='1.0' encoding='UTF-8'?>
> ><SOAP-ENV:Envelope
> >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> >xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> ><SOAP-ENV:Body>
> ><ns1:Add xmlns:ns1="http://www.xml-webservices.net/service/math"
> >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> ><a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20</a>
> ><b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30</b>
> ></ns1:Add>
> ></SOAP-ENV:Body>
> ></SOAP-ENV:Envelope>
> >
> >Do you know how I can do.
> >
> >thanks again...
> >
> >
> >
> >-- Messaggio originale --
> >>Reply-To: soap-dev@xml.apache.org
> >>Date: Tue, 23 Jul 2002 08:45:17 -0400
> >>From: Scott Nichol <sn...@scottnichol.com>
> >>Subject: Re: Problems with complexTipe
> >>To: soap-dev@xml.apache.org
> >>
> >>
> >>Sonia,
> >>
> >>It would be helpful if you could post the error message you receive.
> Your
> >>parameter assignments look good, so I wonder whether there might be some
> >>other problem.
> >>
> >>Scott Nichol
> >>
> >>----- Original Message -----
> >>From: <s....@tin.it>
> >>To: <xm...@apache.org>
> >>Sent: Tuesday, July 23, 2002 6:34 AM
> >>Subject: Problems with complexTipe
> >>
> >>
> >>hi!
> >>I have to do un application that use a service which exploits a WSDL like
> >>this:
> >>- <types>
> >>- <s:schema elementFormDefault="qualified"
> >>targetNamespace="http://www.xml-webservices.net/services/maths">
> >>- <s:element name="Add">
> >>- <s:complexType>
> >>- <s:sequence>
> >>  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
> >>  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
> >>  </s:sequence>
> >>  </s:complexType>
> >>  </s:element>
> >>- <s:element name="AddResponse">
> >>- <s:complexType>
> >>- <s:sequence>
> >>  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
> >>/>
> >>  </s:sequence>
> >>  </s:complexType>
> >>  </s:element>
> >>...
> >>- <message name="AddSoapIn">
> >>  <part name="parameters" element="s0:Add" />
> >>  </message>
> >>...
> >>- <portType name="SimpleCalcSoap">
> >>- <operation name="Add">
> >>  <documentation>Add two numbers</documentation>
> >>  <input message="s0:AddSoapIn" />
> >>  <output message="s0:AddSoapOut" />
> >>  </operation>
> >>...
> >>- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
> >>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> >>style="document"
> >>/>
> >>- <operation name="Add">
> >>  <soap:operation
> >>soapAction="http://www.xml-webservices.net/services/maths/Add"
> >>style="document" />
> >>- <input>
> >>  <soap:body use="literal" />
> >>  </input>
> >>- <output>
> >>  <soap:body use="literal" />
> >>  </output>
> >>  </operation>
> >>...
> >>
> >>How can I assign to the method "Add" the parameters?
> >>If I do:
> >>params.addElement(new Parameter("a", float.class, new Float(20), null));
> >>params.addElement(new Parameter("b", float.class, new Float(20), null));
> >>it doesn't work...
> >>Where are the mistake?
> >>Thanks.
> >>Sonia
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >>For additional commands, e-mail: <ma...@xml.apache.org>
> >>
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >>For additional commands, e-mail: <ma...@xml.apache.org>
> >>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >For additional commands, e-mail: <ma...@xml.apache.org>
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <ma...@xml.apache.org>
> >For additional commands, e-mail: <ma...@xml.apache.org>
> >
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>



Re: Problems with complexTipe

Posted by Scott Nichol <sn...@scottnichol.com>.
I think your English is quite good; certainly excellent compared to my
Italian!  Anyway, a wire dump is just what you sent.  I really don't
understand the problem the server is having.

To investigate, I wrote and ran my own client.  I got the same result as
you.

Then I checked the WSDL.  The operation is defined as

- <operation name="Add">
  <soap:operation
soapAction="http://www.xml-webservices.net/services/maths/Add"
style="document" />
- <input>
  <soap:body use="literal" />
  </input>
- <output>
  <soap:body use="literal" />
  </output>
  </operation>

I believe the problem is the document/literal encoding.  Apache SOAP is
sending (and expecting) rpc/encoded messages.  My understanding is that you
should have success using Axis (http://xml.apache.org/axis) as a client,
since it supports WSDL and doc/lit encoding.

Scott Nichol

----- Original Message -----
From: <s....@tin.it>
To: <so...@xml.apache.org>
Sent: Tuesday, July 23, 2002 11:30 AM
Subject: Re: Problems with complexTipe


ok, I have eliminated the problem of mix of schema 1999 and 2001 but it
doesn't work anyway. I don't speak English very well so I don't know the
meaning of "wire dump", however the message that I send is:
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:Add xmlns:ns1="http://www.xml-webservices.net/services/maths"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<a xmlns:ns2="http://www.w3.org/2001/XMLSchema"
xsi:type="ns2:float">20.0</a>
<b xmlns:ns3="http://www.w3.org/2001/XMLSchema"
xsi:type="ns3:float">30.0</b>
</ns1:Add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and this is the message I receive:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<AddResponse xmlns="http://www.xml-webservices.net/services/maths">
<AddResult>0</AddResult>
</AddResponse>
</soap:Body>
</soap:Envelope>

There are not fault.

I've tryed sending the following message changing at runtime the value of
playload  and the service has responsed me correctly with 50 as retur value:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Add xmlns="http://www.xml-webservices.net/service/math">
      <a>20</a>
      <b>30</b>
    </Add>
  </soap:Body>
</soap:Envelope>>





>-- Messaggio originale --
>Reply-To: soap-dev@xml.apache.org
>Date: Tue, 23 Jul 2002 10:02:18 -0400
>From: Scott Nichol <sn...@scottnichol.com>
>Subject: Re: Problems with complexTipe
>To: soap-dev@xml.apache.org
>
>
>Well, you cannot get Apache SOAP to send exactly the message you show using
>the RPC code, because it will always sent xsi:type for the parameters.
 That
>should not be a problem, however.  One thing I notice is the mix of 1999
>and
>2001 XML schemas.  You might want to specify an encoding type of null in
>the
>Parameter constructor so that you will not have this mix.  Even so, if
this
>were a problem for the web service, I would expect it to return a fault,
>not
>an incorrect answer.  Do you have a wire dump of the response message?
>
>Scott Nichol
>
>----- Original Message -----
>From: <s....@tin.it>
>To: <so...@xml.apache.org>
>Sent: Tuesday, July 23, 2002 9:34 AM
>Subject: Re: Problems with complexTipe
>
>
>thanks Scott.
>I don't receive any error messages, but the response value is constantly
>zero...
>I know that the message i have to send is this:
>
><?xml version="1.0" encoding="utf-8"?>
><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>  <soap:Body>
>    <Add xmlns="http://www.xml-webservices.net/service/math">
>      <a>20</a>
>      <b>30</b>
>    </Add>
>  </soap:Body>
></soap:Envelope>>
>
>But I don't know how can I create this message with Apache SOAP 2.2 because
>for every parameters I have to set the encodingStyle, the class, the
>value...
>So the message that I create is:
>
><?xml version='1.0' encoding='UTF-8'?>
><SOAP-ENV:Envelope
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/1999/XMLSchema">
><SOAP-ENV:Body>
><ns1:Add xmlns:ns1="http://www.xml-webservices.net/service/math"
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
><a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20</a>
><b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30</b>
></ns1:Add>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>Do you know how I can do.
>
>thanks again...
>
>
>
>-- Messaggio originale --
>>Reply-To: soap-dev@xml.apache.org
>>Date: Tue, 23 Jul 2002 08:45:17 -0400
>>From: Scott Nichol <sn...@scottnichol.com>
>>Subject: Re: Problems with complexTipe
>>To: soap-dev@xml.apache.org
>>
>>
>>Sonia,
>>
>>It would be helpful if you could post the error message you receive.
Your
>>parameter assignments look good, so I wonder whether there might be some
>>other problem.
>>
>>Scott Nichol
>>
>>----- Original Message -----
>>From: <s....@tin.it>
>>To: <xm...@apache.org>
>>Sent: Tuesday, July 23, 2002 6:34 AM
>>Subject: Problems with complexTipe
>>
>>
>>hi!
>>I have to do un application that use a service which exploits a WSDL like
>>this:
>>- <types>
>>- <s:schema elementFormDefault="qualified"
>>targetNamespace="http://www.xml-webservices.net/services/maths">
>>- <s:element name="Add">
>>- <s:complexType>
>>- <s:sequence>
>>  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
>>  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
>>  </s:sequence>
>>  </s:complexType>
>>  </s:element>
>>- <s:element name="AddResponse">
>>- <s:complexType>
>>- <s:sequence>
>>  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
>>/>
>>  </s:sequence>
>>  </s:complexType>
>>  </s:element>
>>...
>>- <message name="AddSoapIn">
>>  <part name="parameters" element="s0:Add" />
>>  </message>
>>...
>>- <portType name="SimpleCalcSoap">
>>- <operation name="Add">
>>  <documentation>Add two numbers</documentation>
>>  <input message="s0:AddSoapIn" />
>>  <output message="s0:AddSoapOut" />
>>  </operation>
>>...
>>- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
>>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>>style="document"
>>/>
>>- <operation name="Add">
>>  <soap:operation
>>soapAction="http://www.xml-webservices.net/services/maths/Add"
>>style="document" />
>>- <input>
>>  <soap:body use="literal" />
>>  </input>
>>- <output>
>>  <soap:body use="literal" />
>>  </output>
>>  </operation>
>>...
>>
>>How can I assign to the method "Add" the parameters?
>>If I do:
>>params.addElement(new Parameter("a", float.class, new Float(20), null));
>>params.addElement(new Parameter("b", float.class, new Float(20), null));
>>it doesn't work...
>>Where are the mistake?
>>Thanks.
>>Sonia
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>>For additional commands, e-mail: <ma...@xml.apache.org>
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>>For additional commands, e-mail: <ma...@xml.apache.org>
>>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>




--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Problems with complexTipe

Posted by s....@tin.it.
ok, I have eliminated the problem of mix of schema 1999 and 2001 but it
doesn't work anyway. I don't speak English very well so I don't know the
meaning of "wire dump", however the message that I send is:
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:Add xmlns:ns1="http://www.xml-webservices.net/services/maths" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20.0</a>
<b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30.0</b>
</ns1:Add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and this is the message I receive:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<AddResponse xmlns="http://www.xml-webservices.net/services/maths">
<AddResult>0</AddResult>
</AddResponse>
</soap:Body>
</soap:Envelope>

There are not fault.

I've tryed sending the following message changing at runtime the value of
playload  and the service has responsed me correctly with 50 as retur value:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Add xmlns="http://www.xml-webservices.net/service/math">
      <a>20</a>
      <b>30</b>
    </Add>
  </soap:Body>
</soap:Envelope>>





>-- Messaggio originale --
>Reply-To: soap-dev@xml.apache.org
>Date: Tue, 23 Jul 2002 10:02:18 -0400
>From: Scott Nichol <sn...@scottnichol.com>
>Subject: Re: Problems with complexTipe
>To: soap-dev@xml.apache.org
>
>
>Well, you cannot get Apache SOAP to send exactly the message you show using
>the RPC code, because it will always sent xsi:type for the parameters.
 That
>should not be a problem, however.  One thing I notice is the mix of 1999
>and
>2001 XML schemas.  You might want to specify an encoding type of null in
>the
>Parameter constructor so that you will not have this mix.  Even so, if
this
>were a problem for the web service, I would expect it to return a fault,
>not
>an incorrect answer.  Do you have a wire dump of the response message?
>
>Scott Nichol
>
>----- Original Message -----
>From: <s....@tin.it>
>To: <so...@xml.apache.org>
>Sent: Tuesday, July 23, 2002 9:34 AM
>Subject: Re: Problems with complexTipe
>
>
>thanks Scott.
>I don't receive any error messages, but the response value is constantly
>zero...
>I know that the message i have to send is this:
>
><?xml version="1.0" encoding="utf-8"?>
><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>  <soap:Body>
>    <Add xmlns="http://www.xml-webservices.net/service/math">
>      <a>20</a>
>      <b>30</b>
>    </Add>
>  </soap:Body>
></soap:Envelope>>
>
>But I don't know how can I create this message with Apache SOAP 2.2 because
>for every parameters I have to set the encodingStyle, the class, the
>value...
>So the message that I create is:
>
><?xml version='1.0' encoding='UTF-8'?>
><SOAP-ENV:Envelope
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/1999/XMLSchema">
><SOAP-ENV:Body>
><ns1:Add xmlns:ns1="http://www.xml-webservices.net/service/math"
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
><a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20</a>
><b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30</b>
></ns1:Add>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>Do you know how I can do.
>
>thanks again...
>
>
>
>-- Messaggio originale --
>>Reply-To: soap-dev@xml.apache.org
>>Date: Tue, 23 Jul 2002 08:45:17 -0400
>>From: Scott Nichol <sn...@scottnichol.com>
>>Subject: Re: Problems with complexTipe
>>To: soap-dev@xml.apache.org
>>
>>
>>Sonia,
>>
>>It would be helpful if you could post the error message you receive. 
Your
>>parameter assignments look good, so I wonder whether there might be some
>>other problem.
>>
>>Scott Nichol
>>
>>----- Original Message -----
>>From: <s....@tin.it>
>>To: <xm...@apache.org>
>>Sent: Tuesday, July 23, 2002 6:34 AM
>>Subject: Problems with complexTipe
>>
>>
>>hi!
>>I have to do un application that use a service which exploits a WSDL like
>>this:
>>- <types>
>>- <s:schema elementFormDefault="qualified"
>>targetNamespace="http://www.xml-webservices.net/services/maths">
>>- <s:element name="Add">
>>- <s:complexType>
>>- <s:sequence>
>>  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
>>  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
>>  </s:sequence>
>>  </s:complexType>
>>  </s:element>
>>- <s:element name="AddResponse">
>>- <s:complexType>
>>- <s:sequence>
>>  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
>>/>
>>  </s:sequence>
>>  </s:complexType>
>>  </s:element>
>>...
>>- <message name="AddSoapIn">
>>  <part name="parameters" element="s0:Add" />
>>  </message>
>>...
>>- <portType name="SimpleCalcSoap">
>>- <operation name="Add">
>>  <documentation>Add two numbers</documentation>
>>  <input message="s0:AddSoapIn" />
>>  <output message="s0:AddSoapOut" />
>>  </operation>
>>...
>>- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
>>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>>style="document"
>>/>
>>- <operation name="Add">
>>  <soap:operation
>>soapAction="http://www.xml-webservices.net/services/maths/Add"
>>style="document" />
>>- <input>
>>  <soap:body use="literal" />
>>  </input>
>>- <output>
>>  <soap:body use="literal" />
>>  </output>
>>  </operation>
>>...
>>
>>How can I assign to the method "Add" the parameters?
>>If I do:
>>params.addElement(new Parameter("a", float.class, new Float(20), null));
>>params.addElement(new Parameter("b", float.class, new Float(20), null));
>>it doesn't work...
>>Where are the mistake?
>>Thanks.
>>Sonia
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>>For additional commands, e-mail: <ma...@xml.apache.org>
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>>For additional commands, e-mail: <ma...@xml.apache.org>
>>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Problems with complexTipe

Posted by s....@tin.it.
ok, I have eliminated the problem of mix of schema 1999 and 2001 but it
doesn't work anyway. I don't speak English very well so I don't know the
meaning of "wire dump", however the message that I send is:
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:Add xmlns:ns1="http://www.xml-webservices.net/services/maths" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20.0</a>
<b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30.0</b>
</ns1:Add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and this is the message I receive:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<AddResponse xmlns="http://www.xml-webservices.net/services/maths">
<AddResult>0</AddResult>
</AddResponse>
</soap:Body>
</soap:Envelope>

There are not fault.

I've tryed sending the following message changing at runtime the value of
playload  and the service has responsed me correctly with 50 as retur value:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Add xmlns="http://www.xml-webservices.net/service/math">
      <a>20</a>
      <b>30</b>
    </Add>
  </soap:Body>
</soap:Envelope>>





>-- Messaggio originale --
>Reply-To: soap-dev@xml.apache.org
>Date: Tue, 23 Jul 2002 10:02:18 -0400
>From: Scott Nichol <sn...@scottnichol.com>
>Subject: Re: Problems with complexTipe
>To: soap-dev@xml.apache.org
>
>
>Well, you cannot get Apache SOAP to send exactly the message you show using
>the RPC code, because it will always sent xsi:type for the parameters.
 That
>should not be a problem, however.  One thing I notice is the mix of 1999
>and
>2001 XML schemas.  You might want to specify an encoding type of null in
>the
>Parameter constructor so that you will not have this mix.  Even so, if
this
>were a problem for the web service, I would expect it to return a fault,
>not
>an incorrect answer.  Do you have a wire dump of the response message?
>
>Scott Nichol
>
>----- Original Message -----
>From: <s....@tin.it>
>To: <so...@xml.apache.org>
>Sent: Tuesday, July 23, 2002 9:34 AM
>Subject: Re: Problems with complexTipe
>
>
>thanks Scott.
>I don't receive any error messages, but the response value is constantly
>zero...
>I know that the message i have to send is this:
>
><?xml version="1.0" encoding="utf-8"?>
><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>  <soap:Body>
>    <Add xmlns="http://www.xml-webservices.net/service/math">
>      <a>20</a>
>      <b>30</b>
>    </Add>
>  </soap:Body>
></soap:Envelope>>
>
>But I don't know how can I create this message with Apache SOAP 2.2 because
>for every parameters I have to set the encodingStyle, the class, the
>value...
>So the message that I create is:
>
><?xml version='1.0' encoding='UTF-8'?>
><SOAP-ENV:Envelope
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/1999/XMLSchema">
><SOAP-ENV:Body>
><ns1:Add xmlns:ns1="http://www.xml-webservices.net/service/math"
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
><a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20</a>
><b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30</b>
></ns1:Add>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>Do you know how I can do.
>
>thanks again...
>
>
>
>-- Messaggio originale --
>>Reply-To: soap-dev@xml.apache.org
>>Date: Tue, 23 Jul 2002 08:45:17 -0400
>>From: Scott Nichol <sn...@scottnichol.com>
>>Subject: Re: Problems with complexTipe
>>To: soap-dev@xml.apache.org
>>
>>
>>Sonia,
>>
>>It would be helpful if you could post the error message you receive. 
Your
>>parameter assignments look good, so I wonder whether there might be some
>>other problem.
>>
>>Scott Nichol
>>
>>----- Original Message -----
>>From: <s....@tin.it>
>>To: <xm...@apache.org>
>>Sent: Tuesday, July 23, 2002 6:34 AM
>>Subject: Problems with complexTipe
>>
>>
>>hi!
>>I have to do un application that use a service which exploits a WSDL like
>>this:
>>- <types>
>>- <s:schema elementFormDefault="qualified"
>>targetNamespace="http://www.xml-webservices.net/services/maths">
>>- <s:element name="Add">
>>- <s:complexType>
>>- <s:sequence>
>>  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
>>  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
>>  </s:sequence>
>>  </s:complexType>
>>  </s:element>
>>- <s:element name="AddResponse">
>>- <s:complexType>
>>- <s:sequence>
>>  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
>>/>
>>  </s:sequence>
>>  </s:complexType>
>>  </s:element>
>>...
>>- <message name="AddSoapIn">
>>  <part name="parameters" element="s0:Add" />
>>  </message>
>>...
>>- <portType name="SimpleCalcSoap">
>>- <operation name="Add">
>>  <documentation>Add two numbers</documentation>
>>  <input message="s0:AddSoapIn" />
>>  <output message="s0:AddSoapOut" />
>>  </operation>
>>...
>>- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
>>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>>style="document"
>>/>
>>- <operation name="Add">
>>  <soap:operation
>>soapAction="http://www.xml-webservices.net/services/maths/Add"
>>style="document" />
>>- <input>
>>  <soap:body use="literal" />
>>  </input>
>>- <output>
>>  <soap:body use="literal" />
>>  </output>
>>  </operation>
>>...
>>
>>How can I assign to the method "Add" the parameters?
>>If I do:
>>params.addElement(new Parameter("a", float.class, new Float(20), null));
>>params.addElement(new Parameter("b", float.class, new Float(20), null));
>>it doesn't work...
>>Where are the mistake?
>>Thanks.
>>Sonia
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>>For additional commands, e-mail: <ma...@xml.apache.org>
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>>For additional commands, e-mail: <ma...@xml.apache.org>
>>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>



Re: Problems with complexTipe

Posted by Scott Nichol <sn...@scottnichol.com>.
Well, you cannot get Apache SOAP to send exactly the message you show using
the RPC code, because it will always sent xsi:type for the parameters.  That
should not be a problem, however.  One thing I notice is the mix of 1999 and
2001 XML schemas.  You might want to specify an encoding type of null in the
Parameter constructor so that you will not have this mix.  Even so, if this
were a problem for the web service, I would expect it to return a fault, not
an incorrect answer.  Do you have a wire dump of the response message?

Scott Nichol

----- Original Message -----
From: <s....@tin.it>
To: <so...@xml.apache.org>
Sent: Tuesday, July 23, 2002 9:34 AM
Subject: Re: Problems with complexTipe


thanks Scott.
I don't receive any error messages, but the response value is constantly
zero...
I know that the message i have to send is this:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Add xmlns="http://www.xml-webservices.net/service/math">
      <a>20</a>
      <b>30</b>
    </Add>
  </soap:Body>
</soap:Envelope>>

But I don't know how can I create this message with Apache SOAP 2.2 because
for every parameters I have to set the encodingStyle, the class, the
value...
So the message that I create is:

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:Add xmlns:ns1="http://www.xml-webservices.net/service/math"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20</a>
<b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30</b>
</ns1:Add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Do you know how I can do.

thanks again...



-- Messaggio originale --
>Reply-To: soap-dev@xml.apache.org
>Date: Tue, 23 Jul 2002 08:45:17 -0400
>From: Scott Nichol <sn...@scottnichol.com>
>Subject: Re: Problems with complexTipe
>To: soap-dev@xml.apache.org
>
>
>Sonia,
>
>It would be helpful if you could post the error message you receive.  Your
>parameter assignments look good, so I wonder whether there might be some
>other problem.
>
>Scott Nichol
>
>----- Original Message -----
>From: <s....@tin.it>
>To: <xm...@apache.org>
>Sent: Tuesday, July 23, 2002 6:34 AM
>Subject: Problems with complexTipe
>
>
>hi!
>I have to do un application that use a service which exploits a WSDL like
>this:
>- <types>
>- <s:schema elementFormDefault="qualified"
>targetNamespace="http://www.xml-webservices.net/services/maths">
>- <s:element name="Add">
>- <s:complexType>
>- <s:sequence>
>  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
>  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
>  </s:sequence>
>  </s:complexType>
>  </s:element>
>- <s:element name="AddResponse">
>- <s:complexType>
>- <s:sequence>
>  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
>/>
>  </s:sequence>
>  </s:complexType>
>  </s:element>
>...
>- <message name="AddSoapIn">
>  <part name="parameters" element="s0:Add" />
>  </message>
>...
>- <portType name="SimpleCalcSoap">
>- <operation name="Add">
>  <documentation>Add two numbers</documentation>
>  <input message="s0:AddSoapIn" />
>  <output message="s0:AddSoapOut" />
>  </operation>
>...
>- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>style="document"
>/>
>- <operation name="Add">
>  <soap:operation
>soapAction="http://www.xml-webservices.net/services/maths/Add"
>style="document" />
>- <input>
>  <soap:body use="literal" />
>  </input>
>- <output>
>  <soap:body use="literal" />
>  </output>
>  </operation>
>...
>
>How can I assign to the method "Add" the parameters?
>If I do:
>params.addElement(new Parameter("a", float.class, new Float(20), null));
>params.addElement(new Parameter("b", float.class, new Float(20), null));
>it doesn't work...
>Where are the mistake?
>Thanks.
>Sonia
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>




Re: Problems with complexTipe

Posted by Scott Nichol <sn...@scottnichol.com>.
Well, you cannot get Apache SOAP to send exactly the message you show using
the RPC code, because it will always sent xsi:type for the parameters.  That
should not be a problem, however.  One thing I notice is the mix of 1999 and
2001 XML schemas.  You might want to specify an encoding type of null in the
Parameter constructor so that you will not have this mix.  Even so, if this
were a problem for the web service, I would expect it to return a fault, not
an incorrect answer.  Do you have a wire dump of the response message?

Scott Nichol

----- Original Message -----
From: <s....@tin.it>
To: <so...@xml.apache.org>
Sent: Tuesday, July 23, 2002 9:34 AM
Subject: Re: Problems with complexTipe


thanks Scott.
I don't receive any error messages, but the response value is constantly
zero...
I know that the message i have to send is this:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Add xmlns="http://www.xml-webservices.net/service/math">
      <a>20</a>
      <b>30</b>
    </Add>
  </soap:Body>
</soap:Envelope>>

But I don't know how can I create this message with Apache SOAP 2.2 because
for every parameters I have to set the encodingStyle, the class, the
value...
So the message that I create is:

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:Add xmlns:ns1="http://www.xml-webservices.net/service/math"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20</a>
<b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30</b>
</ns1:Add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Do you know how I can do.

thanks again...



-- Messaggio originale --
>Reply-To: soap-dev@xml.apache.org
>Date: Tue, 23 Jul 2002 08:45:17 -0400
>From: Scott Nichol <sn...@scottnichol.com>
>Subject: Re: Problems with complexTipe
>To: soap-dev@xml.apache.org
>
>
>Sonia,
>
>It would be helpful if you could post the error message you receive.  Your
>parameter assignments look good, so I wonder whether there might be some
>other problem.
>
>Scott Nichol
>
>----- Original Message -----
>From: <s....@tin.it>
>To: <xm...@apache.org>
>Sent: Tuesday, July 23, 2002 6:34 AM
>Subject: Problems with complexTipe
>
>
>hi!
>I have to do un application that use a service which exploits a WSDL like
>this:
>- <types>
>- <s:schema elementFormDefault="qualified"
>targetNamespace="http://www.xml-webservices.net/services/maths">
>- <s:element name="Add">
>- <s:complexType>
>- <s:sequence>
>  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
>  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
>  </s:sequence>
>  </s:complexType>
>  </s:element>
>- <s:element name="AddResponse">
>- <s:complexType>
>- <s:sequence>
>  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
>/>
>  </s:sequence>
>  </s:complexType>
>  </s:element>
>...
>- <message name="AddSoapIn">
>  <part name="parameters" element="s0:Add" />
>  </message>
>...
>- <portType name="SimpleCalcSoap">
>- <operation name="Add">
>  <documentation>Add two numbers</documentation>
>  <input message="s0:AddSoapIn" />
>  <output message="s0:AddSoapOut" />
>  </operation>
>...
>- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>style="document"
>/>
>- <operation name="Add">
>  <soap:operation
>soapAction="http://www.xml-webservices.net/services/maths/Add"
>style="document" />
>- <input>
>  <soap:body use="literal" />
>  </input>
>- <output>
>  <soap:body use="literal" />
>  </output>
>  </operation>
>...
>
>How can I assign to the method "Add" the parameters?
>If I do:
>params.addElement(new Parameter("a", float.class, new Float(20), null));
>params.addElement(new Parameter("b", float.class, new Float(20), null));
>it doesn't work...
>Where are the mistake?
>Thanks.
>Sonia
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>




--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Problems with complexTipe

Posted by s....@tin.it.
thanks Scott.
I don't receive any error messages, but the response value is constantly
zero...
I know that the message i have to send is this:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Add xmlns="http://www.xml-webservices.net/service/math">
      <a>20</a>
      <b>30</b>
    </Add>
  </soap:Body>
</soap:Envelope>>

But I don't know how can I create this message with Apache SOAP 2.2 because
for every parameters I have to set the encodingStyle, the class, the value...
So the message that I create is:

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:Add xmlns:ns1="http://www.xml-webservices.net/service/math" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20</a>
<b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30</b>
</ns1:Add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Do you know how I can do.

thanks again...



-- Messaggio originale --
>Reply-To: soap-dev@xml.apache.org
>Date: Tue, 23 Jul 2002 08:45:17 -0400
>From: Scott Nichol <sn...@scottnichol.com>
>Subject: Re: Problems with complexTipe
>To: soap-dev@xml.apache.org
>
>
>Sonia,
>
>It would be helpful if you could post the error message you receive.  Your
>parameter assignments look good, so I wonder whether there might be some
>other problem.
>
>Scott Nichol
>
>----- Original Message -----
>From: <s....@tin.it>
>To: <xm...@apache.org>
>Sent: Tuesday, July 23, 2002 6:34 AM
>Subject: Problems with complexTipe
>
>
>hi!
>I have to do un application that use a service which exploits a WSDL like
>this:
>- <types>
>- <s:schema elementFormDefault="qualified"
>targetNamespace="http://www.xml-webservices.net/services/maths">
>- <s:element name="Add">
>- <s:complexType>
>- <s:sequence>
>  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
>  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
>  </s:sequence>
>  </s:complexType>
>  </s:element>
>- <s:element name="AddResponse">
>- <s:complexType>
>- <s:sequence>
>  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
>/>
>  </s:sequence>
>  </s:complexType>
>  </s:element>
>...
>- <message name="AddSoapIn">
>  <part name="parameters" element="s0:Add" />
>  </message>
>...
>- <portType name="SimpleCalcSoap">
>- <operation name="Add">
>  <documentation>Add two numbers</documentation>
>  <input message="s0:AddSoapIn" />
>  <output message="s0:AddSoapOut" />
>  </operation>
>...
>- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>style="document"
>/>
>- <operation name="Add">
>  <soap:operation
>soapAction="http://www.xml-webservices.net/services/maths/Add"
>style="document" />
>- <input>
>  <soap:body use="literal" />
>  </input>
>- <output>
>  <soap:body use="literal" />
>  </output>
>  </operation>
>...
>
>How can I assign to the method "Add" the parameters?
>If I do:
>params.addElement(new Parameter("a", float.class, new Float(20), null));
>params.addElement(new Parameter("b", float.class, new Float(20), null));
>it doesn't work...
>Where are the mistake?
>Thanks.
>Sonia
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>



Re: Problems with complexTipe

Posted by s....@tin.it.
thanks Scott.
I don't receive any error messages, but the response value is constantly
zero...
I know that the message i have to send is this:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Add xmlns="http://www.xml-webservices.net/service/math">
      <a>20</a>
      <b>30</b>
    </Add>
  </soap:Body>
</soap:Envelope>>

But I don't know how can I create this message with Apache SOAP 2.2 because
for every parameters I have to set the encodingStyle, the class, the value...
So the message that I create is:

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:Add xmlns:ns1="http://www.xml-webservices.net/service/math" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<a xmlns:ns2="http://www.w3.org/2001/XMLSchema" xsi:type="ns2:float">20</a>
<b xmlns:ns3="http://www.w3.org/2001/XMLSchema" xsi:type="ns3:float">30</b>
</ns1:Add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Do you know how I can do.

thanks again...



-- Messaggio originale --
>Reply-To: soap-dev@xml.apache.org
>Date: Tue, 23 Jul 2002 08:45:17 -0400
>From: Scott Nichol <sn...@scottnichol.com>
>Subject: Re: Problems with complexTipe
>To: soap-dev@xml.apache.org
>
>
>Sonia,
>
>It would be helpful if you could post the error message you receive.  Your
>parameter assignments look good, so I wonder whether there might be some
>other problem.
>
>Scott Nichol
>
>----- Original Message -----
>From: <s....@tin.it>
>To: <xm...@apache.org>
>Sent: Tuesday, July 23, 2002 6:34 AM
>Subject: Problems with complexTipe
>
>
>hi!
>I have to do un application that use a service which exploits a WSDL like
>this:
>- <types>
>- <s:schema elementFormDefault="qualified"
>targetNamespace="http://www.xml-webservices.net/services/maths">
>- <s:element name="Add">
>- <s:complexType>
>- <s:sequence>
>  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
>  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
>  </s:sequence>
>  </s:complexType>
>  </s:element>
>- <s:element name="AddResponse">
>- <s:complexType>
>- <s:sequence>
>  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
>/>
>  </s:sequence>
>  </s:complexType>
>  </s:element>
>...
>- <message name="AddSoapIn">
>  <part name="parameters" element="s0:Add" />
>  </message>
>...
>- <portType name="SimpleCalcSoap">
>- <operation name="Add">
>  <documentation>Add two numbers</documentation>
>  <input message="s0:AddSoapIn" />
>  <output message="s0:AddSoapOut" />
>  </operation>
>...
>- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>style="document"
>/>
>- <operation name="Add">
>  <soap:operation
>soapAction="http://www.xml-webservices.net/services/maths/Add"
>style="document" />
>- <input>
>  <soap:body use="literal" />
>  </input>
>- <output>
>  <soap:body use="literal" />
>  </output>
>  </operation>
>...
>
>How can I assign to the method "Add" the parameters?
>If I do:
>params.addElement(new Parameter("a", float.class, new Float(20), null));
>params.addElement(new Parameter("b", float.class, new Float(20), null));
>it doesn't work...
>Where are the mistake?
>Thanks.
>Sonia
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@xml.apache.org>
>For additional commands, e-mail: <ma...@xml.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Problems with complexTipe

Posted by Scott Nichol <sn...@scottnichol.com>.
Sonia,

It would be helpful if you could post the error message you receive.  Your
parameter assignments look good, so I wonder whether there might be some
other problem.

Scott Nichol

----- Original Message -----
From: <s....@tin.it>
To: <xm...@apache.org>
Sent: Tuesday, July 23, 2002 6:34 AM
Subject: Problems with complexTipe


hi!
I have to do un application that use a service which exploits a WSDL like
this:
- <types>
- <s:schema elementFormDefault="qualified"
targetNamespace="http://www.xml-webservices.net/services/maths">
- <s:element name="Add">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:element name="AddResponse">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
/>
  </s:sequence>
  </s:complexType>
  </s:element>
...
- <message name="AddSoapIn">
  <part name="parameters" element="s0:Add" />
  </message>
...
- <portType name="SimpleCalcSoap">
- <operation name="Add">
  <documentation>Add two numbers</documentation>
  <input message="s0:AddSoapIn" />
  <output message="s0:AddSoapOut" />
  </operation>
...
- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"
/>
- <operation name="Add">
  <soap:operation
soapAction="http://www.xml-webservices.net/services/maths/Add"
style="document" />
- <input>
  <soap:body use="literal" />
  </input>
- <output>
  <soap:body use="literal" />
  </output>
  </operation>
...

How can I assign to the method "Add" the parameters?
If I do:
params.addElement(new Parameter("a", float.class, new Float(20), null));
params.addElement(new Parameter("b", float.class, new Float(20), null));
it doesn't work...
Where are the mistake?
Thanks.
Sonia


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>




--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Problems with complexTipe

Posted by Scott Nichol <sn...@scottnichol.com>.
Sonia,

It would be helpful if you could post the error message you receive.  Your
parameter assignments look good, so I wonder whether there might be some
other problem.

Scott Nichol

----- Original Message -----
From: <s....@tin.it>
To: <xm...@apache.org>
Sent: Tuesday, July 23, 2002 6:34 AM
Subject: Problems with complexTipe


hi!
I have to do un application that use a service which exploits a WSDL like
this:
- <types>
- <s:schema elementFormDefault="qualified"
targetNamespace="http://www.xml-webservices.net/services/maths">
- <s:element name="Add">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:float" />
  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:float" />
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:element name="AddResponse">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="1" maxOccurs="1" name="AddResult" type="s:float"
/>
  </s:sequence>
  </s:complexType>
  </s:element>
...
- <message name="AddSoapIn">
  <part name="parameters" element="s0:Add" />
  </message>
...
- <portType name="SimpleCalcSoap">
- <operation name="Add">
  <documentation>Add two numbers</documentation>
  <input message="s0:AddSoapIn" />
  <output message="s0:AddSoapOut" />
  </operation>
...
- <binding name="SimpleCalcSoap" type="s0:SimpleCalcSoap">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"
/>
- <operation name="Add">
  <soap:operation
soapAction="http://www.xml-webservices.net/services/maths/Add"
style="document" />
- <input>
  <soap:body use="literal" />
  </input>
- <output>
  <soap:body use="literal" />
  </output>
  </operation>
...

How can I assign to the method "Add" the parameters?
If I do:
params.addElement(new Parameter("a", float.class, new Float(20), null));
params.addElement(new Parameter("b", float.class, new Float(20), null));
it doesn't work...
Where are the mistake?
Thanks.
Sonia


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>