Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > WCF Host ASP.NET Service - WSE 3.0 Client Compatibility

Reply
Thread Tools

WCF Host ASP.NET Service - WSE 3.0 Client Compatibility

 
 
Richard Collette
Guest
Posts: n/a
 
      08-27-2007
My goal is to connect a WSE 3.0 client to a WCF asp.net hosted service,
utilizing MTOM encoding and if at all possible, streamedRequest transfer mode.

I am starting with a basic Hello World service. I am basing the
configuration on these articles:

http://devlicio.us/blogs/ziemowit_sk...d-wse-3-0.aspx
http://msdn2.microsoft.com/en-us/library/ms730049.aspx

When calling the hello method of the service I am getting the error:

SOAP Action header was not understood

Any help is greatly appreciated.

The WCF Host Service is defined as:

<ServiceContract(SessionMode:=SessionMode.NotAllow ed)> _
Public Interface IWCFTestService

<OperationContract()> _
Function hello(ByVal value As String) As String

End Interface

The host web.config is:

<?xml version="1.0"?>

<configuration>
<system.serviceModel>
<services>
<service name="WCFTestService" behaviorConfiguration="returnFaults">
<endpoint address="" contract="IWCFTestService"
binding="wsHttpBinding" bindingConfiguration="wsHttp"/>
<endpoint address="2004" contract="IWCFTestService"
binding="customBinding" bindingConfiguration="WSE"/>
</service>
</services>
<bindings>
<customBinding>
<binding name="WSE">
<textMessageEncoding messageVersion="Soap12WSAddressingAugust2004"/>
<httpTransport/>
</binding>
</customBinding>
<wsHttpBinding>
<binding name="wsHttp"/>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="returnFaults" >
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>

The WSE Client config is able to add the web reference and there is one
class generated for each of the endpoints defined by the service. If I use
the Soap11 messageVersion specified in the MSDN article, I only see one
client class defined so I assume at this point, Soap12 is the proper
configuration as noted in the blog article.

The client code is:

Imports WCFTestServiceClient.WCFTestService
Module Module1

Sub Main()
Dim service As New WCFTestService.CustomBinding_IWCFTestService
System.Console.WriteLine(service.hello("Rich"))
Dim x As String = ""
End Sub

End Module

The client app.config configuration is:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings"
type="System.Configuration.ApplicationSettingsGrou p, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="WCFTestServiceClient.My.MySettings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
<section name="microsoft.web.services3"
type="Microsoft.Web.Services3.Configuration.WebSer vicesConfiguration,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" />
</configSections>
<system.diagnostics>
<sources>
<!-- This section defines the logging configuration for
My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog" />
<!-- Uncomment the below section to write to the Application Event
Log -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information" />
</switches>
<sharedListeners>
<add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceLi stener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter" />
<!-- Uncomment the below section and replace APPLICATION_NAME with the
name of your application to write to the Application Event Log -->
<!--<add name="EventLog"
type="System.Diagnostics.EventLogTraceListener"
initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
<applicationSettings>
<WCFTestServiceClient.My.MySettings>
<setting name="WCFTestServiceClient_WCFTestService_WCFTestS ervice"
serializeAs="String">
<value>http://vmservercollett/WCFWSEServiceTest/Service.svc</value>
</setting>
</WCFTestServiceClient.My.MySettings>
</applicationSettings>
<microsoft.web.services3>
<messaging>
<mtom clientMode="Off" />
</messaging>
<diagnostics>
<trace enabled="false" input="InputTrace.webinfo"
output="OutputTrace.webinfo" />
</diagnostics>
</microsoft.web.services3>
</configuration>

The http conversation is:

POST /WCFWSEServiceTest/Service.svc/2004 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 2.0.50727.832)
VsDebuggerCausalityData:
uIDPo6Qxe7N1eM9HhvdKAtBbVyQAAAAAnYhYItwjIkKr0ekzCl TrSM22vQv1ompKg0kaBJHlxo8ACAAA
Content-Type: application/soap+xml; charset=utf-8;
action="http://tempuri.org/IWCFTestService/hello"
Host: vmservercollett
Content-Length: 306
Expect: 100-continue
Connection: Keep-Alive

HTTP/1.1 100 Continue

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlnssd="http://www.w3.org/2001/XMLSchema"><soap:Body><hello
xmlns="http://tempuri.org/"><value>Rich</value></hello></soap:Body></soap:Envelope>

HTTP/1.1 500 Internal Server Error
Date: Fri, 24 Aug 2007 19:27:06 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1534

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing"><s:Header><a:Action
s:mustUnderstand="1">http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault</a:Action><a:To
s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Recei ver</s:Value><s:Subcode><s:Value
xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</s:Value></s:Subcode></s:Code><s:Reason><s:Text
xml:lang="en-US">The SOAP action specified on the message, '', does not match
the HTTP SOAP Action, 'http://tempuri.org/IWCFTestService/hello'.
</s:Text></s:Reason><setail><ExceptionDetail
xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HelpLink
i:nil="true"/><InnerException i:nil="true"/><Message>The SOAP action
specified on the message, '', does not match the HTTP SOAP Action,
'http://tempuri.org/IWCFTestService/hello'. </Message><StackTrace> at
System.ServiceModel.Channels.RequestContextBase.ge t_RequestMessage()

at
System.ServiceModel.Dispatcher.ChannelHandler.Prov ideFaultAndReplyFailure(RequestContext
request, Exception exception, ErrorHandlerFaultInfo& faultInfo, Boolean&
replied)</StackTrace><Type>System.ServiceModel.ActionMismatc hAddressingException</Type></ExceptionDetail></setail></s:Fault></s:Body></s:Envelope>

 
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
Difference between Ajax Enabled WCF service and regular WCF? Cindy Lee ASP .Net 1 03-19-2010 05:59 PM
wcf service hosted in IIS6 with aspnet compatibility return 4001 but tracing as authenticated CS ADNT ASP .Net Web Services 0 03-16-2010 07:19 PM
AJAX enabled WCF Service Vs Standard WCF Service Simon ASP .Net 0 10-13-2009 09:13 AM
Windows Service as Web Service host without WCF? mike ASP .Net Web Services 0 03-30-2009 06:19 PM
SOAP Header in a Dot Net 2.0 Web Service Client Consuming a WCF 3.0 service. Curt K ASP .Net Web Services 3 06-15-2007 10:19 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57