I am trying to use some .NET web services using JAX-WS. I created Java classes using the wsimport tool. However, when I try to use these (proprietary, not public) web services in Java, I notice that most of the methods and properties provided by the provider in their C # examples are not available in the generated classes (despite the absence of any errors when creating Java classes from the WSDL file). Connecting to web services also works mostly.
When I tried to generate the C # class using wsdl.exe from the .NET SDK, all the methods were correctly generated.
What would be the best way to use .NET web services so that full functionality is available in Java and why does wsimport generate only a small subset of all the methods and properties described in the WSDL file?
Example: in the WSDL file UserManagement.wsdl there is a fragment
<s:schema elementFormDefault="qualified" targetNamespace=" http://www.initechsystems.com/initech7/initechws/ "> <s:element name="UserSecurityContext" type="s2:UserSecurityContext"/> <s:complexType name="UserSecurityContext"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Token" type="s2:UserToken"/> </s:sequence> </s:complexType> <s:complexType name="UserToken"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Value" type="s:string"/> </s:sequence> </s:complexType> </s:schema>
In C #, I can access the UserSecurityContext as follows:
UserManagement userMgmt = new UserManagement(); userMgmt.UserSecurityContextValue = new SampleWS.UserRef.UserSecurityContext();
However, in Java I can create the UserManagement object
UserManagement userMgmt = new UserManagement();
but the generated UserManagement object does not have any SecurityContext object available, and not getters or setters for such a private object.
simon source share