cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Posting XML SOAP

From: Renato Bonicio <renatobonicio_at_gmail.com>
Date: Fri, 15 Sep 2006 15:02:13 -0300

HI ALL!!

PLEASE, I HAVE A URGENT PROBLEM HERE!!

On 9/14/06, Renato Bonicio <renatobonicio_at_gmail.com> wrote:
>
> 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/%22%3E'>
> *;
> $XMLRequest .= '<soap:Body>';
> $XMLRequest .= '<ConsultarAcessosPacoteInstalado xmlns=" **
> http://tempuri.org/">'* <http://tempuri.org/%22%3E'>*;
> $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-15