2010-12-04 3 views
0

Je travaille avec l'API EBay, en utilisant .net C#. sur ebay leur est un moyen de vous inscrire pour la notification de la plate-forme ebay notification platformcomment gérer le message eBay SOAP

Je reçois la notification à mon adresse URL que je mets dans le processus de registre de la notification.

c'est le xml que ebay envoyer comme notification

ma question est, comment je traitais cette notification ebay. Je pense que je dois le convertir en objet appelé « ReviseItemResponseType »

<?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">YbRVIBUN/EFL8LSz1YTuvw==</ebl:NotificationSignature> 
    </ebl:RequesterCredentials> 
    </soapenv:Header> 
    <soapenv:Body> 
    <GetItemResponse xmlns="urn:ebay:apis:eBLBaseComponents"> 
     <Timestamp>2010-11-29T18:38:33.700Z</Timestamp> 
     <Ack>Success</Ack> 
     <CorrelationID>455735780</CorrelationID> 
     <Version>695</Version> 
     <Build>E695_CORE_BUNDLED_12363018_R1</Build> 
     <NotificationEventName>ItemRevised</NotificationEventName> 
     <RecipientUserID>testuser_aviavi</RecipientUserID> 
     <EIASToken>nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wFk4CoAJiEqQSdj6x9nY+seQ**</EIASToken> 
     <Item> 
     <AutoPay>false</AutoPay> 
     <BuyerProtection>ItemIneligible</BuyerProtection> 
     <BuyItNowPrice currencyID="USD">0.0</BuyItNowPrice> 
     <Country>US</Country> 
     <Currency>USD</Currency> 
     <GiftIcon>0</GiftIcon> 
     <HitCounter>BasicStyle</HitCounter> 
     <ItemID>110062858260</ItemID> 
     <ListingDetails> 
      <Adult>false</Adult> 
      <BindingAuction>false</BindingAuction> 
      <CheckoutEnabled>true</CheckoutEnabled> 
      <ConvertedBuyItNowPrice currencyID="USD">0.0</ConvertedBuyItNowPrice> 
      <ConvertedStartPrice currencyID="USD">5467.0</ConvertedStartPrice> 
      <ConvertedReservePrice currencyID="USD">0.0</ConvertedReservePrice> 
      <HasReservePrice>false</HasReservePrice> 
      <StartTime>2010-11-29T18:31:56.000Z</StartTime> 
      <EndTime>2010-12-09T18:31:56.000Z</EndTime> 
      <ViewItemURL>http://cgi.sandbox.ebay.com/ws/eBayISAPI.dll?ViewItem&amp;item=110062858260&amp;category=177</ViewItemURL> 
      <HasUnansweredQuestions>false</HasUnansweredQuestions> 
      <HasPublicMessages>false</HasPublicMessages> 
      <ExpressListing>false</ExpressListing> 
     </ListingDetails> 
     <ListingDuration>Days_10</ListingDuration> 
     <ListingType>FixedPriceItem</ListingType> 
     <Location>city, WA</Location> 
     <PaymentMethods>PayPal</PaymentMethods> 
     <PayPalEmailAddress></PayPalEmailAddress> 
     <PrimaryCategory> 
      <CategoryID>177</CategoryID> 
      <CategoryName>Computers &amp; Networking:PC Laptops &amp; Netbooks</CategoryName> 
     </PrimaryCategory> 
     <PrivateListing>false</PrivateListing> 
     <Quantity>3</Quantity> 
     <ReservePrice currencyID="USD">0.0</ReservePrice> 
     <ReviseStatus> 
      <ItemRevised>true</ItemRevised> 
     </ReviseStatus> 
     <Seller> 
      <AboutMePage>false</AboutMePage> 
      <Email>[email protected]</Email> 
      <FeedbackScore>500</FeedbackScore> 
      <PositiveFeedbackPercent>0.0</PositiveFeedbackPercent> 
      <FeedbackPrivate>false</FeedbackPrivate> 
      <FeedbackRatingStar>Purple</FeedbackRatingStar> 
      <IDVerified>true</IDVerified> 
      <eBayGoodStanding>true</eBayGoodStanding> 
      <NewUser>false</NewUser> 
      <RegistrationDate>2000-01-01T00:00:00.000Z</RegistrationDate> 
      <Site>US</Site> 
      <Status>Confirmed</Status> 
      <UserID>testuser_aviavi</UserID> 
      <UserIDChanged>true</UserIDChanged> 
      <UserIDLastChanged>2010-11-18T16:20:21.000Z</UserIDLastChanged> 
      <VATStatus>NoVATTax</VATStatus> 
      <SellerInfo> 
      <AllowPaymentEdit>true</AllowPaymentEdit> 
      <CheckoutEnabled>true</CheckoutEnabled> 
      <CIPBankAccountStored>false</CIPBankAccountStored> 
      <GoodStanding>true</GoodStanding> 
      <LiveAuctionAuthorized>false</LiveAuctionAuthorized> 
      <MerchandizingPref>OptIn</MerchandizingPref> 
      <QualifiesForB2BVAT>false</QualifiesForB2BVAT> 
      <StoreOwner>false</StoreOwner> 
      <ExpressEligible>false</ExpressEligible> 
      <ExpressWallet>false</ExpressWallet> 
      <SafePaymentExempt>true</SafePaymentExempt> 
      </SellerInfo> 
      <MotorsDealer>false</MotorsDealer> 
     </Seller> 
     <SellingStatus> 
      <BidCount>0</BidCount> 
      <BidIncrement currencyID="USD">0.0</BidIncrement> 
      <ConvertedCurrentPrice currencyID="USD">5467.0</ConvertedCurrentPrice> 
      <CurrentPrice currencyID="USD">5467.0</CurrentPrice> 
      <LeadCount>0</LeadCount> 
      <MinimumToBid currencyID="USD">5467.0</MinimumToBid> 
      <QuantitySold>0</QuantitySold> 
      <ReserveMet>true</ReserveMet> 
      <SecondChanceEligible>false</SecondChanceEligible> 
      <ListingStatus>Active</ListingStatus> 
     </SellingStatus> 
     <ShippingDetails> 
      <ApplyShippingDiscount>false</ApplyShippingDiscount> 
      <SalesTax> 
      <SalesTaxPercent>0.0</SalesTaxPercent> 
      <ShippingIncludedInTax>false</ShippingIncludedInTax> 
      </SalesTax> 
      <ShippingServiceOptions> 
      <ShippingService>USPSParcel</ShippingService> 
      <ShippingServiceCost currencyID="USD">10.0</ShippingServiceCost> 
      <ShippingServiceAdditionalCost currencyID="USD">10.0</ShippingServiceAdditionalCost> 
      <ShippingServicePriority>1</ShippingServicePriority> 
      <ExpeditedService>false</ExpeditedService> 
      <ShippingTimeMin>2</ShippingTimeMin> 
      <ShippingTimeMax>9</ShippingTimeMax> 
      </ShippingServiceOptions> 
      <ShippingType>Flat</ShippingType> 
      <ThirdPartyCheckout>false</ThirdPartyCheckout> 
      <SellerExcludeShipToLocationsPreference>false</SellerExcludeShipToLocationsPreference> 
     </ShippingDetails> 
     <ShipToLocations>US</ShipToLocations> 
     <Site>US</Site> 
     <StartPrice currencyID="USD">5467.0</StartPrice> 
     <TimeLeft>P9DT23H53M23S</TimeLeft> 
     <Title>Averatec AV</Title> 
     <HitCount>0</HitCount> 
     <GetItFast>false</GetItFast> 
     <PostalCode>98102</PostalCode> 
     <PictureDetails> 
      <GalleryType>Gallery</GalleryType> 
      <GalleryURL>http://i.ebayimg.com/19/!!d5rVwQ!2M~$(KGrHqMH-C0Equyk1qOWBKue4iDIqg~~_7.JPG?set_id=89040003C1</GalleryURL> 
      <PhotoDisplay>None</PhotoDisplay> 
     </PictureDetails> 
     <DispatchTimeMax>15</DispatchTimeMax> 
     <ProxyItem>false</ProxyItem> 
     <BuyerGuaranteePrice currencyID="USD">20000.0</BuyerGuaranteePrice> 
     <IntangibleItem>false</IntangibleItem> 
     <ReturnPolicy> 
      <RefundOption>MoneyBack</RefundOption> 
      <Refund>Money Back</Refund> 
      <ReturnsWithinOption>Days_7</ReturnsWithinOption> 
      <ReturnsWithin>7 Days</ReturnsWithin> 
      <ReturnsAcceptedOption>ReturnsAccepted</ReturnsAcceptedOption> 
      <ReturnsAccepted>Returns Accepted</ReturnsAccepted> 
      <ShippingCostPaidByOption>Buyer</ShippingCostPaidByOption> 
      <ShippingCostPaidBy>Buyer</ShippingCostPaidBy> 
     </ReturnPolicy> 
     <PaymentAllowedSite>eBayMotors</PaymentAllowedSite> 
     <PaymentAllowedSite>CanadaFrench</PaymentAllowedSite> 
     <PaymentAllowedSite>Canada</PaymentAllowedSite> 
     <PaymentAllowedSite>US</PaymentAllowedSite> 
     <ConditionID>2000</ConditionID> 
     <ConditionDisplayName>Manufacturer refurbished</ConditionDisplayName> 
     </Item> 
    </GetItemResponse> 
    </soapenv:Body> 
</soapenv:Envelope> 
+1

'Je pense que je dois le convertir en objet appelé "ReviseItemResponseType"': non, vous devez le convertir en un élément de type "GetItemResponseType". – EJP

Répondre

-1

Avez-vous essayé d'utiliser le kit de développement .NET eBay?

http://developer.ebay.com/community/featured_projects/?name=eBay+SDK+for+.NET

Il devrait envelopper tout cela pour vous.

+0

oui, je l'utilise. mais comment puis-je rattraper le requst d'ebay, et déformer ce xml en objet ebay? – Yan

+0

Certes, je n'ai pas utilisé le SDK ebay, mais généralement avec. NET, vous ne devriez pas avoir besoin de composer des messages SOAP manuellement. Il semble que vous créiez simplement une instance de la classe ReviseItemResponseType, remplissiez les champs dont vous aviez besoin puis la passiez dans le proxy de service, on dirait qu'elle s'appelle "eBayAPISoapBinding". Il y a un exemple ici dans VB, mais vous obtiendrez l'essentiel: http://dev-forums.ebay.com/thread.jspa?threadID=500006860&tstart=1497 – Doobi

+0

qu'est-ce qu'un proxy de service? – Yan

Questions connexes