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

curl-and-php

Re: Posting XML SOAP

From: Kevin Carothers <kevindotcar_at_gmail.com>
Date: Fri, 15 Sep 2006 11:47:50 -0700

On 9/15/06, Renato Bonicio <renatobonicio_at_gmail.com> wrote:
>
> HI ALL!!
>
> PLEASE, I HAVE A URGENT PROBLEM HERE!!
>
 [---]

Hi Renato-

This is more of a SOAP Q, but I hacked on your code a little bit-
SOAP servers are REAL picky about quote marks- I changed your SOAP request
to the following;

<?xml version=1.0 encoding=UTF-8?> <soap:Envelope xmlns:xsi='
http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='
http://www.w3.org/2001/XMLSchema' xmlns:soap='
http://schemas.xmlsoap.org/soap/envelope/'> <soap:Body>
<ConsultarAcessosPacoteInstalado xmlns='http://tempuri.org/'>
<pOperadora>TC</pOperadora> <pCodPacote>78508</pCodPacote>
</ConsultarAcessosPacoteInstalado> </soap:Body> </soap:Envelope>

  (notice- just ONE kind of quote :-)
...And sent a Curl command-line request as follows;

CURL -k "(your website ref)" -H "Content-Type: text/xml" -H "SoapAction:
\"\""
  -d "<the soap req. I typed above>"

... and I got this response;
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>You are not authorized to view this page</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<STYLE type="text/css">
  BODY { font: 8pt/12pt verdana }
  H1 { font: 13pt/15pt verdana }
    [---]

...which I would expect- because your SOAP server doesn't know me from a
hole in the ground :-)

Hope this helps-

KC

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-09-15