views:

23

answers:

1

I'm using Axis2 and Eclipse to create my webservice. I have created my schema object to be included in the WSDL, but I don't want some fields to be included in this process.

Reason is that these same objects will be persisted in database using hibernate. I added transient into the field class declaration but I'm still seeing the field in the WSDL!!!

Is there a way to prevent certain fields from being included in the WSDL?

Thank you.

+1  A: 

Use excludeProperties in services.xml

<parameter name="beanPropertyRules">
    <bean class="sample.Address" excludeProperties="street,number" />
    <bean class="sample.AddressParent" excludeProperties="zipcode" />
</parameter>

See http://wso2.org/library/2893

Snekse