Tengo el siguiente codigo:
Código:
  
Este programe me regresa texto en html, pero yo lo quiero en xml, alguien puede ayudarme? Gracias!!! <?php
$reqestPayloadString = <<<XML
<ns1:getProductos xmlns:ns1="...php.wsf.wso2.net/samples">
        <ns1:id_producto>1</ns1:id_producto>
</ns1:getProductos>
XML;
try
{
        $message = new WSMessage($reqestPayloadString, 
                array("to" =>  ".../~li406045162/php/ws/wsf/wsf_lib/productoDataSer
vice2.php"));
        
        $client = new WSClient(array("useSOAP"=>1.1));
        $response = $client->request($message);
        echo $response->str;
        echo "\n";
}
catch (Exception $e) 
{
        
        if ($e instanceof WSFault) 
        {
            $fault = $e;
                printf("Soap Fault received with code '%s' and reason '%s'\n", 
                        $fault->code, $fault->reason);
        }
        else 
        {
                printf("Exception caught with message '%s'\n", $e->getMessage());
        }
}
//header ("Content-type:text/xml");
?>
 
