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: [EMAIL PROTECTED] >Date: Tue, 23 Jul 2002 10:02:18 -0400 >From: Scott Nichol <[EMAIL PROTECTED]> >Subject: Re: Problems with complexTipe >To: [EMAIL PROTECTED] > > >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: <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >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: [EMAIL PROTECTED] >>Date: Tue, 23 Jul 2002 08:45:17 -0400 >>From: Scott Nichol <[EMAIL PROTECTED]> >>Subject: Re: Problems with complexTipe >>To: [EMAIL PROTECTED] >> >> >>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: <[EMAIL PROTECTED]> >>To: <[EMAIL PROTECTED]> >>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: <mailto:[EMAIL PROTECTED]> >>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> >> >> >> >> >>-- >>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> >> > > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>