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

SV: Getting Error HTTP/1.1 501 Not Implemented.



Hi Dave,

Your browser example is http get method.
Maybe you should try a httpapi get example.

"HTTP/1.1 501 Not Implemented"  also indicates that the POST method is not
supported.

Best regards,
Magne

-----Opprinnelig melding-----
Fra: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] På vegne av David White
Sendt: 17. januar 2011 18:35
Til: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Emne: Getting Error HTTP/1.1 501 Not Implemented.

Good Morning Everybody,

I'm new to using the HTTPAPI. I searched for this error in the mailing
list first but did not anything, so I decided to post this asking for
some help.

- What I'm trying to do is post an address to the USPS to get the zip code.

- I modeled my program GETZIPCODE after EXAMPLE5. Here is the code
that's running....

     c                   eval      *inlr = *on

DAW1 c
DAW1  /free
DAW1
DAW1   //Construct the XML document.
DAW1   data = '<AddressValidateRequest%20USERID="400MCKES0921">' +
DAW1          '<Address ID="0">' +
DAW1          '<Address1></Address1><Addreess2>6406 Ivy Lane</Address2>' +
DAW1          '<City>Greenbelt</City><State>MD</State><Zip5></Zip5><Zip4>' +
DAW1          '</Zip4></Address></AddressValidateRequest>';
DAW1
DAW1   //Construct the URL with the XML.
DAW1   rc = http_url_post_raw(
DAW1        'http://testing.shippingapis.com/' +
DAW1        'ShippingAPITest.dll?API=Verify&XML=' :
DAW1        %addr(data):
DAW1        %len(%trimr(data)):
DAW1        1:
DAW1        %paddr('INCOMING'));
DAW1
DAW1   //Check for error.
DAW1   if rc <> 1;
DAW1     msg = http_error;
DAW1     dsply msg;
DAW1   //return;
DAW1   endif;
DAW1
DAW1   //Convert the received data to EBCDIC character set.
DAW1   if retlen > 1;
DAW1     http_xlate(retlen : retdata : TO_EBCDIC);
DAW1   endif;
DAW1
DAW1   return;

- Here is the error returned...

 Job 280312/DWHITE/QPADEV005Z held by user DWHITE with option SPLFILE(*NO)
 Job 280312/DWHITE/QPADEV005Z released by user DWHITE.
 DSPLY  HTTP/1.1 501 Not Implemented

- When I post this via the browser (Chrome) it works fine...

http://testing.shippingapis.com/ShippingAPITest.dll?API=Verify&XML=<AddressV
alidateRequest%20USERID="400MCKES0921"><Address%20ID="0"><Address1></Address
1><Address2>6406%20Ivy%20Lane</Address2><City>Greenbelt</City><State>MD</Sta
te><Zip5></Zip5><Zip4></Zip4></Address></AddressValidateRequest>

Anybody see what I'm doing wrong?

Thanks!

Dave
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------