views:

40

answers:

1

I tried the tool wsdl2java from axis2, but looks something wrong with the XML Java class binding, so when making the call, a ADBException (adb binding used) will be thrown out. can someone kindly tell the bet tool/way to generate can-work client code from such style of wsdl file (standard .net style:document literal wrapped)? Thanks.

A: 

If you are using the 1.6 version of the JDK there is a built in tool called wsimport. This uses JAXB to create and compile the stubs out of the WSDL. The output is compatible follows the JAX-wS standard I think.

One thing to be careful about is that you may need a custom JAXB custom binding so that all your data classes have actual values and not JAXBElement instances. Here is the custom binding contents:

<jaxb:bindings version="2.0"
  xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
  <jaxb:globalBindings generateElementProperty="false"/>
</jaxb:bindings> 

If that doesn't work out for you look into either apache CXF of axis2 (which i think you already tried).

Good luck.

Gennadiy