Posts

Showing posts from May, 2012

What are the main modules in Spring- ws api?

There are 3 main modules of spring-ws
 core package- consists of soapmessage interface,webservice interfaces,supporting class for implementing    webservice endpoints.security pacakge-authentication and authorization service,encrypt and decrypt soap servicesoxm-(object to xml marshalling)-supports jaxb1 and jaxb2 marshallers

Generating Client Codee from WSDL Using Netbeans7.1

I love net beans just coz it is smart and intuitive and meant for smart people who love to do things quickly.Netbeans tutorial is very informative as well.I also love the net beans maven support.It saves lot of time unlike eclipse.
I was given a web service URL generated from .net application and was asked to write a java client app.

I used ws- tool and spring-ws template and wrote the client code.I started  using spring-ws client--but got web service transport exception.

Then I used net beans I succeeded in my venture.

Here are steps:

1:Use netbeans be smart.
2:Create a Simple WebApplication Project
3:Right Click on the Project->New->WebService->Web Service Client
4:Clock on Next
5:Select WSDL URL in the radio button
6:Enter the WSDL URL and Check Generate Dispatach Code
7:Create a Sample Servlet
8:In the process method and some empty lines
9:In the empty lines right Click ->Insert code
10:Select -Insert webservice operation
11:Webservice method will be called.
12:Call the method  …

wsimport - to generate JAVA files from WSDL

If you go to your java installation folder/bin dir you can see  wsimport tool.
This tool generates proxy classes from WSDL file. Using the proxy  classes we can write our client application.

you can find wsimport--> C:\Program Files\Java\jdk1.6.0_07\bin 

command to use wsimport :


C:\Program Files\Java\jdk1.6.0_07\bin>wsimport -keep -verbose http://abcdsvr08.
rd.com:82/MIIPIService.svc?wsdl
parsing WSDL...



generating code...
org\tempuri\ExecutePSApplication.java
org\tempuri\ExecutePSApplicationResponse.java
org\tempuri\IMIPService.java
org\tempuri\ImportXMLDataTransactionService.java
org\tempuri\ImportXMLDataTransactionServiceResponse.java
org\tempuri\MIPService.java
org\tempuri\ObjectFactory.java
org\tempuri\package-info.java
com\prdcinfotech\types\AcknowledgeType.java
com\prdcinfotech\types\MIPExecuteRequest.java
com\prdcinfotech\types\MIPExecuteResponse.java
com\prdcinfotech\types\ObjectFactory.java
com\prdcinfotech\types\RequestBase.java
com\prdcinfotech\types\ResponseBase.java
com\prdcinfotec…