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 william kinney <wi...@gmail.com> on 2007/03/02 16:11:57 UTC

Generated WSDL XSD from POJO, restricting complexType

Hello,

I was wondering if anyone could point me to any documenation on
altering the XSD of the autogenerated responseTypes when Axis2
generates a WSDL based on a simple POJO and Class.
For example, I have a simple POJO that has 3 string properties, which
is returned in my service method, but the XSD in the WSDL has this
format for the POJO:

<xs:complexType name="AuthorizedUser">
 <xs:sequence>
  <xs:element name="emailAddress" nillable="true" type="xs:string" />
  <xs:element name="jsessionId" nillable="true" type="xs:string" />
  <xs:element name="userName" nillable="true" type="xs:string" />
  </xs:sequence>
</xs:complexType>

Is it possible to alter the XSD autogenerated, to have
nillable="false", and have for example further restrictions like

<xs:pattern value="[a-z]"/>

?

I am running axis2-1.1.1 on Tomat 5.5, JDK 5.

Thanks,
William

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


Re: Generated WSDL XSD from POJO, restricting complexType

Posted by Jean-LucT <jl...@natsystem.fr>.


william kinney-2 wrote:
> 
> 
> Is it possible to alter the XSD autogenerated, to have
> nillable="false", and have for example further restrictions like
> 
> <xs:pattern value="[a-z]"/>
> 
> 

Hello, I'm new to Axis2, but from my understanding about this comment :
http://www.nabble.com/Schema-Validation-%28WAS%3A--axis2--Validating-Messages-%3A%3A-WSDL-%3A%3A-%3Cchoice%3E%29-tf1915767.html#a5244800
the answer is no. At least it is not a build in option.

I've seen from the cvs log that end of january 2007, the enumeration
restriction has been added to the build.
I've noticed that some people seemed to have been able to have it working
but with my own version it does not work as I'm using : Apache Axis2 1.1.1
build (January 9 2007) this seems to me normal.

-- 
View this message in context: http://www.nabble.com/Generated-WSDL-XSD-from-POJO%2C-restricting-complexType-tf3334122.html#a10058128
Sent from the Axis - User mailing list archive at Nabble.com.


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