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

RE: Exception Error on Premature end of file on Http_post_xml



Mike, 

First of all thanks so much for your response.
We have set up 2 environments (Dev & Prod) on both sides (iSeries as
client and Web server as none iSeries server). Before I had your
response, I ran the same code on both environments as well as
crisscross. It narrowed it down to this;  the client program (RPGLE) and
the both environment on the iSeries and Prod Env in Web Server were all
working properly and the problem is residing on the Web Server in Dev
Env. Apparently  the Web server in Dev Environment has not been set up
the same as the one in Production therefore it is not communicating
correctly with iSeries both envr. So you analogy supports my test result
as well. Once our network Admin gets the problem fixed, I will update
this message with exact solution. So when next time someone has the same
issue, it would be helpful. Again I thank you for your assistance.  

Behzad H.


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mike Krebs
Sent: Friday, October 09, 2009 10:42 AM
To: HTTPAPI and FTPAPI Projects
Subject: RE: Exception Error on Premature end of file on Http_post_xml

I could be way off...but you didn't get any real stuff back. What
happened is that the server/web service didn't like your data and puked.

Do you have the right URL that you are sending the data to? And is your
message in the format expected by the service?

Mike Krebs 

> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Behzad Hosseinzadeh
> Sent: Wednesday, October 07, 2009 10:27 PM
> To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Exception Error on Premature end of file on Http_post_xml
> 
> Has any one ever received an exception error :"premature end of file"
> before?
> 
> If yes,  could you please provide some assistance of what it means?  I
> am consuming a web server and I get rc= 500  with the exception error
> of
> "xml.sax.SAXParseException: Premature end of file."
> 
> 
> 
> 
> 
> I have included the Soap XML  value,  http_post_xml command and the
> debug dump. Is this caused at on my client web server program or on
the
> Web server side? Any idea that can help to figure what my problem is ,
> will be appreciated greatly.
> 
> 
> 
> I thank you in advance,
> 
> Behzad
> 
> 
> 
> Here is the code:
> 
> 
> 
> D MapXmlData      PR
> 
> D   XMLRESP                     52a      varying
> 
> D   depth                             10I 0   value
> 
> D   name                           1024A   varying const
> 
> D   path                           24576A   varying const
> 
> D   value                          65535A   varying const
> 
> D   attrs                                       *   dim(32767)
> 
> D                                                     const
> options(*varsize)
> 
> D   VARYINGDATAOFFSET...
> 
> d                       c                            const(2)
> 
> d SOAP             s               1024a   varying
> 
> d response         s                   50a   varying
> 
> d wait                s                     1a
> 
> d rc                    s                    10i 0
> 
> d XMLREQ        s               1024a   varying
> 
> d XMLRES        s               1024a   varying
> 
> 
> 
> 
> 
> 
> This is my Soap value:
> 
> 
> 
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
> 
> <soapenv:Header />
> 
>    <soapenv:Body>
> 
>     <soapenv:process>
> 
>      <soapenv:gorcid>0000000167</soapenv:gorcid>
> 
>     </soapenv:process>
> 
>    </soapenv:Body>
> 
>   </soapenv:Envelope>
> 
> 
> 
> 
> 
> This my http_post_xml:
> 
> 
> 
> http_setCCSIDs(1208: 0);
> 
> http_debug(*ON);
> 
> rc =
> 
> http_post_xml('http://cvwebdev1:9202/com/ge/finance.cfc?wsdl'
> 
> : %addr(SOAP) + VARYINGDATAOFFSET
> 
> : %len(SOAP)
> 
> : *NULL
> 
> : %paddr(MapXmlData)
> 
> : %paddr(MapXmlData)
> 
> : %addr(response)
> 
> : HTTP_TIMEOUT
> 
> : HTTP_USERAGENT
> 
> : 'text/xml; charset=UTF-8'
> 
> : '" http://cvwebdev1:9202/com/ge/finance.cfc?wsdl";' );
> 
> 
> 
> 
> 
> 
> 
> This is my Debug Dump:
> 
> 
> 
> HTTPAPI Ver 1.23 released 2008-04-24
> 
> OS/400 Ver V5R4M0
> 
> 
> 
> http_persist_open(): entered
> 
> http_long_ParseURL(): entered
> 
> DNS resolver retrans: 2
> 
> DNS resolver retry  : 2
> 
> DNS resolver options: x'00000136'
> 
> DNS default domain: ORECK.COM
> 
> DNS server found: 204.117.214.10
> 
> DNS server found: 199.2.252.10
> 
> DNS server found: 172.16.102.80
> 
> http_persist_post(): entered
> 
> http_long_ParseURL(): entered
> 
> do_post(): entered
> 
> POST /com/ge/finance.cfc?wsdl HTTP/1.1
> 
> Host: cvwebdev1:9202
> 
> User-Agent: http-api/1.23
> 
> Content-Type: text/xml; charset=UTF-8
> 
> SOAPAction: " http://cvwebdev1:9202/com/ge/finance.cfc?wsdl";
> 
> Expect: 100-continue
> 
> Content-Length: 220
> 
> 
> 
> 
> 
> recvresp(): entered
> 
> HTTP/1.1 100 Continue
> 
> 
> 
> 
> 
> SetError() #13: HTTP/1.1 100 Continue
> 
> senddoc(): entered
> 
> <soapenv:Envelope
>
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Head
> e
> r
>
/><soapenv:Body><soapenv:process><soapenv:gorcid>0000000167</soapenv:go
> r
> cid></soapenv:process></soapenv:Body></soapenv:Envelope>
> 
> recvresp(): entered
> 
> HTTP/1.1 500 Internal Server Error
> 
> Connection: close
> 
> Date: Thu, 08 Oct 2009 02:57:20 GMT
> 
> Server: Microsoft-IIS/6.0
> 
> server: DEV1.3
> 
> PICS-Label: (PICS-1.0 "http://www.rsac.org/ratingsv01.html"; l by
> "abuse@xxxxxxxxx" on "2008.11.19T20:45-0600" exp "2020.11.19T12:00-
> 0600"
> r (v 0 s 0 n 0 l 0))
> 
> Set-Cookie: CFID=2005731;expires=Sat, 01-Oct-2039 02:57:20 GMT;path=/
> 
> Set-Cookie:
> CFTOKEN=c93162777f0e1b44-3214493B-188B-41B5-
> E8D03047EC5C2DAE;expires=Sat
> , 01-Oct-2039 02:57:20 GMT;path=/
> 
> Set-Cookie: JSESSIONID=5030b638c539d5bd760def653de132d545f1;path=/
> 
> Content-Type: text/xml; charset=utf-8
> 
> 
> 
> 
> 
> SetError() #13: HTTP/1.1 500 Internal Server Error
> 
> recvdoc parms: identity 0
> 
> header_load_cookies() entered
> 
> cookie_parse() entered
> 
> cookie =  CFID=2005731;expires=Sat, 01-Oct-2039 02:57:20 GMT;path=/
> 
> cookie attr cfid=2005731
> 
> cookie attr expires=Sat, 01-Oct-2039 02:57:20 GMT
> 
> cookie attr path=/
> 
> cookie_parse() entered
> 
> cookie =
> CFTOKEN=c93162777f0e1b44-3214493B-188B-41B5-
> E8D03047EC5C2DAE;expires=Sat
> , 01-Oct-2039 02:57:20 GMT;path=/
> 
> cookie attr cftoken=c93162777f0e1b44-3214493B-188B-41B5-
> E8D03047EC5C2DAE
> 
> cookie attr expires=Sat, 01-Oct-2039 02:57:20 GMT
> 
> cookie attr path=/
> 
> cookie_parse() entered
> 
> cookie =  JSESSIONID=5030b638c539d5bd760def653de132d545f1;path=/
> 
> cookie attr jsessionid=5030b638c539d5bd760def653de132d545f1
> 
> cookie attr path=/
> 
> recvdoc(): entered
> 
> SetError() #0:
> 
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> 
>  <soapenv:Body>
> 
>   <soapenv:Fault>
> 
>    <faultcode>soapenv:Server.userException</faultcode>
> 
>    <faultstring>org.xml.sax.SAXParseException: Premature end of
> file.</faultstring>
> 
>    <detail>
> 
>     <ns1:stackTrace
> xmlns:ns1="http://xml.apache.org/axis/";>org.xml.sax.SAXParseException:
> Premature end of file.
> 
>                 at
>
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unkn
> o
> wn Source)
> 
>                 at
> org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
> 
>                 at
> org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> 
>                 at
> org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> 
>                 at
> org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown
> Source)
> 
>                 at
> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 
>                 at
> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 
>                 at org.apache.xerces.parsers.XMLParser.parse(Unknown
> Source)
> 
>                 at
> org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 
>                 at
> javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
> 
>                 at
>
org.apache.axis.encoding.DeserializationContext.parse(DeserializationCo
> n
> text.java:227)
> 
>                 at
> org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
> 
>                 at
> org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
> 
>                 at
>
org.apache.axis.server.AxisServer.initSOAPConstants(AxisServer.java:345
> )
> 
>                 at
> org.apache.axis.server.AxisServer.invoke(AxisServer.java:279)
> 
>                 at
>
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
> 
>                 at
> coldfusion.xml.rpc.CFCServlet.doAxisPost(CFCServlet.java:270)
> 
>                 at
> coldfusion.filter.AxisFilter.invoke(AxisFilter.java:43)
> 
>                 at
> coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:273)
> 
>                 at
>
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java
> :
> 48)
> 
>                 at
> coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
> 
>                 at
> coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
> 
>                 at
> coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
> 
>                 at
>
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersis
> t
> enceFilter.java:28)
> 
>                 at
> coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
> 
>                 at
> coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
> 
>                 at
> coldfusion.xml.rpc.CFCServlet.invoke(CFCServlet.java:138)
> 
>                 at
> coldfusion.xml.rpc.CFCServlet.doPost(CFCServlet.java:289)
> 
>                 at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> 
>                 at
>
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.
> j
> ava:327)
> 
>                 at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
>                 at
>
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
> 
>                 at
> jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
> 
>                 at
>
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringSer
> v
> letFilter.java:42)
> 
>                 at
> coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
> 
>                 at
> jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
> 
>                 at
> jrun.servlet.FilterChain.service(FilterChain.java:101)
> 
>                 at
> jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
> 
>                 at
> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> 
>                 at
>
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:28
> 6
> )
> 
>                 at
>
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:54
> 3
> )
> 
>                 at
>
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java
> :
> 203)
> 
>                 at
>
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.jav
> a
> :428)
> 
>                 at
> jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
> 
> </ns1:stackTrace>
> 
>     <ns2:hostname
> xmlns:ns2="http://xml.apache.org/axis/";>cvwebdev1</ns2:hostname>
> 
>    </detail>
> 
>   </soapenv:Fault>
> 
>  </soapenv:Body>
> 
> </soapenv:Envelope>
> 
> SetError() #13: HTTP/1.1 500 Internal Server Error
> 
> http_close(): entered
> 
> 
> 
> 

-----------------------------------------------------------------------
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
-----------------------------------------------------------------------