XML Output Stage issue, missing namespace prefixes
Posted: Fri May 16, 2008 1:48 am
Hi all,
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:
This runs perfectly. Therefore we do not have any connectivity issues or issues with the web services stage (i hope).
2. Next test was to use the XML output stage to generate the Request Message chunk. Job design as follows:
The XPath for the temp column as imported by the web service WSDL importer in CToF_IN tabledef is:
The XML chunk that i get for this XPath is:
The issue is that i should be getting "</ns1:CtoF xmlns:..." and not "<:CtoF xmlns:..." from the XML Output Stage.
Another trial run with the XPath:
produced
This has been also tested out in PX with the same results.
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
Anyone faced this before?
.
Thanks in advance
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?
![Sad :(](./images/smilies/icon_sad.gif)
Thanks in advance