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 "TAM Tenfold5 (Created) (JIRA)" <ji...@apache.org> on 2011/11/28 09:20:39 UTC

[jira] [Created] (AXIS2-5202) Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding

Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding
-------------------------------------------------------------------------------------------------------------------------------------

                 Key: AXIS2-5202
                 URL: https://issues.apache.org/jira/browse/AXIS2-5202
             Project: Axis2
          Issue Type: Bug
          Components: adb, client-api, codegen, databinding
    Affects Versions: 1.6.0
         Environment: axis2 version is 1.6.0. 
            Reporter: TAM Tenfold5


The response SOAP message cannot be accessed outside the Stub class (extension of org.apache.axis2.client.Stub) generated by Axis2 Code generator for ADB or XMLBeans data binding (WSDL2Java). The below line of code gives an error:
serviceClient.getLastOperationContext().getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);

I am currently using a work-around. Adding the below line in the Stub after response message is received helps me rebuild the response object and make it accessible outside the Stub class:
_returnEnv.build();

Probably this fix should be added in the API itself.

Regards,
TAM Tenfold5, GDev.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (AXIS2-5202) Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding

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

Sagara Gunathunga  commented on AXIS2-5202:
-------------------------------------------

Another workaround is to use a MessageContextListener as follows. 

        stub._getServiceClient().getAxisService().addMessageContextListener(
                new MessageContextListener() {

                    public void attachServiceContextEvent(ServiceContext sc,
                            MessageContext mc) {                       

                    }

                    public void attachEnvelopeEvent(MessageContext mc) {
                        try {
                            mc.getEnvelope().cloneOMElement()
                                    .serialize(System.out);
                        } catch (XMLStreamException e) {
                        }

                    }
                }); 
                
> Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5202
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5202
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb, client-api, codegen, databinding
>    Affects Versions: 1.6.0
>         Environment: axis2 version is 1.6.0. 
>            Reporter: TAM Tenfold5
>
> The response SOAP message cannot be accessed outside the Stub class (extension of org.apache.axis2.client.Stub) generated by Axis2 Code generator for ADB or XMLBeans data binding (WSDL2Java). The below line of code gives an error:
> serviceClient.getLastOperationContext().getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
> I am currently using a work-around. Adding the below line in the Stub after response message is received helps me rebuild the response object and make it accessible outside the Stub class:
> _returnEnv.build();
> Probably this fix should be added in the API itself.
> I have seen this issue in the STubs generated for ADB and XMLBeans data binding.
> Regards,
> TAM Tenfold5, GDev.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (AXIS2-5202) Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding

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

Kishanthan Thangarajah commented on AXIS2-5202:
-----------------------------------------------

What you have suggested is one way to get this work. Or you can directly work with AXIOM and create axiom based clients and get the work done instead of service stubs. You can take a look at this quickstartaxiom sample [1]. This is my suggestion.

Thanks,
Kishanthan.
[1] http://svn.apache.org/repos/asf/axis/axis2/java/core/trunk/modules/samples/quickstartaxiom/
                
> Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5202
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5202
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb, client-api, codegen, databinding
>    Affects Versions: 1.6.0
>         Environment: axis2 version is 1.6.0. 
>            Reporter: TAM Tenfold5
>
> The response SOAP message cannot be accessed outside the Stub class (extension of org.apache.axis2.client.Stub) generated by Axis2 Code generator for ADB or XMLBeans data binding (WSDL2Java). The below line of code gives an error:
> serviceClient.getLastOperationContext().getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
> I am currently using a work-around. Adding the below line in the Stub after response message is received helps me rebuild the response object and make it accessible outside the Stub class:
> _returnEnv.build();
> Probably this fix should be added in the API itself.
> I have seen this issue in the STubs generated for ADB and XMLBeans data binding.
> Regards,
> TAM Tenfold5, GDev.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (AXIS2-5202) Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding

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

TAM Tenfold5 updated AXIS2-5202:
--------------------------------

    Description: 
The response SOAP message cannot be accessed outside the Stub class (extension of org.apache.axis2.client.Stub) generated by Axis2 Code generator for ADB or XMLBeans data binding (WSDL2Java). The below line of code gives an error:
serviceClient.getLastOperationContext().getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);

I am currently using a work-around. Adding the below line in the Stub after response message is received helps me rebuild the response object and make it accessible outside the Stub class:
_returnEnv.build();

Probably this fix should be added in the API itself.

I have seen this issue in the STubs generated for ADB and XMLBeans data binding.

Regards,
TAM Tenfold5, GDev.



  was:
The response SOAP message cannot be accessed outside the Stub class (extension of org.apache.axis2.client.Stub) generated by Axis2 Code generator for ADB or XMLBeans data binding (WSDL2Java). The below line of code gives an error:
serviceClient.getLastOperationContext().getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);

I am currently using a work-around. Adding the below line in the Stub after response message is received helps me rebuild the response object and make it accessible outside the Stub class:
_returnEnv.build();

Probably this fix should be added in the API itself.

Regards,
TAM Tenfold5, GDev.



    
> Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5202
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5202
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb, client-api, codegen, databinding
>    Affects Versions: 1.6.0
>         Environment: axis2 version is 1.6.0. 
>            Reporter: TAM Tenfold5
>
> The response SOAP message cannot be accessed outside the Stub class (extension of org.apache.axis2.client.Stub) generated by Axis2 Code generator for ADB or XMLBeans data binding (WSDL2Java). The below line of code gives an error:
> serviceClient.getLastOperationContext().getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
> I am currently using a work-around. Adding the below line in the Stub after response message is received helps me rebuild the response object and make it accessible outside the Stub class:
> _returnEnv.build();
> Probably this fix should be added in the API itself.
> I have seen this issue in the STubs generated for ADB and XMLBeans data binding.
> Regards,
> TAM Tenfold5, GDev.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (AXIS2-5202) Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding

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

TAM Tenfold5 commented on AXIS2-5202:
-------------------------------------

Kishanthan, I agree that the error is due to pull parsing feature of AXIOM because of which Response MessageContext object cannot be repopulated outside Stub class. But what other solution do you suggest to make Response MessageContext object usable outside a stub? Is their a specific reason for making SOAP response message usable only inside the Stub class?

Regards,
TAM Tenfold5, GDev. 
                
> Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5202
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5202
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb, client-api, codegen, databinding
>    Affects Versions: 1.6.0
>         Environment: axis2 version is 1.6.0. 
>            Reporter: TAM Tenfold5
>
> The response SOAP message cannot be accessed outside the Stub class (extension of org.apache.axis2.client.Stub) generated by Axis2 Code generator for ADB or XMLBeans data binding (WSDL2Java). The below line of code gives an error:
> serviceClient.getLastOperationContext().getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
> I am currently using a work-around. Adding the below line in the Stub after response message is received helps me rebuild the response object and make it accessible outside the Stub class:
> _returnEnv.build();
> Probably this fix should be added in the API itself.
> I have seen this issue in the STubs generated for ADB and XMLBeans data binding.
> Regards,
> TAM Tenfold5, GDev.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Resolved] (AXIS2-5202) Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding

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

Sagara Gunathunga  resolved AXIS2-5202.
---------------------------------------

    Resolution: Not A Problem

Number of workarounds provided within the thread.  
                
> Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5202
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5202
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb, client-api, codegen, databinding
>    Affects Versions: 1.6.0
>         Environment: axis2 version is 1.6.0. 
>            Reporter: TAM Tenfold5
>
> The response SOAP message cannot be accessed outside the Stub class (extension of org.apache.axis2.client.Stub) generated by Axis2 Code generator for ADB or XMLBeans data binding (WSDL2Java). The below line of code gives an error:
> serviceClient.getLastOperationContext().getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
> I am currently using a work-around. Adding the below line in the Stub after response message is received helps me rebuild the response object and make it accessible outside the Stub class:
> _returnEnv.build();
> Probably this fix should be added in the API itself.
> I have seen this issue in the STubs generated for ADB and XMLBeans data binding.
> Regards,
> TAM Tenfold5, GDev.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (AXIS2-5202) Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding

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

Kishanthan Thangarajah commented on AXIS2-5202:
-----------------------------------------------

This is because how the AXIOM, the object model used by AXIS2, works. This model is based on pull parsing. So the SOAP message will not be build in memory until a requests comes to it. This was the basic requirement to deal with memory efficiency. As you can see from the generated stub, it will not try to build the xml object, rather it will just read it to create the return object type. In this case, what you have suggested is a workaround to tell the SOAP Envelop to build it self before returning.

AFAIK, I don't think this change should go to the API. Because this is how the axiom is designed [1] to work with axis2. 

Thanks,
Kishanthan.
[1] http://ws.apache.org/axiom/userguide/ch01.html
                
> Response MessageContext not accessible outside web-service stub generated using Axis2 Code generator for ADB or XMLBeans data binding
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5202
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5202
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb, client-api, codegen, databinding
>    Affects Versions: 1.6.0
>         Environment: axis2 version is 1.6.0. 
>            Reporter: TAM Tenfold5
>
> The response SOAP message cannot be accessed outside the Stub class (extension of org.apache.axis2.client.Stub) generated by Axis2 Code generator for ADB or XMLBeans data binding (WSDL2Java). The below line of code gives an error:
> serviceClient.getLastOperationContext().getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
> I am currently using a work-around. Adding the below line in the Stub after response message is received helps me rebuild the response object and make it accessible outside the Stub class:
> _returnEnv.build();
> Probably this fix should be added in the API itself.
> I have seen this issue in the STubs generated for ADB and XMLBeans data binding.
> Regards,
> TAM Tenfold5, GDev.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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