I've been using a site for years to get a daily quote on my intranet page. Today, it stopped working with the message HTTP/1.1 301 Moved Permanently. I've imported the wsdl to soapui and that seems to work fine. I can't see the problem. Maybe a fresh set of eyes can help me. I'm attaching the rpg program and the debug log. Thanks in advance, Craig Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Unless expressly stated in this e-mail, nothing in this message or any attachment should be construed as a digital or electronic signature.
H DftActGrp(*No) BndDir('HTTPAPI':'QC2LE')
H Option(*SrcStmt:*NoDebugIO) Debug(*Yes)
H Copyright('URL/Mutual Pharmaceutical')
*?----------------------------------------------------------------*
*?Program : GETQUOTE *
*?Description : Get the quote of the day *
*?Created by : Craig Jacobsen *
*?Date Created: 05/06/2008 *
*?----------------------------------------------------------------*
*?Parms:
*? None
*?----------------------------------------------------------------*
*?Maintenance History: *
*? *
*?Update# Date Pgmr Description *
*?------- ---------- ---- ---------------------------------------*
*? *
*?----------------------------------------------------------------*
D SOAP s 65535A varying
D Resp s 65535A varying
D rc s 10I 0
D x s 10I 0
D pos s 10I 0
D errnum s 10i 0
/Copy HttpAPI_h
/Copy IfsIO_h
D EndTag PR
D save 65535a varying
D depth 10I 0 value
D ns 1024A varying const
D name 1024A varying const
D path 24576A varying const
D value 65535A varying const
D attrs * dim(32767)
D const options(*varsize)
D SoapAction PR
D Header 1024A varying
D UserData * value
*?Incoming/outgoing parms
D GetQuote PR ExtPgm('GETQUOTE')
D Quote 256A
D Author 128A
D GetQuote PI
D Quote 256A
D Author 128A
/free
http_debug(*ON ); //?turn this on to get a debug log
//?in /tmp/httpapi_debug.txt
http_XmlStripCRLF(*ON);
http_XmlNs(*ON);
SOAP = '<?xml version="1.0" encoding="utf-8"?> +
<soapenv:Envelope +
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" +
xmlns:swan="http://swanandmokashi.com"> +
<soapenv:Header/> +
<soapenv:Body> +
<swan:GetQuote/> +
</soapenv:Body> +
</soapenv:Envelope>';
http_xproc( HTTP_POINT_ADDL_HEADER
: %paddr(SoapAction) );
//? Ask for the quote of the day
//? store the response in the 'RESP' variable
for x = 1 to 5;
rc = http_url_post_xml( 'http://swanandmokashi.com/HomePage/+
WebServices/QuoteOfTheDay.asmx'
: %addr(SOAP) + 2
: %len(SOAP)
: *NULL
: %paddr(EndTag)
: %addr(RESP)
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml; charset=utf-8');
if (rc = 1);
leave;
endif;
If x = 5;
http_error(errnum);
if (errnum<>HTTP_XMLERR);
http_crash();
endif;
endif;
endfor;
*InLr = *On;
Return;
/end-free
*?called by HTTPAPI for each ending XML tag
P EndTag B
D EndTag PI
D save 65535a varying
D depth 10I 0 value
D ns 1024A varying const
D name 1024A varying const
D path 24576A varying const
D value 65535A varying const
D attrs * dim(32767)
D const options(*varsize)
/free
If Value <> *Blanks;
If Quote = *Blanks;
Quote = Value;
Else;
Author = Value;
Endif;
Endif;
/end-free
P E
*?inserts a SOAPAction string
P SoapAction B
D SoapAction PI
D Header 1024A varying
D UserData * value
/free
Header = 'SOAPAction: "http://swanandmokashi.com/GetQuote"'+
x'0d25';
/end-free
P E
HTTPAPI Ver 1.23 released 2008-04-24 OS/400 Ver V7R1M0 New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0 http_persist_open(): entered http_long_ParseURL(): entered DNS resolver retrans: 2 DNS resolver retry : 2 DNS resolver options: x'00000136' DNS default domain: urlmutual.com DNS server found: 172.17.3.5 DNS server found: 172.27.3.3 http_persist_post(): entered http_long_ParseURL(): entered do_post(): entered POST /HomePage/WebServices/QuoteOfTheDay.asmx HTTP/1.1 Host: swanandmokashi.com User-Agent: http-api/1.23 Content-Type: text/xml; charset=utf-8 Expect: 100-continue Content-Length: 240 SOAPAction: "http://swanandmokashi.com/GetQuote" recvresp(): entered HTTP/1.1 301 Moved Permanently Content-Length: 279 Content-Type: text/html Location: http://www.swanandmokashi.com/HomePage/WebServices/QuoteOfTheDay.asmx Server: Microsoft-IIS/7.0 X-Powered-By: ASP.NET Date: Wed, 04 Apr 2012 14:05:48 GMT Connection: close SetError() #13: HTTP/1.1 301 Moved Permanently recvdoc parms: identity 279 header_load_cookies() entered recvdoc(): entered SetError() #0: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1><p>The document has moved <a href="http://www.swanandmokashi.com/HomePage/WebServices/QuoteOfTheDay.asmx">here</a>.</p> </body></html> SetError() #13: HTTP/1.1 301 Moved Permanently http_close(): entered
----------------------------------------------------------------------- This is the FTPAPI mailing list. To unsubscribe, please go to: http://www.scottklement.com/mailman/listinfo/ftpapi -----------------------------------------------------------------------