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 Darren Rowley <Da...@orderware.net> on 2002/12/04 04:40:09 UTC

Message Service interop question

I have a message service that I have written and deployed into Axis, which 
Axis accepts using the "method (SOAPEnvelope, SOAPEnvelope)" signature. On 
the server the implementation searches for a list of products and returns 
a SOAP body like this:

 <soapenv:Body>
  <m:SearchProductsResponse xmlns:m="http://orderware.net">
    <Product>
     <Code>AWSCU-100</Code>
     <Qty>AWSCU-100</Qty>
     <Price>123.45</Price>
    </Product>
    <Product>
        ... // repeating list of products
    </Product>
  </m:SearchProductsResponse>
 </soapenv:Body>

Because this is a pure message service there are no java classes on the 
server side so I hand coded a WSDL file. I was suprised to find that after 
a bit of tinkering that Axis could generate client side stubs (using 
WSDL2Java)  to correctly call my service ( I wasn't aware that Axis was 
able to generate client side code for Message services) . A bean class 
SearchProductsResponse  is created that has an accessor to an array of 
Product[] beans. A bean class is also created for the ProductRequest top 
level namespace in the request which contains an array of Filters[] which 
are basically a set of WHERE clauses to the server side product search. I 
created up a little tester class and great I was able to call my service 
and return products.

Now armed with the WSDL file I tried calling the service with the .NET 
test client (our Customer wants to consume the service with a C# client) 
and although it interprets the WSDL file and creates all the relevant 
proxies, null Product[] beans are returned. On the server side my service 
is called and it does seem to return all the data in the same way it 
returns it to the Axis client. 

Unfortunately I'm a complete novice when it comes to .NET and C# but was 
wondering if someone has come across this problem or if there are known 
interop issues with Axis document style webservices and .NET? 

Finally one difference I noticed in the generted .NET code was that in the 
Axis client a bean is created for the request (containing the filters[]) 
and a bean is created for the response (ProductSearchResponse) containing 
the products[]. In .NET the Filter[] seems to be passed directly to the 
invoke() method and it attempts to decode a Product[] array directly from 
the return of the invoke method (i.e. no bean classes are created for the 
top level namespaced element in the SOAP body).

Any pointers would be much appreciated...

darren.
-------------------------------------------------
Darren Rowley
Software Architect
OrderWare® Solutions Limited
darrenr@orderware.net
www.orderware.net
PH: +64 9 573 3316
FX:  +64 9 573 3301
-------------------------------------------------