Loading
Dynamic Web Service Client

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  Dynamic Web Service Client ?


Ans)

There are several ways to create Dynamic Soap Client, the following
is one of them.

     URL url = new URL("http://api.google.com/GoogleSearch.wsdl");
     QName serviceName = new QName("urn:GoogleSearch", "GoogleSearchService");
     QName portName = new QName("urn:GoogleSearch", "GoogleSearchPort");
     Service service = Service.create(url, serviceName);
     Dispatch<SOAPMessage> dispatch = service.createDispatch(portName,
  SOAPMessage.class,Service.Mode.MESSAGE);

     SOAPMessage request = MessageFactory.newInstance().createMessage(null,
         new FileInputStream("yourGoogleKey.xml"));

     SOAPMessage response = dispatch.invoke(request);
     response.writeTo(System.out);



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Dynamic Web Service Client


Dynamic Web Service Client

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free