Page 1 of 1

Passing user defined Header to WebService

Posted: Sat Apr 04, 2009 9:07 am
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>

Posted: Sun Apr 05, 2009 5:26 am
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

Posted: Sun Apr 05, 2009 5:29 am
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

Posted: Thu Oct 21, 2010 7:56 am
by Kingland
any resolution to your error? I have the same issue and Trace does not work on my release.

Posted: Thu Oct 21, 2010 8:04 am
by chulett
What version would that be? Perhaps a fix pack or six is in your future. :wink:

Posted: Sun Jun 29, 2014 3:43 pm
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.

Posted: Sun Jun 29, 2014 6:00 pm
by chulett
Five years later? Best to start your own post and tell us exactly what this "same issue" is that you are having.