Passing user defined Header to WebService

Dedicated to DataStage and DataStage TX editions featuring IBM<sup>®</sup> Service-Oriented Architectures.

Moderators: chulett, rschirm

Post Reply
Derrickfn
Participant
Posts: 11
Joined: Fri Jul 18, 2008 4:07 pm
Location: Alexandria

Passing user defined Header to WebService

Post by Derrickfn »

I'm trying to pass the following header to a web service. I'm using the Web Service Transformer stage to call the service.

'<soapenv:Header><urn:SecuritySoapHeader AppUserFmid="0x010002E000000BE7"/> </soapenv:Header>'

I put the following header message in a VarBinary field like the manual said and specified the column as my user defined header. Is there a way to make Datastage show you teh SOAP Mesage?



I'm getting the following error message

Web_Services_Transformer_17,0: Fatal Error: Fatal: 0026`:`com.ascentialsoftware.wsclient.ServiceInvocationException: Service invocation exception: The prefix "soapenv" for element "soapenv:Header" 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:Header" 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.xmlStreamToDom(TreeBuilder.java:347)
at com.ascentialsoftware.wsclient.InputRequest.buildRequestHeaderDocument(InputRequest.java:833)
at com.ascentialsoftware.wsclient.WebService.callServiceInternal(WebService.java:1624)
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1591)
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)


The following is a successful call using SOAPUI

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:us:gov:dodent:gfm:gfmdi:gfmiedmWebService:3:4" xmlns:urn1="urn:us:gov:dodent:defred:ofsc:gfmcore" xmlns:urn2="urn:us:gov:dodent:gfm:gfmdi:gfmiedmWebService">
<soapenv:Header>
<urn:SecuritySoapHeader AppUserFmid="0x010002E000000BE7"/>
</soapenv:Header>
<soapenv:Body>
<urn:GetOrgHierarchy>
<!--Optional:-->
<urn:GfmiedmGetOrgHierarchyRequest ResponseMode="Sync" DeliveryMethod="Full" NestingLevels="2" OrgAssociationCode="Adcon" ParentFmid="0x010002E00000154F">
</urn:GfmiedmGetOrgHierarchyRequest>
</urn:GetOrgHierarchy>
</soapenv:Body>
</soapenv:Envelope>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

hard to say exactly what the cause is....best approach is to find a tool that will capture the entire SOAP envelope on the wire while testing. Cut/paste that header into wherever/however you are createing the headre for the WSTransformer....once that is working, you can custom build it in an xmlOutput stage or upstream transformer...

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

sorry...answered too quick...it looks like you have one already, so may have done that......

See if tracing is working in your release..... Use Trace on the run box dialog....select your WStransformer stage and click all four boxes on the right..... if it doesn't abort the job, you'll get the http going out and coming back....... it's a good way to tell exactly who is causing the problem...the local parser that reviews the envelope, or the remote server.....

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Kingland
Premium Member
Premium Member
Posts: 4
Joined: Wed Oct 20, 2010 8:55 am

Post by Kingland »

any resolution to your error? I have the same issue and Trace does not work on my release.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What version would that be? Perhaps a fix pack or six is in your future. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Madhumitha_Raghunathan
Premium Member
Premium Member
Posts: 59
Joined: Fri Apr 22, 2011 8:02 am

Post by Madhumitha_Raghunathan »

Hi,

Was this issue resolved? I am able to see the same issue. Would be grateful if you could help me out.
Thanks,
Madhumitha
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Five years later? Best to start your own post and tell us exactly what this "same issue" is that you are having.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply