Pages

Showing posts with label SOAP. Show all posts
Showing posts with label SOAP. Show all posts

Wednesday, March 21, 2012

SOAP Web Services - Generating Java artifacts with WSIMPORT

Hi

The Java JDK comes with an easy tool to generate Java Web Services artifacts. Prefer this method instead of JBoss wsconsume because if your JBoss is too old, it will lead to some random error (ClassCastException...)

You just have to type the following command.

wsimport -s source -p com.mypackage http://mywsdlpath
:8080/method?wsdl

Friday, February 10, 2012

SOAP Web Services - Generating Java artifacts, JAX-WS

If you want to consume web services with Java and JBoss, you can use the JBoss tool "wsconsume" to build all the artifacts used to talk with the SOAP Web Service.

You need JBoss to achieve this.

The tool is in JBoss/bin. It is named wsconsume.sh

Here are the steps to generates the aritfacts
  1. Use the following command to generate the artifacts: wsconsume.sh -k -p com.mypackage http://127.0.0.1:8080/ws/jaxws/test?wsdl
  2. The tool will generate all the Java class required

Have fun!