|
Posted by Rik Wasmus on 12/05/07 15:59
On Wed, 05 Dec 2007 16:45:46 +0100, gentleJuggernaut <url84t@gmail.com> =
=
wrote:
> I am using curl to access a webservice. The webservice offers a
> search and confirm. The search works great. on the confirm there is
> a value that needs to be passed back to the webservice in order to
> confirm. This value often contains '+%20' etc. Curl appears to be
> changing these values to spaces. Is there a curl option that will
> tell it not to encode the data, just pass it as is.
>
> Here is the cURL code that I am working with:
>
> $ch =3D curl_init ();
> $fp =3D @fopen('out.txt','w');
> $postdata =3D 'serviceRequest=3D' . $xml;
Hmmz, shouldn't you 'double encode' the data in the $xml here? Once some=
=
possible values/attributes in the XML itself, once the whole lot to make=
=
it postdata? (just guessing here, might work though). So, something like=
=
$postdata =3D 'serviceRequest=3D' . rawurlencode($xml);
> the variable $xml contains my well formed xml request (I have verified=
> this separately). When the server (represented by $this-
>> getGateway($test)) receives my xml statement with altered text (when
> I compare what the server receives with what I had prior to putting it=
> through cURL some of the data contained in the xml has been
> reformatted with spaces in place of certain characters, referenced
> above). This of course causes the confirmation to fail. Any help
> would be appreciated.
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|