Hola..
Necesito pasar como parametro string que es un xml hacia un web service en php,
pero no se como hacerlo , he probado enviando un dato sencillo , pero cuando envio un xml, no funciona. Alguna Idea o sugerencia ?????
Gracias ... por su pronta respuesta
Adjunto el cliente :
<?php
$string = <<<XML
<?xml version='1.0'?>
<document>
<cmd>login</cmd>
<login>Richard</login>
</document>
XML;
require_once('/www/lib/nusoap.php');
$client = new SoapClient("http://servidor/ws/serv8.php?wsdl");
$xml = simplexml_load_string($string);
// Check for an error
$error = 0;
try {
$info = $client->__call('hello', array('name' => $xml ));
} catch (SoapFault $fault) {
$error = 1;
print("Se ha presentado el siguiente error: ".$fault->faultcode."-".$fault->faultstring." ");
}
if ($error == 0) {
print $info;
}
?>