Web Service issue
Posted: Fri Sep 19, 2008 10:05 am
We have imported the wsdl file with an embedded XSD and created a job to call the operation. The job is giving an error as"there is no SOAP Header". How to create the Soap header using WSTransformer.
Below is the xml request generated by Datastage using WSTransformer:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body><ns1:RetrieveSystemData xmlns:ns1="http://www.ibm.com/cormac" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instan ... SystemData> </soapenv:Body>
</soapenv:Envelope>
Below is the xml request which needs to be passed to web server to get the correct response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:m0="http://www.ibm.com/cormac">
<SOAP-ENV:Header>
<m:ServiceRequest xmlns:m="http://tempuri.org/CorMacServices/">
<m0:ServiceName>String</m0:ServiceName>
<m0:Action>String</m0:Action>
<m0:From>String</m0:From>
<m0:MessageId>String</m0:MessageId>
</m:ServiceRequest>
<m:Security xmlns:m="http://tempuri.org/CorMacServices/">
<m0:UsernameToken Id="" UNPMechanismType="" UserType="" Username=""/>
<m0:UserRoles>
<m0:UserRole>String</m0:UserRole>
</m0:UserRoles>
<m0:OrgUnits>
<m0:OU>String</m0:OU>
</m0:OrgUnits>
</m:Security>
<m:ContactPoint xmlns:m="http://tempuri.org/CorMacServices/">
<m0:ContactPointType>String</m0:ContactPointType>
<m0:ContactPointId>String</m0:ContactPointId>
<m0:ApplicationId>String</m0:ApplicationId>
<m0:InitialOriginatorId>String</m0:InitialOriginatorId>
<m0:InitialOriginatorType>String</m0:InitialOriginatorType>
<m0:OperatorType>String</m0:OperatorType>
</m:ContactPoint>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:RetrieveSystemData xmlns:m="http://www.ibm.com/cormac">
<m:codeTableName>CdAddrUsageTp</m:codeTableName>
</m:RetrieveSystemData>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Can anyone throw some input
Magesh S
Below is the xml request generated by Datastage using WSTransformer:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body><ns1:RetrieveSystemData xmlns:ns1="http://www.ibm.com/cormac" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instan ... SystemData> </soapenv:Body>
</soapenv:Envelope>
Below is the xml request which needs to be passed to web server to get the correct response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:m0="http://www.ibm.com/cormac">
<SOAP-ENV:Header>
<m:ServiceRequest xmlns:m="http://tempuri.org/CorMacServices/">
<m0:ServiceName>String</m0:ServiceName>
<m0:Action>String</m0:Action>
<m0:From>String</m0:From>
<m0:MessageId>String</m0:MessageId>
</m:ServiceRequest>
<m:Security xmlns:m="http://tempuri.org/CorMacServices/">
<m0:UsernameToken Id="" UNPMechanismType="" UserType="" Username=""/>
<m0:UserRoles>
<m0:UserRole>String</m0:UserRole>
</m0:UserRoles>
<m0:OrgUnits>
<m0:OU>String</m0:OU>
</m0:OrgUnits>
</m:Security>
<m:ContactPoint xmlns:m="http://tempuri.org/CorMacServices/">
<m0:ContactPointType>String</m0:ContactPointType>
<m0:ContactPointId>String</m0:ContactPointId>
<m0:ApplicationId>String</m0:ApplicationId>
<m0:InitialOriginatorId>String</m0:InitialOriginatorId>
<m0:InitialOriginatorType>String</m0:InitialOriginatorType>
<m0:OperatorType>String</m0:OperatorType>
</m:ContactPoint>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:RetrieveSystemData xmlns:m="http://www.ibm.com/cormac">
<m:codeTableName>CdAddrUsageTp</m:codeTableName>
</m:RetrieveSystemData>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Can anyone throw some input
Magesh S