webservice plugin using with C# SOAP webservice

ivan

New Member
i tryed to uste the plugin but a t the time of parcing the response with xpatch i meet some problems.
to make the soap.php to work i changed the get function in
/components/com_fabrik/models/webservice/soap.php
it will be good if the name spaces for the parcer are moved to the plugin form.
to get a string from $this->client->__getLastResponse();
also added the trace options to the client
$this->client = new SoapClient($options['endpoint'],array('trace'=>1));


changed to:
public function get($method, $options = array(), $startPoint = null, $result = null)
{
if (is_null($result))
{
$result = $method . 'Result';
}

$xml = $this->client->$method($options);

$soap = $this->client->__getLastResponse();


$data = simplexml_load_string($soap);
$data->registerXPathNamespace('soap', 'http://www.w3.org/2003/05/soap-envelope');
$data->registerXPathNamespace('a', 'http://tempuri.org/');
if (!is_null($startPoint))
{

$dataj = $data->xpath($startPoint);
}






$return = array();

// Convert xml nodes into simple objects
foreach ($dataj as $xmlElement)
{
$json = json_encode($xmlElement);
$return[] = json_decode($json);
}

return $return;
}
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top