Jump to content

PHP 5 - SOAP call, problem passing variables..


Twixly

Recommended Posts

Hello. I have some problem with SOAP and a WSDL

 

$client = new SoapClient('http://localhost/staticWSDL.xml', array("exceptions"=>0));
$paras = array('affiliateID'=>'1', 'affiliatePassword'=>'myPass', 'affiliateCountry'=>'SE','live'=>'0');

$res = $client->getAffiliateProducts($paras);

if (is_soap_fault($res)) {
	trigger_error("SOAP Fault: (faultcode: {$res->faultcode}, faultstring: {$res->faultstring})", E_USER_ERROR);
}else
{
	var_dump($res);
}

 

The problem is that according to SOAPMonitor (Axis2 module) my request takes the form :

 

<?xml version='1.0' encoding='utf-8'?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost/myservice/xsd">

<SOAP-ENV:Body>

<ns1:getAffiliateProducts />

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

As you can see, NO variables get´s passed to the request. I have no idea why? :(

Anyone got any idea?

 

Thanks!

 

EDIT : Using localhost instead of the real URLs.. could the problem be that I cannot resolve (xmlns:ns1="THIS URL) ? Just a hunch..

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.