You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "David Liu (JIRA)" <ji...@apache.org> on 2011/04/26 08:20:03 UTC

[jira] [Created] (CXF-3472) Make HTTPConduit easy to extend and override

Make HTTPConduit easy to extend and override
--------------------------------------------

                 Key: CXF-3472
                 URL: https://issues.apache.org/jira/browse/CXF-3472
             Project: CXF
          Issue Type: Improvement
          Components: Core
            Reporter: David Liu


  Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method. It is not very easy to extend HTTPConduit and override both method if we want to add more functions during processing response.

  Can cxf move both meothd from WrappedOutputStream class to HTTPConduit? thanks.

David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034127#comment-13034127 ] 

Daniel Kulp commented on CXF-3472:
----------------------------------


I just added a new protected "createOutputStream" method to the conduit so you may be able to make this even easier/cleaner by not even having the original  WrappedOutputStream created.



> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>             Fix For: 2.4.1, 2.3.5
>
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

Posted by "David Liu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032369#comment-13032369 ] 

David Liu commented on CXF-3472:
--------------------------------

Thanks Willem!

David

> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>             Fix For: 2.4.1, 2.3.5
>
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

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

Willem Jiang resolved CXF-3472.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.5
                   2.4.1

committed the patch into trunk and 2.3.x-fixes branch.

> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>             Fix For: 2.4.1, 2.3.5
>
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

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

Willem Jiang reassigned CXF-3472:
---------------------------------

    Assignee: Willem Jiang

> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

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

David Liu updated CXF-3472:
---------------------------

    Description: 
  Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
  My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.

  Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.

David

  was:
  Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method. It is not very easy to extend HTTPConduit and override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.

  Can cxf move both meothd from WrappedOutputStream class to HTTPConduit? thanks.

David

     Issue Type: Bug  (was: Improvement)
        Summary: Cannot override HTTPConduit's handleResponse() method  (was: Make HTTPConduit easy to extend and override)

> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>            Reporter: David Liu
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

Posted by "David Liu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029770#comment-13029770 ] 

David Liu commented on CXF-3472:
--------------------------------

Could someone please take a look at this jira? We want to override handleResponse(), and handleResponseInternal() method to extend HttpConduit, thanks.

David

> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-3472) Make HTTPConduit easy to extend and override

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

David Liu updated CXF-3472:
---------------------------

    Description: 
  Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method. It is not very easy to extend HTTPConduit and override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.

  Can cxf move both meothd from WrappedOutputStream class to HTTPConduit? thanks.

David

  was:
  Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method. It is not very easy to extend HTTPConduit and override both method if we want to add more functions during processing response.

  Can cxf move both meothd from WrappedOutputStream class to HTTPConduit? thanks.

David


> Make HTTPConduit easy to extend and override
> --------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>            Reporter: David Liu
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method. It is not very easy to extend HTTPConduit and override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

Posted by "David Liu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031599#comment-13031599 ] 

David Liu commented on CXF-3472:
--------------------------------

Unfortunately, I cannot. All properties:connection, needToCacheRequest, isChunking, chunkThreshold are constructed in the method HttpConduit.prepare()  method, so MyHTTPConduit.prepare() cannot get these values, unless we copy all code from HTTPConduit.prepare() method to MyHTTPConduit.prepare() method. (I want to avoid copy HttpConduit's code if it is possible)

  If we can provide a getMethod in WrappedOutputStream to allow us to get these value, it can also resolve the issue. thanks.

David

> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032303#comment-13032303 ] 

Willem Jiang commented on CXF-3472:
-----------------------------------

Hi David,

I just did a simple test by adding a new construction of WrappedOutputStream() which takes the instance of WrappedOutputStream. Then the MyWrappedOutputStream construction code could be like this.
{code}
        protected MyWrappedOutputStream(WrappedOutputStream wos) {
             super(wos);
        }
{code}

I will commit the change shortly.

Willem

> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

Posted by "David Liu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031516#comment-13031516 ] 

David Liu commented on CXF-3472:
--------------------------------

Hi,

  Yup, this is the problem. I can extend both HttpConduit and its WrappedOutputStream class, and also I can override the handleResponse() and handleResponseInternal() method in the sub class.
  However, the problem is that I cannot access WrappedOutputStream's protected field to construct my sub class (java does not allow it). please see my code:

{code} 
public class MyHTTPConduit extends HTTPConduit {

    public MyHTTPConduit(Bus b, EndpointInfo ei) throws IOException {
        super(b, ei);
    }

    public void prepare(Message message) throws IOException {
        super.prepare(message);

        WrappedOutputStream wos = (WrappedOutputStream) message.getContent(OutputStream.class);
        MyWrappedOutputStream my = new MyWrappedOutputStream(wos);//compile error
        message.put(OutputStream.class, my);
    }

    protected class MyWrappedOutputStream extends WrappedOutputStream {

        protected MyWrappedOutputStream(WrappedOutputStream wos) {
            //Message m = wos.outMessage;// java access restriction, cannot access protected outMessage in WrappedOutputStream  
            super(m, c, possibleRetransmit, isChunking, chunkThreshold);
        }

        protected void handleResponse() throws IOException {
            super.handleResponse();
        }

        protected void handleResponseInternal() throws IOException {
            super.handleResponseInternal();
        }
    }
}

{code} 


> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031589#comment-13031589 ] 

Willem Jiang commented on CXF-3472:
-----------------------------------

I think you can still use the below code to set a new WrappedOutputStream, in the MyHTTPConduit.prepare() method.

{code} 
message.setContent(OutputStream.class, 
                           new MyWrappedOutputStream(
                                   message, connection,
                                   needToCacheRequest, 
                                   isChunking,
                                   chunkThreshold,
                                   getConduitName()));
{code}

> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

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

David Liu updated CXF-3472:
---------------------------

    Affects Version/s: 2.2

> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2
>            Reporter: David Liu
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

Posted by "David Liu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038914#comment-13038914 ] 

David Liu commented on CXF-3472:
--------------------------------

Thanks Dan!

David

> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>             Fix For: 2.4.1, 2.3.5
>
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

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

David Liu updated CXF-3472:
---------------------------

    Affects Version/s: 2.4

I just check cxf 2.4, it is a same issue.

> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3472) Cannot override HTTPConduit's handleResponse() method

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030655#comment-13030655 ] 

Willem Jiang commented on CXF-3472:
-----------------------------------

Hi David,

I just checked the HttpConduit code in the trunk and 2.3.x branch, the WrappedOutputStream and it's members are all protected.
You should be able to override the handleResponse() and handleResponseInternal() method in the sub class.
And you can set your customerized WrappedOutputStream by override the HTTPConduit.prepare(Message) method.

Willem


> Cannot override HTTPConduit's handleResponse() method
> -----------------------------------------------------
>
>                 Key: CXF-3472
>                 URL: https://issues.apache.org/jira/browse/CXF-3472
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>
>   Current, all response message processing of HTTPConduit is in the class WrappedOutputStream, e.g. handleResponse(), and handleResponseInternal() method, so we cannot extend HTTPConduit to override both method if we want to add more functions during processing response. because the class WrappedOutputStream need some input parameter and the its sub-class cannot get these private properties.
>   My use case is: I have my customized HTTPConduit which needs to override handleResponse() method to catch its instead of cxf's default logic.
>   Can cxf move both meothd from WrappedOutputStream class to HTTPConduit so that we can override them? thanks.
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira