Possible Duplicate:
Java: Simple SOAP Client
How to create java client using WSDL? and how to run or test that client?
Possible Duplicate:
Java: Simple SOAP Client
How to create java client using WSDL? and how to run or test that client?
Firstly, you have to genrated client stubs from the wsdl. 1. You can use Eclipse to generate client stubs 2. Or using WSDL2JAVA class of the axis.jar 3. Then, configure the PortType of the proxy and invoke appropriate operation ex:
serviceProxy.setEndpoint(endPoint);
Service_PortType service_PortType = serviceProxy.getService_PortType();
((Stub) service_PortType )._setProperty(Call.USERNAME_PROPERTY,"username");
((Stub) service_PortType )._setProperty(Call.PASSWORD_PROPERTY,"password");
serviceProxy.setService_PortType(service_PortType );
Response response = serviceProxy.operation(Request);