WCF client needs SoapAction header
- From: RK <rebecca.keller@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 27 Nov 2007 09:37:47 -0800 (PST)
Hi,
I've got a WCF client that needs to use a Java Web Service. I need a
soapaction header to appear with the tcp info of the request. I tried
creating a message inspector to add the header, but this doesn't seem
to do it, it just adds the soapaction as a "WebHeader" (see the
example below) but doesn't put it with the other TCP headers at the
TCP level. I did a TCP trace to verify this. How do I go about
adding soapaction for TCP?
Thanks!
<HttpRequest xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/
Management/MessageTrace">
<Method>POST</Method>
<QueryString></QueryString>
<WebHeaders>
<SOAPAction>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT</
SOAPAction>
</WebHeaders>
</HttpRequest>
Here is the TCP trace (with url and host changed)
POST theservice HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
Host: thehost
Content-Length: 7327
Expect: 100-continue
Connection: Keep-Alive
Here is code from the client message inspector
Public Function BeforeSendRequest(ByRef request As
System.ServiceModel.Channels.Message, _
ByVal channel As
System.ServiceModel.IClientChannel) _
As Object Implements
IClientMessageInspector.BeforeSendRequest
Dim httpRequestMessage As
System.ServiceModel.Channels.HttpRequestMessageProperty = New
System.ServiceModel.Channels.HttpRequestMessageProperty
httpRequestMessage.Headers.Add("SOAPAction", "http://
schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT")
request.Properties.Add(System.ServiceModel.Channels.HttpRequestMessageProperty.Name,
httpRequestMessage)
Return Nothing
End Function
.
- Prev by Date: Connection Error with Web Service
- Next by Date: RE: WCF SOAP Router Including Credentials
- Previous by thread: Connection Error with Web Service
- Next by thread: msdiscocodegenerator failed when update web reference in vs2008 for smart device application
- Index(es):
Relevant Pages
|