My requirement is to use a web service in datstage which has userid and password parameters in SOAP header.
I tried with web service transformer stage. In the input header properties there is an option to provide the column receiving the user header. How can i specify both username and password?
SOAP header to authenticate web service
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 28
- Joined: Thu Mar 13, 2008 11:24 pm
You have to manually build the header somewhere upstream. Either using something like XMLOutput, or far simpler, just hard code it in a Derivation.
For prototyping, I like to run the Service successfully from some testing tool, such as SOAPscope from Mindreef. Then capture the SOAP envelope on the wire. Cut/Past the full header into a text column and get your Web Service to function. Once it works great, you can then work on building it (the header) incrementally.
Ernie
For prototyping, I like to run the Service successfully from some testing tool, such as SOAPscope from Mindreef. Then capture the SOAP envelope on the wire. Cut/Past the full header into a text column and get your Web Service to function. Once it works great, you can then work on building it (the header) incrementally.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
-
- Participant
- Posts: 28
- Joined: Thu Mar 13, 2008 11:24 pm
SOAP Header
Thanx for your valuable information.
I am trying with it, if any problem I will get back to you.
I am trying with it, if any problem I will get back to you.
Pradeep
-
- Participant
- Posts: 28
- Joined: Thu Mar 13, 2008 11:24 pm
I used SOAPUI tool to test my web-service and I captured the SOAP Header as follows:
<soapenv:Header>
<myw:UserCredentials>
<!--Optional:-->
<myw:userName>pradeep</myw:userName>
<!--Optional:-->
<myw:password>pradeep</myw:password>
</myw:UserCredentials>
</soapenv:Header>
I put it in the text file in a single line and passed this value using sequential file stage to the web-service transformer using Header Column.
I am getting the following error:
APT_CombinedOperatorController,0: Fatal Error: Fatal: 0026`:`com.ascentialsoftware.wsclient.ServiceInvocationException: Service invocation exception: The prefix "soapenv" for element "soapenv:Envelope" is not bound.
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: The prefix "soapenv" for element "soapenv:Envelope" is not bound.
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.buildRequestHeaderDocument(InputRequest.java:840)
at com.ascentialsoftware.wsclient.WebService.callServiceInternal(WebService.java:1624)
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1591)
... 4 more
Can you please look into this, and guide me solve it.
Thanx
<soapenv:Header>
<myw:UserCredentials>
<!--Optional:-->
<myw:userName>pradeep</myw:userName>
<!--Optional:-->
<myw:password>pradeep</myw:password>
</myw:UserCredentials>
</soapenv:Header>
I put it in the text file in a single line and passed this value using sequential file stage to the web-service transformer using Header Column.
I am getting the following error:
APT_CombinedOperatorController,0: Fatal Error: Fatal: 0026`:`com.ascentialsoftware.wsclient.ServiceInvocationException: Service invocation exception: The prefix "soapenv" for element "soapenv:Envelope" is not bound.
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: The prefix "soapenv" for element "soapenv:Envelope" is not bound.
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.buildRequestHeaderDocument(InputRequest.java:840)
at com.ascentialsoftware.wsclient.WebService.callServiceInternal(WebService.java:1624)
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1591)
... 4 more
Can you please look into this, and guide me solve it.
Thanx
Pradeep