Get WCF to recognize incoming SOAP request

I am trying to write an application in C # to receive eBay notifications that are sent as SOAP over HTTP. I receive notifications in order, but I can not send them to the WCF service. What do I need to do in the WCF service configuration to enable recognition of an incoming SOAP request? I am using webHttpBinding with WCF service.

SOAP request:

POST /paypal/ebaynotification.svc HTTP/1.0
Host: myserver.com
Content-Type: text/xml;charset=utf-8
SOAPAction: "http://developer.ebay.com/notification/ItemListed"
Content-Length: 6610
X-Original-Client: 10.71.29.83
Via: 1.0 sjcproxy10b:8081 (squid)
Cache-Control: max-age=86400
Connection: keep-alive

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Header>
  <ebl:RequesterCredentials soapenv:mustUnderstand="0" xmlns:ns="urn:ebay:apis:eBLBaseComponents" xmlns:ebl="urn:ebay:apis:eBLBaseComponents">
   <ebl:NotificationSignature xmlns:ebl="urn:ebay:apis:eBLBaseComponents">RnvpyFAXc9Duo0W+/Mk68g==</ebl:NotificationSignature>
  </ebl:RequesterCredentials>
 </soapenv:Header>
 <soapenv:Body>
      ....
     </soapenv:Body>
   </soapenv:Envelope>

My WCF service interface:

[ServiceContract(Namespace="http://developer.ebay.com/notification")]
public interface Iebaynotification
{
    [OperationContract]
    void ItemListed(ItemType item);
}
+3
source share
2 answers

You need to “catch” the incoming SOAP request and deploy the WCF class to handle it.

WCF (, Windows NT), URL , , IIS/WAS, WCF .

, , WCF, / WCF , .

:, SOAP, webHttpBinding, , WCF REST. - basicHttpBinding wsHttpBinding.

+2

eBay SOAP, , WSDL-, . svcutil.exe () WCF/#, SOAP, . . API eBay...

0

Source: https://habr.com/ru/post/1767740/


All Articles