[WSMONITOR-2] GETting a WSDL thru wsmonitor fails on XML ParseError Created: 07/Sep/06  Updated: 08/Jul/08  Resolved: 08/Jul/08

Status: Resolved
Project: wsmonitor
Component/s: www
Affects Version/s: current
Fix Version/s: milestone 1

Type: Bug Priority: Major
Reporter: Alexis MP Assignee: wsmonitor-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Sun


Issuezilla Id: 2

 Description   

Using wsmonitor, I get this error simply trying to HTTP GET
the WSDL file from a browser and tunnel that request via wsmonitor.
There is no problem when bypassing the wsmonitor tunnel...

> Application server startup complete.
> XML reader error: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,1]
> Message: Premature end of file.
> XML reader error: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,1]
> Message: Premature end of file.
> at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:246)
> at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:70)
> at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:85)
> at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:75)
> at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:123)
> at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:109)
> at
com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:190)
> at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:151)
> at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:235)
> at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:97)
> at
com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:161)
> at
com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:49)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
> at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
> at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
> at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:246)
> at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
> at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
> at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
> at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> at
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
> at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
> at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
> at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
> at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:619)
> at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.processNonBlocked(DefaultProcessorTask.java:550)
> at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:780)
> at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
> at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:251)
> at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:205)
> at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
> at
com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:103)
> Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
> Message: Premature end of file.
> at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:571)
> at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:51)
> ... 37 more
> XML reader error: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,1]
> Message: Premature end of file.
> XML reader error: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,1]
> Message: Premature end of file.
> at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:246)
> at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:70)
> at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:85)
> at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:75)
> at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:123)
> at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:109)
> at
com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:190)
> at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:151)
> at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:235)
> at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:97)
> at
com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:161)
> at
com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:49)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
> at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
> at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
> at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:246)
> at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
> at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
> at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
> at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> at
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
> at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
> at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
> at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
> at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:619)
> at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.processNonBlocked(DefaultProcessorTask.java:550)
> at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:780)
> at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
> at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:251)
> at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:205)
> at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
> at
com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:103)
> Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
> Message: Premature end of file.
> at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:571)
> at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:51)
> ... 37 more

It looks as if wsmonitor is generating a POST rather than
forwarding a GET...

Initial browser HTTP headers
----------------------------
GET /PRESTO_rm/PrestoSvc?wsdl HTTP/1.1
Host: localhost:7000
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8) Gecko/20051130
Firefox/1.5
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: test_cookie=test cookie
Cache-Control: max-age=0

Headers issued by wsmonitor and received by GlassFish
-----------------------------------------------------
POST /PRESTO_rm/PrestoSvc?wsdl HTTP/1.1
Cache-Control: max-age=0
Cookie: test_cookie=test cookie
Host: localhost:7000
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8) Gecko/20051130
Firefox/1.5
Keep-Alive: 300
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
Content-type: application/x-www-form-urlencoded
Content-Length: 0

Note this is on Solaris x86...



 Comments   
Comment by arungupta [ 08/Jul/08 ]
      • Issue 3 has been marked as a duplicate of this issue. ***
Comment by arungupta [ 08/Jul/08 ]

Output Stream was opening on the HttpURLConnection which was issuing a POST
request instead of GET.

Generated at Mon Mar 30 00:00:00 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.