Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I am building a wcf web service, and I am trying to connect it to notification recieved from ebay.

My current status is that the notifications are recieved, but instead of getting to the right method with a parameter data, It reaches a method with action="*", meaning it acually cant find matching method.

I tryed calling my method using my own code and compared the soap body to the ebay soap body, so i can see the differences.

ebay soap body:

XML
<soapenv:Body>
   <GetItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">
     <Timestamp>2008-02-13T03:47:28.106Z</Timestamp>
     <Ack>Success</Ack>
     <CorrelationID>137541140</CorrelationID>
     <Version>553</Version>
     <Build>e553_core_Bundled_6057805_R1</Build>
     <NotificationEventName>ItemSold</NotificationEventName>
     <RecipientUserID>Seller1</RecipientUserID>
     <Item>
       .
   .
   .
   .
     </Item>
   </GetItemResponse>
 </soapenv:Body>


The packed i send from my test client is:

<s:Body>
    <FixedPriceTransaction xmlns="http://developer.ebay.com/notification">
      <GetItemTransactionsResponse xmlns:a="http://schemas.datacontract.org/2004/07/eBay.Service.Core.Soap" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <a:mAck>Warning</a:mAck>
        <a:mAckSpecified>true</a:mAckSpecified>
        <a:mAny i:nil="true" xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
        <a:mBotBlock i:nil="true"/>
        <a:mBuild>915</a:mBuild>
        <a:mCorrelationID i:nil="true"/>
        <a:mDuplicateInvocationDetails i:nil="true"/>
        <a:mEIASToken i:nil="true"/>
        <a:mErrors i:nil="true" xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
        <a:mExternalUserData i:nil="true"/>
        <a:mHardExpirationWarning i:nil="true"/>
        <a:mMessage i:nil="true"/>
        <a:mNotificationEventName i:nil="true"/>
        <a:mNotificationSignature i:nil="true"/>
        <a:mRecipientUserID i:nil="true"/>
        <a:mTimestamp> 0001-01-01T00:00:00 </a:mTimestamp>
        <a:mTimestampSpecified> false </a:mTimestampSpecified>
        <a:mVersion i:nil="true"/>
        <a:mHasMoreTransactions> false </a:mHasMoreTransactions>
        <a:mHasMoreTransactionsSpecified> false </a:mHasMoreTransactionsSpecified>
        <a:mItem i:nil="true"/>
        <a:mPageNumber> 0 </a:mPageNumber>
        <a:mPageNumberSpecified> false </a:mPageNumberSpecified>
        <a:mPaginationResult i:nil="true"/>
        <a:mPayPalPreferred> false </a:mPayPalPreferred>
        <a:mPayPalPreferredSpecified> false </a:mPayPalPreferredSpecified>
        <a:mReturnedTransactionCountActual> 0 </a:mReturnedTransactionCountActual>
        <a:mReturnedTransactionCountActualSpecified> false </a:mReturnedTransactionCountActualSpecified>
        <a:mTransactionArray i:nil="true" xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
        <a:mTransactionsPerPage>0</a:mTransactionsPerPage>
        <a:mTransactionsPerPageSpecified> false </a:mTransactionsPerPageSpecified>
      </GetItemTransactionsResponse>
    </FixedPriceTransaction>
  </s:Body>


Couple of things to ignore:

1. I removed the header from both examples because it contains mustUnderstand=0, and because it reaches the method with action="*", so the header is probably fine.
2. The data content is different between the examples because i created an empty parameter for my test. And removed much of the irrelevant data from ebay example.

My Interface Method:
C#
[ServiceContract(Namespace = "http://developer.ebay.com/notification")]
    public interface ITestService
    {
        [OperationContract(Action = "http://TestDomain.com/DropshipService.svc/Software/FixedPriceTransaction", IsOneWay = true)]
        [WebInvoke(UriTemplate = "/Software/FixedPriceTransaction", Method = "POST", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
        void FixedPriceTransaction(GetItemTransactionsResponseType GetItemTransactionsResponse);

The Main differences as i see it:

1. Somewhy in my example theres GetItemTransactionsResponse inside FixedPriceTransaction although i used in the interface BodyStyle = WebMessageBodyStyle.Bare. Why? and how can i fix it?
2. Somewhy in my example theres a:m on every line. In ebay's example theres none. How can i remove it?
3. How do i remove all the namespaces i have in my example and why are they there by default?

Thank you for your help

Dolev
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