You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Shaoguang Cong (JIRA)" <ji...@apache.org> on 2006/12/04 22:01:20 UTC

[jira] Created: (AXIS2-1823) Client API needs a method to access Current Message Context

Client API needs a method to access Current Message Context
-----------------------------------------------------------

                 Key: AXIS2-1823
                 URL: http://issues.apache.org/jira/browse/AXIS2-1823
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: New Feature
          Components: client-api
            Reporter: Shaoguang Cong


The generated client stub doesn't have a way to access MessageContext or SOAPHeader.  Client would like to access the header upon returned from the service.  It's ideal to add a getter method in the client stub or Service Client class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Assigned: (AXIS2-1823) Client API needs a method to access Current Message Context

Posted by "Glen Daniels (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1823?page=all ]

Glen Daniels reassigned AXIS2-1823:
-----------------------------------

    Assignee: Glen Daniels

> Client API needs a method to access Current Message Context
> -----------------------------------------------------------
>
>                 Key: AXIS2-1823
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1823
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: New Feature
>          Components: client-api
>            Reporter: Shaoguang Cong
>         Assigned To: Glen Daniels
>
> The generated client stub doesn't have a way to access MessageContext or SOAPHeader.  Client would like to access the header upon returned from the service.  It's ideal to add a getter method in the client stub or Service Client class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (AXIS2-1823) Client API needs a method to access Current Message Context

Posted by "Glen Daniels (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1823?page=comments#action_12456477 ] 
            
Glen Daniels commented on AXIS2-1823:
-------------------------------------

Hey folks:

The rationale behind the switch to turn the cache on/off was that keeping a reference to the OC in a live object (a stub which is sitting around for a while and reused sporadically) might in many cases result in a significant amount of memory escaping garbage collection.  If folks think it would be simpler to just cache all the time, I'm OK with that but we should keep this in mind as a potential hot spot.

Shaoguang, I called the method "getLastOperationContext" because the operation is usually over by the time you call it.  As for getting the MC instead, I think I'd prefer to keep it as is, retrieving the OC, because there may well be cases where you would like to examine the request message as well - or look at OC properties.  Granted, you could get there by getting the response MC, then calling mc.getOperationContext().GetMessageContext(...), but I think this is a little cleaner.

--Glen


> Client API needs a method to access Current Message Context
> -----------------------------------------------------------
>
>                 Key: AXIS2-1823
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1823
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: New Feature
>          Components: client-api
>            Reporter: Shaoguang Cong
>         Assigned To: Glen Daniels
>
> The generated client stub doesn't have a way to access MessageContext or SOAPHeader.  Client would like to access the header upon returned from the service.  It's ideal to add a getter method in the client stub or Service Client class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (AXIS2-1823) Client API needs a method to access Current Message Context

Posted by "Glen Daniels (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1823?page=comments#action_12456237 ] 
            
Glen Daniels commented on AXIS2-1823:
-------------------------------------

This has been fixed on the trunk.  The way this would work is as follows:

stub._getServiceClient().setCachingOperationContext(true);
... do work...
stub._getServiceClient().getLastOperationContext().getMessageContext(MESSAGE_LABEL_OUT_VALUE)...

Leaving this open as it doesn't yet have a test case.  Please check it out and let us know if this resolves your issue.


> Client API needs a method to access Current Message Context
> -----------------------------------------------------------
>
>                 Key: AXIS2-1823
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1823
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: New Feature
>          Components: client-api
>            Reporter: Shaoguang Cong
>         Assigned To: Glen Daniels
>
> The generated client stub doesn't have a way to access MessageContext or SOAPHeader.  Client would like to access the header upon returned from the service.  It's ideal to add a getter method in the client stub or Service Client class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (AXIS2-1823) Client API needs a method to access Current Message Context

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1823?page=comments#action_12456178 ] 
            
Deepal Jayasinghe commented on AXIS2-1823:
------------------------------------------

How about adding a method to service client to get current operation context from that , something like

ServiceClient.getCurrentOperationContext();

using that operation context you can do whatever you want to do .

> Client API needs a method to access Current Message Context
> -----------------------------------------------------------
>
>                 Key: AXIS2-1823
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1823
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: New Feature
>          Components: client-api
>            Reporter: Shaoguang Cong
>
> The generated client stub doesn't have a way to access MessageContext or SOAPHeader.  Client would like to access the header upon returned from the service.  It's ideal to add a getter method in the client stub or Service Client class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (AXIS2-1823) Client API needs a method to access Current Message Context

Posted by "Sanjiva Weerawarana (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1823?page=comments#action_12456307 ] 
            
Sanjiva Weerawarana commented on AXIS2-1823:
--------------------------------------------

Do we really need setCachcingOperationContext()?? When I looked at it I didn't think there would be any cost with saving the opcontext. If so why not just have it be available. 

It seems to me this should be true anyway by default.

> Client API needs a method to access Current Message Context
> -----------------------------------------------------------
>
>                 Key: AXIS2-1823
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1823
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: New Feature
>          Components: client-api
>            Reporter: Shaoguang Cong
>         Assigned To: Glen Daniels
>
> The generated client stub doesn't have a way to access MessageContext or SOAPHeader.  Client would like to access the header upon returned from the service.  It's ideal to add a getter method in the client stub or Service Client class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (AXIS2-1823) Client API needs a method to access Current Message Context

Posted by "Shaoguang Cong (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1823?page=comments#action_12456490 ] 
            
Shaoguang Cong commented on AXIS2-1823:
---------------------------------------

Glen,
For the problem I try to resolve, all the proposed solutions here will work.  So you can decide which way is best to meet broader needs and avoid potential issues.  Thank you all for looking at this problem.

Shaoguang

> Client API needs a method to access Current Message Context
> -----------------------------------------------------------
>
>                 Key: AXIS2-1823
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1823
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: New Feature
>          Components: client-api
>            Reporter: Shaoguang Cong
>         Assigned To: Glen Daniels
>
> The generated client stub doesn't have a way to access MessageContext or SOAPHeader.  Client would like to access the header upon returned from the service.  It's ideal to add a getter method in the client stub or Service Client class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Resolved: (AXIS2-1823) Client API needs a method to access Current Message Context

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

Deepal Jayasinghe resolved AXIS2-1823.
--------------------------------------

    Resolution: Fixed

> Client API needs a method to access Current Message Context
> -----------------------------------------------------------
>
>                 Key: AXIS2-1823
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1823
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: New Feature
>          Components: client-api
>            Reporter: Shaoguang Cong
>         Assigned To: Glen Daniels
>
> The generated client stub doesn't have a way to access MessageContext or SOAPHeader.  Client would like to access the header upon returned from the service.  It's ideal to add a getter method in the client stub or Service Client class.

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1823) Client API needs a method to access Current Message Context

Posted by "Sanjiva Weerawarana (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1823?page=comments#action_12456512 ] 
            
Sanjiva Weerawarana commented on AXIS2-1823:
--------------------------------------------

+1 for getLastOperationContext instead of getLastMC() as the latter is relatively meaningless esp. if async invocations are in place.

W.r.t. the caching flag- I didn't look at the code yet but I assume you just made the OC variable an instance var of the service client object right? If so I'm fine with removing the caching flag as once the service client is dropped (that is when the stub is dropped) all state will be GC'ed. 

Alternatively, how about keeping it but leaving it with default on? Then if someone really doesn't want those message contexts hanging around even for a bit they can turn it off.

> Client API needs a method to access Current Message Context
> -----------------------------------------------------------
>
>                 Key: AXIS2-1823
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1823
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: New Feature
>          Components: client-api
>            Reporter: Shaoguang Cong
>         Assigned To: Glen Daniels
>
> The generated client stub doesn't have a way to access MessageContext or SOAPHeader.  Client would like to access the header upon returned from the service.  It's ideal to add a getter method in the client stub or Service Client class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (AXIS2-1823) Client API needs a method to access Current Message Context

Posted by "Glen Daniels (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1823?page=comments#action_12456985 ] 
            
Glen Daniels commented on AXIS2-1823:
-------------------------------------

Sanjiva: I actually made it an instance var of the ServiceContext, because some code paths through the stub objects don't use the ServiceClient, instead going direct to the OperationClient.  I like the idea of leaving the switch there with the default to on, so I'll adjust appropriately, add a quick test case, and then close the issue.

Shaoguang: Thanks for the comments and the issue.  Glad to help.

> Client API needs a method to access Current Message Context
> -----------------------------------------------------------
>
>                 Key: AXIS2-1823
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1823
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: New Feature
>          Components: client-api
>            Reporter: Shaoguang Cong
>         Assigned To: Glen Daniels
>
> The generated client stub doesn't have a way to access MessageContext or SOAPHeader.  Client would like to access the header upon returned from the service.  It's ideal to add a getter method in the client stub or Service Client class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (AXIS2-1823) Client API needs a method to access Current Message Context

Posted by "Shaoguang Cong (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1823?page=comments#action_12456470 ] 
            
Shaoguang Cong commented on AXIS2-1823:
---------------------------------------

Glen, I'm playing with the released version 2.1.1.  So I cannot check the fix in the trunk.

>From purely a user's view, I'll echo Sanjiva's comment on avoiding to use some methods not so obvious to the app developer.  

Could just add the method as Deepal suggested, like 
   ServiceClient.getCurrentOperationContext(); 
Or even ServiceClient.getCurrentMessageContext().

It's the returned MessageContext really matter in most cases if not all of the cases(e.g. retrieve soap header info).  

> Client API needs a method to access Current Message Context
> -----------------------------------------------------------
>
>                 Key: AXIS2-1823
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1823
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: New Feature
>          Components: client-api
>            Reporter: Shaoguang Cong
>         Assigned To: Glen Daniels
>
> The generated client stub doesn't have a way to access MessageContext or SOAPHeader.  Client would like to access the header upon returned from the service.  It's ideal to add a getter method in the client stub or Service Client class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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