Anonymous | Login | Signup for a new account | 12-17-2024 08:32 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002022 | [Resin] | major | always | 09-22-07 07:56 | 09-25-07 09:53 | ||||
Reporter | stbu | View Status | public | ||||||
Assigned To | |||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.1.3 | ||||||
Summary | 0002022: JAX-WS: SOAP Requests from Resin to a Web Service Provider uses wrong Content-Type Header | ||||||||
Description |
I have deployed a small sample application on Resin-pro-3.1.s070917 (Sun JDK 6, Linux) that is consuming a Web Service which is provided on a Sun Java System Application Server 9.1 from Project GlassFish V2 UR1 b01. The Web Service is used in a JSP and the resin-web.xml is configured to contact the Web Service at: <web-service-client jndi-name="soap/AddNumbersService"> <url>soap:http://192.168.1.100:8080/wsprovider-javaee/addnum</url> [^] <interface>consumer.AddNumbersService</interface> </web-service-client> The endpoint http://192.168.1.100:8080/wsprovider-javaee/addnum [^] is running on Sun Java System Application Server 9.1 from Project GlassFish V2 UR1 b01. When the JSP is called, Resin shows the following Servlet Exception: 500 Servlet Exception java.io.IOException: Server returned HTTP response code: 415 for URL: http://192.168.1.100:8080/wsprovider-javaee/addnum [^] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1241) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373) at com.caucho.soap.skeleton.AbstractAction.invoke(AbstractAction.java:641) at com.caucho.soap.skeleton.DirectSkeleton.invoke(DirectSkeleton.java:287) at com.caucho.soap.skeleton.DirectSkeleton.invoke(DirectSkeleton.java:273) at com.caucho.soap.service.ServiceImplInvocationHandler.invoke(ServiceImplInvocationHandler.java:68) at $Proxy9.add(Unknown Source) at _jsp._index__jsp._jspService(index.jsp:16) at com.caucho.jsp.JavaPage.service(JavaPage.java:61) at com.caucho.jsp.Page.pageservice(Page.java:578) at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:192) at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:160) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:177) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:241) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268) at com.caucho.server.port.TcpConnection.run(TcpConnection.java:576) at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:685) at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:607) at java.lang.Thread.run(Thread.java:619) Enabled debug log shows: [14:25:22.028] /wsconsumer-javaee FINEST com.caucho.jaxb.JAXBUtil (introspectClass) Introspecting class consumer.AddNumbersService [14:25:22.031] /wsconsumer-javaee FINEST com.caucho.jaxb.JAXBUtil (introspectMethod) Introspecting method add [14:25:22.032] /wsconsumer-javaee FINEST com.caucho.jaxb.JAXBUtil (introspectType) Introspecting type int [14:25:22.037] /wsconsumer-javaee FINEST com.caucho.jaxb.JAXBUtil (introspectType) Introspecting type int [14:25:22.037] /wsconsumer-javaee FINEST com.caucho.jaxb.JAXBUtil (introspectType) Introspecting type int [14:25:22.316] /wsconsumer-javaee FINER com.caucho.soap.skeleton.DirectSkeleton (addAction) Adding DocumentWrappedAction[add] to DirectSkeleton[interface consumer.AddNumbersService] [14:25:22.429] /wsconsumer-javaee WARNING com.caucho.server.webapp.ErrorPageManager (sendServletError) java.lang.reflect.UndeclaredThrowableException [14:25:22.429] at $Proxy9.add(Unknown Source) [14:25:22.429] at _jsp._index__jsp._jspService(_index__jsp.java:50) [14:25:22.429] at com.caucho.jsp.JavaPage.service(JavaPage.java:61) [14:25:22.429] at com.caucho.jsp.Page.pageservice(Page.java:578) [14:25:22.429] at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:192) [14:25:22.429] at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:160) [14:25:22.429] at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:177) [14:25:22.429] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:241) [14:25:22.429] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268) [14:25:22.429] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:576) [14:25:22.429] at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:685) [14:25:22.429] at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:607) [14:25:22.429] at java.lang.Thread.run(Thread.java:619) [14:25:22.429] Caused by: java.io.IOException: Server returned HTTP response code: 415 for URL: http://192.168.1.100:8080/wsprovider-javaee/addnum [^] [14:25:22.429] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [14:25:22.429] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [14:25:22.429] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [14:25:22.429] at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [14:25:22.429] at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1296) [14:25:22.429] at java.security.AccessController.doPrivileged(Native Method) [14:25:22.429] at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1290) [14:25:22.429] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:944) [14:25:22.429] at com.caucho.soap.skeleton.AbstractAction.invoke(AbstractAction.java:642) [14:25:22.429] at com.caucho.soap.skeleton.DirectSkeleton.invoke(DirectSkeleton.java:287) [14:25:22.429] at com.caucho.soap.skeleton.DirectSkeleton.invoke(DirectSkeleton.java:273) [14:25:22.429] at com.caucho.soap.service.ServiceImplInvocationHandler.invoke(ServiceImplInvocationHandler.java:68) [14:25:22.429] ... 13 more [14:25:22.429] Caused by: java.io.IOException: Server returned HTTP response code: 415 for URL: http://192.168.1.100:8080/wsprovider-javaee/addnum [^] [14:25:22.429] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1241) [14:25:22.429] at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373) [14:25:22.429] at com.caucho.soap.skeleton.AbstractAction.invoke(AbstractAction.java:641) [14:25:22.429] ... 16 more The log file of the Web Service Provider on Sun Java System Application Server 9.1 from Project GlassFish V2 shows this: com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: application/x-www-form-urlencoded Supported ones are: [text/xml] at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:130) at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:294) at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276) at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:432) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Using a Filter to log Request/Response shows this: Request headers: User-Agent = Java/1.6.0_02 Host = localhost:8090 Accept = text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection = keep-alive Content-type = application/x-www-form-urlencoded Content-Length = 268 Request body: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header></soapenv:Header><soapenv:Body><m:add [^] xmlns:m="http://consumer/"><arg0>600</arg0><arg1>66</arg1></m:add></soapenv:Body></soapenv:Envelope> [^] So, the message from Glassfish Unsupported Content-Type: application/x-www-form-urlencoded Supported ones are: [text/xml] makes sense as SOAP Requests should use "test/xml" as Content-Type that also states: http://www.caucho.com/resin-javadoc/constant-values.html#javax.xml.soap.SOAPConstants.SOAP_1_1_CONTENT_TYPE [^] <..> public static final java.lang.String SOAP_1_1_CONTENT_TYPE "text/xml" <..> |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed. 26 unique queries executed. |