Jump to content

Recommended Posts

Hello All

I am trying a simple php soap connection - not wdsl

 

$xml contains the actual xml code with the <envelope> and such

 

$options = array(

"location" => 'http://173.xxx.xxx.226/BeaconWs/BeaconWs.asmx',

"uri" => 'http://173.xxx..xxx.226/BeaconWs/',

"trace" => 1,

);

 

$client = new SoapClient(NULL, $options);

 

$client->__soapCall('ImportRequest', $xml);

 

The $xml is set up as an array, which I wasnt sure about but Im not getting that far to get errors back and worry about how to send the xml data.

 

 

I keep getting:

 

Server did not recognize the value of HTTP Header SOAPAction: http://173.xxx.xxx.226/BeaconWs/#ImportRequest.

#0 C:\wamp\www\xmltest2.php(75): SoapClient->__soapCall('ImportRequest', Array)

#1 {main}

 

From my research I have seen this error is supposedly about the uri namespace being wrong

Looking at the request Headers though I see

 

POST /BeaconWs/BeaconWs.asmx HTTP/1.1

Host: 173.14.111.226

Connection: Keep-Alive

User-Agent: PHP-SOAP/5.3.8

Content-Type: text/xml; charset=utf-8

SOAPAction: "http://173.XXX.XXX.226/BeaconWs/#ImportRequest"

Content-Length: 6589

 

So the soap client is automatically generating the SOAPAction

and those headers look exactly like the ones I was given from a succesful .Net implementation

Except for the '#' - that appears in the header and the error in the response.

 

So the question is whether that # is messing it up?

How I would keep it from being in the Headers, since Im not specifying the SOAPAction?

or is that ok and there is something else Im missing?

 

Thanks in advance for any help

 

Mark

Link to comment
https://forums.phpfreaks.com/topic/269633-getting-soapaction-header-error/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.