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 "Glen Verran (JIRA)" <ji...@apache.org> on 2008/04/10 09:26:04 UTC

[jira] Created: (AXIS2-3723) AXIS2 is not aware of "is" methods when generating soap messages from JAXB java beans

AXIS2 is not aware of "is" methods when generating soap messages from JAXB java beans
-------------------------------------------------------------------------------------

                 Key: AXIS2-3723
                 URL: https://issues.apache.org/jira/browse/AXIS2-3723
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: databinding
    Affects Versions: nightly
         Environment: Win XP Pro, JDK 6_04, Tomcat 5.5.26, JAXB 2.1.6
            Reporter: Glen Verran
            Priority: Blocker
             Fix For: nightly


I have an XSD which contains an element of type xs:boolean.  This element is called "redirect".  I use JAXB 2.1.6 to generate the java beans from the XSD. 

The methods for the "redirect" variable in the java bean are isRedirect and setRedirect.

I created a web service with the method below:

  public RetrieveConfigurationDataResponse retrieveConfigurationData(RetrieveConfigurationDataRequest req) {
    RetrieveConfigurationDataResponse rsp = new RetrieveConfigurationDataResponse();
    rsp.setData("1234");
    rsp.setDataEncodingType(req.getDataEncodingType());
    rsp.setEchoData(req.getEchoData());
    rsp.setIdentifier(req.getIdentifier());
    rsp.setIdentifierType(req.getIdentifierType());
    rsp.setRedirect(Boolean.FALSE);
    rsp.setResponseCode("00");
    rsp.setRevision(req.getRevision());
    return rsp;
  }

Both the (RetrieveConfigurationDataRequest  and RetrieveConfigurationDataResponse are JAXB generated java beans.  The RetrieveConfigurationDataResponse class is the one that contains this redirect variable.  I generated the client code and went on to test this method to the web service.

I got the following AxisFault saying that it could not find the read method for "redirect".

Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.AxisFault: can not find read method for : redirect
	at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
	at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
	at com.traderoot.webservices.configurationdistribwebservice.ConfigurationDistribWebServiceStub.retrieveConfigurationData(ConfigurationDistribWebServiceStub.java:172)
	at Test.main(Test.java:23)

To confirm my assumptions, I went into the JAXB code and changed the isRedirect method to getRedirect.  This fault did not occure.

I do not consider this a workaround since JAXB classes are to be untouched.  It seems that AXIS2 is not looking for "is" methods when binding the java bean.

This is an absoluate blocker and prevents us from being able to use AXIS2.

-- 
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] Assigned: (AXIS2-3723) AXIS2 is not aware of "is" methods when generating soap messages from JAXB java beans

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

Deepal Jayasinghe reassigned AXIS2-3723:
----------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

> AXIS2 is not aware of "is" methods when generating soap messages from JAXB java beans
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3723
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: nightly
>         Environment: Win XP Pro, JDK 6_04, Tomcat 5.5.26, JAXB 2.1.6
>            Reporter: Glen Verran
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: nightly
>
>         Attachments: 20080522_00.diff
>
>
> I have an XSD which contains an element of type xs:boolean.  This element is called "redirect".  I use JAXB 2.1.6 to generate the java beans from the XSD. 
> The methods for the "redirect" variable in the java bean are isRedirect and setRedirect.
> I created a web service with the method below:
>   public RetrieveConfigurationDataResponse retrieveConfigurationData(RetrieveConfigurationDataRequest req) {
>     RetrieveConfigurationDataResponse rsp = new RetrieveConfigurationDataResponse();
>     rsp.setData("1234");
>     rsp.setDataEncodingType(req.getDataEncodingType());
>     rsp.setEchoData(req.getEchoData());
>     rsp.setIdentifier(req.getIdentifier());
>     rsp.setIdentifierType(req.getIdentifierType());
>     rsp.setRedirect(Boolean.FALSE);
>     rsp.setResponseCode("00");
>     rsp.setRevision(req.getRevision());
>     return rsp;
>   }
> Both the (RetrieveConfigurationDataRequest  and RetrieveConfigurationDataResponse are JAXB generated java beans.  The RetrieveConfigurationDataResponse class is the one that contains this redirect variable.  I generated the client code and went on to test this method to the web service.
> I got the following AxisFault saying that it could not find the read method for "redirect".
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.AxisFault: can not find read method for : redirect
> 	at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
> 	at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.traderoot.webservices.configurationdistribwebservice.ConfigurationDistribWebServiceStub.retrieveConfigurationData(ConfigurationDistribWebServiceStub.java:172)
> 	at Test.main(Test.java:23)
> To confirm my assumptions, I went into the JAXB code and changed the isRedirect method to getRedirect.  This fault did not occure.
> I do not consider this a workaround since JAXB classes are to be untouched.  It seems that AXIS2 is not looking for "is" methods when binding the java bean.
> This is an absoluate blocker and prevents us from being able to use AXIS2.

-- 
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] Updated: (AXIS2-3723) AXIS2 is not aware of "is" methods when generating soap messages from JAXB java beans

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

Glen Daniels updated AXIS2-3723:
--------------------------------

    Fix Version/s:     (was: nightly)
                   1.6

Targeting this at 1.6.

> AXIS2 is not aware of "is" methods when generating soap messages from JAXB java beans
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3723
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: nightly
>         Environment: Win XP Pro, JDK 6_04, Tomcat 5.5.26, JAXB 2.1.6
>            Reporter: Glen Verran
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.6
>
>         Attachments: 20080522_00.diff
>
>
> I have an XSD which contains an element of type xs:boolean.  This element is called "redirect".  I use JAXB 2.1.6 to generate the java beans from the XSD. 
> The methods for the "redirect" variable in the java bean are isRedirect and setRedirect.
> I created a web service with the method below:
>   public RetrieveConfigurationDataResponse retrieveConfigurationData(RetrieveConfigurationDataRequest req) {
>     RetrieveConfigurationDataResponse rsp = new RetrieveConfigurationDataResponse();
>     rsp.setData("1234");
>     rsp.setDataEncodingType(req.getDataEncodingType());
>     rsp.setEchoData(req.getEchoData());
>     rsp.setIdentifier(req.getIdentifier());
>     rsp.setIdentifierType(req.getIdentifierType());
>     rsp.setRedirect(Boolean.FALSE);
>     rsp.setResponseCode("00");
>     rsp.setRevision(req.getRevision());
>     return rsp;
>   }
> Both the (RetrieveConfigurationDataRequest  and RetrieveConfigurationDataResponse are JAXB generated java beans.  The RetrieveConfigurationDataResponse class is the one that contains this redirect variable.  I generated the client code and went on to test this method to the web service.
> I got the following AxisFault saying that it could not find the read method for "redirect".
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.AxisFault: can not find read method for : redirect
> 	at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
> 	at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.traderoot.webservices.configurationdistribwebservice.ConfigurationDistribWebServiceStub.retrieveConfigurationData(ConfigurationDistribWebServiceStub.java:172)
> 	at Test.main(Test.java:23)
> To confirm my assumptions, I went into the JAXB code and changed the isRedirect method to getRedirect.  This fault did not occure.
> I do not consider this a workaround since JAXB classes are to be untouched.  It seems that AXIS2 is not looking for "is" methods when binding the java bean.
> This is an absoluate blocker and prevents us from being able to use AXIS2.

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


[jira] Commented: (AXIS2-3723) AXIS2 is not aware of "is" methods when generating soap messages from JAXB java beans

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645199#action_12645199 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-3723:
-----------------------------------------------------

can you test this with a nightly build (which uses jaxbri 2.1.7) and attach the patch with the for current trunk.

> AXIS2 is not aware of "is" methods when generating soap messages from JAXB java beans
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3723
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: nightly
>         Environment: Win XP Pro, JDK 6_04, Tomcat 5.5.26, JAXB 2.1.6
>            Reporter: Glen Verran
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: nightly
>
>         Attachments: 20080522_00.diff
>
>
> I have an XSD which contains an element of type xs:boolean.  This element is called "redirect".  I use JAXB 2.1.6 to generate the java beans from the XSD. 
> The methods for the "redirect" variable in the java bean are isRedirect and setRedirect.
> I created a web service with the method below:
>   public RetrieveConfigurationDataResponse retrieveConfigurationData(RetrieveConfigurationDataRequest req) {
>     RetrieveConfigurationDataResponse rsp = new RetrieveConfigurationDataResponse();
>     rsp.setData("1234");
>     rsp.setDataEncodingType(req.getDataEncodingType());
>     rsp.setEchoData(req.getEchoData());
>     rsp.setIdentifier(req.getIdentifier());
>     rsp.setIdentifierType(req.getIdentifierType());
>     rsp.setRedirect(Boolean.FALSE);
>     rsp.setResponseCode("00");
>     rsp.setRevision(req.getRevision());
>     return rsp;
>   }
> Both the (RetrieveConfigurationDataRequest  and RetrieveConfigurationDataResponse are JAXB generated java beans.  The RetrieveConfigurationDataResponse class is the one that contains this redirect variable.  I generated the client code and went on to test this method to the web service.
> I got the following AxisFault saying that it could not find the read method for "redirect".
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.AxisFault: can not find read method for : redirect
> 	at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
> 	at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.traderoot.webservices.configurationdistribwebservice.ConfigurationDistribWebServiceStub.retrieveConfigurationData(ConfigurationDistribWebServiceStub.java:172)
> 	at Test.main(Test.java:23)
> To confirm my assumptions, I went into the JAXB code and changed the isRedirect method to getRedirect.  This fault did not occure.
> I do not consider this a workaround since JAXB classes are to be untouched.  It seems that AXIS2 is not looking for "is" methods when binding the java bean.
> This is an absoluate blocker and prevents us from being able to use AXIS2.

-- 
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] Updated: (AXIS2-3723) AXIS2 is not aware of "is" methods when generating soap messages from JAXB java beans

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

Wicus Ross updated AXIS2-3723:
------------------------------

    Attachment: 20080522_00.diff

We have tracked down the cause relating to the reported issue. It would seem that JAXB is not following the JavaBean specification. The following link, http://www.mojavelinux.com/blog/archives/2006/09/the_great_jaxb_api_blunder/, describes our situation. From the aforementioned URL you can follow https://jaxb.dev.java.net/issues/show_bug.cgi?id=131 for more details.
 
We will start in module ADB, which is the closest to the issue. Specifically method org.apache.axis2.databinding.utils.BeanUtil.getPullParser(...) +-line 128. The line reads as follows: BeanInfo beanInfo = Introspector.getBeanInfo(beanObject.getClass()); If you debug from here you will eventually hit the point of interest, java.beans.Introspector.getTargetProperty(...). Lines 537 through 567 (JDK6_04) is the focus point. Evidently the PropertyDescriptor (pd) readMethod (isXxx) will not be set if the resultType is of type java.lang.Boolean (lines 549 - 552, JDK6_04).
 
To address the issue we made a small modification to method org.apache.axis2.databinding.utils.BeanUtil.getPullParser(...). Please find attached diff (20080522_00.diff).

> AXIS2 is not aware of "is" methods when generating soap messages from JAXB java beans
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3723
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3723
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: nightly
>         Environment: Win XP Pro, JDK 6_04, Tomcat 5.5.26, JAXB 2.1.6
>            Reporter: Glen Verran
>            Priority: Blocker
>             Fix For: nightly
>
>         Attachments: 20080522_00.diff
>
>
> I have an XSD which contains an element of type xs:boolean.  This element is called "redirect".  I use JAXB 2.1.6 to generate the java beans from the XSD. 
> The methods for the "redirect" variable in the java bean are isRedirect and setRedirect.
> I created a web service with the method below:
>   public RetrieveConfigurationDataResponse retrieveConfigurationData(RetrieveConfigurationDataRequest req) {
>     RetrieveConfigurationDataResponse rsp = new RetrieveConfigurationDataResponse();
>     rsp.setData("1234");
>     rsp.setDataEncodingType(req.getDataEncodingType());
>     rsp.setEchoData(req.getEchoData());
>     rsp.setIdentifier(req.getIdentifier());
>     rsp.setIdentifierType(req.getIdentifierType());
>     rsp.setRedirect(Boolean.FALSE);
>     rsp.setResponseCode("00");
>     rsp.setRevision(req.getRevision());
>     return rsp;
>   }
> Both the (RetrieveConfigurationDataRequest  and RetrieveConfigurationDataResponse are JAXB generated java beans.  The RetrieveConfigurationDataResponse class is the one that contains this redirect variable.  I generated the client code and went on to test this method to the web service.
> I got the following AxisFault saying that it could not find the read method for "redirect".
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.AxisFault: can not find read method for : redirect
> 	at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
> 	at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.traderoot.webservices.configurationdistribwebservice.ConfigurationDistribWebServiceStub.retrieveConfigurationData(ConfigurationDistribWebServiceStub.java:172)
> 	at Test.main(Test.java:23)
> To confirm my assumptions, I went into the JAXB code and changed the isRedirect method to getRedirect.  This fault did not occure.
> I do not consider this a workaround since JAXB classes are to be untouched.  It seems that AXIS2 is not looking for "is" methods when binding the java bean.
> This is an absoluate blocker and prevents us from being able to use AXIS2.

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