• Post Reply Bookmark Topic Watch Topic
  • New Topic

Send SOAP Request to wsdl  RSS feed

 
Jigeshs Shahs
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Saloon Keeper
Posts: 3893
91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks Tim . Can you please elaborate on this one or can you give me any reference for the same.
 
Tim Moores
Saloon Keeper
Posts: 3893
91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!