You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Sagara Gunathunga (JIRA)" <ji...@apache.org> on 2012/07/19 17:09:35 UTC
[jira] [Created] (AXIS2-5374) Axis2 always assume "text/xml" as
SOAP 1.1 content
Sagara Gunathunga created AXIS2-5374:
-----------------------------------------
Summary: Axis2 always assume "text/xml" as SOAP 1.1 content
Key: AXIS2-5374
URL: https://issues.apache.org/jira/browse/AXIS2-5374
Project: Axis2
Issue Type: Bug
Components: kernel
Affects Versions: 1.6.2, 1.5.6
Reporter: Sagara Gunathunga
Priority: Critical
Axis2 REST guide contains following text
"if the content type is text/xml and if the SOAPAction Header is missing, then the message is treated as a RESTful Message, if not it is treated as a usual SOAP Message."
In summery
content type - text/xml + SOAPAction present => SOAP 1.1
content type - text/xml + NO SOAPAction present => POX (REST)
In contrast Axis2 never implemented above logic and always consider text/xml as SOAP 1.1. This issue can be solved by adding a condition to TransportUtils#getMessageFormatter() so that it will check "SOAPAction" header in addition to "text/xml" content type.
Before I implement above solution I like see any objection from users and developers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[jira] [Assigned] (AXIS2-5374) Axis2 always assume "text/xml" as
SOAP 1.1 content
Posted by "Sagara Gunathunga (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sagara Gunathunga reassigned AXIS2-5374:
-----------------------------------------
Assignee: Sagara Gunathunga
> Axis2 always assume "text/xml" as SOAP 1.1 content
> ----------------------------------------------------
>
> Key: AXIS2-5374
> URL: https://issues.apache.org/jira/browse/AXIS2-5374
> Project: Axis2
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5.6, 1.6.2
> Reporter: Sagara Gunathunga
> Assignee: Sagara Gunathunga
> Priority: Critical
>
> Axis2 REST guide contains following text
> "if the content type is text/xml and if the SOAPAction Header is missing, then the message is treated as a RESTful Message, if not it is treated as a usual SOAP Message."
> In summery
> content type - text/xml + SOAPAction present => SOAP 1.1
> content type - text/xml + NO SOAPAction present => POX (REST)
> In contrast Axis2 never implemented above logic and always consider text/xml as SOAP 1.1. This issue can be solved by adding a condition to TransportUtils#getMessageFormatter() so that it will check "SOAPAction" header in addition to "text/xml" content type.
> Before I implement above solution I like see any objection from users and developers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[jira] [Commented] (AXIS2-5374) Axis2 always assume "text/xml" as
SOAP 1.1 content
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13418359#comment-13418359 ]
Andreas Veithen commented on AXIS2-5374:
----------------------------------------
I'm pretty sure that I've seen some code that already implements this logic, but I don't remember where.
> Axis2 always assume "text/xml" as SOAP 1.1 content
> ----------------------------------------------------
>
> Key: AXIS2-5374
> URL: https://issues.apache.org/jira/browse/AXIS2-5374
> Project: Axis2
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5.6, 1.6.2
> Reporter: Sagara Gunathunga
> Priority: Critical
>
> Axis2 REST guide contains following text
> "if the content type is text/xml and if the SOAPAction Header is missing, then the message is treated as a RESTful Message, if not it is treated as a usual SOAP Message."
> In summery
> content type - text/xml + SOAPAction present => SOAP 1.1
> content type - text/xml + NO SOAPAction present => POX (REST)
> In contrast Axis2 never implemented above logic and always consider text/xml as SOAP 1.1. This issue can be solved by adding a condition to TransportUtils#getMessageFormatter() so that it will check "SOAPAction" header in addition to "text/xml" content type.
> Before I implement above solution I like see any objection from users and developers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[jira] [Comment Edited] (AXIS2-5374) Axis2 always assume "text/xml"
as SOAP 1.1 content
Posted by "Sagara Gunathunga (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422281#comment-13422281 ]
Sagara Gunathunga edited comment on AXIS2-5374 at 7/25/12 2:07 PM:
--------------------------------------------------------------------
Once the following setting available on axis2.xml above doingREST is set to true and provide desired functionalities too.
<parameter name="enableREST">true</parameter>
But still I don't think above solution is a widely acceptable solution.
1.) Above doingREST flag is checked and set within the HTTP module under HTTPTransportUtils#initializeMessageContext() method. I haven't check other transports yet but IMO this check should not belong to a specific transport implementation. In my POV when writing a new transport it should not expect to anticipate REST and SOAP messages by the transport implementation.
2.) "enableREST" is a kind of a hidden setting and "disableREST" setting also there, having two settings for same or slightly different features is not a good design. For the moment it's required to have following two settings.
<parameter name="disableREST" >false</parameter>
<parameter name="enableREST">true</parameter>
3.) HTTPTransportUtils#initializeMessageContext() method facilitate for REST invocation by changing "text/xml" content type into "application/xml" content type when the conditions are met. But the better approach would be perform REST invocation while keeping "text/xml" content type as it is.
4.) As a side effect of 3.) REST invocation always returns response messages with "application/xml" content type ignoring original content type of the request message.
was (Author: sagara):
Once the following setting available on axis2.xml above doingREST is set to true and provide desired functionalities too.
<parameter name="enableREST">true</parameter>
But still I don't think above solution is a widely acceptable solution.
1.) Above doingREST flag is checked and set within the HTTP module under HTTPTransportUtils#initializeMessageContext() method. I haven't check other transports yet but IMO this check should not belong to a specific transport implementation. In my POV when writing a new transport it should not expect to anticipate REST and SOAP messages by the transport implementation.
2.) "enableREST" is a kind of a hidden setting and "disableREST" setting also there, having two settings for same or slightly different features are not a good design. For the moment it's required to have following two settings.
<parameter name="disableREST" >false</parameter>
<parameter name="enableREST">true</parameter>
3.) HTTPTransportUtils#initializeMessageContext() method facilitate for REST invocation by changing "text/xml" content type into "application/xml" content type when the conditions are met. But the better approach would be perform REST invocation while keeping "text/xml" content type as it is.
4.) As a side effect of 3.) REST invocation always returns response messages with "application/xml" content type ignoring original content type of the request message.
> Axis2 always assume "text/xml" as SOAP 1.1 content
> ----------------------------------------------------
>
> Key: AXIS2-5374
> URL: https://issues.apache.org/jira/browse/AXIS2-5374
> Project: Axis2
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5.6, 1.6.2
> Reporter: Sagara Gunathunga
> Assignee: Sagara Gunathunga
> Priority: Critical
>
> Axis2 REST guide contains following text
> "if the content type is text/xml and if the SOAPAction Header is missing, then the message is treated as a RESTful Message, if not it is treated as a usual SOAP Message."
> In summery
> content type - text/xml + SOAPAction present => SOAP 1.1
> content type - text/xml + NO SOAPAction present => POX (REST)
> In contrast Axis2 never implemented above logic and always consider text/xml as SOAP 1.1. This issue can be solved by adding a condition to TransportUtils#getMessageFormatter() so that it will check "SOAPAction" header in addition to "text/xml" content type.
> Before I implement above solution I like see any objection from users and developers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[jira] [Commented] (AXIS2-5374) Axis2 always assume "text/xml" as
SOAP 1.1 content
Posted by "Sagara Gunathunga (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422281#comment-13422281 ]
Sagara Gunathunga commented on AXIS2-5374:
-------------------------------------------
Once the following setting available on axis2.xml above doingREST is set to true and provide desired functionalities too.
<parameter name="enableREST">true</parameter>
But still I don't think above solution is a widely acceptable solution.
1.) Above doingREST flag is checked and set within the HTTP module under HTTPTransportUtils#initializeMessageContext() method. I haven't check other transports yet but IMO this check should not belong to a specific transport implementation. In my POV when writing a new transport it should not expect to anticipate REST and SOAP messages by the transport implementation.
2.) "enableREST" is a kind of a hidden setting and "disableREST" setting also there, having two settings for same or slightly different features are not a good design. For the moment it's required to have following two settings.
<parameter name="disableREST" >false</parameter>
<parameter name="enableREST">true</parameter>
3.) HTTPTransportUtils#initializeMessageContext() method facilitate for REST invocation by changing "text/xml" content type into "application/xml" content type when the conditions are met. But the better approach would be perform REST invocation while keeping "text/xml" content type as it is.
4.) As a side effect of 3.) REST invocation always returns response messages with "application/xml" content type ignoring original content type of the request message.
> Axis2 always assume "text/xml" as SOAP 1.1 content
> ----------------------------------------------------
>
> Key: AXIS2-5374
> URL: https://issues.apache.org/jira/browse/AXIS2-5374
> Project: Axis2
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5.6, 1.6.2
> Reporter: Sagara Gunathunga
> Assignee: Sagara Gunathunga
> Priority: Critical
>
> Axis2 REST guide contains following text
> "if the content type is text/xml and if the SOAPAction Header is missing, then the message is treated as a RESTful Message, if not it is treated as a usual SOAP Message."
> In summery
> content type - text/xml + SOAPAction present => SOAP 1.1
> content type - text/xml + NO SOAPAction present => POX (REST)
> In contrast Axis2 never implemented above logic and always consider text/xml as SOAP 1.1. This issue can be solved by adding a condition to TransportUtils#getMessageFormatter() so that it will check "SOAPAction" header in addition to "text/xml" content type.
> Before I implement above solution I like see any objection from users and developers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[jira] [Commented] (AXIS2-5374) Axis2 always assume "text/xml" as
SOAP 1.1 content
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421715#comment-13421715 ]
Andreas Veithen commented on AXIS2-5374:
----------------------------------------
At least part of the logic is in TransportUtils#getContentType. Note that the code is executed only if doingREST is set to true. Not sure where this flag is set.
> Axis2 always assume "text/xml" as SOAP 1.1 content
> ----------------------------------------------------
>
> Key: AXIS2-5374
> URL: https://issues.apache.org/jira/browse/AXIS2-5374
> Project: Axis2
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5.6, 1.6.2
> Reporter: Sagara Gunathunga
> Assignee: Sagara Gunathunga
> Priority: Critical
>
> Axis2 REST guide contains following text
> "if the content type is text/xml and if the SOAPAction Header is missing, then the message is treated as a RESTful Message, if not it is treated as a usual SOAP Message."
> In summery
> content type - text/xml + SOAPAction present => SOAP 1.1
> content type - text/xml + NO SOAPAction present => POX (REST)
> In contrast Axis2 never implemented above logic and always consider text/xml as SOAP 1.1. This issue can be solved by adding a condition to TransportUtils#getMessageFormatter() so that it will check "SOAPAction" header in addition to "text/xml" content type.
> Before I implement above solution I like see any objection from users and developers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[jira] [Commented] (AXIS2-5374) Axis2 always assume "text/xml" as
SOAP 1.1 content
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458645#comment-13458645 ]
Hudson commented on AXIS2-5374:
-------------------------------
Integrated in Axis2 #1780 (See [https://builds.apache.org/job/Axis2/1780/])
AXIS2-5374 fixed .
* Introduced a new class called MessageProcessorSelector which encapsulate logics and algorithms when selecting MessageBuilders, AttachmentsBuilders and MessageFormatters, eventually related logics scattered in various places need to be moved to here.
* REST support is now only depends on disableREST parameter. (Revision 1387522)
Result = SUCCESS
sagara :
Files :
* /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java
* /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/MIMEBuilder.java
* /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/externalize/MessageExternalizeUtils.java
* /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
* /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java
* /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/MessageProcessorSelector.java
* /axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
* /axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
* /axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient3/HTTPSenderImpl.java
* /axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient4/HTTPSenderImpl.java
> Axis2 always assume "text/xml" as SOAP 1.1 content
> ----------------------------------------------------
>
> Key: AXIS2-5374
> URL: https://issues.apache.org/jira/browse/AXIS2-5374
> Project: Axis2
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5.6, 1.6.2
> Reporter: Sagara Gunathunga
> Assignee: Sagara Gunathunga
> Priority: Critical
>
> Axis2 REST guide contains following text
> "if the content type is text/xml and if the SOAPAction Header is missing, then the message is treated as a RESTful Message, if not it is treated as a usual SOAP Message."
> In summery
> content type - text/xml + SOAPAction present => SOAP 1.1
> content type - text/xml + NO SOAPAction present => POX (REST)
> In contrast Axis2 never implemented above logic and always consider text/xml as SOAP 1.1. This issue can be solved by adding a condition to TransportUtils#getMessageFormatter() so that it will check "SOAPAction" header in addition to "text/xml" content type.
> Before I implement above solution I like see any objection from users and developers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org