You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org> on 2010/05/24 07:26:24 UTC

[jira] Created: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

Make it Possible to Configure the TCP Transport at Service Level
----------------------------------------------------------------

                 Key: AXIS2-4723
                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
             Project: Axis2
          Issue Type: Improvement
          Components: transports
    Affects Versions: 1.5
            Reporter: Hiranya Jayathilaka
             Fix For: 1.6


Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update3.patch

Fixed the limitation pointed out by Andreas

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update1.patch

Restored the test cases back to their original state. Summary of changes:

* Added a separate axis2.xml for client side usage (in the client side we should use a different port than the server side)
* I encountered some problems (possible bug) in ListenerManager/ServiceClient which leads to the same transport listener being initialized twice. I have added a simple workaround for that in the respective test cases (look for TODOs). This problem is now also being discussed in the mailing list. Depending on the outcome of that we can change/remove the workarounds

If you are wondering why these issues did not show up until now, it was because of the following bit of code in the TCPServer class (which I have removed):

   public ServerSocket openSocket(int port) throws AxisFault {
        for (int i = 0; i < 5; i++) {
            try {
                return new ServerSocket(port + i);
            } catch (IOException e) {
                // What I'm gonna do here. Try again.
            }
        }

        throw new AxisFault(Messages.getMessage("failedToOpenSocket"));
    }

So the above code basically catches bind exceptions and try to start the listener on a different port. This has been masking the error all along.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update4.patch

Added the contentType parameter to the generated EPRs (will be added only if it is different from the default)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update2.patch

Since the problem in the AbstractTransportListenerEx has been fixed, I'm getting rid of the workarounds I had added to the test cases. Now the tests are fully restored to their original state.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870881#action_12870881 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

> Endpoints configured at the service level show up on the WSDLs. Only the endpoints configured at transport level do not. Does other implementations of AbstractTransportListenerEx also suffer from this limitation, or have I done something wrong here?

It's a limitation of AbstractTransportListenerEx. I've done some modifications (see r947834) to enable this, but it still requires some finetuning.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Andreas Veithen resolved AXIS2-4723.
------------------------------------

    Resolution: Fixed

Applied AXIS2-4723-update5.patch and AXIS2-4723-docs.patch. Thanks for your contribution, Hiranya!

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723.patch

First cut version of the patch. Feedback is much appreciated.

Summary:
* Introduced the TCPTransportListener extending AbstractTransportListenerEx
* Introduced TCPEndpoint
* Introduced TCPOutTransportInfo to handle request-response scenarios
* More configuration options to the tcp listener (backlog and content type are now configurable)


> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870636#action_12870636 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

I'm a bit uneasy with the fact that you changed the test cases to set up the TCP endpoints at the service level. We need to make sure that the new version of the TCP transport still supports the scenarios that were supported by the old version (i.e. configuring the TCP endpoint at the transport level). Therefore we should keep the existing unit tests.

BTW, I think there will be a regression because AbstractTransportListenerEx#getEPRsForService doesn't yet support protocol endpoints configured at the transport level. Thus, the generated WSDL will have no EPRs for the TCP transport.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Andreas Veithen resolved AXIS2-4723.
------------------------------------

    Resolution: Fixed

Applied AXIS2-4723-update5.patch and AXIS2-4723-docs.patch. Thanks for your contribution, Hiranya!

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873395#action_12873395 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

> Can you also supply a patch for this?

With pleasure :)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871906#action_12871906 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

If configured both UDP and TCP (at transport level) and I get the following WSDL snippet (for the default Version service):

        <wsdl:port name="VersionUdpSoap11Endpoint" binding="ns:VersionSoap11Binding"> 
            <soap:address location="udp://localhost:3333/axis2/services/Version?contentType=text/xml"/> 
        </wsdl:port> 
        <wsdl:port name="VersionTcpSoap11Endpoint" binding="ns:VersionSoap11Binding"> 
            <soap:address location="tcp://localhost:5555"/> 
        </wsdl:port> 

For TCP, that would not be enough to dispatch to the right service.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723.patch

First cut version of the patch. Feedback is much appreciated.

Summary:
* Introduced the TCPTransportListener extending AbstractTransportListenerEx
* Introduced TCPEndpoint
* Introduced TCPOutTransportInfo to handle request-response scenarios
* More configuration options to the tcp listener (backlog and content type are now configurable)


> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870710#action_12870710 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

BTW rest assured that this new version of the TCP transport also supports endpoints configured at transport level. I have tested and verified the functionality. However I ran into a series of issues with the existing test cases due to the way they are currently organized. Basically I ended up getting a bunch of bind exceptions. I just fixed the tests for the moment since I wanted to put forward the patch for review. I will work on the tests and get them back to their original state. Expect a new patch fairly soon.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-docs.patch

Attaching the documentation patch (It could be a little rusty. Feedback welcome!)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update1.patch

Restored the test cases back to their original state. Summary of changes:

* Added a separate axis2.xml for client side usage (in the client side we should use a different port than the server side)
* I encountered some problems (possible bug) in ListenerManager/ServiceClient which leads to the same transport listener being initialized twice. I have added a simple workaround for that in the respective test cases (look for TODOs). This problem is now also being discussed in the mailing list. Depending on the outcome of that we can change/remove the workarounds

If you are wondering why these issues did not show up until now, it was because of the following bit of code in the TCPServer class (which I have removed):

   public ServerSocket openSocket(int port) throws AxisFault {
        for (int i = 0; i < 5; i++) {
            try {
                return new ServerSocket(port + i);
            } catch (IOException e) {
                // What I'm gonna do here. Try again.
            }
        }

        throw new AxisFault(Messages.getMessage("failedToOpenSocket"));
    }

So the above code basically catches bind exceptions and try to start the listener on a different port. This has been masking the error all along.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870881#action_12870881 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

> Endpoints configured at the service level show up on the WSDLs. Only the endpoints configured at transport level do not. Does other implementations of AbstractTransportListenerEx also suffer from this limitation, or have I done something wrong here?

It's a limitation of AbstractTransportListenerEx. I've done some modifications (see r947834) to enable this, but it still requires some finetuning.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update5.patch

Fixed the problems in the transport sender:

* For messages sent to target EPRs, the output socket is stored in the message context and closed in the cleanup method of the transport sender
* When processing responses, the message is no longer buffered in memory (the input stream of the socket is directly handed to the parser)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873395#action_12873395 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

> Can you also supply a patch for this?

With pleasure :)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update2.patch

Since the problem in the AbstractTransportListenerEx has been fixed, I'm getting rid of the workarounds I had added to the test cases. Now the tests are fully restored to their original state.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873254#action_12873254 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

TCPTransportSender needs some more attention, because neither the original code nor your new code is entirely correct.

The original code uses the correct lifecycle for the InputStream with the response: it is closed only in the cleanup method, and the invoke method doesn't consume the InputStream. That is important to enable deferred parsing. However, the InputStream (actually the corresponding Socket) is stored in an attribute of TCPTransportSender. That is of course wrong because TCPTransportSender may be invoked concurrently from multiple threads. Instead it should store the object in the MessageContext.

On the other hand, your implementation contains the following code to process the response:

            BufferedReader reader = new BufferedReader(new InputStreamReader(
                    socket.getInputStream()));

            char[] cbuf = new char[1024];
            int len;
            StringBuffer buff = new StringBuffer();
            while ((len = reader.read(cbuf)) != -1) {
                buff.append(cbuf, 0, len);
            }

            ByteArrayInputStream bais = new ByteArrayInputStream(buff.toString().getBytes());

There are two issues with this code:
* There is no reason to go through a byte stream -> character stream -> byte stream transformation. Also, constructing an InputStreamReader or using String#getBytes without specifying a charset encoding is almost always a programming error (there are only very few cases where this would be correct). There will be a mismatch between the platform's default charset encoding and the encoding actually used by the message.
* It buffers the entire message, which (in part) defeats the purpose of deferred parsing.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update3.patch

Fixed the limitation pointed out by Andreas

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873388#action_12873388 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

The patch looks good to me. It supports all scenarios supported by the existing code and at the same time represents a significant improvement. There is now only one thing missing: since there is a change in configuration (parameters have changed + different listener class) and new features, the documentation (see src/site/apt/tcp-transport.apt) needs to be updated. Can you also supply a patch for this?

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-docs.patch

Attaching the documentation patch (It could be a little rusty. Feedback welcome!)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-docs.patch

Attaching the documentation patch (It could be a little rusty. Feedback welcome!)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Assigned: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Andreas Veithen reassigned AXIS2-4723:
--------------------------------------

    Assignee: Andreas Veithen

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870701#action_12870701 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

> Therefore we should keep the existing unit tests. 

I will look into this. Should be able to get it done without much trouble. Some minor changes will be required anyway though since the listener impl has changed. (TCPServer --> TCPTransportListener)

> Thus, the generated WSDL will have no EPRs for the TCP transport.

Endpoints configured at the service level show up on the WSDLs. Only the endpoints configured at transport level do not. Does other implementations of AbstractTransportListenerEx also suffer from this limitation, or have I done something wrong here?

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873254#action_12873254 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

TCPTransportSender needs some more attention, because neither the original code nor your new code is entirely correct.

The original code uses the correct lifecycle for the InputStream with the response: it is closed only in the cleanup method, and the invoke method doesn't consume the InputStream. That is important to enable deferred parsing. However, the InputStream (actually the corresponding Socket) is stored in an attribute of TCPTransportSender. That is of course wrong because TCPTransportSender may be invoked concurrently from multiple threads. Instead it should store the object in the MessageContext.

On the other hand, your implementation contains the following code to process the response:

            BufferedReader reader = new BufferedReader(new InputStreamReader(
                    socket.getInputStream()));

            char[] cbuf = new char[1024];
            int len;
            StringBuffer buff = new StringBuffer();
            while ((len = reader.read(cbuf)) != -1) {
                buff.append(cbuf, 0, len);
            }

            ByteArrayInputStream bais = new ByteArrayInputStream(buff.toString().getBytes());

There are two issues with this code:
* There is no reason to go through a byte stream -> character stream -> byte stream transformation. Also, constructing an InputStreamReader or using String#getBytes without specifying a charset encoding is almost always a programming error (there are only very few cases where this would be correct). There will be a mismatch between the platform's default charset encoding and the encoding actually used by the message.
* It buffers the entire message, which (in part) defeats the purpose of deferred parsing.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Assigned: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Andreas Veithen reassigned AXIS2-4723:
--------------------------------------

    Assignee: Andreas Veithen

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873254#action_12873254 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

TCPTransportSender needs some more attention, because neither the original code nor your new code is entirely correct.

The original code uses the correct lifecycle for the InputStream with the response: it is closed only in the cleanup method, and the invoke method doesn't consume the InputStream. That is important to enable deferred parsing. However, the InputStream (actually the corresponding Socket) is stored in an attribute of TCPTransportSender. That is of course wrong because TCPTransportSender may be invoked concurrently from multiple threads. Instead it should store the object in the MessageContext.

On the other hand, your implementation contains the following code to process the response:

            BufferedReader reader = new BufferedReader(new InputStreamReader(
                    socket.getInputStream()));

            char[] cbuf = new char[1024];
            int len;
            StringBuffer buff = new StringBuffer();
            while ((len = reader.read(cbuf)) != -1) {
                buff.append(cbuf, 0, len);
            }

            ByteArrayInputStream bais = new ByteArrayInputStream(buff.toString().getBytes());

There are two issues with this code:
* There is no reason to go through a byte stream -> character stream -> byte stream transformation. Also, constructing an InputStreamReader or using String#getBytes without specifying a charset encoding is almost always a programming error (there are only very few cases where this would be correct). There will be a mismatch between the platform's default charset encoding and the encoding actually used by the message.
* It buffers the entire message, which (in part) defeats the purpose of deferred parsing.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871906#action_12871906 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

If configured both UDP and TCP (at transport level) and I get the following WSDL snippet (for the default Version service):

        <wsdl:port name="VersionUdpSoap11Endpoint" binding="ns:VersionSoap11Binding"> 
            <soap:address location="udp://localhost:3333/axis2/services/Version?contentType=text/xml"/> 
        </wsdl:port> 
        <wsdl:port name="VersionTcpSoap11Endpoint" binding="ns:VersionSoap11Binding"> 
            <soap:address location="tcp://localhost:5555"/> 
        </wsdl:port> 

For TCP, that would not be enough to dispatch to the right service.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update1.patch

Restored the test cases back to their original state. Summary of changes:

* Added a separate axis2.xml for client side usage (in the client side we should use a different port than the server side)
* I encountered some problems (possible bug) in ListenerManager/ServiceClient which leads to the same transport listener being initialized twice. I have added a simple workaround for that in the respective test cases (look for TODOs). This problem is now also being discussed in the mailing list. Depending on the outcome of that we can change/remove the workarounds

If you are wondering why these issues did not show up until now, it was because of the following bit of code in the TCPServer class (which I have removed):

   public ServerSocket openSocket(int port) throws AxisFault {
        for (int i = 0; i < 5; i++) {
            try {
                return new ServerSocket(port + i);
            } catch (IOException e) {
                // What I'm gonna do here. Try again.
            }
        }

        throw new AxisFault(Messages.getMessage("failedToOpenSocket"));
    }

So the above code basically catches bind exceptions and try to start the listener on a different port. This has been masking the error all along.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871906#action_12871906 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

If configured both UDP and TCP (at transport level) and I get the following WSDL snippet (for the default Version service):

        <wsdl:port name="VersionUdpSoap11Endpoint" binding="ns:VersionSoap11Binding"> 
            <soap:address location="udp://localhost:3333/axis2/services/Version?contentType=text/xml"/> 
        </wsdl:port> 
        <wsdl:port name="VersionTcpSoap11Endpoint" binding="ns:VersionSoap11Binding"> 
            <soap:address location="tcp://localhost:5555"/> 
        </wsdl:port> 

For TCP, that would not be enough to dispatch to the right service.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Assigned: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Andreas Veithen reassigned AXIS2-4723:
--------------------------------------

    Assignee: Andreas Veithen

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873388#action_12873388 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

The patch looks good to me. It supports all scenarios supported by the existing code and at the same time represents a significant improvement. There is now only one thing missing: since there is a change in configuration (parameters have changed + different listener class) and new features, the documentation (see src/site/apt/tcp-transport.apt) needs to be updated. Can you also supply a patch for this?

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870701#action_12870701 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

> Therefore we should keep the existing unit tests. 

I will look into this. Should be able to get it done without much trouble. Some minor changes will be required anyway though since the listener impl has changed. (TCPServer --> TCPTransportListener)

> Thus, the generated WSDL will have no EPRs for the TCP transport.

Endpoints configured at the service level show up on the WSDLs. Only the endpoints configured at transport level do not. Does other implementations of AbstractTransportListenerEx also suffer from this limitation, or have I done something wrong here?

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Andreas Veithen resolved AXIS2-4723.
------------------------------------

    Resolution: Fixed

Applied AXIS2-4723-update5.patch and AXIS2-4723-docs.patch. Thanks for your contribution, Hiranya!

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update2.patch

Since the problem in the AbstractTransportListenerEx has been fixed, I'm getting rid of the workarounds I had added to the test cases. Now the tests are fully restored to their original state.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Andreas Veithen resolved AXIS2-4723.
------------------------------------

    Resolution: Fixed

Applied AXIS2-4723-update5.patch and AXIS2-4723-docs.patch. Thanks for your contribution, Hiranya!

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update3.patch

Fixed the limitation pointed out by Andreas

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870710#action_12870710 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

BTW rest assured that this new version of the TCP transport also supports endpoints configured at transport level. I have tested and verified the functionality. However I ran into a series of issues with the existing test cases due to the way they are currently organized. Basically I ended up getting a bunch of bind exceptions. I just fixed the tests for the moment since I wanted to put forward the patch for review. I will work on the tests and get them back to their original state. Expect a new patch fairly soon.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870710#action_12870710 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

BTW rest assured that this new version of the TCP transport also supports endpoints configured at transport level. I have tested and verified the functionality. However I ran into a series of issues with the existing test cases due to the way they are currently organized. Basically I ended up getting a bunch of bind exceptions. I just fixed the tests for the moment since I wanted to put forward the patch for review. I will work on the tests and get them back to their original state. Expect a new patch fairly soon.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update5.patch

Fixed the problems in the transport sender:

* For messages sent to target EPRs, the output socket is stored in the message context and closed in the cleanup method of the transport sender
* When processing responses, the message is no longer buffered in memory (the input stream of the socket is directly handed to the parser)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870636#action_12870636 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

I'm a bit uneasy with the fact that you changed the test cases to set up the TCP endpoints at the service level. We need to make sure that the new version of the TCP transport still supports the scenarios that were supported by the old version (i.e. configuring the TCP endpoint at the transport level). Therefore we should keep the existing unit tests.

BTW, I think there will be a regression because AbstractTransportListenerEx#getEPRsForService doesn't yet support protocol endpoints configured at the transport level. Thus, the generated WSDL will have no EPRs for the TCP transport.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873388#action_12873388 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

The patch looks good to me. It supports all scenarios supported by the existing code and at the same time represents a significant improvement. There is now only one thing missing: since there is a change in configuration (parameters have changed + different listener class) and new features, the documentation (see src/site/apt/tcp-transport.apt) needs to be updated. Can you also supply a patch for this?

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update5.patch

Fixed the problems in the transport sender:

* For messages sent to target EPRs, the output socket is stored in the message context and closed in the cleanup method of the transport sender
* When processing responses, the message is no longer buffered in memory (the input stream of the socket is directly handed to the parser)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871906#action_12871906 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

If configured both UDP and TCP (at transport level) and I get the following WSDL snippet (for the default Version service):

        <wsdl:port name="VersionUdpSoap11Endpoint" binding="ns:VersionSoap11Binding"> 
            <soap:address location="udp://localhost:3333/axis2/services/Version?contentType=text/xml"/> 
        </wsdl:port> 
        <wsdl:port name="VersionTcpSoap11Endpoint" binding="ns:VersionSoap11Binding"> 
            <soap:address location="tcp://localhost:5555"/> 
        </wsdl:port> 

For TCP, that would not be enough to dispatch to the right service.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873262#action_12873262 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

This bit of code was written in this manner to ensure that by the time the socket is closed the response is fully read by the transport sender. Otherwise the parser would throw exceptions when the socket is closed. If there is a way to ensure this without buffering the response in memory, that would be great. That will basically fix both aforementioned limitations.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873262#action_12873262 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

This bit of code was written in this manner to ensure that by the time the socket is closed the response is fully read by the transport sender. Otherwise the parser would throw exceptions when the socket is closed. If there is a way to ensure this without buffering the response in memory, that would be great. That will basically fix both aforementioned limitations.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update4.patch

Added the contentType parameter to the generated EPRs (will be added only if it is different from the default)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Assigned: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Andreas Veithen reassigned AXIS2-4723:
--------------------------------------

    Assignee: Andreas Veithen

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873262#action_12873262 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

This bit of code was written in this manner to ensure that by the time the socket is closed the response is fully read by the transport sender. Otherwise the parser would throw exceptions when the socket is closed. If there is a way to ensure this without buffering the response in memory, that would be great. That will basically fix both aforementioned limitations.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873254#action_12873254 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

TCPTransportSender needs some more attention, because neither the original code nor your new code is entirely correct.

The original code uses the correct lifecycle for the InputStream with the response: it is closed only in the cleanup method, and the invoke method doesn't consume the InputStream. That is important to enable deferred parsing. However, the InputStream (actually the corresponding Socket) is stored in an attribute of TCPTransportSender. That is of course wrong because TCPTransportSender may be invoked concurrently from multiple threads. Instead it should store the object in the MessageContext.

On the other hand, your implementation contains the following code to process the response:

            BufferedReader reader = new BufferedReader(new InputStreamReader(
                    socket.getInputStream()));

            char[] cbuf = new char[1024];
            int len;
            StringBuffer buff = new StringBuffer();
            while ((len = reader.read(cbuf)) != -1) {
                buff.append(cbuf, 0, len);
            }

            ByteArrayInputStream bais = new ByteArrayInputStream(buff.toString().getBytes());

There are two issues with this code:
* There is no reason to go through a byte stream -> character stream -> byte stream transformation. Also, constructing an InputStreamReader or using String#getBytes without specifying a charset encoding is almost always a programming error (there are only very few cases where this would be correct). There will be a mismatch between the platform's default charset encoding and the encoding actually used by the message.
* It buffers the entire message, which (in part) defeats the purpose of deferred parsing.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870701#action_12870701 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

> Therefore we should keep the existing unit tests. 

I will look into this. Should be able to get it done without much trouble. Some minor changes will be required anyway though since the listener impl has changed. (TCPServer --> TCPTransportListener)

> Thus, the generated WSDL will have no EPRs for the TCP transport.

Endpoints configured at the service level show up on the WSDLs. Only the endpoints configured at transport level do not. Does other implementations of AbstractTransportListenerEx also suffer from this limitation, or have I done something wrong here?

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870636#action_12870636 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

I'm a bit uneasy with the fact that you changed the test cases to set up the TCP endpoints at the service level. We need to make sure that the new version of the TCP transport still supports the scenarios that were supported by the old version (i.e. configuring the TCP endpoint at the transport level). Therefore we should keep the existing unit tests.

BTW, I think there will be a regression because AbstractTransportListenerEx#getEPRsForService doesn't yet support protocol endpoints configured at the transport level. Thus, the generated WSDL will have no EPRs for the TCP transport.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873395#action_12873395 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

> Can you also supply a patch for this?

With pleasure :)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update2.patch

Since the problem in the AbstractTransportListenerEx has been fixed, I'm getting rid of the workarounds I had added to the test cases. Now the tests are fully restored to their original state.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Andreas Veithen resolved AXIS2-4723.
------------------------------------

    Resolution: Fixed

Applied AXIS2-4723-update5.patch and AXIS2-4723-docs.patch. Thanks for your contribution, Hiranya!

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870636#action_12870636 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

I'm a bit uneasy with the fact that you changed the test cases to set up the TCP endpoints at the service level. We need to make sure that the new version of the TCP transport still supports the scenarios that were supported by the old version (i.e. configuring the TCP endpoint at the transport level). Therefore we should keep the existing unit tests.

BTW, I think there will be a regression because AbstractTransportListenerEx#getEPRsForService doesn't yet support protocol endpoints configured at the transport level. Thus, the generated WSDL will have no EPRs for the TCP transport.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723.patch

First cut version of the patch. Feedback is much appreciated.

Summary:
* Introduced the TCPTransportListener extending AbstractTransportListenerEx
* Introduced TCPEndpoint
* Introduced TCPOutTransportInfo to handle request-response scenarios
* More configuration options to the tcp listener (backlog and content type are now configurable)


> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update2.patch

Since the problem in the AbstractTransportListenerEx has been fixed, I'm getting rid of the workarounds I had added to the test cases. Now the tests are fully restored to their original state.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873254#action_12873254 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

TCPTransportSender needs some more attention, because neither the original code nor your new code is entirely correct.

The original code uses the correct lifecycle for the InputStream with the response: it is closed only in the cleanup method, and the invoke method doesn't consume the InputStream. That is important to enable deferred parsing. However, the InputStream (actually the corresponding Socket) is stored in an attribute of TCPTransportSender. That is of course wrong because TCPTransportSender may be invoked concurrently from multiple threads. Instead it should store the object in the MessageContext.

On the other hand, your implementation contains the following code to process the response:

            BufferedReader reader = new BufferedReader(new InputStreamReader(
                    socket.getInputStream()));

            char[] cbuf = new char[1024];
            int len;
            StringBuffer buff = new StringBuffer();
            while ((len = reader.read(cbuf)) != -1) {
                buff.append(cbuf, 0, len);
            }

            ByteArrayInputStream bais = new ByteArrayInputStream(buff.toString().getBytes());

There are two issues with this code:
* There is no reason to go through a byte stream -> character stream -> byte stream transformation. Also, constructing an InputStreamReader or using String#getBytes without specifying a charset encoding is almost always a programming error (there are only very few cases where this would be correct). There will be a mismatch between the platform's default charset encoding and the encoding actually used by the message.
* It buffers the entire message, which (in part) defeats the purpose of deferred parsing.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873388#action_12873388 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

The patch looks good to me. It supports all scenarios supported by the existing code and at the same time represents a significant improvement. There is now only one thing missing: since there is a change in configuration (parameters have changed + different listener class) and new features, the documentation (see src/site/apt/tcp-transport.apt) needs to be updated. Can you also supply a patch for this?

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870701#action_12870701 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

> Therefore we should keep the existing unit tests. 

I will look into this. Should be able to get it done without much trouble. Some minor changes will be required anyway though since the listener impl has changed. (TCPServer --> TCPTransportListener)

> Thus, the generated WSDL will have no EPRs for the TCP transport.

Endpoints configured at the service level show up on the WSDLs. Only the endpoints configured at transport level do not. Does other implementations of AbstractTransportListenerEx also suffer from this limitation, or have I done something wrong here?

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870710#action_12870710 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

BTW rest assured that this new version of the TCP transport also supports endpoints configured at transport level. I have tested and verified the functionality. However I ran into a series of issues with the existing test cases due to the way they are currently organized. Basically I ended up getting a bunch of bind exceptions. I just fixed the tests for the moment since I wanted to put forward the patch for review. I will work on the tests and get them back to their original state. Expect a new patch fairly soon.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870701#action_12870701 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

> Therefore we should keep the existing unit tests. 

I will look into this. Should be able to get it done without much trouble. Some minor changes will be required anyway though since the listener impl has changed. (TCPServer --> TCPTransportListener)

> Thus, the generated WSDL will have no EPRs for the TCP transport.

Endpoints configured at the service level show up on the WSDLs. Only the endpoints configured at transport level do not. Does other implementations of AbstractTransportListenerEx also suffer from this limitation, or have I done something wrong here?

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update4.patch

Added the contentType parameter to the generated EPRs (will be added only if it is different from the default)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-docs.patch

Attaching the documentation patch (It could be a little rusty. Feedback welcome!)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update3.patch

Fixed the limitation pointed out by Andreas

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871906#action_12871906 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

If configured both UDP and TCP (at transport level) and I get the following WSDL snippet (for the default Version service):

        <wsdl:port name="VersionUdpSoap11Endpoint" binding="ns:VersionSoap11Binding"> 
            <soap:address location="udp://localhost:3333/axis2/services/Version?contentType=text/xml"/> 
        </wsdl:port> 
        <wsdl:port name="VersionTcpSoap11Endpoint" binding="ns:VersionSoap11Binding"> 
            <soap:address location="tcp://localhost:5555"/> 
        </wsdl:port> 

For TCP, that would not be enough to dispatch to the right service.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update1.patch

Restored the test cases back to their original state. Summary of changes:

* Added a separate axis2.xml for client side usage (in the client side we should use a different port than the server side)
* I encountered some problems (possible bug) in ListenerManager/ServiceClient which leads to the same transport listener being initialized twice. I have added a simple workaround for that in the respective test cases (look for TODOs). This problem is now also being discussed in the mailing list. Depending on the outcome of that we can change/remove the workarounds

If you are wondering why these issues did not show up until now, it was because of the following bit of code in the TCPServer class (which I have removed):

   public ServerSocket openSocket(int port) throws AxisFault {
        for (int i = 0; i < 5; i++) {
            try {
                return new ServerSocket(port + i);
            } catch (IOException e) {
                // What I'm gonna do here. Try again.
            }
        }

        throw new AxisFault(Messages.getMessage("failedToOpenSocket"));
    }

So the above code basically catches bind exceptions and try to start the listener on a different port. This has been masking the error all along.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update5.patch

Fixed the problems in the transport sender:

* For messages sent to target EPRs, the output socket is stored in the message context and closed in the cleanup method of the transport sender
* When processing responses, the message is no longer buffered in memory (the input stream of the socket is directly handed to the parser)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870881#action_12870881 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

> Endpoints configured at the service level show up on the WSDLs. Only the endpoints configured at transport level do not. Does other implementations of AbstractTransportListenerEx also suffer from this limitation, or have I done something wrong here?

It's a limitation of AbstractTransportListenerEx. I've done some modifications (see r947834) to enable this, but it still requires some finetuning.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update4.patch

Added the contentType parameter to the generated EPRs (will be added only if it is different from the default)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update1.patch

Restored the test cases back to their original state. Summary of changes:

* Added a separate axis2.xml for client side usage (in the client side we should use a different port than the server side)
* I encountered some problems (possible bug) in ListenerManager/ServiceClient which leads to the same transport listener being initialized twice. I have added a simple workaround for that in the respective test cases (look for TODOs). This problem is now also being discussed in the mailing list. Depending on the outcome of that we can change/remove the workarounds

If you are wondering why these issues did not show up until now, it was because of the following bit of code in the TCPServer class (which I have removed):

   public ServerSocket openSocket(int port) throws AxisFault {
        for (int i = 0; i < 5; i++) {
            try {
                return new ServerSocket(port + i);
            } catch (IOException e) {
                // What I'm gonna do here. Try again.
            }
        }

        throw new AxisFault(Messages.getMessage("failedToOpenSocket"));
    }

So the above code basically catches bind exceptions and try to start the listener on a different port. This has been masking the error all along.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-docs.patch

Attaching the documentation patch (It could be a little rusty. Feedback welcome!)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873262#action_12873262 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

This bit of code was written in this manner to ensure that by the time the socket is closed the response is fully read by the transport sender. Otherwise the parser would throw exceptions when the socket is closed. If there is a way to ensure this without buffering the response in memory, that would be great. That will basically fix both aforementioned limitations.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870636#action_12870636 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

I'm a bit uneasy with the fact that you changed the test cases to set up the TCP endpoints at the service level. We need to make sure that the new version of the TCP transport still supports the scenarios that were supported by the old version (i.e. configuring the TCP endpoint at the transport level). Therefore we should keep the existing unit tests.

BTW, I think there will be a regression because AbstractTransportListenerEx#getEPRsForService doesn't yet support protocol endpoints configured at the transport level. Thus, the generated WSDL will have no EPRs for the TCP transport.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873388#action_12873388 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

The patch looks good to me. It supports all scenarios supported by the existing code and at the same time represents a significant improvement. There is now only one thing missing: since there is a change in configuration (parameters have changed + different listener class) and new features, the documentation (see src/site/apt/tcp-transport.apt) needs to be updated. Can you also supply a patch for this?

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update3.patch

Fixed the limitation pointed out by Andreas

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873262#action_12873262 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

This bit of code was written in this manner to ensure that by the time the socket is closed the response is fully read by the transport sender. Otherwise the parser would throw exceptions when the socket is closed. If there is a way to ensure this without buffering the response in memory, that would be great. That will basically fix both aforementioned limitations.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870710#action_12870710 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

BTW rest assured that this new version of the TCP transport also supports endpoints configured at transport level. I have tested and verified the functionality. However I ran into a series of issues with the existing test cases due to the way they are currently organized. Basically I ended up getting a bunch of bind exceptions. I just fixed the tests for the moment since I wanted to put forward the patch for review. I will work on the tests and get them back to their original state. Expect a new patch fairly soon.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870881#action_12870881 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

> Endpoints configured at the service level show up on the WSDLs. Only the endpoints configured at transport level do not. Does other implementations of AbstractTransportListenerEx also suffer from this limitation, or have I done something wrong here?

It's a limitation of AbstractTransportListenerEx. I've done some modifications (see r947834) to enable this, but it still requires some finetuning.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873395#action_12873395 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

> Can you also supply a patch for this?

With pleasure :)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723.patch

First cut version of the patch. Feedback is much appreciated.

Summary:
* Introduced the TCPTransportListener extending AbstractTransportListenerEx
* Introduced TCPEndpoint
* Introduced TCPOutTransportInfo to handle request-response scenarios
* More configuration options to the tcp listener (backlog and content type are now configurable)


> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870881#action_12870881 ] 

Andreas Veithen commented on AXIS2-4723:
----------------------------------------

> Endpoints configured at the service level show up on the WSDLs. Only the endpoints configured at transport level do not. Does other implementations of AbstractTransportListenerEx also suffer from this limitation, or have I done something wrong here?

It's a limitation of AbstractTransportListenerEx. I've done some modifications (see r947834) to enable this, but it still requires some finetuning.

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update4.patch

Added the contentType parameter to the generated EPRs (will be added only if it is different from the default)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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-4723) Make it Possible to Configure the TCP Transport at Service Level

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873395#action_12873395 ] 

Hiranya Jayathilaka commented on AXIS2-4723:
--------------------------------------------

> Can you also supply a patch for this?

With pleasure :)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Assigned: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Andreas Veithen reassigned AXIS2-4723:
--------------------------------------

    Assignee: Andreas Veithen

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-docs.patch, AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723.patch

First cut version of the patch. Feedback is much appreciated.

Summary:
* Introduced the TCPTransportListener extending AbstractTransportListenerEx
* Introduced TCPEndpoint
* Introduced TCPOutTransportInfo to handle request-response scenarios
* More configuration options to the tcp listener (backlog and content type are now configurable)


> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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] Updated: (AXIS2-4723) Make it Possible to Configure the TCP Transport at Service Level

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

Hiranya Jayathilaka updated AXIS2-4723:
---------------------------------------

    Attachment: AXIS2-4723-update5.patch

Fixed the problems in the transport sender:

* For messages sent to target EPRs, the output socket is stored in the message context and closed in the cleanup method of the transport sender
* When processing responses, the message is no longer buffered in memory (the input stream of the socket is directly handed to the parser)

> Make it Possible to Configure the TCP Transport at Service Level
> ----------------------------------------------------------------
>
>                 Key: AXIS2-4723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4723
>             Project: Axis2
>          Issue Type: Improvement
>          Components: transports
>    Affects Versions: 1.5
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.6
>
>         Attachments: AXIS2-4723-update1.patch, AXIS2-4723-update2.patch, AXIS2-4723-update3.patch, AXIS2-4723-update4.patch, AXIS2-4723-update5.patch, AXIS2-4723.patch
>
>
> Currently the TCP transport can only be configured in the axis2.xml (globally). It would be nice to be able to configure the transport at service level. We can do this by using the Axis2TransportListenerEx API. (I will soon attach a patch)

-- 
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