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 "Marcin Markiewicz (JIRA)" <ji...@apache.org> on 2010/12/03 17:03:12 UTC

[jira] Created: (AXIS2-4905) CommonsHTTPTransportSender does not allow to use other Formatter than OMOutputFormat.

CommonsHTTPTransportSender does not allow to use other Formatter than OMOutputFormat.
-------------------------------------------------------------------------------------

                 Key: AXIS2-4905
                 URL: https://issues.apache.org/jira/browse/AXIS2-4905
             Project: Axis2
          Issue Type: Bug
          Components: transports
    Affects Versions: 1.5.1
         Environment: all - found on a Windows Vista machine with Java 1.6
            Reporter: Marcin Markiewicz


I have a little compatibility problem with our older software using MIME-messages. A could solve this problem if I could use my own Output formatter, based on the OMOutputFormat. (I use it this way to generate messages send by my own MQ-Transport). It would be very usefull for me if i could tell the CommonsHTTPTransport which OMOutputFormat implementation it should use. Something like 
OMOutputFormat = getOutputFormatFromContext(msgContext) 
instead of
OMOutputFormat format = new OMOutputFormat();
(it is the first line in the "invoke" method)
And only if the context does not contain the Formatter value the "default" one - OMOutputFormat - should be used.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Commented: (AXIS2-4905) CommonsHTTPTransportSender does not allow to use other Formatter than OMOutputFormat.

Posted by "Marcin Markiewicz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12967114#action_12967114 ] 

Marcin Markiewicz commented on AXIS2-4905:
------------------------------------------

Yes, it should work this way, but it doesn't. I tried to configure the Formatter in the axis2 configuration in 
---
<messageFormatters>
        <messageFormatter contentType="application/x-www-form-urlencoded"
                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
        <messageFormatter contentType="multipart/form-data"
                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
        <messageFormatter contentType="application/xml"
                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
        <messageFormatter contentType="text/xml"
                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
        <messageFormatter contentType="application/soap+xml"
                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
    </messageFormatters>
---
But no matter what I added there it didn't work. Only this on OMFormatter has been used.
I changed the last two Formatters to my own one - I do SOAP messages so I thought it is the right way to make Axis2 use my formatter...

But if there is an other way, configuration would be the best one, I would be glad to learn it.

I solved my problem by copying the CommonsHTTPTransportSender, changing the one line containing "OMOutputFormat format = new OMOutputFormat();" to use my formatter and then... it works. But it isn't nice...

> CommonsHTTPTransportSender does not allow to use other Formatter than OMOutputFormat.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4905
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4905
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: all - found on a Windows Vista machine with Java 1.6
>            Reporter: Marcin Markiewicz
>
> I have a little compatibility problem with our older software using MIME-messages. A could solve this problem if I could use my own Output formatter, based on the OMOutputFormat. (I use it this way to generate messages send by my own MQ-Transport). It would be very usefull for me if i could tell the CommonsHTTPTransport which OMOutputFormat implementation it should use. Something like 
> OMOutputFormat = getOutputFormatFromContext(msgContext) 
> instead of
> OMOutputFormat format = new OMOutputFormat();
> (it is the first line in the "invoke" method)
> And only if the context does not contain the Formatter value the "default" one - OMOutputFormat - should be used.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4905) CommonsHTTPTransportSender does not allow to use other Formatter than OMOutputFormat.

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4905.
------------------------------------

    Resolution: Won't Fix

The right approach to modify the way a message is serialized is to configure an alternate MessageFormatter.

> CommonsHTTPTransportSender does not allow to use other Formatter than OMOutputFormat.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4905
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4905
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: all - found on a Windows Vista machine with Java 1.6
>            Reporter: Marcin Markiewicz
>
> I have a little compatibility problem with our older software using MIME-messages. A could solve this problem if I could use my own Output formatter, based on the OMOutputFormat. (I use it this way to generate messages send by my own MQ-Transport). It would be very usefull for me if i could tell the CommonsHTTPTransport which OMOutputFormat implementation it should use. Something like 
> OMOutputFormat = getOutputFormatFromContext(msgContext) 
> instead of
> OMOutputFormat format = new OMOutputFormat();
> (it is the first line in the "invoke" method)
> And only if the context does not contain the Formatter value the "default" one - OMOutputFormat - should be used.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org