[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTTPAPI Problem



Hi Jeff,

> I'm using HTTPAPI Ver 1.13.1 released 2006-01-03. to consume a Web Service,
> attached avcelular.wsdl, and jetainfatl.txt program,
> and I got the following error:
> <faultstring>Name of parameter 1 different than expected.</faultstring>

This error message comes from your web service, not from HTTPAPI. The web 
service is receiving your XML document and isn't understanding it. So it 
sends back an error message that says "Name of parameter 1 different than 
expected".  It sends that back to your program to tell you that something 
is wrong.

The WSDL document seems to say that the first tag is called 
VCelular.Execute -- however, you've only coded "Execute" without the 
VCelular prefix.

Furthermore, the WSDL document says that the SOAPAction is 
"http://www.tempuri.org/action/action/AVCELULAR.Execute";, however, you're 
sending "http://tempuri.org/Execute";

The WSDL says that the namespace is "http://tempuri.org/action/";. 
However, you're sending "http://tempuri.org/";

Also (unless there's additional code that you didn't post) you're sending 
the document in the ISO-8859-1 character set, but you tell the web 
service that it's actually in UTF-8.

You also tell the Web service that you're running Mozilla as a web 
browser, when you're actually running HTTPAPI.

Try changing the call to the url_post API so that it looks like this:

      c                   eval      rc = http_url_post(
      c                             'http://150.150.60.85/AOGHostMSG/'+
      c                             'avcelular.aspx'                     :
      c                             %addr(data)                          :
      c                             %size(data:*all)                     :
      c                             '/tmp/AVCELULAR.html'                :
      c                             10                                   :
      c                             HTTP_USERAGENT                       :
      c                             'text/xml'                           :
      c                             'http://tempuri.org/action/'
      c                             + 'action/AVCELULAR.Execute')

And change your XML document so that it looks like this:

<?xml version="1.0" encoding="iso-8859-1"?>
<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>
     <VCelular.Execute xmlns="http://tempuri.org/action/";>
       <Celular>3866074</Celular>
       <Password>12345</Password>
       <Ipadress>150.150.10.235</Ipadress>
     </VCelular.Execute>
   </soap:Body>
</soap:Envelope>

I can't test this since either the server is down, or doesn't allow 
requests from untrusted hosts... but maybe it'll help steer you in the 
correct direction.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------