curl-and-php
Posting XML SOAP
Date: Thu, 14 Sep 2006 15:27:43 -0300
Hi all!!!
Please i need your help,
I think my problem is very simple to you.
My name is Renato and i´m from Brazil.
I´m using this code with PHP:
* $XMLRequest = '<?xml version="1.0" encoding="UTF-8"?';
$XMLRequest .= '>';
$XMLRequest .= '<soap:Envelope xmlns:xsi="**
http://www.w3.org/2001/XMLSchema-instance*<http://www.w3.org/2001/XMLSchema-instance>
*" xmlns:xsd="**http://www.w3.org/2001/XMLSchema*<http://www.w3.org/2001/XMLSchema>
*" xmlns:soap="**http://schemas.xmlsoap.org/soap/envelope/">'*<http://schemas.xmlsoap.org/soap/envelope/">'>
*;
$XMLRequest .= '<soap:Body>';
$XMLRequest .= '<ConsultarAcessosPacoteInstalado xmlns="**
http://tempuri.org/">'* <http://tempuri.org/">'>*;
$XMLRequest .= '<pOperadora>TC</pOperadora>';
$XMLRequest .= '<pCodPacote>78508</pCodPacote>';
$XMLRequest .= '</ConsultarAcessosPacoteInstalado>';
$XMLRequest .= '</soap:Body>';
$XMLRequest .= '</soap:Envelope>';*
* $data_string = $XMLRequest;*
* $curl_handle = curl_init();*
* curl_setopt ($curl_handle, CURLOPT_URL,"**
http://webservices.dsv.telemigcelular.com.br/wsw/ConsultaAcessosPacoteInstalado/cp.asmx
*<http://webservices.dsv.telemigcelular.com.br/wsw/ConsultaAcessosPacoteInstalado/cp.asmx>
*");
curl_setopt ($curl_handle, CURLOPT_HEADER, 0);
curl_setopt ($curl_handle, CURLOPT_RETURNTRANSFER,1);
curl_setopt ($curl_handle, CURLOPT_POST, 1);
curl_setopt ($curl_handle, CURLOPT_POSTFIELDS, $data_string );*
* $result = curl_exec ($curl_handle);*
* if (curl_error($curl_handle))
{
printf("Error %s: %s", curl_errno($curl_handle),
curl_error($curl_handle));
die (" ->> There has been an error");
}
curl_close ($curl_handle);*
* $xml_parser = xml_parser_create ();
xml_parser_set_option ( $xml_parser , XML_OPTION_CASE_FOLDING , 0 );
xml_parser_set_option ( $xml_parser , XML_OPTION_SKIP_WHITE , 1 );
xml_parse_into_struct ( $xml_parser , $result , $vals , $index );
xml_parser_free ( $xml_parser );*
**
When I print the output, i receive this response:
**
*Array
(
[http://schemas.xmlsoap.org/soap/envelope/] => Array
(
[soap:Body] => Array
(
[soap:Fault] => Array
(
[faultcode] => soap:Client
[faultstring] => Unable to handle request
without a valid action parameter. Please supply a valid soap action.
[detail] =>
)
)
)
)*
Please!! Could you help me with this error?!?!
Thanks in advance..
Renato Bonicio
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-09-14