Hello,
I'm trying to connect to SOAP api of tradera.com using feeds (but I think the problem that I have is with how I conigure web service client for soap authenthication
http://api.tradera.com/v3/PublicService.asmx?WSDL
In feeds I choose the: parameters (GetSellerItems)
However whenever I try to import the data I get an error:
"Error invoking the SOAP service tradera active 2, operation GetSellerItems: Invalid request ---> Value cannot be null. Parameter name: No application Id provided"
So my question is where in the Web Service client can I provide the Application ID so it would be passed to feeds ?
I tried to add it to: Input for global service parameters but maybe I used wrong parametrs it didnt worked..
I also tried putting this data in parametr:
AuthenticationHeader (Machine name: AuthenticationHeader) but when I put it in there, then I cannot access the "GetSellerItems"
If anyone could provide me some suggestions what I'm doing wrong it would be helpful :( I'm stuck with it for 2 weeks now :/
- UPDATE -
I have tried different options (I'm attaching screenshots of my setup) but unfortunatly it still doesnt work as on error in the screenshot below, how else can I add my authenthication details to header? I must be doing something wrong I assume but not sure what
Comment | File | Size | Author |
---|---|---|---|
#1 | data-type-authenthication-header.png | 82.99 KB | Narhir |
#1 | webservices-operation-getselleritems.png | 119.3 KB | Narhir |
#1 | webservicesfeeds.jpg | 111.47 KB | Narhir |
Comments
Comment #1
Narhir CreditAttribution: Narhir commentedComment #2
dman CreditAttribution: dman as a volunteer commentedI did try to replicate, and did get that error.
I haven't been able to guess what an application Id is in this context though. It's possibly something that was introduced, or supported in SOAP 1.2
Do you have any idea what the expected *value* of an application Id should be here, or what a successful packet would look like?
Hm, Well this is nice - there is actually properly written API docs at http://api.tradera.com/v3/PublicService.asmx?op=GetSellerItems
This is something to go on...
But the namespace here implies that the concept of AuthenticationHeader and AppId are custom-made by tradera. Not an official SOAP thing.
Hm.
Comment #3
Narhir CreditAttribution: Narhir commentedHi,
Thank you so much for your reply
The application id is this thing: Application Id: 1502
That is provided when you create new application in their "developer center" it also provides:
Service key: (around 30 characters or so)
Public key: (around 30 characters or so)
On the link that they provide: https://api.tradera.com/v3/PublicService.asmx?op=GetSellerItems (as you provided above) is what I'm trying to do unfortunatly with no luck
And overall call should look like in the example
I was trying to find somewhere in code of a module a place where I could somehow even place my authenthication header layout
Comment #4
Narhir CreditAttribution: Narhir commentedI have looked futher into the API documentation and apparently there is a way to authenthicate my self by passing my Appid and Appkey in URL:
http://api.tradera.com/v3/Default.aspx?NodeId=9763
So I tried adding that kind of url:
http://api.tradera.com/v3/publicservice.asmx?appId=1502&appKey=965d0336-3fa3-4c11-ac9b-689f680d6482&WSDL
It imported definitions correctly HOWEVER it still gave same error on importing attempt:
Error invoking the SOAP service tradera active 4, operation GetSellerItems: Invalid request ---> Value cannot be null. Parameter name: No application Id provided
Maybe I'm doing something wrong but if there is no easy way to pass the details in SOAP header authenthicate maybe I should change some "dynamic" url value in the module files to fix it ? tried some options so far.. but not much luck :( would appriciate any suggestions
-- UPDATE -- 26/06/2015
Okay.. I looked much further into it, unfortunatly I still was unable to pastt the AppId and AppKey trough URL so I moved back to the creating header and its authenthication, first I enabled the patch that allowed for UI to have the place to type the Username and Password, and then I change it a bit to get closer output with "Tester"
Here is my current php code:
It currently generate that kind of "REQUEST"
The correct version of how tradera requirs should look like this:
Currently I'm trying to figure out how to change the into and how to change all those SOAP-ENV into just "soap" if any of you have some suggestions I would really appriciate that I tried implementing code below.. but It didnt worked (I must have done something wrong)
Comment #5
Narhir CreditAttribution: Narhir commentedHello,
So.. after quite some time I finally managed to solve the problems thanks to a help from IRC :)
I'm copy pasting working code, maybe someone will need it in future, it is modified version of patched wsclient_soap.module
Comment #6
Narhir CreditAttribution: Narhir as a volunteer commented