Question

Here is the code that makes the SOAP call

require_once("zulutradeClient.php");
date_default_timezone_set('America/New_York');

$params->providerId = 128391;
$params->validTrades = true;
$params->lotSize = "Standard";
$params->start = 0;
$params->length = 20;
//$params->sortAscending = false;
$params->fromDateStr = "1986-08-27T09:00:00";
$params->toDateStr = "2014-01-12T09:00:00";
$params->sortBy = "dc";

$ztclient = new zulutradeClient();
$response = "";

try {
    $response = $ztclient->GetProviderTrades( $params );
    var_dump($response);
}
catch (SoapFault $e) {
   var_dump($e); 
}

The wsdl is here

http://www.zulutrade.com/WebServices/Performance.asmx?WSDL

When the 'sortAscending' is commented out, i get the no property error:

SOAP-ERROR: Encoding: object has no 'sortAscending' property"

When it is uncommented I get the following error:

message: Could not connect to host
faultcode: http

It seems really hopeless, I've tried everything, and it just doesn't want to take that parameter.

Était-ce utile?

La solution

When the 'sortAscending' is commented out, i get the no property error:

SOAP-ERROR: Encoding: object has no 'sortAscending' property"

<s:element minOccurs="1" maxOccurs="1" name="sortAscending" type="s:boolean" /> 

sortAscending is a mandatory field in wsdl, that's why you are getting above error.

When it is uncommented I get the following error:

 message: Could not connect to host
 faultcode: http

There is no fault in your request soap message here. The issue here is, this end point url.

http://www.zulutrade.com:81/WebServices/Performance.asmx

It is not accessible. Connect with your wsdl provider regarding this. you can not do anything about that. Most probably, this srvice would be hosted on some other port rather than 81.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top