You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Adam.Leggett" <Ad...@upco.co.uk> on 2001/11/28 13:36:38 UTC

FW: .NET Service Apache Soap and Axis clients


-----Original Message-----
From: Adam.Leggett [mailto:Adam.Leggett@upco.co.uk] 
Sent: Wednesday, November 28, 2001 12:21 PM
To: 'soap-user@xml.apache.org'
Subject: RE: .NET Service Apache Soap and Axis clients


Sam,

Thanks for the links I got both Axis and Apache Clients working with the
'base' .NET services.

However, maybe u or someone could shed some light on our internal interop
test problems. I am talking here about Apache/Axis clients calling .NET
service. I know I may be goin over old ground , but bear with me.

We are attempting the now standard invocation of an .NET 'echo' service.

First point is that I have success when using GLUE to invoke calls. Note
that GLUE does not send the schema type declaration attribute. I use the
same paramater names for Apache and Axis clients and I can remotely invoke
the same calls but each call returns me null or (for numeric types) zero.

My MS colleague is auto-generating WSDL from his deployed C# class.

When comparing the base interop WSDL with my colleagues, it appears that
'our' WSDL defines all parameters to all methods as complex types ie:

In the types parent element 

<s:element name="echoString">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="str"
nillable="true" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="echoStringResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="echoStringResult"
nillable="true" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>

And in his corresponding message element

<message name="echoStringSoapIn">
    <part name="parameters" element="s0:echoString" />
  </message>
  <message name="echoStringSoapOut">
    <part name="parameters" element="s0:echoStringResponse" />
  </message>

So in Axis when I make the call (or something similar in apache):

String ret = (String) call.invoke("http://tempuri.org","echoString", new
Object[]{ new RPCParam("str","Hello!")});

Request ***************************************   

<?xml version="1.0" encoding="UTF-8" ?> 

- <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <SOAP-ENV:Body>
- 	<ns3:echoString xmlns:ns3="http://tempuri.org">
  		<str xsi:type="xsd:string">Hello!</str> 
  	</ns3:echoString>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

Response ***************************************************

  <?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>
- 		<echoStringResponse xmlns="http://tempuri.org/">
  			<echoStringResult xsi:nil="true" /> 
  		</echoStringResponse>
  	</soap:Body>
  </soap:Envelope>

But in Glue (no typing included in request)
String str = (String) Registry.invoke( url, "echoString", new Object[]{
"Hello" } );

It works ie:

Request *********************************************************

<?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>
		<echoString xmlns='http://tempuri.org/'>
			<str>Hello</str>
		</echoString>
	</soap:Body>
</soap:Envelope>

 

Response *******************************************************

<?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>
    <echoStringResponse xmlns="http://tempuri.org/">
      <echoStringResult>Hello</echoStringResult>
    </echoStringResponse>
  </soap:Body>
</soap:Envelope>

 
I already know how to handle the deserialisation issues. Does anyone have
any experience of this problem?

Thanks in advance

Adam Leggett
UPCO
Direct Line: 0113 20 10 631
Fax: 0113 20 10 666
<http://www.upco.co.uk>
The contents of this email are intended for the named addressees and may
contain confidential and / or privileged material. If received in error,
please contact UPCO on +44 (0)113 20 10 600 and then delete the entire email
from your system. Unauthorised review, distribution, disclosure or other use
of this information could constitute a breach of confidence. Your
co-operation in this matter is greatly appreciated.



-----Original Message-----
From: Sam Ruby [mailto:rubys@us.ibm.com] 
Sent: Tuesday, November 27, 2001 4:44 PM
To: soap-user@xml.apache.org
Subject: Re: .NET Service Apache Soap and Axis clients


Adam Leggett wrote:
>
> Could someone on the group give me a quick refresh (or point to a
> resource) that deals with any iterop issues here.

http://www.whitemesa.com/interop.htm
http://www.apache.org/~rubys/ApacheClientInterop.html

These contain actual results, updated frequently of running the interop
tests against public servers.  You can try your clients against the same
servers.

The public Apache servers are also updated frequently with the latest code.
If you are experiencing interop problems, you might consider trying out one
of the nightly builds.

> However when I attempt to invoke his implementation of the Echo
> service I can do so but the return values are always null or zero. I 
> have the exact same problem with an Axis client.

You might want to check the names your collegue has assigned to the
parameters being passed.

- Sam Ruby