NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
How to use the SOAP header?


Joined: 29 Jun 2006
Posts: 20
Reply with quote
Hi,

i want to use a webservice that obviously wants me to pass authentication information in the soap header. When i simply access a service using the soap proxy i get a soap fault saying "Expected exactly one 'DeveloperPass' in the SOAP header, found 0".
I do have such a pass, but i don't know how to put it in the header of the request. I found there is an optional 'header' parameter in the call method of the soapclient, but how would i feed it (generally)?
I googled a bit and found someone that filled the header with a XML snippet: http://burningbird.net/technology/accessing-the-newsgator-api-within-php/

The webservice can be found here: http://auktionmaster.channeladvisor.de/api/1.0/soap.wsdl
The function to call would be 'Ping'. I used PhpEd's nusoap wizard to test it but it said there are no input parameters needed.

thanx

Doc Olson
View user's profileFind all posts by Doc OlsonSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Looks like http://burningbird.net/technology/accessing-the-newsgator-api-within-php/ is a good article on how to use nusoap for accessing newsgator.
Did you try their sample?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 29 Jun 2006
Posts: 20
Reply with quote
Code:

// create SOAP header for Newsgator API
$hdr = "<ng:NGAPIToken xmlns:ng='http://services.newsgator.com/svc/Subscription.asmx'>
<ng:Token>$token</ng:Token></ng:NGAPIToken>";


That is for the newsgator service. I am not trying to acces newsgator, im trying auctionmaster. I just mentioned the newsgator sample because of the way the soap header is being used there. Is THAT the way one should do it? If so, i would not know how to create the proper XML snippet for the header of the service i want to access.
I already asked the auctionmaster support, but their support is kinda lame and i am still waiting for an answer. So i try to figure things out myself... somehow.
BTW: the WSDL Docs can be found here: auktionmaster.channeladvisor.de/api/1.0/docu/index.html
Any idea how such a doc should be read to use it properly with nusoap?
View user's profileFind all posts by Doc OlsonSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
Is THAT the way one should do it?

I'm not familiar with neither newsgator nor auctionmaster.
If SOAP Header is what they expect, that's the way.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 29 Jun 2006
Posts: 20
Reply with quote
dmitri wrote:
If SOAP Header is what they expect, that's the way.


OK, thanx. That's basically the answer to my question. I was wondering if there are functions for adding soap headers.
View user's profileFind all posts by Doc OlsonSend private message
How to use the SOAP header?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic