Jibx2Wsdl (http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/jibx2wsdl)
is a more powerful and effective alternative to Java2Wsdl, even if you
don't want to use JiBX data binding for your service implementation. It
allows you to specify which properties (or fields) are or are not
included in the data representation for each data object (see the
http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/jibx2wsdl/customize
page for details - still not complete, but the includes="..." or
excludes="..." attributes described for the <class> element of the
customizations file will do what you want). You can also specify which
values are required or optional in the same sort of way. Also see the
article at http://www.infoq.com/articles/sosnoski-code-first for some
discussion of the whole code-first approach and an example using Jibx2Wsdl.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Gabriel Falkenberg wrote:
> Hi
>
> Is it possible to somehow fine tune the generation of WSDL files from code
> so that some properties of a Java Bean are not exposed in the corresponding
> complex type?
>
> Example
>
> A bean called Person has the attributes first name, last name and id. I
> would like to omit the id-attribute from the WSDL like this:
>
> <xs:complexType name="Person">
>     <xs:sequence>
>         <xs:element minOccurs="0" name="firstName" nillable="true"
> type="xs:string"/>
>         <xs:element minOccurs="0" name="lastName" nillable="true"
> type="xs:string"/>
>     </xs:sequence>
> </xs:complexType>
>
> On the way in the id attribute would get the default value null.
>
> Is this at all possible or do I have to keep the beans used in the interface
> "clean"?
>
> /Gabriel Falkenberg
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to