You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Guus Gerrits (JIRA)" <ax...@ws.apache.org> on 2005/06/07 16:48:41 UTC

[jira] Commented: (AXIS-119) WSDL2Java doesn't honor restrictions in schema

    [ http://issues.apache.org/jira/browse/AXIS-119?page=comments#action_12312892 ] 

Guus Gerrits commented on AXIS-119:
-----------------------------------

I am facing the same problems.
I defined following simple wsString to make sure that no empty-""-Strings are sent into the Webservice. Also there is a limit of 4000 for the max. Databasefieldsize:

<xs:simpleType name="wsString">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="4000"/>
    </xs:restriction>
 </xs:simpleType>

Using the classes generated with axis-wsdl2java I couldnot get these restrictions to work. Just being mapped onto String and that's it. Ok I have to make some other checks at the serverside anyways, but  it would have been nice to have the basics done in front of that.

Searching the Web did not give me much clues. Finally I found this "Issue" saying enumeration-facets only. ;-(
But looking into  the JAX-RPC 1.1 Final (JSR101), the TABLE 18-1 "XML Schema support in JAX-RPC specification" defines all facets as required:
"Derivation of new simple types by restriction of an existing simple type"
 --> Required

"Facets used with restriction element": Refer XML Schema Part 2:
Datatypes for details on the facets
 --> Required


I am not familiar with the current work being done on Axis/Wsdl/Xml specs and projectdevelopments, so maybe this is just a non-issue (anymore).
Any suggestions?

Thanks.

> WSDL2Java doesn't honor restrictions in schema
> ----------------------------------------------
>
>          Key: AXIS-119
>          URL: http://issues.apache.org/jira/browse/AXIS-119
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: beta-2
>  Environment: Operating System: Windows NT/2K
> Platform: PC
>     Reporter: Joe Riess
>     Assignee: Axis Developers Mailing List

>
> The Java bean class which is generated via WSDL2Java using the following WSDL 
> schema section:
> <wsdl:schema targetNamespace="http://www.lexisnexis.com/SimpleRestriction">
>   <xsd:simpleType name="simpleRestrictionType">
>     <xsd:restriction base="xsd:integer">
>       <xsd:minInclusive value="1" /> 
>       <xsd:maxInclusive value="10" /> 
>     </xsd:restriction>
>   </xsd:simpleType>
> </wsdl:schema>
> does not contain any range checking with regards to the minInclusive and 
> maxInclusive values.  The bean class accepts any valid integer value which is 
> contradictive to the schema.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira