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

Re: 37e The value specified for the argument is not correct..



Hi Brian,

The HTTP server you're communicating with is malfunctioning.  This is 
the general overview of what's supposed to happen:

a) HTTPAPI sends the request.
b) The server can (but doesn't have to) respond with '100 continue'
c) HTTPAPI sends the POST data.
d) The server responds with '200 OK' or an error code.
e) The server sends the response.

The tricky part is step (b).  The server CAN (but doesn't have to) send 
the '100 continue'.  All this code means is that HTTPAPI is to continue 
by sending the POST data.  If the code isn't sent, HTTPAPI is supposed 
to do that anyway -- so the '100 continue' doesn't really do anything.

So when HTTPAPI receives a '100 continue' it simply ignores it.

Here's the problem:  At step (d), your server is sending a '100 
continue' instead of a '200 OK'.  That's not valid according to the HTTP 
standard -- they CANNOT legally send '100 continue' at this point in 
time.  But, they are.

HTTPAPI sees the '100 continue' and ignores it, as it does with all 
other '100 continue' messages.  It's still looking for the response code 
from the server, because it has ignored the '100 continue'.

The server, however, is sending the download data (in chunked format) 
but HTTPAPI is expecting the '200 OK' message -- and that's why it's 
failing.

The server appears to be broken.




Brian Miller wrote:
> Getting this error message when trying to post XML file. If I send a
> small file it will work.  Sometimes it will work on a large file then
> other times it will give me an error sending the same file.  I should
> be getting an XML back.
> 
>    Loaded the HTTP API from the site last month so should be up to date.
> 
>    Any ideas will be greatly appreciated.
> 
>    Using the following RPG code.
> 
>    RC = http_url_post(
> 
>                 '[1]http://wheeltime.metrex.net/soap/SubmitRepairOrder'
> 
>               : P_DATA
> 
>               : ST_SIZE
> 
>               : '/xml/httplog.xml'
> 
>               : HTTP_TIMEOUT
> 
>               : HTTP_USERAGENT
> 
>               : 'text/xml'
> 
>               : 'http://www.wheeltime.com/ro/1.0/#repairorders');
> 
>    IF RC <> 1;
> 
>      MSG = %TRIM(http_error()) + '  ' +
> 
>      %STR(strerror(errno)) + '. ' ;
> 
>    ENDIF;
> 
>    Added debug and got the following log.
> 
>    HTTPAPI Ver 1.23 released 2008-04-24
> 
>    OS/400 Ver V5R4M0
> 
>    http_url_post(): entered
> 
>    http_persist_open(): entered
> 
>    http_long_ParseURL(): entered
> 
>    DNS resolver retrans: 2
> 
>    DNS resolver retry  : 2
> 
>    DNS resolver options: x'00000136'
> 
>    DNS default domain: INDCOMPUTER.COM
> 
>    DNS server found: 192.168.10.10
> 
>    http_persist_post(): entered
> 
>    http_long_ParseURL(): entered
> 
>    do_post(): entered
> 
>    POST /soap/SubmitRepairOrder HTTP/1.1
> 
>    Host: wheeltime.metrex.net
> 
>    User-Agent: http-api/1.23
> 
>    Content-Type: text/xml
> 
>    SOAPAction: [2]http://www.wheeltime.com/ro/1.0/#repairorders
> 
>    Expect: 100-continue
> 
>    Content-Length: 13941
> 
>    recvresp(): entered
> 
>    HTTP/1.1 100 Continue
> 
>    SetError() #13: HTTP/1.1 100 Continue
> 
>    senddoc(): entered
> 
>    <env:Envelope xmlns:env="[3]http://www.w3.org/2003/05/soap-envelope";>
> 
>    <env:Header>
> 
>    <wsse:Security
>    xmlns:wsse="[4]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss
>    -wssecurity-secext-1.0.xsd">
> 
>    <wsse:UsernameToken>
> 
>    <wsse:Username>userid</wsse:Username>
> 
>    <wsse:Password
>    Type="[5]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-usern
>    ame-token-profile-1.0#PasswordText">
> 
>    userpassword
> 
>    </wsse:Password>
> 
>    </wsse:UsernameToken>
> 
>    </wsse:Security>
> 
>    </env:Header>
> 
>    <env:Body>
> 
>    <repairorders xmlns="[6]http://www.wheeltime.com/ro/1.0/";>
> 
>    ..... data being sent .....
> 
>    </repairorders>
> 
>    </env:Body>
> 
>    </env:Envelope>
> 
>    recvresp(): entered
> 
>    HTTP/1.1 100 Continue
> 
>    Date: Thu, 31 Jul 2008 14:42:22 GMT
> 
>    X-Cache: MISS from wheeltime.metrex.net
> 
>    Transfer-Encoding: chunked
> 
>    Content-Type: text/plain
> 
>    SetError() #13: HTTP/1.1 100 Continue
> 
>    37e
> 
>    HTTP/1.1 100 Continue
> 
>    SetError() #13: 37e
> 
>    http_close(): entered
> 
>    This is the http debug log from file post without error.
> 
>    HTTPAPI Ver 1.23 released 2008-04-24
> 
>    OS/400 Ver V5R4M0
> 
>    New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819.
>    ProtLoc=0
> 
>    http_url_post(): entered
> 
>    http_persist_open(): entered
> 
>    http_long_ParseURL(): entered
> 
>    DNS resolver retrans: 2
> 
>    DNS resolver retry  : 2
> 
>    DNS resolver options: x'00000136'
> 
>    DNS default domain: INDCOMPUTER.COM
> 
>    DNS server found: 192.168.10.10
> 
>    http_persist_post(): entered
> 
>    http_long_ParseURL(): entered
> 
>    do_post(): entered
> 
>    POST /soap/SubmitRepairOrder HTTP/1.1
> 
>    Host: wheeltime.metrex.net
> 
>    User-Agent: http-api/1.23
> 
>    Content-Type: text/xml
> 
>    SOAPAction: [7]http://www.wheeltime.com/ro/1.0/#repairorders
> 
>    Expect: 100-continue
> 
>    Content-Length: 2443
> 
>    recvresp(): entered
> 
>    HTTP/1.1 100 Continue
> 
>    SetError() #13: HTTP/1.1 100 Continue
> 
>    senddoc(): entered
> 
>    <env:Envelope xmlns:env="[8]http://www.w3.org/2003/05/soap-envelope";>
> 
>    <env:Header>
> 
>    <wsse:Security
>    xmlns:wsse="[9]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss
>    -wssecurity-secext-1.0.xsd">
> 
>    <wsse:UsernameToken>
> 
>    <wsse:Username>username</wsse:Username>
> 
>    <wsse:Password
>    Type="[10]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-user
>    name-token-profile-1.0#PasswordText">
> 
>    userpassword
> 
>    </wsse:Password>
> 
>    </wsse:UsernameToken>
> 
>    </wsse:Security>
> 
>    </env:Header>
> 
>    <env:Body>
> 
>    <repairorders xmlns="[11]http://www.wheeltime.com/ro/1.0/";>
> 
>    ..... data .....
> 
>    </repairorders>
> 
>    </env:Body>
> 
>    </env:Envelope>
> 
>    recvresp(): entered
> 
>    HTTP/1.1 200 OK
> 
>    Date: Thu, 31 Jul 2008 15:37:43 GMT
> 
>    Server: Apache
> 
>    Content-Length: 588
> 
>    Content-Type: text/xml; charset=utf-8
> 
>    SOAPServer: SOAP::Lite/Perl/0.70_04
> 
>    X-Cache: MISS from wheeltime.metrex.net, MISS from
>    wheeltime.metrex.net
> 
>    SetError() #13: HTTP/1.1 200 OK
> 
>    recvdoc parms: identity 588
> 
>    header_load_cookies() entered
> 
>    recvdoc(): entered
> 
>    SetError() #0:
> 
>    <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
>    xmlns:soapenc="[12]http://www.w3.org/2003/05/soap-encoding";
>    soap:encodingStyle="[13]http://www.w3.org/2003/05/soap-encoding";
>    xmlns:soap="[14]http://www.w3.org/2003/05/soap-envelope";><soap:Body><r
>    epair-order-results
>    xmlns="[15]http://www.wheeltime.com/ro/1.0/";><repair-order-result
>    number="R552722B000" distributor-id="6" location-id="00004"
>    status="success"></repair-order-result><repair-order-result
>    number="R553784C000" distributor-id="6" location-id="00009"
>    status="success"></repair-order-result></repair-order-results></soap:B
>    ody></soap:Envelope>
> 
>    http_close(): entered
> 
>                                          
> 
>    Brian Miller
>    ICS
>    Programmer
>    (256) 760-8239
>    brian@xxxxxxxxxxxxxxx
> 
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------