HighTechTalks DotNet Forums  

WCF Host ASP.NET Service - WSE 3.0 Client Compatibility

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss WCF Host ASP.NET Service - WSE 3.0 Client Compatibility in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
=?Utf-8?B?UmljaGFyZCBDb2xsZXR0ZQ==?=
 
Posts: n/a

Default WCF Host ASP.NET Service - WSE 3.0 Client Compatibility - 08-27-2007 , 09:28 AM






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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="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 Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.