File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Send SOAP Request to wsdl Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Send SOAP Request to wsdl" Watch "Send SOAP Request to wsdl" New topic
Author

Send SOAP Request to wsdl

Jigeshs Shahs
Greenhorn

Joined: May 28, 2009
Posts: 26
Hi All,

I am a Software Tester and want a code through which I can send a SOAP request to a WSDL
So anybody having an idea regarding the code or any reference through which I can do it
I don't wont to do it through SOAP UI tool as I want to embed this thing in my existing Automation code

Below is the WSDL
http://www.webservicex.net/CurrencyConvertor.asmx?wsdl

Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET/">
<soapenv:Header/>
<soapenv:Body>
<web:ConversionRate>
<web:FromCurrency>USD</web:FromCurrency>
<web:ToCurrency>EUR</web:ToCurrency>
</web:ConversionRate>
</soapenv:Body>
</soapenv:Envelope>

Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ConversionRateResponse xmlns="http://www.webserviceX.NET/">
<ConversionRateResult>0.7566</ConversionRateResult>
</ConversionRateResponse>
</soap:Body>
</soap:Envelope>

Thanks
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
All major SOAP implementations come with tools that can create Java client code from a WSDL. Find out how your SOAP implementation of choice does it, and you should be well on your way.
Jigeshs Shahs
Greenhorn

Joined: May 28, 2009
Posts: 26
Hi,
Thanks Tim . Can you please elaborate on this one or can you give me any reference for the same.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
The documentation of whichever SOAP implementation you intend to use should get you going. I can't tell you what the tool for creating client code is called because that differs between SOAP implementations. For example, it's called "wsdl2java" for Axis2.
 
Don't get me started about those stupid light bulbs.
 
subject: Send SOAP Request to wsdl
 
Similar Threads
sendind SOAP request
need to add namespace ns2: in the all webservices response tags.
SOAP Fault for SOAP Action property
How to get document object From SOAP Message?
TcpMon in Eclipse