[jboss-user] [JBossWS] - Re: Generate wsdl from JSR 181 POJO

monowai do-not-reply at jboss.com
Thu Feb 15 19:45:34 EST 2007

I assume by the deafening silence on this, that this is either a really stupid question, or we're the only suckers doing this  ¯\(°_o)/¯

Here's how it works for me.  Create a file called wstools-java-to-wsdl.xml based upon wstools-config.xml but have it include the <java-wsdl> tags.  Here is an example based on the 181ejb example:

  |       <service name="TestService" style="rpc"
  |         endpoint="org.jboss.test.ws.jaxws.samples.jsr181ejb.EndpointInterface"/>
  |       <namespaces target-namespace="http://org.jboss.ws/samples/jsr181ejb"
  |         type-namespace="http://org.jboss.ws/samples/jsr181ejb/types"/>
  |       <mapping file="jaxrpc-mapping.xml"/>
  |       <webservices servlet-link="TrivialEndpoint"/>
  |     </java-wsdl>

Then, run the wstools with the following arguments:

-cp [FULL_PATH_TO_CLASS_FILE] -config ./resources/wstools-config.xml -dest ./resources/META-INF

My paths are relative to the folder jbossws-samples-1.0.4.GA\jaxws\jsr181ejb folder.

When run, it will create the META-INF/wsdl/TestServices.wsdl file.

It seems that wstools is not selective in what it creates.  If you specify <java-wsdl> in your main wstools-config file, and you run the JBOSS sample ANT build files, then the WSDL will be recreated each time, overwriting your <soap:address location=.../> tag, which is not what you probably want to happen.  I haven't looked in to how this works yet.

Likewise if the .wsdl file doesn't exist, then when you run your java2wsdl command, it will error complaining that it "can't load wsdl file" if your config contains the <wsdl-java> tags; Bit of a circular refrence going on there!


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017334#4017334

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017334

More information about the jboss-user mailing list