I need to send a header from my client. The heade need to have following format:
<Header>
<id>23</id>
</Header>
1. I created a soap header:
<System.Xml.Serialization.XmlRoot("id")> _
Public Class IRMHeader
Inherits SoapHeader
<System.Xml.Serialization.XmlText()> _
Public id As String
End Class
2. Adder header variable to my proxy class
Public id As IRMHeader
3. Added attributes to the method
<System.Web.Services.Protocols.SoapHeaderAttribute ("id", _
Direction:=System.Web.Services.Protocols.SoapHeade rDirection.In), _
System.Web.Services.Protocols.SoapRpcMethod("", RequestNamespace:="http://ibm.com", ResponseNamespace:="http://ibm.com")> _
Public Function getComponentDesignControllerAsString() As <System.Xml.Serialization.SoapElementAttribute("ge tComponentDesignControllerAsStringReturn")> String
Dim results() As Object = Me.Invoke("getComponentDesignControllerAsString", New Object(-1) {})
Return CType(results(0), String)
End Function
4. However, no matted what I do, I am getting header with the format below:
- <soap:Header>
- <types:IRMHeader id="h_id1">
<id xsi:type="xsd:string">id>
</types:IRMHeader>
</soap:Header>
Serialization attributes doesn't work for me. Any idea why ??
---
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.