Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Webservice not returning the soap header in client response.

Reply
Thread Tools

Webservice not returning the soap header in client response.

 
 
imonline
Guest
Posts: n/a
 
      12-01-2006
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 xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlnssd="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 xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlnssd="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("HTNGHea der",
Direction:=SoapHeaderDirection.InOut Or SoapHeaderDirection.Fault), _
System.Web.Services.WebMethodAttribute(), _

System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://www.opentravel.org/OTA/2003/05TA_HotelGetMsgIn",
Use:=System.Web.Services.Description.SoapBindingUs e.Literal,
ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.Bare,
Binding:="HotelReservation")> _
Public Overridable Function
OTA_HotelGetMsg(<System.Xml.Serialization.XmlEleme ntAttribute([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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header files with "header.h" or <header.h> ?? mlt C++ 2 01-31-2009 02:54 PM
How to add SOAP header to a SOAP message? Peter van der veen ASP .Net Web Services 6 11-14-2006 06:44 PM
Encoded WebService SOAP Header? Andrew Robinson ASP .Net Web Services 1 05-26-2005 02:06 AM
Returning array Via soap toolkit to vb.net client John Harkin ASP .Net Web Services 0 04-14-2004 01:55 PM
Returning array from Asp.Net webservice via SOAP to classic Asp Steve Kuhn ASP .Net Web Services 2 07-29-2003 07:52 PM



Advertisments