我正在尝试构建和应用程序来调用由 AAA Cooper Transportation 托管的 Web 服务。
我最终使用wsdl2phpgenerator来生成调用服务所需的代码。
我正在尝试构建和应用程序来调用由 AAA Cooper Transportation 托管的 Web 服务。
我正在尝试构建和应用程序来调用由 AAA Cooper Transportation 托管的 Web 服务。
我正在尝试构建和应用程序来调用由 AAA Cooper Transportation 托管的 Web 服务。
$ProNo="73266840";
$ImageType="BL";
$ImageFormat="PDF";
$Token="#######-####-###-######-########";
ActDocumentSearch.php
<?php
include_once('GetDocument.php');
include_once('ActImgSearchServiceRequestVO.php');
include_once('GetDocumentResponse.php');
include_once('ActImgSearchServiceResponseVO.php');
include_once('UserCredentials.php');
/**
*
*/
class ActDocumentSearch extends SoapClient
{
/**
*
* @var array $classmap The defined classes
* @access private
*/
private static $classmap = array(
'GetDocument' => 'GetDocument',
'ActImgSearchServiceRequestVO' => 'ActImgSearchServiceRequestVO',
'GetDocumentResponse' => 'GetDocumentResponse',
'ActImgSearchServiceResponseVO' => 'ActImgSearchServiceResponseVO',
'UserCredentials' => 'UserCredentials');
/**
*
* @param array $config A array of config values
* @param string $wsdl The wsdl file to use
* @access public
*/
public function __construct(array $options = array(), $wsdl = 'http://www.aaacooper.com/ws/ActDocumentSearch.asmx?wsdl')
{
foreach(self::$classmap as $key => $value)
{
if(!isset($options['classmap'][$key]))
{
$options['classmap'][$key] = $value;
}
}
parent::__construct($wsdl, $options);
}
/**
*
* @param GetDocument $parameters
* @access public
*/
public function GetDocument(GetDocument $parameters)
{
return $this->__soapCall('GetDocument', array($parameters));
}
}
<?php
class UserCredentials
{
/**
*
* @var string $token
* @access public
*/
public $token;
/**
*
* @param string $token
* @access public
*/
public function __construct($token)
{
$this->token = $token;
}
}
<?php
class GetDocumentResponse
{
/**
*
* @var ActImgSearchServiceResponseVO $GetDocumentResult
* @access public
*/
public $GetDocumentResult;
/**
*
* @param ActImgSearchServiceResponseVO $GetDocumentResult
* @access public
*/
public function __construct($GetDocumentResult)
{
$this->GetDocumentResult = $GetDocumentResult;
}
}
<?php
class GetDocument
{
/**
*
* @var ActImgSearchServiceRequestVO $actImgSearchServiceRequestVO
* @access public
*/
public $actImgSearchServiceRequestVO;
/**
*
* @param ActImgSearchServiceRequestVO $actImgSearchServiceRequestVO
* @access public
*/
public function __construct($actImgSearchServiceRequestVO)
{
$this->actImgSearchServiceRequestVO = $actImgSearchServiceRequestVO;
}
}
<?php
class ActImgSearchServiceResponseVO
{
/**
*
* @var string $ProNo
* @access public
*/
public $ProNo;
/**
*
* @var string $ImageType
* @access public
*/
public $ImageType;
/**
*
* @var string $ImageFormat
* @access public
*/
public $ImageFormat;
/**
*
* @var anyType $ImageUrl
* @access public
*/
public $ImageUrl;
/**
*
* @var string $ErrorMessage
* @access public
*/
public $ErrorMessage;
/**
*
* @param string $ProNo
* @param string $ImageType
* @param string $ImageFormat
* @param anyType $ImageUrl
* @param string $ErrorMessage
* @access public
*/
public function __construct($ProNo, $ImageType, $ImageFormat, $ImageUrl, $ErrorMessage)
{
$this->ProNo = $ProNo;
$this->ImageType = $ImageType;
$this->ImageFormat = $ImageFormat;
$this->ImageUrl = $ImageUrl;
$this->ErrorMessage = $ErrorMessage;
}
}
<?php
class ActImgSearchServiceRequestVO
{
/**
*
* @var string $ProNo
* @access public
*/
public $ProNo;
/**
*
* @var string $ImageType
* @access public
*/
public $ImageType;
/**
*
* @var string $ImageFormat
* @access public
*/
public $ImageFormat;
/**
*
* @param string $ProNo
* @param string $ImageType
* @param string $ImageFormat
* @access public
*/
public function __construct($ProNo, $ImageType, $ImageFormat)
{
$this->ProNo = $ProNo;
$this->ImageType = $ImageType;
$this->ImageFormat = $ImageFormat;
}
}