axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nadir amra (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AXIS2-3017) WSDL generation error - lowercasing 1st char in element names
Date Thu, 26 Jul 2007 01:27:31 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-3017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

nadir amra updated AXIS2-3017:
------------------------------

    Attachment: ConvertTemp.zip

I hava attached a very simple POJO service to illustrate the problem.  When a client tried
to invoke the service, the response returned is simply: 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
   <ns:converttempResponse xmlns:ns="http://generate.com">
  <ns:return xmlns:ax22="http://generate.com/xsd" type="com.generate.CONVERTTEMPResult"
/> 
  </ns:converttempResponse>
  </soapenv:Body>
  </soapenv:Envelope>

However, if I change the methods to settEMPIN and gettEMPIN and settEMPOUT and gettEMPOUT,
a valid response is returned. 

So when a WSDL is generated by AXIS2, I suspect that AXIS2 calls JavaUtils.xmlNameToJavaIdentifier,
which lowercases the first character.  However, when AXIS2 receives the response, it attempts
to look for settEMPIN, etc.  

I do not know what the proper fix would be.  We can either NOT lowercase the character for
POJO, or most likely attempt to look for settEMPIN and if not found, look for setTEMPIN. 


I hope this gets in 1.3, because I believe this is critical.

> WSDL generation error - lowercasing 1st char in element names
> -------------------------------------------------------------
>
>                 Key: AXIS2-3017
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3017
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>            Reporter: nadir amra
>         Attachments: ConvertTemp.zip
>
>
> Here is the problem.  I deploy a POJO and when AXIS2 (using nightly build 
> 2007/07/25) automatically generated WSDL via ?wsdl it produces a WSDL file 
> the includes the following:
> <xs:complexType name="CONVERTTEMPInput">
>       <xs:sequence>
>                 <xs:element minOccurs="0" name="tEMPIN" nillable="true"  type="xs:string"/>
>                 <xs:element minOccurs="0" name="tEMPOUT" nillable="true" type="xs:string"/>
>       </xs:sequence>
> </xs:complexType>
> <xs:complexType name="CONVERTTEMPResult">
>       <xs:sequence>
>                 <xs:element minOccurs="0" name="tEMPIN" nillable="true" type="xs:string"/>
>                 <xs:element minOccurs="0" name="tEMPOUT" nillable="true" type="xs:string"/>
>       </xs:sequence>
> </xs:complexType>
> The problem is with the element names.  It seems that AXIS2 is lowercasing the "t" in
TEMPIN and TEMPOUT, which makes the service unusable. The CONVERTTEMPInput class is as follows:
> public class CONVERTTEMPInput implements Serializable
> {
>     private static final long serialVersionUID = -884605419035002637L;
>     public CONVERTTEMPInput() { }
>      public void setTEMPIN( String TEMPIN )
>      {
>       _TEMPIN = TEMPIN;
>      }
>      public String getTEMPIN( )
>      {
>        return _TEMPIN;
>      }
>      public void setTEMPOUT( String TEMPOUT )
>      {
>       _TEMPOUT = TEMPOUT;
>      }
>      public String getTEMPOUT( )
>      {
>        return _TEMPOUT;
>      }
>    private String _TEMPIN =  "";
>    private String _TEMPOUT =  "";
> }
> If I add an underscore prior to TEMPIN and TEMPOUT in the method names, things start
to work. 

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


Mime
View raw message