eBay XML API returns 'Invalid job context type' error - ebay-api

I am developing eBay manager that is almost completed. Everything is running fine, like posting of data, getting order details from eBay.
Now I need to update the status of Shipping Tracking numbers, Carrier on eBay. Here I am getting error and I can't figured out what is the problem. Any help in this regards will be highly appreciated.
Help Reference: http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/CompleteSale.html
Error response:
<?xml version="1.0" encoding="UTF-8"?>
<GetSellerTransactionsResponse
xmlns="urn:ebay:apis:eBLBaseComponents"><Timestamp>2010-01-13T12:50:29.644Z<Ack>Failure<Errors><ShortMessage>Invalid
job context type<LongMessage>The job context object
is not supported by Action Service
Framework.<ErrorCode>21843<SeverityCode>Error<ErrorParameters
ParamID="0"><Value>GetSellerTransactions<ErrorParameters
ParamID="1"><Value>CompleteSaleRequestTypeRequestError<Version>643<Build>E643_CORE_BUNDLED_10284414_R1</GetSellerTransactionsResponse>

I got this error when accidentally having the wrong X-EBAY-API-CALL-NAME value for the call I was making.
For example, in my header I put GetSellerEvents, but my request body was using GetSellerList.
Hope that helps!
Joe

Just had a similar issue. I had non-matching values in the headers and the XML; I had AddItem in the header, but VerifyAddItemRequest in the XML. (A copy and paste issue). The XML part needs to be AddItemRequest in this case.
After fixing this, I made my first-ever successful item listing in the sandbox.

Related

Sending xAPI statements to an LRS

I'm trying to send xAPI statements from an "Activity Provider" to the ADL LRS live demo. The goal is to implement this from my C# .NET application, but I was having trouble implementing it so I tried running a simple POST request from JMeter.
I do get a 200 response, but when I try to check whether the statement was successfully stored at https://lrs.adlnet.gov/me/statements, it's empty.
Am I completely misunderstanding how this structure is supposed to work? I'm going to install the ADL LRS eventually for testing purposes, but I wanted to get the actual request structure worked out first.
The path looks incorrect, the POST should be to {endpoint}/statements, so in your case it looks like it should be https://lrs.adlnet.gov/xAPI/statements. Additionally you should make sure you are setting the X-Experience-API-Version header. If this doesn't solve the issue, you should look at more than just the response status code, and see what the body contains (and add it to your question). The body for the type of request you are sending should return JSON, with an array with a single statement identifier in it. Additionally when you retrieve the statements the URL you use should match the one that you specify when you send, so /me/ is not correct.
If it is a basic C# .NET project you may be interested in https://github.com/RusticiSoftware/TinCan.NET. It is showing its age, but in general for a number of projects it will still work or would at least be a reasonable place to start.

Unable to POST Multipart Form in Robot Framework Using Request Library

I have the following request in postman:
I have been using request library since the beginning automation on API: https://marketsquare.github.io/robotframework-requests/doc/RequestsLibrary.html#POST%20On%20Session
I tried to automate based on the postman request above with several trial and errors:
It always return 400 although the headers value set already correct:
What did I miss in the steps above?
Thank you in advance!
You should pass file descriptor not dictionary and "POST On Session" accepts file as "data" argument not "files". Try this
${file_stream} = Get File For Streaming Upload ${file_path}
${response} = POST On Session ${alias} ${URI} data=${file_stream}
On the second line you should add the rest arguments.
P.S. Next time please don't post code as screenshot, it makes hard for someone to copy and run it.
this is a false-negative due to the framework used by developers.
The developer has updated their framework and it works fine now.
No issues on the Robot Framework Request Library
Thank you.

RAML mocking service POST request showing 404 Error in Mule design center

I am using mocking service feature to build and test API design for one of the POC. I am getting HTTP error code 404, when posting message from design center through mocking service.
See the attached picture as well:
GET, PUT and POST request with without URI parameter are all working fine, but whenever I try to explicitly pass a specific gid or cid with the POST method it is showing the error from above.
I am attaching RAML file:
https://forums.mulesoft.com/storage/temp/6224-test.txt
I have read the documentation and have understood that we can pass any parameter value, when testing API with the mock service.
Could you please help me to find out, why the POST request with a specific gid or cid is returning an error code?
Based on the attached sceenshot you are trying to POST something to the root path of your API Mock Service.
Instead of deleting the parameters and sending the HTTP POST request to an URL like:
https://mocksvc.mulesoft.com/mocks/29b2eb87-675e-4aa2-8ae3-c5d13e99e441/
Please try to keep the URI in the correct format:
https://mocksvc.mulesoft.com/mocks/29b2eb87-675e-4aa2-8ae3-c5d13e99e441/groups/{gid}/channels/{cid}/chatthreads
In this URL you just have to replace the gid and cid parameters in the curly braces to the actual values.
Using your RAML file and a URI in the correct format, like the followine examples:
https://mocksvc.mulesoft.com/mocks/29b2eb87-675e-4aa2-8ae3-c5d13e99e441/groups/10/channels/5/chatthreads
https://mocksvc.mulesoft.com/mocks/29b2eb87-675e-4aa2-8ae3-c5d13e99e441/groups/10/teams
I am getting "204 No Content":
But when I remove the parameters and try to execute the HTTP POST on the wrong path, then I get "404 Not Found":
Based on the screenshot you have provided; the path to the resource was not complete in your HTTP request. This could have caused the HTTP error code "404 Not Found".
Please make sure that the full path to the resource is set in the API Console. This is needed to be able to identify what resource you want to POST (create).
For details about the usage of special characters (like '-' or '$') in the names of resources; please see the raml-js-parser. This parser is being used by the API Designer.
At the moment there are still open issues related to the handling of special charachters, like '-'. Please see the related bug report: Resource name is invalid: illegal character #129 in the github repository of raml-js-parser.
I would suggest to be using no special charachters in the resource names. (even though the current RFC standards eventually do allow the usage of '$')
According to this; the resource name "$ref" seems to be causing problems in your RAML. Please consider filing a bug report for the API designer in their github repository. However the issue could be caused by the parser as well...

What should the payload have? Mule ESB - Studio

Im new at Mule. I saw some examples of people who had all the information stored in this part of the message called 'payload', Mule Doc is not the greatest so i hope you can explain me this.
I have seen that they recive the information and access to it this way
#[payload.age]
but in my case (just trying) I discovered that my information (that comes from the http POST request ) is accesible this way
#[message.inboundProperties.age]
What's the diferece? im always getting a payload with information that i dont know anything about.
in this image i show you a simple flow of my App, just as example.
Ty
Actually, the documentation for Mule is now very solid.
Here is a great explanation of the structure of a Mule message: http://www.mulesoft.org/documentation/display/current/Mule+Message+Structure
You can't really use Mule without having some fundamentals: I strongly suggest you got through these first steps http://www.mulesoft.org/documentation/display/current/Mule+Fundamentals

How to parse WCF binary response manually (xml)

I need to parse WCF binary response. The reason is that I have no contract nor metadata I can just call wcf service with parameters using WebClient. What I'm getting now is binary response with xml inside but when I want to deserialize it with BinaryFormatter and load xml document, it gives me an error because of leading data. Is there some class which can do this for me?
Thanks.
I was also looking for something similar and I came across https://github.com/waf/WCF-Binary-Message-Inspector
It may help you out.
thank you for responses. Actually I ended up following this blog post (Fiddler plugin):
http://blog.functionalfun.net/2009/11/fiddler-plug-in-for-inspecting-wcf.html
there is also a link to source code:
http://archive.msdn.microsoft.com/wcfbinaryinspector
hope it will help