How To Add Web Service SOAP Call On Netbeans IDE
How To Add Web Service SOAP Call On Netbeans IDE
Posted on http://m-shaheen.blogspot.com
In these below lines I describe briefly how to add SOAP web service call using
Netbeans 6.5 IDE built in wizards for both J2ME and J2EE/J2SE platforms:
J2ME platform
2. Press Next
4. Press Finish
This will create SOAP stub classes for that web service
5. in the midlet code insatiate the web service stup class (not use the interface)
Sample code:
backend._setProperty(
eis_wsbackendService_Stub.SESSION_MAINTAIN_PROPERTY,
new Boolean(true)
);
try {
aa = backend.getAccounts(userID);
ex.printStackTrace();
}
J2EE/J2SE
1. Right click the project item : New>WebServiceClient
this will create the SOAP stub classes for the referenced Web service
3. Drag and drop the web service reference from the IDE this will create the
following code :
try {
com.galaxy.test.eis.ws.EisWsbackend port =
service.getEisWsbackendPort();
System.out.println("Result = "+result);
ex.printStackTrace();