0

I'm trying to call a function from this webservice:

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

I'm sending all the requested params but I'm getting this error: Value cannot be null. Parameter name: source I think it's a server issue, but maybe I need to change something in my code:

$client = new SoapClient('http://www.zulutrade.com/WebServices/Performance.asmx?WSDL',
                         array('location' => "http://www.zulutrade.com/WebServices/Performance.asmx",
                               'trace'=>1, 
                               "cache_wsdl" => 0));

$params = array
(
    'providerId' => 109206,
    'fromDateStr' => "1985-12-19",
    'toDateStr' => "2013-05-06",
    'validTrades' => true,
    'lotSize' => "Mini",
    'start' => 0,
    'length' => 20,
    'sortBy' => "buy",
    'sortAscending' => true
);

try
{
    $result =  $client->GetProviderTrades($params);
}
catch (SoapFault $fault)
{
    print_r($fault);
}

Any ideas? thanks

4
  • You're not sending a required parameter 'source'? Commented May 8, 2013 at 10:18
  • @RMcLeod, There is no such parameter 'source' in the wsdl, so that cannot be it. Commented May 8, 2013 at 10:20
  • @Veda Has this ever been resolved? I'm facing the same issue here and can't seem to fix it. The parameter source doesn't exist in the WSDL file ether. Commented Sep 13, 2015 at 10:24
  • @WarreBuysse This is not my question, I tried looking into the problem, but for me the endpoint gives a server error (500). Commented Sep 15, 2015 at 11:48

2 Answers 2

0

I tried with nusoap class and I get this error

HTTP Error: Couldn't open socket connection to server http://www.zulutrade.com:81/WebServices/Performance.asmx, Error (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

So maybe it's a bug on their part

Sign up to request clarification or add additional context in comments.

3 Comments

Did you set location to 80 port http://www.zulutrade.com/WebServices/Performance.asmx as it set by OP ?
There's no need to set the port
I don't - it's an inside code in the class of nusoap - I used this class with many web services and it worked fluency - I guess they know what they are doing
0

You set all vars except one. ArrayOfInt currencyIds; is not set.

struct GetProviderTrades {
 int providerId;
 ArrayOfInt currencyIds;
 string fromDateStr;
 string toDateStr;
 boolean validTrades;
 LotSize lotSize;
 int start;
 int length;
 string sortBy;
 boolean sortAscending;
}

3 Comments

I've tried this: code$params = array ( 'providerId' => 109206, 'currencyIds' => array(1,2), 'fromDateStr' => "1985-12-19", 'toDateStr' => "2013-05-06", 'validTrades' => true, 'lotSize' => "Mini", 'start' => 0, 'length' => 20, 'sortBy' => "buy", 'sortAscending' => true );code And now the error is: "AnonymousType4f`2[System.Int32,Z.T[]] cannot be serialized because it does not have a parameterless constructor"
That is another question. Take a look at stackoverflow.com/a/7377712/2123644
probably a bug on the other side

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.