[
http://jira.jboss.com/jira/browse/JBWS-1824?page=comments#action_12390887 ]
Richard Opalka commented on JBWS-1824:
--------------------------------------
The Content-Type HTTP header need not be set in such case (empty message body). Here's
the copy/paste from HTTP 1.1 specification:
7.2.1 Type
When an entity-body is included with a message, the data type of that
body is determined via the header fields Content-Type and Content-
Encoding. These define a two-layer, ordered encoding model:
entity-body := Content-Encoding( Content-Type( data ) )
Content-Type specifies the media type of the underlying data.
Content-Encoding may be used to indicate any additional content
codings applied to the data, usually for the purpose of data
compression, that are a property of the requested resource. There is
no default encoding.
Any HTTP/1.1 message containing an entity-body SHOULD include a
Content-Type header field defining the media type of that body. If
and only if the media type is not given by a Content-Type field, the
recipient MAY attempt to guess the media type via inspection of its
content and/or the name extension(s) of the URI used to identify the
resource. If the media type remains unknown, the recipient SHOULD
treat it as type "application/octet-stream".
Content-type header is not set in SOAP response
-----------------------------------------------
Key: JBWS-1824
URL:
http://jira.jboss.com/jira/browse/JBWS-1824
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jbossws-jaxws
Affects Versions: jbossws-1.2.1
Reporter: Lukas Jungmann
-have a JAX-WS web service in a web module deployed on JBoss 4.2.1 (use JBossWS for this
service)
-create a JAX-WS client for this service in java application (and use JAX-WS RI 2.1.2
from
jax-ws.dev.java.net/or tools from JDK6update3)
-run the client
expected: the JBossWS web service is successfully called from JAX-WS RI client
actual: the call of the operation fails because of missing Content-Type header in the
SOAP response
TCP dump from Wireshark tool:
GET /JBossWS-test/JBossWS?wsdl HTTP/1.1
User-Agent: Java/1.6.0_03-ea
Host: 127.0.0.1:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA
date=200707131605)/Tomcat-5.5
Content-Type: text/xml
Transfer-Encoding: chunked
Date: Wed, 12 Sep 2007 13:39:11 GMT
f7
<definitions name='JBossWSService'
targetNamespace='http://ws.test.jboss/'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://ws.test.jboss/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
...
</definitions>
0
POST /JBossWS-test/JBossWS HTTP/1.1
SOAPAction: ""
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*;
q=.2
Content-Type: text/xml; charset=utf-8
User-Agent: Java/1.6.0_03-ea
Host: 127.0.0.1:8080
Connection: keep-alive
Content-Length: 189
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA
date=200707131605)/Tomcat-5.5
Transfer-Encoding: chunked
Date: Wed, 12 Sep 2007 13:39:11 GMT
0
<?xml version="1.0" ?><S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Bo...
xmlns:ns2="http://ws.test.jboss/"><name>tom</name></ns2:sayHi></S:Body></S:Envelope
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira