WCF client needs SoapAction header

Tech-Archive recommends: Fix windows errors by optimizing your registry



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
.



Relevant Pages

  • Re: Advice on a multithreaded netisr patch?
    ... cache, and the link layer will take a cache miss on the front of the ... netstat packets per second and my application's TCP ... header flowid field, and use that instead of the hash for work placement. ...
    (freebsd-net)
  • Re: Net Meter [radio station bit rate] tutorial please? I want to nail this????????
    ... TCP uses a 16-bit checksum to detect errors and corrects them by ... You say that UDP doesn't have overhead, ... Remember there's also the IP packet header, ... can use NetMeter to measure bit rate levels: if you measure a stream ...
    (alt.radio.digital)
  • Re: Messages being received out of order
    ... sure how much your data will be send in one packet, because if IP header is ... Are you saying that tcp assures you that if you send data1, ... then I only need to fix my client - specifically the recv handling? ...
    (microsoft.public.win32.programmer.networks)
  • Req Help with TCP headers
    ... I understand that the first header must send a SYN to the server which will ... A web page is being opened, which requires a TCP connection to be opened to ... This partially represents the header of the TCP segment returned by the ...
    (comp.security.firewalls)
  • Re: Bizarre router issue
    ... tracert on Windows traceroute on Linux and Solaris. ... ETHER: Packet 2 arrived at 11:41:23.21 ... Header length = 20 bytes ... TCP: Source port = 2059 ...
    (comp.os.linux.networking)