Trying to test the webservices transformer to post data to a web service.
The webservice I've used is the Temperature Conversions service (Starting small as recommended here and elswhere(Thanks ernie for your amazing blogs)).
The web service page is:
http://xmethods.net/ve2/ViewListing.po? ... C8E4640281
This takes one input integer (I am using CtoF) and gets the Corresponding Farenheit value.
1. Imported WSDL and set up the following test rig:
Code: Select all
Transformer----->Web Services Transformer------>Seq File
(Working as
a row gen,
no IP's,
1 stagevar)
2. Next test was to use the XML output stage to generate the Request Message chunk. Job design as follows:
Code: Select all
(This mirrors
the XML sent
to the WS transfm
into a SeqFile).
Transformer----->XML Output----->Transformer----->Web Services Transformer------>Seq File
|
|
Seq File
(Working as
a row gen,
no IP's,
1 stagevar)
Code: Select all
/ns1:CtoF/temp[@xsi:type="xsd:int"]/text()
Code: Select all
<:CtoF xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:TempConverterIntf-ITempConverter" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<temp :type="xsd:int">
53
</temp>
</:CtoF>
Another trial run with the XPath:
Code: Select all
/ns1:CtoF/temp/text()
Code: Select all
<:CtoF xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:TempConverterIntf-ITempConverter" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<temp>
14
</temp>
</:CtoF>
Removing the namespace declarations from the XPath is not an option as (I believe) webservices tend to insist on the namespace being properly defined.
Using only the webservices stage without the XML output stage is also not an option as the final requirement is to build a job that calls a web service that needs a request formatted with 3 levels(??) of XML
Code: Select all
<PO>
<PO LIne
<POLineSchedule>
Anyone faced this before?
.
Thanks in advance