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 vera_83 <ve...@abv.bg> on 2012/11/07 13:19:47 UTC

wsdl2java in axis-1_4 does not generate simpleType

Hello,

I'm using axis-1_4 and jdk 1.4. I'm trying to generate java classes from
wsdl file.
I'm executing: java org.apache.axis.wsdl.WSDL2Java -a -u -s -w
my_service.wsdl.
No error appears during the command execution but some java classes are
missing, for example:

<xsd:simpleType name="Int1_15">
                <xsd:annotation><xsd:documentation>Integer
(1-15)</xsd:documentation></xsd:annotation>
                <xsd:restriction base="xsd:long">
                    <xsd:minInclusive value="1"/>
                    <xsd:maxInclusive value="15"/>
                </xsd:restriction>
            </xsd:simpleType>

No class named Int1_15 is generated.

Can someone help me with that?

Thank you.
-- 
View this message in context: http://old.nabble.com/wsdl2java-in-axis-1_4-does-not-generate-simpleType-tp34651517p34651517.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: wsdl2java in axis-1_4 does not generate simpleType

Posted by Andreas Veithen <an...@gmail.com>.
This is actually the behavior required by the JAX-RPC 1.1
specification (see section 4.2.5):

"A simple type derived by restriction from another simple type,
referred to as its base type, is mapped to the same Java type that its
base type is mapped to. If its base type does not have a standard
JAX-RPC mapping (i.e. is unsupported), then the derived type itself is
unsupported."

In your case, Int1_15 should therefore be mapped to long.

I think that the rationale for this requirement is that restriction
relationships in XML Schema should be mapped to inheritance
relationships in Java. This is easy for complex types because a
complex type is mapped to a generated class which can be inherited. On
the other hand, simple types are mapped to primitive types, wrapper
types or String, and none of them can be inherited.

Andreas


On Wed, Nov 7, 2012 at 1:19 PM, vera_83 <ve...@abv.bg> wrote:
>
> Hello,
>
> I'm using axis-1_4 and jdk 1.4. I'm trying to generate java classes from
> wsdl file.
> I'm executing: java org.apache.axis.wsdl.WSDL2Java -a -u -s -w
> my_service.wsdl.
> No error appears during the command execution but some java classes are
> missing, for example:
>
> <xsd:simpleType name="Int1_15">
>                 <xsd:annotation><xsd:documentation>Integer
> (1-15)</xsd:documentation></xsd:annotation>
>                 <xsd:restriction base="xsd:long">
>                     <xsd:minInclusive value="1"/>
>                     <xsd:maxInclusive value="15"/>
>                 </xsd:restriction>
>             </xsd:simpleType>
>
> No class named Int1_15 is generated.
>
> Can someone help me with that?
>
> Thank you.
> --
> View this message in context: http://old.nabble.com/wsdl2java-in-axis-1_4-does-not-generate-simpleType-tp34651517p34651517.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>

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