Click here to Skip to main content
15,118,214 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Please help cannot figure this error out......

Client Calling WCF Service

POST http://rpideviis/RpiAraServices/rpiaraservices.svc HTTP/1.1
SOAPAction: "urn:kcml-ReturnsServer#ProcessReturns"
Content-Type: text/xml; charset="utf-8"
User-Agent: Borland SOAP 1.2
Host: rpideviis
Content-Length: 1302
Connection: Keep-Alive
Pragma: no-cache

<soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"><soap-env:body xmlns:ns1="urn:kcml-ReturnsServer" soap-env:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"><ns1:processreturns><custnum xsi:type="xsd:string">JOB999<linecode xsi:type="xsd:string">WIX<partnum xsi:type="xsd:string">51515<qty xsi:type="xsd:double">1<saveflag xsi:type="xsd:string">P<ratype xsi:type="xsd:string">W<genrano xsi:type="xsd:double">1<ranumber xsi:type="xsd:double">1<qoh xsi:type="xsd:double">0<qoo xsi:type="xsd:double">0<cusid xsi:type="xsd:double">1<cusname xsi:type="xsd:string"><cusaddr1 xsi:type="xsd:string"><cusaddr2 xsi:type="xsd:string"><cusphone xsi:type="xsd:string"><mileage xsi:type="xsd:double">0<reason xsi:type="xsd:string">WARRANTY<saleshistory xsi:type="xsd:double">0<ordertrigger xsi:type="xsd:double">0<tote xsi:type="xsd:string">

WCF Service Web.Config

<services>
<service name="RpiAraServices.ReturnsServer">
<clear>
<endpoint binding="basicHttpBinding" name="ReturnsServer">
contract="RpiAraServices.IReturnsServer" listenUriMode="Explicit">
<identity>
<dns value="localhost">
<certificatereference storename="My" storelocation="LocalMachine">
x509FindType="FindBySubjectDistinguishedName" />


<endpoint address="mex" binding="mexHttpBinding" name="ReturnsServer">
contract="IMetadataExchange" listenUriMode="Explicit">
<identity>
<dns value="localhost">
<certificatereference storename="My" storelocation="LocalMachine">
x509FindType="FindBySubjectDistinguishedName" />


<host>
<baseAddresses>
<add baseaddress="http://localhost:8733/Design_Time_Addresses/RpiAraServices/Service1/">
</baseAddresses>




WCF Function to receive data and return Response

<servicecontract()>
Public Interface IReturnsServer

Function ProcessReturns(ByVal CustNum As String, ByVal LineCode As String, ByVal PartNum As String, ByVal QTY As Double, ByVal SaveFlag As String, ByVal RAType As String, ByVal GenRANo As Double, _
ByVal RANumber As Double, ByVal QOH As Double, ByVal QOO As Double, ByVal CusID As Double, ByVal CusName As String, ByVal CusAddr1 As String, ByVal CusAddr2 As String, _
ByVal CusPhone As String, ByVal Mileage As Double, ByVal CustomerReason As String, ByVal SalesHistory As Double, ByVal OrderTrigger As Double, ByVal Tote As String) As <system.servicemodel.messageparameterattribute(name:> String

End Interface

Error Message

The message with Action 'urn:kcml-ReturnsServer#ProcessReturns' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900