Jump to content

SOAP


LoOpy

Recommended Posts

Hi im trying to connect to a web service im getting timeout errors, just wondering am i calling it properly or am i missing some code?

 

POST /test.asmx HTTP/1.1
Host: test.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://test.org/Pos"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Pos xmlns="http://test.org/">
      <numbers>
        <string>string</string>
        <string>string</string>
      </numbers>
      <systemID>string</systemID>
      <username>string</username>
      <password>string</password>
      <errorCode>string</errorCode>
    </Pos>
  </soap:Body>
</soap:Envelope>

<?php
$wsdl = "test.wsdl";
$number 	= '123321';
$systemID	= 'sysid';
$username	= 'username';
$password	= 'pass';
$errorcode	= '';
$namespace = 'http://test.org/';

$param = array(
		'number' => $number,
		'systemid' => $systemID,
		'username' => $username,
		'password' => $password,
		'errorcode' => ''
	);

$client = new SoapClient($wsdl,$param);
$client->Pos();
print htmlspecialchars($client->__getLastRequest()) ;
?>

Link to comment
https://forums.phpfreaks.com/topic/102675-soap/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.