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  from the process request method by setting the request and response.

Ref:
http://srikanthtechnologies.com/blog/dotnet/wsdaljava.aspx 
http://netbeans.org/kb/docs/websvc/client.html



Comments

Popular posts from this blog

defining functions clojure

Integrating Struts2 with Spring Security using Custom Login Form