axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rodrigo Asensio" <>
Subject Re: Response a Custom XSD
Date Thu, 11 Dec 2008 18:05:05 GMT
I'm seeing the wikipedia article (
) and I saw something like I want, that means is not that crazy, now
my question is , how can I represent in the XML the attributes of an
having this obj for example

class Request {
  private Header header;  >>> would be the complex type
  private String method; >>> is represented as an xs:attribute.. HOW
can I make this ????

         <xs:element name="request">
                  <xs:element name="header" maxOccurs="unbounded">
                           <xs:extension base="xs:string">
                              <xs:attribute name="name"
type="xs:string" use="required"/>
                  <xs:element name="body" type="xs:anyType" minOccurs="0"/>
               <xs:attribute name="method" type="xs:string" use="required"/>
               <xs:attribute name="uri" type="xs:anyURI" use="required"/>

Rodrigo Asensio
"To err is human, but to really screw up requires the root password."

On Thu, Dec 11, 2008 at 3:35 PM, Rodrigo Asensio <> wrote:
> Axis2 141
> we are developing a ws based on our customer spec. He gave me a XSD
> and the response XML (inner the soap msg) should be in a specific way.
> I made it 100% using AXIOM OMElements because I didnt found a way to
> do the XS:ATTRIBUTES as is shown below.
>        <xs:element name="BigObject">
>                <xs:complexType>
>                        <xs:sequence>
>                                <xs:element ref="SmallObject1"/>
>                                <xs:element ref="SmallObject2" minOccurs="0"/>
>                                <xs:element ref="SmallObject3" minOccurs="0" maxOccurs="unbounded"/>
>                                <xs:element ref="SmallObject4" minOccurs="0" maxOccurs="unbounded"/>
>                        </xs:sequence>
>                        <xs:attribute name="Version" type="xs:string" use="optional"
>                        <xs:attribute name="UnitsOfMeasure" type="UnitsOfMeasure"
> use="optional" default="metric"/>
>                        <xs:attribute name="TrainingModeFlag" type="xs:boolean"
> use="optional" default="false"/>
>                </xs:complexType>
>        </xs:element>
> If I deploy a WS returning objects, how can I do that some attributes
> of the BigObject are shown like xs:attribute and not in the
> xs:sequence, is this possible or they are crazy asking me this ? is
> this standard ???
> Rodrigo Asensio
> "To err is human, but to really screw up requires the root password."

View raw message