0

Possible Duplicate:
Java: Simple SOAP Client

How to create java client using WSDL? and how to run or test that client?

1
  • (I asked google for "java soap client" and the duplicate was one of the first answers on the list... the idea of SO is to create a big library of answers to common question. Please use it like that first) Commented Nov 23, 2012 at 5:30

1 Answer 1

0

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);
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.