Webservice not returning the soap header in client response.

I

imonline

Hi,
I have created a webservice which has soap headers in both
client request and response.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<HTNGHeader xmlns="http://htng.org/1.1/Header/">
<From>
<systemId />
<Credential>
<userName />
<password />
</Credential>
</From>
<To>
<systemId />
</To>
<timestamp>date</timestamp>
<echoToken />
<transactionId />
<action />
</HTNGHeader>
</soap:Header>
<soap:Body>
<OTA_HotelGetMsgRQ EchoToken="" TimeStamp="dateTime" Target=""
Version="decimal" TransactionIdentifier=""
SequenceNmbr="nonNegativeInteger" TransactionStatusCode=""
PrimaryLangID="language" AltLangID="language"
RetransmissionIndicator="boolean"
xmlns="http://www.opentravel.org/OTA/2003/05">
<UniqueID URL="anyURI" Type="" Instance="" ID="" ID_Context="">
<CompanyName CompanyShortName="" TravelSector="" Code=""
CodeContext="" />
</UniqueID>
<Messages>
<Message ChainCode="" BrandCode="" HotelCode=""
HotelCityCode="" HotelName="" HotelCodeContext="" ChainName=""
BrandName="" AreaID="" Start="" Duration="" End=""
StartSeqNmbr="nonNegativeInteger" EndSeqNmbr="nonNegativeInteger"
MessageType="" ResponseValue="" RequestCode="string"
ReasonForRequest="string" UserName="string" RatePlanCode="string"
ConfirmationID="string" ReservationID="string">
<OriginalPayloadStdAttributes EchoToken=""
TimeStamp="dateTime" Target="" Version="decimal"
TransactionIdentifier="" SequenceNmbr="nonNegativeInteger"
TransactionStatusCode="" PrimaryLangID="language" AltLangID="language"
RetransmissionIndicator="boolean" />
<MessageContent>string</MessageContent>
</Message>
<Message ChainCode="" BrandCode="" HotelCode=""
HotelCityCode="" HotelName="" HotelCodeContext="" ChainName=""
BrandName="" AreaID="" Start="" Duration="" End=""
StartSeqNmbr="nonNegativeInteger" EndSeqNmbr="nonNegativeInteger"
MessageType="" ResponseValue="" RequestCode="string"
ReasonForRequest="string" UserName="string" RatePlanCode="string"
ConfirmationID="string" ReservationID="string">
<OriginalPayloadStdAttributes EchoToken=""
TimeStamp="dateTime" Target="" Version="decimal"
TransactionIdentifier="" SequenceNmbr="nonNegativeInteger"
TransactionStatusCode="" PrimaryLangID="language" AltLangID="language"
RetransmissionIndicator="boolean" />
<MessageContent>string</MessageContent>
</Message>
</Messages>
</OTA_HotelGetMsgRQ>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<HTNGHeader xmlns="http://htng.org/1.1/Header/">
<From>
<systemId />
<Credential>
<userName />
<password />
</Credential>
</From>
<To>
<systemId />
</To>
<timestamp>date</timestamp>
<echoToken />
<transactionId />
<action />
</HTNGHeader>
</soap:Header>
<soap:Body>
<OTA_HotelGetMsgRS EchoToken="" TimeStamp="dateTime" Target=""
Version="decimal" TransactionIdentifier=""
SequenceNmbr="nonNegativeInteger" TransactionStatusCode=""
PrimaryLangID="language" AltLangID="language"
RetransmissionIndicator="boolean"
xmlns="http://www.opentravel.org/OTA/2003/05">
<Errors>
<Error Type="" ShortText="" Code="" DocURL="anyURI" Status=""
Tag="string" RecordID="" NodeList="string" />
<Error Type="" ShortText="" Code="" DocURL="anyURI" Status=""
Tag="string" RecordID="" NodeList="string" />
</Errors>
</OTA_HotelGetMsgRS>
</soap:Body>
</soap:Envelope>
Its request and response are as above I
have created it from XSDs using wscf 0.7. I am able to receive the
header but the response that I send does not contain the soap header.


My vb.net coding is as under:
<System.Web.Services.Protocols.SoapHeader("HTNGHeader",
Direction:=SoapHeaderDirection.InOut Or SoapHeaderDirection.Fault), _
System.Web.Services.WebMethodAttribute(), _

System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.opentravel.org/OTA/2003/05:oTA_HotelGetMsgIn",
Use:=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Bare,
Binding:="HotelReservation")> _
Public Overridable Function
OTA_HotelGetMsg(<System.Xml.Serialization.XmlElementAttribute([Namespace]:="http://www.opentravel.org/OTA/2003/05",
ElementName:="OTA_HotelGetMsgRQ")> ByVal oTA_HotelGetMsgRQ As
OTA_HotelGetMsgRQ) As
<System.Xml.Serialization.XmlElementAttribute("OTA_HotelGetMsgRS",
[Namespace]:="http://www.opentravel.org/OTA/2003/05")>
OTA_HotelGetMsgRS Implements IHotelReservation.OTA_HotelGetMsg
End function


Please let me know what am i doing wrong.


Thanks,
Nis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top