how pass param to Webservice
Posted: Thu Nov 15, 2012 9:33 am
Hi there,
I'm facing a critical issue querying a Webservice. I'll try to describe as much as possible.
I'm working on Datastage v8.1 Server on Unix & DB2
1st/
I tried to load a WSDL file used by other departments with the Web Service Meta Data Importer tool without success. When I tried that the web methods were not visible, and when I tried to load the wsdl from my hard drive I received an error message regarding the namespace = ""
The workaround was to:
- create manually the webmethod in the WebServiceTransformer stage
- In the Output Message in the Output tab of the WSTransformerPX stage the Namespace information is empty. So I checked the User-Defined Message box and selected the newly created field soapResponse.
- specify the namespace in the XMLInput stage
Here is the stages of my 1st job calling a webservice with no input param: WebServiceTransformer stage -> XMLINPUT stage -> FileSequential stage
So calling a Web method which does not require any input param works fine for me.
2nd/ Now I would like to call another webmethod which requires couple of params (same webservice than above, meaning I can not load the WSDL file and have to add manually the details of the webmethod in the WebServiceTransformer stage
So I created the following job: DB2 stage (returns 3 fields [string]) -> Transformer stage -> WebServiceTransformer stage -> Peek stage
This time in the WSTRansformer stage I have an Input Message in the WSTransformer stage ! I can not check the User Definied Message box as it will pick up only 1 field coming from db2 !!
I'm running couple of tests, now I'm getting the following error:
ws_transformer,0: Failure during execution of operator logic.
APT_CombinedOperatorController,0: Fatal Error: Fatal: 0026`:`com.ascentialsoftware.wsclient.ServiceInvocationException: Service invocation exception: Content is not allowed in prolog.
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1602)
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1544)
at com.ascentialsoftware.wspack.Transformer.process(Transformer.java:104)
at com.ascentialsoftware.jds.StageFactory.runStage(StageFactory.java:544)
at com.ascentialsoftware.jds.StageFactory.runTransformer(StageFactory.java:361)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.ascentialsoftware.wsclient.xml.TreeBuilder.xmlReaderToDom(TreeBuilder.java:325)
at com.ascentialsoftware.wsclient.InputRequest.buildRequestBodyDocument(InputRequest.java:922)
at com.ascentialsoftware.wsclient.WebService.callServiceInternal(WebService.java:1625)
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1591)
... 4 more
Please could you help there
Thanks in advance
I'm facing a critical issue querying a Webservice. I'll try to describe as much as possible.
I'm working on Datastage v8.1 Server on Unix & DB2
1st/
I tried to load a WSDL file used by other departments with the Web Service Meta Data Importer tool without success. When I tried that the web methods were not visible, and when I tried to load the wsdl from my hard drive I received an error message regarding the namespace = ""
The workaround was to:
- create manually the webmethod in the WebServiceTransformer stage
- In the Output Message in the Output tab of the WSTransformerPX stage the Namespace information is empty. So I checked the User-Defined Message box and selected the newly created field soapResponse.
- specify the namespace in the XMLInput stage
Here is the stages of my 1st job calling a webservice with no input param: WebServiceTransformer stage -> XMLINPUT stage -> FileSequential stage
So calling a Web method which does not require any input param works fine for me.
2nd/ Now I would like to call another webmethod which requires couple of params (same webservice than above, meaning I can not load the WSDL file and have to add manually the details of the webmethod in the WebServiceTransformer stage
So I created the following job: DB2 stage (returns 3 fields [string]) -> Transformer stage -> WebServiceTransformer stage -> Peek stage
This time in the WSTRansformer stage I have an Input Message in the WSTransformer stage ! I can not check the User Definied Message box as it will pick up only 1 field coming from db2 !!
I'm running couple of tests, now I'm getting the following error:
ws_transformer,0: Failure during execution of operator logic.
APT_CombinedOperatorController,0: Fatal Error: Fatal: 0026`:`com.ascentialsoftware.wsclient.ServiceInvocationException: Service invocation exception: Content is not allowed in prolog.
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1602)
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1544)
at com.ascentialsoftware.wspack.Transformer.process(Transformer.java:104)
at com.ascentialsoftware.jds.StageFactory.runStage(StageFactory.java:544)
at com.ascentialsoftware.jds.StageFactory.runTransformer(StageFactory.java:361)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.ascentialsoftware.wsclient.xml.TreeBuilder.xmlReaderToDom(TreeBuilder.java:325)
at com.ascentialsoftware.wsclient.InputRequest.buildRequestBodyDocument(InputRequest.java:922)
at com.ascentialsoftware.wsclient.WebService.callServiceInternal(WebService.java:1625)
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1591)
... 4 more
Please could you help there
Thanks in advance