axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reneta Säll (HF/EBC) <reneta.s...@ericsson.com>
Subject Axis2 XMLBeans,JAXB validation?
Date Tue, 27 Mar 2007 08:21:46 GMT
Hi all,
 
I am using Axis2  WSDL2Java and generate java classes from wsdl.
In the generated java classes I can't  see any validation code for patterns maping from my
schema.
I tried JAXB, XMLBean as binding options. 
 
How can I handle validation for restrictions when using JAXB or XMLBeans as a databinding
in Axis2?
Here is my schema file:
<?xml version="1.0" encoding="UTF-8"?>

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
attributeFormDefault="unqualified">

        <xs:element name="myElement">

            <xs:complexType>

                <xs:sequence>

                    <xs:element name="element1" minOccurs="0">

                            <xs:annotation>

                                <xs:documentation>Used as ID. Account code</xs:documentation>

                            </xs:annotation>

                            <xs:simpleType>

                                <xs:restriction base="xs:string">

                                        <xs:pattern value="^((([1-9][0-9]{0,14},)|([1-9][0-9]{0,14}-[1-9][0-9]{0,14},))*([1-9][0-9]{0,14}|([1-9][0-9]{0,14}-[1-9][0-9]{0,14})))$|^([Aa][Ll][Ll])$|^([>][1-9][0-9]{0,14})$"/>

                               </xs:restriction>

                            </xs:simpleType>

                </xs:element>

            </xs:sequence>

        </xs:complexType>

    </xs:element>

    <xs:element name="myElement1">

        <xs:complexType>

                <xs:sequence>

                        <xs:element ref="tns:myElement" minOccurs="0" maxOccurs="4000"/>

                </xs:sequence>

        </xs:complexType>

    </xs:element>

</xs:schema>

Reneta 


Mime
View raw message