XML zahtev:
Code:
POST /content.asmx HTTP/1.1
Host: www.tripauthority.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "urn:TripAuthority/FindPropertiesByPropertyId"
<?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:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:TripAuthority" xmlns:types="urn:TripAuthority/encodedTypes" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:FindPropertiesByPropertyId>
<aUser xsi:type="xsd:string">string</aUser>
<aPassword xsi:type="xsd:string">string</aPassword>
<aPropertyId xsi:type="xsd:int">int</aPropertyId>
<aSiteId xsi:type="xsd:int">int</aSiteId>
<aPageSize xsi:type="xsd:int">int</aPageSize>
<aPage xsi:type="xsd:int">int</aPage>
<aSortColumn xsi:type="xsd:string">string</aSortColumn>
<aSortOrder xsi:type="xsd:string">string</aSortOrder>
</tns:FindPropertiesByPropertyId>
</soap:Body>
</soap:Envelope>
POST /content.asmx HTTP/1.1
Host: www.tripauthority.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "urn:TripAuthority/FindPropertiesByPropertyId"
<?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:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:TripAuthority" xmlns:types="urn:TripAuthority/encodedTypes" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:FindPropertiesByPropertyId>
<aUser xsi:type="xsd:string">string</aUser>
<aPassword xsi:type="xsd:string">string</aPassword>
<aPropertyId xsi:type="xsd:int">int</aPropertyId>
<aSiteId xsi:type="xsd:int">int</aSiteId>
<aPageSize xsi:type="xsd:int">int</aPageSize>
<aPage xsi:type="xsd:int">int</aPage>
<aSortColumn xsi:type="xsd:string">string</aSortColumn>
<aSortOrder xsi:type="xsd:string">string</aSortOrder>
</tns:FindPropertiesByPropertyId>
</soap:Body>
</soap:Envelope>
moj PHP code
Code:
<?
require_once 'lib/nusoap.php';
$TSoapClient = new nusoap_client("http://tripauthority.com/hotel.asmx", true,$proxyhost, $proxyport, $proxyusername,$proxypassword);
$namespace="http://tripauthority.com/hotel";
$SOAPAction="TripAuthority/FindPropertiesByPropertyId";
if ($sError = $TSoapClient->getError())
{
echo $sError;
die();
}
// list of parameters values
$aUser=USER
$aPassword=PASS
$aPropertyId=1001;
$aSiteId=23752;
$aPageSize=20;
$aPage=1;
$aSortColumn="";
$aSortOrder="";
//making parameters array
$aParametres = array("aUser" => $aUser
, "aPassword" => $aPassword
, "aLocationId" => $aLocationId
, "aPropertyId" => $aPropertyId
, "aSiteId" => $aSiteId
, "aPageSize" => $aPageSize
, "aPage" => $aPage
, "aSortColumn" => $aSortColumn
, "aSortOrder" => $aSortOrder);
//calling the client, with parametres and namespace
$request=$TSoapClient->call($SOAPAction, $aParametres, $namespace);
if ($TSoapClient->fault)
{
echo 'Operation not compleated';
die();
}
else
{
$sError = $TSoapClient->getError(); // allways stuck here
if ($sError)
{
echo 'Error:' . $sError;
die();
}
}
<?
require_once 'lib/nusoap.php';
$TSoapClient = new nusoap_client("http://tripauthority.com/hotel.asmx", true,$proxyhost, $proxyport, $proxyusername,$proxypassword);
$namespace="http://tripauthority.com/hotel";
$SOAPAction="TripAuthority/FindPropertiesByPropertyId";
if ($sError = $TSoapClient->getError())
{
echo $sError;
die();
}
// list of parameters values
$aUser=USER
$aPassword=PASS
$aPropertyId=1001;
$aSiteId=23752;
$aPageSize=20;
$aPage=1;
$aSortColumn="";
$aSortOrder="";
//making parameters array
$aParametres = array("aUser" => $aUser
, "aPassword" => $aPassword
, "aLocationId" => $aLocationId
, "aPropertyId" => $aPropertyId
, "aSiteId" => $aSiteId
, "aPageSize" => $aPageSize
, "aPage" => $aPage
, "aSortColumn" => $aSortColumn
, "aSortOrder" => $aSortOrder);
//calling the client, with parametres and namespace
$request=$TSoapClient->call($SOAPAction, $aParametres, $namespace);
if ($TSoapClient->fault)
{
echo 'Operation not compleated';
die();
}
else
{
$sError = $TSoapClient->getError(); // allways stuck here
if ($sError)
{
echo 'Error:' . $sError;
die();
}
}
i uvek ista poruka:
Code:
Error:wsdl error: XML error parsing WSDL from http://tripauthority.com/hotel.asmx on line 75: Mismatched tag
Error:wsdl error: XML error parsing WSDL from http://tripauthority.com/hotel.asmx on line 75: Mismatched tag
jedan smeshni nekomercijalni video: http://www.develop-one.net/blog/2008/08/27/HugADeveloper.aspx