[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MessageBlocked error
Hiya Tony,
You have some strange problems in your debug file that I don't
understand. Look at this:
do_post(): entered
POST /test/DataServiceLoad HTTP/1.1
Host: eb1.mazda.com.au:9808
User-Agent: HTTP_USEAGENT
Expect: 100-continue
Content-Length: 442
HTTP/1.1 500 ERROR
HTTPAPI has stated that it's sending 442 bytes of data -- but there's NO
DATA AT ALL! What the heck...?! Even more interesting, you're getting
a response from the HTTP server (HTTP/1.1 500 ERROR). It should be
waiting until the 442 bytes arrive, it shouldn't be sending you a
response until that happens...
So I would've expected to see a timeout error here...
So I think the first step is to figure out why there's no data being
sent here...
1) Is it possible that the data appeared in the debug file at this
point, but you removed it?
2) Or, is it possible that there were 442 blanks (or unprintable
characters) at this point, that you failed to send with your debug file?
3) Or, is it possible that you are sending the wrong variable on the RPG
side, and so you are sending a blank variable?
Also, in the above part of the log (I'll repeat it, below) you have a
weird user-agent. You have this:
User-Agent: HTTP_USEAGENT
What on earth is HTTP_USEAGENT? I can only assume someone got really
confused, here... the user agent should be the string "http-api/1.23",
but for some reason it's HTTP_USEAGENT. Now, HTTPAPI does have a named
constant of HTTP_USERAGENT (with an R in it) and that constant
corresponds to the value "http-api/1.23". But apparently instead of
using the constant, you are sending a string containing the words
'HTTP_USEAGENT'. That's a very weird thing to do.
I doubt that the web service cares which user agent you use.
(Typically, only websites care about that...) But I guess it's possible
that it's an error, and it sure doesn't make any sense to send
"HTTP_USEAGENT"
Finally, this is the response you are getting from the HTTP server you
are communicating with:
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header/>
<env:Body>
<env:Fault>
<env:Code>
<env:Value>env:Receiver</env:Value>
<env:Subcode>
<env:Value xmlns:fault="http://www.vordel.com/soapfaults"
fault:MessageBlocked
</env:Value>
</env:Subcode>
</env:Code>
<env:Reason/>
<env:Detail
xmlns:fault="http://www.vordel.com/soapfaults"
fault:type="faultDetails"/>
</env:Fault>
</env:Body>
</env:Envelope>
This is not a "legal" XML document. (or, in XML terminology it's not
"well-formed") The the opening <env:Value> tag (the one within the
env:Subcode element) is missing it's closing > character.
This means that it's impossible to process this XML document in any XML
parser. And, even as a human-being reading it, I can't tell if
"fault:MessageBlocked" is part of an attribute? (This seems likely,
since it has a "fault" namespace) Or, is it actually character data?
Or... what is it?
Once again, I ask you to look carefully and see if it looks like that in
your debug file, or whether this was some sort of error created when you
sent me the file.
If you are copy/pasting this file screen-by-screen into the e-mail, then
... wow... that's a very time-consuming and error-prone way of doing
things. I would ask that you download the debug file to your PC and
attach it to the e-mail.
Finally: Please understand what HTTPAPI does. In POST mode (what you
are using) it sends a file to an HTTP server, and receives a file back.
It doesn't know or care what is in those files... it's just copying
the data across the communications line.
The remainder of the process, when you call a web service, is to know
what data to send to produce a particular result... and to know what
the data that comes back is supposed to mean. And that part is
different with every single web service on the planet.
I'm not familiar with every single web service on earth. Thankfully,
most web services have something called a WSDL file (an XML document)
that tell you how to use them. I cannot tell you whether your SOAP
message is right or wrong unless you also include that WSDL.
And I'll never be able to tell you what an error code from a web service
means. From HTTPAPI's perspective, it's just data being sent from the
server to your program. It doesn't know what it means, it's just a
string of bytes. Asking *me* what a web service meant by a message like
"MessageBlocked" (which may or may not actually be the message, based on
the not-well-formed data in the debug file) makes little sense.
That would be like getting a phone call from your mother where she said
"Ooooga Booga" and then calling up your phone company and asking *them*
what the message meant. After all, it was sent with their phones, they
should know what it means right? NO! They just provide the
communications channel.
The same is true here. HTTPAPI doesn't know what the messages mean. It
just relays them from the server to your program. If you don't
understand a message, you need to ask the folks that sent it! Don't ask
me just because I provided you with the communications channel.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------