You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Martin Centner <mc...@sbox.tugraz.at> on 2002/01/25 09:25:04 UTC

Interop Problem .NET Client / Apache SOAP Server

Hi All!

I have got a interoperability problem between a MS.NET client and Apache 
SOAP server. The problem is that there are no namespace prefixes in the 
<return> element(s) of the RPC response from the Apache SOAP server.

<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:HelloWorldResponse xmlns:ns1="http://sicher.net/" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <return xsi:type="xsd:string">HelloWorld</return>
</ns1:HelloWorldResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The .NET client does not recognize that the <return> element.

If I use my own serializer to serialize this message and put the 
namespace prefix infront of the <return> tag (<ns1:return>) the .NET 
client recognizes the <ns1:return> element.

<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:HelloWorldResponse xmlns:ns1="http://sicher.net/" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <ns1:return xsi:type="xsd:string">HelloWorld</return>
     ^^^^^
</ns1:HelloWorldResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I have looked through the Apache SOAP source code, but it seems there is 
no possibility to enable the namespace prefix other than writing my own 
serializer.


Are there any possiblities to get the .NET client to accept the return 
element without the namespace prefix, or are there other possibilies 
then writing my own serializers?


cu
lot


Re: Interop Problem .NET Client / Apache SOAP Server

Posted by Simon Fell <so...@zaks.demon.co.uk>.
Despite the apparent structural differences in those two responses,
they're actually the same [as far as section 5 encoding is concerned].
One problem however is that the Apache endpoint is using the 1999
schema version, but IIRC, .NET only supports the 2001 schema version,
you'll need to change your Apache endpoint to use the 2001 schema
version.

Cheers
Simon

On Fri, 25 Jan 2002 11:46:33 +0100, in soap you wrote:

>Simon Fell wrote:
>
>> Make sure your .NET proxy class thinks its doing section 5 encoding,
>> it sounds like its trying to do doc/literal.
>> 
>> The method in the proxy class should have a
>> System.Web.Services.Protocols.SoapRpcMethodAttribute attribute on it.
>
>
>hm, this works fine with the HelloWorld expample, but if i want to 
>return a more complex data structure i run into trubbles.
>
>The Apache SOAP RPC returns
>
><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:GetTerminResponse xmlns:ns1="http://sicher.net/" 
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>         <return xsi:type="ns1:Termin">
>             <TerminID xsi:type="xsd:int">1</TerminID>
>             <LV xsi:type="xsd:int">534766</LV>
>             <Ort xsi:type="xsd:string">i7</Ort>
>             <Zeit xsi:type="xsd:timeInstant">1970-01-02T14:18:52Z</Zeit>
>             <Pruefer xsi:type="xsd:int">2</Pruefer>
>         </return>
>     </ns1:GetTerminResponse>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>
>But the .NET wants to have it in this form (according to the WSDL)
>
><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>xmlns:tns="http://sicher.net/" 
>xmlns:types="http://sicher.net/encodedTypes" 
>xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
><soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>     <tns:GetTerminResponse>
>         <GetTerminResult href="#id1" />
>     </tns:GetTerminResponse>
>     <types:Termin id="id1" xsi:type="types:Termin">
>         <TerminID xsi:type="xsd:int">int</TerminID>
>         <LV xsi:type="xsd:int">int</LV>
>         <Ort xsi:type="xsd:string">string</Ort>
>         <Zeit xsi:type="xsd:dateTime">dateTime</Zeit>
>         <Pruefer xsi:type="xsd:int">int</Pruefer>
>     </types:Termin>
></soap:Body>
></soap:Envelope>
>
>
>Im trying to get a .NET client to work with a .NET Webservice _and_ an 
>Apache SOAP RPC service.
>
>cu
>lot
>
>
>
>


Re: Interop Problem .NET Client / Apache SOAP Server

Posted by Simon Fell <so...@zaks.demon.co.uk>.
Despite the apparent structural differences in those two responses,
they're actually the same [as far as section 5 encoding is concerned].
One problem however is that the Apache endpoint is using the 1999
schema version, but IIRC, .NET only supports the 2001 schema version,
you'll need to change your Apache endpoint to use the 2001 schema
version.

Cheers
Simon

On Fri, 25 Jan 2002 11:46:33 +0100, in soap you wrote:

>Simon Fell wrote:
>
>> Make sure your .NET proxy class thinks its doing section 5 encoding,
>> it sounds like its trying to do doc/literal.
>> 
>> The method in the proxy class should have a
>> System.Web.Services.Protocols.SoapRpcMethodAttribute attribute on it.
>
>
>hm, this works fine with the HelloWorld expample, but if i want to 
>return a more complex data structure i run into trubbles.
>
>The Apache SOAP RPC returns
>
><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:GetTerminResponse xmlns:ns1="http://sicher.net/" 
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>         <return xsi:type="ns1:Termin">
>             <TerminID xsi:type="xsd:int">1</TerminID>
>             <LV xsi:type="xsd:int">534766</LV>
>             <Ort xsi:type="xsd:string">i7</Ort>
>             <Zeit xsi:type="xsd:timeInstant">1970-01-02T14:18:52Z</Zeit>
>             <Pruefer xsi:type="xsd:int">2</Pruefer>
>         </return>
>     </ns1:GetTerminResponse>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>
>But the .NET wants to have it in this form (according to the WSDL)
>
><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>xmlns:tns="http://sicher.net/" 
>xmlns:types="http://sicher.net/encodedTypes" 
>xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
><soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>     <tns:GetTerminResponse>
>         <GetTerminResult href="#id1" />
>     </tns:GetTerminResponse>
>     <types:Termin id="id1" xsi:type="types:Termin">
>         <TerminID xsi:type="xsd:int">int</TerminID>
>         <LV xsi:type="xsd:int">int</LV>
>         <Ort xsi:type="xsd:string">string</Ort>
>         <Zeit xsi:type="xsd:dateTime">dateTime</Zeit>
>         <Pruefer xsi:type="xsd:int">int</Pruefer>
>     </types:Termin>
></soap:Body>
></soap:Envelope>
>
>
>Im trying to get a .NET client to work with a .NET Webservice _and_ an 
>Apache SOAP RPC service.
>
>cu
>lot
>
>
>
>


Re: Interop Problem .NET Client / Apache SOAP Server

Posted by David Wall <dw...@Yozons.com>.
> To generate Apache SOAP servers from WSDL defintions, try using the IBM
WSTK
> utility "servicegen", available at http://www.ibm.com/alphaworks,

Is there anything else that doesn't have a license that restricts use in a
production environment?  This seems like it gets you going, but unless IBM
releases and you buy a license, you can only go as far as your development
phase before you're stuck again.

David


Re: Interop Problem .NET Client / Apache SOAP Server

Posted by David Wall <dw...@Yozons.com>.
> To generate Apache SOAP servers from WSDL defintions, try using the IBM
WSTK
> utility "servicegen", available at http://www.ibm.com/alphaworks,

Is there anything else that doesn't have a license that restricts use in a
production environment?  This seems like it gets you going, but unless IBM
releases and you buy a license, you can only go as far as your development
phase before you're stuck again.

David


RE: Interop Problem .NET Client / Apache SOAP Server

Posted by Tony Hong <th...@xmethods.net>.
Sorry, one clarification -

Pull down the package 'Web Services Toolkit' from alphaWorks.  "servicegen"
is a utility bundled in the package.

Tony

> -----Original Message-----
> From: Tony Hong [mailto:thong@xmethods.net]
> Sent: Friday, January 25, 2002 5:12 AM
> To: soap-user@xml.apache.org
> Subject: RE: Interop Problem .NET Client / Apache SOAP Server
>
>
> Hi Martin,
>
> To generate Apache SOAP servers from WSDL defintions, try using
> the IBM WSTK
> utility "servicegen", available at http://www.ibm.com/alphaworks,
> which will
> create everything you need , including the deployment descriptor. You then
> simply supply the implementation, and the server will then be strictly
> conformant to the wsdl - no worrying about namespaces, soapaction, etc.
>
> Tony
>
> > -----Original Message-----
> > From: Martin Centner [mailto:mcentner@sbox.tugraz.at]
> > Sent: Friday, January 25, 2002 2:47 AM
> > To: soap-user@xml.apache.org
> > Subject: Re: Interop Problem .NET Client / Apache SOAP Server
> >
> >
> > Simon Fell wrote:
> >
> > > Make sure your .NET proxy class thinks its doing section 5 encoding,
> > > it sounds like its trying to do doc/literal.
> > >
> > > The method in the proxy class should have a
> > > System.Web.Services.Protocols.SoapRpcMethodAttribute attribute on it.
> >
> >
> > hm, this works fine with the HelloWorld expample, but if i want to
> > return a more complex data structure i run into trubbles.
> >
> > The Apache SOAP RPC returns
> >
> > <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:GetTerminResponse xmlns:ns1="http://sicher.net/"
> > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> >          <return xsi:type="ns1:Termin">
> >              <TerminID xsi:type="xsd:int">1</TerminID>
> >              <LV xsi:type="xsd:int">534766</LV>
> >              <Ort xsi:type="xsd:string">i7</Ort>
> >              <Zeit
> xsi:type="xsd:timeInstant">1970-01-02T14:18:52Z</Zeit>
> >              <Pruefer xsi:type="xsd:int">2</Pruefer>
> >          </return>
> >      </ns1:GetTerminResponse>
> > </SOAP-ENV:Body>
> > </SOAP-ENV:Envelope>
> >
> >
> > But the .NET wants to have it in this form (according to the WSDL)
> >
> > <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:tns="http://sicher.net/"
> > xmlns:types="http://sicher.net/encodedTypes"
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > <soap:Body
> soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> >      <tns:GetTerminResponse>
> >          <GetTerminResult href="#id1" />
> >      </tns:GetTerminResponse>
> >      <types:Termin id="id1" xsi:type="types:Termin">
> >          <TerminID xsi:type="xsd:int">int</TerminID>
> >          <LV xsi:type="xsd:int">int</LV>
> >          <Ort xsi:type="xsd:string">string</Ort>
> >          <Zeit xsi:type="xsd:dateTime">dateTime</Zeit>
> >          <Pruefer xsi:type="xsd:int">int</Pruefer>
> >      </types:Termin>
> > </soap:Body>
> > </soap:Envelope>
> >
> >
> > Im trying to get a .NET client to work with a .NET Webservice _and_ an
> > Apache SOAP RPC service.
> >
> > cu
> > lot
> >
> >
> >
> >
> >
>
>



RE: Interop Problem .NET Client / Apache SOAP Server

Posted by Tony Hong <th...@xmethods.net>.
Sorry, one clarification -

Pull down the package 'Web Services Toolkit' from alphaWorks.  "servicegen"
is a utility bundled in the package.

Tony

> -----Original Message-----
> From: Tony Hong [mailto:thong@xmethods.net]
> Sent: Friday, January 25, 2002 5:12 AM
> To: soap-user@xml.apache.org
> Subject: RE: Interop Problem .NET Client / Apache SOAP Server
>
>
> Hi Martin,
>
> To generate Apache SOAP servers from WSDL defintions, try using
> the IBM WSTK
> utility "servicegen", available at http://www.ibm.com/alphaworks,
> which will
> create everything you need , including the deployment descriptor. You then
> simply supply the implementation, and the server will then be strictly
> conformant to the wsdl - no worrying about namespaces, soapaction, etc.
>
> Tony
>
> > -----Original Message-----
> > From: Martin Centner [mailto:mcentner@sbox.tugraz.at]
> > Sent: Friday, January 25, 2002 2:47 AM
> > To: soap-user@xml.apache.org
> > Subject: Re: Interop Problem .NET Client / Apache SOAP Server
> >
> >
> > Simon Fell wrote:
> >
> > > Make sure your .NET proxy class thinks its doing section 5 encoding,
> > > it sounds like its trying to do doc/literal.
> > >
> > > The method in the proxy class should have a
> > > System.Web.Services.Protocols.SoapRpcMethodAttribute attribute on it.
> >
> >
> > hm, this works fine with the HelloWorld expample, but if i want to
> > return a more complex data structure i run into trubbles.
> >
> > The Apache SOAP RPC returns
> >
> > <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:GetTerminResponse xmlns:ns1="http://sicher.net/"
> > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> >          <return xsi:type="ns1:Termin">
> >              <TerminID xsi:type="xsd:int">1</TerminID>
> >              <LV xsi:type="xsd:int">534766</LV>
> >              <Ort xsi:type="xsd:string">i7</Ort>
> >              <Zeit
> xsi:type="xsd:timeInstant">1970-01-02T14:18:52Z</Zeit>
> >              <Pruefer xsi:type="xsd:int">2</Pruefer>
> >          </return>
> >      </ns1:GetTerminResponse>
> > </SOAP-ENV:Body>
> > </SOAP-ENV:Envelope>
> >
> >
> > But the .NET wants to have it in this form (according to the WSDL)
> >
> > <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:tns="http://sicher.net/"
> > xmlns:types="http://sicher.net/encodedTypes"
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > <soap:Body
> soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> >      <tns:GetTerminResponse>
> >          <GetTerminResult href="#id1" />
> >      </tns:GetTerminResponse>
> >      <types:Termin id="id1" xsi:type="types:Termin">
> >          <TerminID xsi:type="xsd:int">int</TerminID>
> >          <LV xsi:type="xsd:int">int</LV>
> >          <Ort xsi:type="xsd:string">string</Ort>
> >          <Zeit xsi:type="xsd:dateTime">dateTime</Zeit>
> >          <Pruefer xsi:type="xsd:int">int</Pruefer>
> >      </types:Termin>
> > </soap:Body>
> > </soap:Envelope>
> >
> >
> > Im trying to get a .NET client to work with a .NET Webservice _and_ an
> > Apache SOAP RPC service.
> >
> > cu
> > lot
> >
> >
> >
> >
> >
>
>



RE: Interop Problem .NET Client / Apache SOAP Server

Posted by Tony Hong <th...@xmethods.net>.
Hi Martin,

To generate Apache SOAP servers from WSDL defintions, try using the IBM WSTK
utility "servicegen", available at http://www.ibm.com/alphaworks, which will
create everything you need , including the deployment descriptor. You then
simply supply the implementation, and the server will then be strictly
conformant to the wsdl - no worrying about namespaces, soapaction, etc.

Tony

> -----Original Message-----
> From: Martin Centner [mailto:mcentner@sbox.tugraz.at]
> Sent: Friday, January 25, 2002 2:47 AM
> To: soap-user@xml.apache.org
> Subject: Re: Interop Problem .NET Client / Apache SOAP Server
>
>
> Simon Fell wrote:
>
> > Make sure your .NET proxy class thinks its doing section 5 encoding,
> > it sounds like its trying to do doc/literal.
> >
> > The method in the proxy class should have a
> > System.Web.Services.Protocols.SoapRpcMethodAttribute attribute on it.
>
>
> hm, this works fine with the HelloWorld expample, but if i want to
> return a more complex data structure i run into trubbles.
>
> The Apache SOAP RPC returns
>
> <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:GetTerminResponse xmlns:ns1="http://sicher.net/"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>          <return xsi:type="ns1:Termin">
>              <TerminID xsi:type="xsd:int">1</TerminID>
>              <LV xsi:type="xsd:int">534766</LV>
>              <Ort xsi:type="xsd:string">i7</Ort>
>              <Zeit xsi:type="xsd:timeInstant">1970-01-02T14:18:52Z</Zeit>
>              <Pruefer xsi:type="xsd:int">2</Pruefer>
>          </return>
>      </ns1:GetTerminResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> But the .NET wants to have it in this form (according to the WSDL)
>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:tns="http://sicher.net/"
> xmlns:types="http://sicher.net/encodedTypes"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>      <tns:GetTerminResponse>
>          <GetTerminResult href="#id1" />
>      </tns:GetTerminResponse>
>      <types:Termin id="id1" xsi:type="types:Termin">
>          <TerminID xsi:type="xsd:int">int</TerminID>
>          <LV xsi:type="xsd:int">int</LV>
>          <Ort xsi:type="xsd:string">string</Ort>
>          <Zeit xsi:type="xsd:dateTime">dateTime</Zeit>
>          <Pruefer xsi:type="xsd:int">int</Pruefer>
>      </types:Termin>
> </soap:Body>
> </soap:Envelope>
>
>
> Im trying to get a .NET client to work with a .NET Webservice _and_ an
> Apache SOAP RPC service.
>
> cu
> lot
>
>
>
>
>



RE: Interop Problem .NET Client / Apache SOAP Server

Posted by Tony Hong <th...@xmethods.net>.
Hi Martin,

To generate Apache SOAP servers from WSDL defintions, try using the IBM WSTK
utility "servicegen", available at http://www.ibm.com/alphaworks, which will
create everything you need , including the deployment descriptor. You then
simply supply the implementation, and the server will then be strictly
conformant to the wsdl - no worrying about namespaces, soapaction, etc.

Tony

> -----Original Message-----
> From: Martin Centner [mailto:mcentner@sbox.tugraz.at]
> Sent: Friday, January 25, 2002 2:47 AM
> To: soap-user@xml.apache.org
> Subject: Re: Interop Problem .NET Client / Apache SOAP Server
>
>
> Simon Fell wrote:
>
> > Make sure your .NET proxy class thinks its doing section 5 encoding,
> > it sounds like its trying to do doc/literal.
> >
> > The method in the proxy class should have a
> > System.Web.Services.Protocols.SoapRpcMethodAttribute attribute on it.
>
>
> hm, this works fine with the HelloWorld expample, but if i want to
> return a more complex data structure i run into trubbles.
>
> The Apache SOAP RPC returns
>
> <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:GetTerminResponse xmlns:ns1="http://sicher.net/"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>          <return xsi:type="ns1:Termin">
>              <TerminID xsi:type="xsd:int">1</TerminID>
>              <LV xsi:type="xsd:int">534766</LV>
>              <Ort xsi:type="xsd:string">i7</Ort>
>              <Zeit xsi:type="xsd:timeInstant">1970-01-02T14:18:52Z</Zeit>
>              <Pruefer xsi:type="xsd:int">2</Pruefer>
>          </return>
>      </ns1:GetTerminResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> But the .NET wants to have it in this form (according to the WSDL)
>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:tns="http://sicher.net/"
> xmlns:types="http://sicher.net/encodedTypes"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>      <tns:GetTerminResponse>
>          <GetTerminResult href="#id1" />
>      </tns:GetTerminResponse>
>      <types:Termin id="id1" xsi:type="types:Termin">
>          <TerminID xsi:type="xsd:int">int</TerminID>
>          <LV xsi:type="xsd:int">int</LV>
>          <Ort xsi:type="xsd:string">string</Ort>
>          <Zeit xsi:type="xsd:dateTime">dateTime</Zeit>
>          <Pruefer xsi:type="xsd:int">int</Pruefer>
>      </types:Termin>
> </soap:Body>
> </soap:Envelope>
>
>
> Im trying to get a .NET client to work with a .NET Webservice _and_ an
> Apache SOAP RPC service.
>
> cu
> lot
>
>
>
>
>



Re: Interop Problem .NET Client / Apache SOAP Server

Posted by Martin Centner <mc...@sbox.tugraz.at>.
Simon Fell wrote:

> Make sure your .NET proxy class thinks its doing section 5 encoding,
> it sounds like its trying to do doc/literal.
> 
> The method in the proxy class should have a
> System.Web.Services.Protocols.SoapRpcMethodAttribute attribute on it.


hm, this works fine with the HelloWorld expample, but if i want to 
return a more complex data structure i run into trubbles.

The Apache SOAP RPC returns

<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:GetTerminResponse xmlns:ns1="http://sicher.net/" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <return xsi:type="ns1:Termin">
             <TerminID xsi:type="xsd:int">1</TerminID>
             <LV xsi:type="xsd:int">534766</LV>
             <Ort xsi:type="xsd:string">i7</Ort>
             <Zeit xsi:type="xsd:timeInstant">1970-01-02T14:18:52Z</Zeit>
             <Pruefer xsi:type="xsd:int">2</Pruefer>
         </return>
     </ns1:GetTerminResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


But the .NET wants to have it in this form (according to the WSDL)

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tns="http://sicher.net/" 
xmlns:types="http://sicher.net/encodedTypes" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <tns:GetTerminResponse>
         <GetTerminResult href="#id1" />
     </tns:GetTerminResponse>
     <types:Termin id="id1" xsi:type="types:Termin">
         <TerminID xsi:type="xsd:int">int</TerminID>
         <LV xsi:type="xsd:int">int</LV>
         <Ort xsi:type="xsd:string">string</Ort>
         <Zeit xsi:type="xsd:dateTime">dateTime</Zeit>
         <Pruefer xsi:type="xsd:int">int</Pruefer>
     </types:Termin>
</soap:Body>
</soap:Envelope>


Im trying to get a .NET client to work with a .NET Webservice _and_ an 
Apache SOAP RPC service.

cu
lot






Re: Interop Problem .NET Client / Apache SOAP Server

Posted by Martin Centner <mc...@sbox.tugraz.at>.
Simon Fell wrote:

> Make sure your .NET proxy class thinks its doing section 5 encoding,
> it sounds like its trying to do doc/literal.
> 
> The method in the proxy class should have a
> System.Web.Services.Protocols.SoapRpcMethodAttribute attribute on it.


hm, this works fine with the HelloWorld expample, but if i want to 
return a more complex data structure i run into trubbles.

The Apache SOAP RPC returns

<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:GetTerminResponse xmlns:ns1="http://sicher.net/" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <return xsi:type="ns1:Termin">
             <TerminID xsi:type="xsd:int">1</TerminID>
             <LV xsi:type="xsd:int">534766</LV>
             <Ort xsi:type="xsd:string">i7</Ort>
             <Zeit xsi:type="xsd:timeInstant">1970-01-02T14:18:52Z</Zeit>
             <Pruefer xsi:type="xsd:int">2</Pruefer>
         </return>
     </ns1:GetTerminResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


But the .NET wants to have it in this form (according to the WSDL)

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tns="http://sicher.net/" 
xmlns:types="http://sicher.net/encodedTypes" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <tns:GetTerminResponse>
         <GetTerminResult href="#id1" />
     </tns:GetTerminResponse>
     <types:Termin id="id1" xsi:type="types:Termin">
         <TerminID xsi:type="xsd:int">int</TerminID>
         <LV xsi:type="xsd:int">int</LV>
         <Ort xsi:type="xsd:string">string</Ort>
         <Zeit xsi:type="xsd:dateTime">dateTime</Zeit>
         <Pruefer xsi:type="xsd:int">int</Pruefer>
     </types:Termin>
</soap:Body>
</soap:Envelope>


Im trying to get a .NET client to work with a .NET Webservice _and_ an 
Apache SOAP RPC service.

cu
lot






Re: Interop Problem .NET Client / Apache SOAP Server

Posted by Simon Fell <so...@zaks.demon.co.uk>.
Make sure your .NET proxy class thinks its doing section 5 encoding,
it sounds like its trying to do doc/literal.

The method in the proxy class should have a
System.Web.Services.Protocols.SoapRpcMethodAttribute attribute on it.

Cheers
Simon
www.pocketsoap.com

On Fri, 25 Jan 2002 09:25:04 +0100, in soap you wrote:

>Hi All!
>
>I have got a interoperability problem between a MS.NET client and Apache 
>SOAP server. The problem is that there are no namespace prefixes in the 
><return> element(s) of the RPC response from the Apache SOAP server.
>
><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:HelloWorldResponse xmlns:ns1="http://sicher.net/" 
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>     <return xsi:type="xsd:string">HelloWorld</return>
></ns1:HelloWorldResponse>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>The .NET client does not recognize that the <return> element.
>
>If I use my own serializer to serialize this message and put the 
>namespace prefix infront of the <return> tag (<ns1:return>) the .NET 
>client recognizes the <ns1:return> element.
>
><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:HelloWorldResponse xmlns:ns1="http://sicher.net/" 
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>     <ns1:return xsi:type="xsd:string">HelloWorld</return>
>     ^^^^^
></ns1:HelloWorldResponse>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>I have looked through the Apache SOAP source code, but it seems there is 
>no possibility to enable the namespace prefix other than writing my own 
>serializer.
>
>
>Are there any possiblities to get the .NET client to accept the return 
>element without the namespace prefix, or are there other possibilies 
>then writing my own serializers?
>
>
>cu
>lot


Re: Interop Problem .NET Client / Apache SOAP Server

Posted by Simon Fell <so...@zaks.demon.co.uk>.
Make sure your .NET proxy class thinks its doing section 5 encoding,
it sounds like its trying to do doc/literal.

The method in the proxy class should have a
System.Web.Services.Protocols.SoapRpcMethodAttribute attribute on it.

Cheers
Simon
www.pocketsoap.com

On Fri, 25 Jan 2002 09:25:04 +0100, in soap you wrote:

>Hi All!
>
>I have got a interoperability problem between a MS.NET client and Apache 
>SOAP server. The problem is that there are no namespace prefixes in the 
><return> element(s) of the RPC response from the Apache SOAP server.
>
><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:HelloWorldResponse xmlns:ns1="http://sicher.net/" 
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>     <return xsi:type="xsd:string">HelloWorld</return>
></ns1:HelloWorldResponse>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>The .NET client does not recognize that the <return> element.
>
>If I use my own serializer to serialize this message and put the 
>namespace prefix infront of the <return> tag (<ns1:return>) the .NET 
>client recognizes the <ns1:return> element.
>
><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:HelloWorldResponse xmlns:ns1="http://sicher.net/" 
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>     <ns1:return xsi:type="xsd:string">HelloWorld</return>
>     ^^^^^
></ns1:HelloWorldResponse>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>I have looked through the Apache SOAP source code, but it seems there is 
>no possibility to enable the namespace prefix other than writing my own 
>serializer.
>
>
>Are there any possiblities to get the .NET client to accept the return 
>element without the namespace prefix, or are there other possibilies 
>then writing my own serializers?
>
>
>cu
>lot