Create SOAP request using Database input

One Star

Create SOAP request using Database input

Hello,
I am currently trying to create a job that takes values from a database table and pass them to a tSOAP component to get values after consuming a webservice.
The database table contains a list of currency codes and I want to get these codes and pass them in a SOAP request message to the webservice http://www.webservicex.net/CurrencyConvertor.asmx
I mapped the input DB data to a tXMLMap component. The output of the tXMLMap is set to be a document with name "Soap". The root element of this document is named as "ConversionRate" and it has sub-elements "FromCurrency" and "ToCurrency". The root element is, by default, the loop element.
When I run the job, the values from the database table are retrieved one at a time and sent to the tSOAP component.
However I get the following error when trying to consume the webservice:
Soap: <?xml version="1.0" encoding="UTF-8"?>
<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:Header><soap12:Upgrade xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"><soap12Smiley FrustratedupportedEnvelope qname="soap:Envelope"></soap12Smiley FrustratedupportedEnvelope><soap12Smiley FrustratedupportedEnvelope qname="soap12:Envelope"></soap12Smiley FrustratedupportedEnvelope></soap12:Upgrade></soap:Header><soap:Body><soap:Fault><faultcode>soap:VersionMismatch</faultcode><faultstring>System.Web.Services.Protocols.SoapException: Possible SOAP version mismatch: Envelope namespace was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/.
at System.Web.Services.Protocols.SoapServerProtocol.CheckHelperVersion()
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)</faultstring><detail/></soap:Fault></soap:Body></soap:Envelope>
The same error message is displayed for SOAP Version 1.1 or 1.2.
Are there any online examples to create and execute a t<DB>Input-->tXMLMap-->tSOAP-->tLogRow kind of job?
Moderator

Re: Create SOAP request using Database input

Hi,
Which talend product build version are you using? Would you mind posting your screenshots of tSOAP component setting into forum so that we can address your issue quickly.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Create SOAP request using Database input

Hi,
I am currently using the Talend Open Studio for ESB v5.3.1.
And as I am posting messages as a guest I am not sure how I can add screenshots to my post.
Moderator

Re: Create SOAP request using Database input

Hi,
You should register and log in as a Community member first, then you'll get a Image upload box that allows to upload screen captures and images up to 200KB.(Limits: 20 images per post, each image must be less then 1024x768 pixels and 200 KB, .png is preferred)
Note: for registered users, please click on "post reply" (not through the quick post").
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seven Stars

Re: Create SOAP request using Database input

Hi,
I have attached the screenshot of the tSOAP component properties.
But I found the reason for the error message when I debugged the job.
The reason was that the SOAP request sent was not in the correct format.
Once I corrected that in the tXMLMap Map Editor the job was successfully executed.
Moderator

Re: Create SOAP request using Database input

Hi,
Thanks for your feedback. Don't hesitate to post your issue on forum.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.