question

pcalchi avatar image
0 Likes"
pcalchi asked

Calling GetCategories using Trading WSDL in .Net

I'm trying to use the GetCategories method in the Trading API . I've had success invoking a couple of methods in the Finding API. Here's the relevant information in my web.config file
 endpoint address="https://api.ebay.com/ws/api.dll" binding="basicHttpBinding"
        bindingConfiguration="eBayAPISoapBinding" contract="eBayTradingApi.eBayAPIInterface"
        name="eBayAPI" 

    binding name="eBayAPISoapBinding"
          security mode="Transport" 
        binding
This is the raw request I'm able to retrieve using fiddler:
POST https://api.ebay.com/ws/api.dll HTTP/1.1
Content-Type: text/xml; charset=utf-8
X-EBAY-API-COMPATIBILITY-LEVEL: 899
X-EBAY-API-DEV-NAME: 2d433616-XXXX-4391-93bb-f2e5592ba372
X-EBAY-API-APP-NAME: XXXXXMar-XXXX-4c87-9695-c622b673d9db
X-EBAY-API-CERT-NAME: fa52b2d4-XXXX-48e3-afb9-c9d7f90ce917
X-EBAY-API-SITEID: 0
X-EBAY-API-CALL-NAME: GetCategories
VsDebuggerCausalityData: uIDPozlSyi3Cwg5FpfFme+sJlqQAAAAAgOksZJ/2b0qjkJXXJFNRuSD4lYs8Zq5MhBHDeq6S+UQACQAA
SOAPAction: ""
Host: api.ebay.com
Content-Length: 1410
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

xyz

With the exception of the empty SOAPAction header and the VSDebuggerCausalityData header, it's pretty much identical to what I'm seeing in the API Test tool.

This is the error message I'm getting back:


2014-11-14T06:44:06.202ZFailureXML Parse error.XML Error Text: "; nested exception is: 
	org.xml.sax.SAXParseException: The prefix "s" for element "s:Header" is not bound.".
 
  5
 
 
  Error
 
 
  
   ; nested exception is: 
	org.xml.sax.SAXParseException: The prefix "s" for element "s:Header" is not bound.
  
 
 
  RequestError
 
 
  895
 
 
  E895_CORE_APICATALOG_17257396_R1
 

Based on the error message I'm getting back "The prefix "s" for element "s:Header" is not bound."; one could assume that the issue is with .net not generating a proper SOAP message, when indeed it is.

Please help!!!
trading api.NETwsdlthe prefix s for element s header is not bound.
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
devanathan.developersupport@ebay.com avatar image
0 Likes"
devanathan.developersupport@ebay.com answered
Hello pcalchi, Without looking into your code it is not possible to check on this. If possible share the code snippet where it is throwing error. Please remove any token and other confidential information before sharing the code snippet. Best Regards, Devanathan Sampath, eBay Developer Support
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.