You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Volker Honds <Vo...@de.ibm.com> on 2007/06/07 18:09:50 UTC

[Axis2] Complex types with extension base and generated Axis2 classes (ADB)

Hi there,

I posted before but found no answer to my problem, perhaps someone has an
idea, because maybe this part is not
implemented in Axis2.

I am using Axis2 1.1.1. and running into problems using the generated Axis2
classes (via ADBBeans) from my xml schema.
I am using a WSDL which I can't change, but it uses probably unusual xsd
expression, however which is well formed.

By the way I tried Axis2 1.2 as well, but no change.



1. the following xsd snippet (see 2.) should express a xml document like:
--------------------------------------------------------------------------------------------------------------------

<attribute id="foo">bar</attribute>

comment: Okay, "attribute" is the element NAME which is given by the WSDL,
so please no blame on me ;-)

2. the xsd of the WSDL:
-------------------------------------
...
<xsd:element name="attribute" type="myns:AttributeType" minOccurs="0"
maxOccurs="unbounded"/>
...
<xsd:complexType name="AttributeType">
      <xsd:complexContent>
            <xsd:extension base="xsd:anyType">
                  <xsd:attribute name="id" type="xsd:anyURI"
use="required"/>
                  <xsd:anyAttribute processContents="lax"/>
            </xsd:extension>
      </xsd:complexContent>
</xsd:complexType>
...

So there is a xml element with name = "attribute" of type "AttributeType",
which is a complexType.
As I understand the xml element attribute "id" and the xml element content
should be of type anyURI. And additionally we can add some more element
attributes.

3. the generated Java class
-------------------------------------------

And here the problem:

The generated class has a getter and setter for the named element attribute
"id" - fine!
But there are no getter & setter for the xml element content !???!?!?!?!?!


public class AttributeType implements org.apache.axis2.databinding.ADBBean
{
...
protected org.apache.axis2.databinding.types.URI localId ;

/**
 * field for Id This was an Attribute!
 */
protected org.apache.axis2.databinding.types.URI localId;
/**
 * Auto generated getter method
 *
 * @return org.apache.axis2.databinding.types.URI
 */
public org.apache.axis2.databinding.types.URI getId() {
      return localId;
}
/**
 * Auto generated setter method
 *
 * @param param
 *            Id
 */
public void setId(org.apache.axis2.databinding.types.URI param) {
            this.localId = param;
}
...

But not getter and setter of object or URI for the content.


Perhaps someone can help - thanks a lot!!!


Kind regards
Volker



                                                                                   
 Volker Honds                                                                      
 IT Specialist              Gustav Heinemann Ufer                                  
 AS Delivery Application    120-122                                                
 Innovation                 50968 Köln                                             
 Global Business Services   Deutschland                                            
 (GBS)                                                                             
                                                                                   
                                                                                   
 IBM Deutschland GmbH                                                              
 Vorsitzender des                                                                  
 Aufsichtsrats: Hans Ulrich                                                        
 Maerki                                                                            
 Geschäftsführung: Martin                                                          
 Jetter (Vorsitzender),                                                            
 Rudolf Bauer, Christian                                                           
 Diedrich, Christoph                                                               
 Grandpierre,                                                                      
 Matthias Hartmann, Thomas                                                         
 Fell, Michael Diemer                                                              
 Sitz der Gesellschaft:                                                            
 Stuttgart                                                                         
 Registergericht:                                                                  
 Amtsgericht Stuttgart, HRB                                                        
 14562 WEEE-Reg.-Nr. DE                                                            
 99369940                                                                          
                                                                                   







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