Hi there,
I'm having trouble getting an axis client working in "document/literal" format so that a .net client can access it.
1) If I create a simple webservice that returns primitive types or arrays of primitive types using Axis, in RPC format, my
java client can access it just fine. But it needs to be in document/literal format for the .NET client to be able to access it. When I set it up to use document/literal, even my java client has trouble with it. It get a response, but the returned values are all null. Any idea why this is?
WSDD for simple types:
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="HelloWorldService" provider="java:RPC" style="document" use="literal">
<parameter name="className" value="com.test.services.HelloWorldService"/>
<parameter name="allowedMethods" value="*"/>
</service>
</deployment>
2) Once I get it working with primitive types, I want to eventually get it working for complex types (say a java bean that is made up of primitive types internally). I can once again get complex types working with java clients in RPC format, but not in document/literal format (then it returns null).
WSDD for complex types:
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="EmployeeService" provider="java:RPC" style="document" use="literal">
<parameter name="className" value="com.test.services.EmployeeService"/>
<parameter name="allowedMethods" value="*"/>
<beanMapping qname="myNS:Employee" xmlns:myNS="urn:EmployeeService" languageSpecificType="java:com.test.services.Employee"/>
</service>
</deployment>
Actually, when I use document/literal (for simple or complex types), even the Wsdl2Java
ant task has trouble parsing wsdl to create the client code, though it works just fine with RPC. I'm just using the WSDL I get when I add ?wsdl to end of the URL. I'm not doing the WSDL first approach. I'm not an xml guru and I really don't want to write the Wsdl by hand, but I can certainly tweak a auto-generated one to get it working. If you want to see the Wsdl to any of the above services, let me know. Please let me know if you have any suggestions to resolve this.
Thanks a lot.