Hi, 
Is there any way to force that minOccurs=1 instead of minOccurs=0 in wsdl?
Unfortunately @WebParam annotation doesn't contain "required" attribute.

I'm using CXF 2.0.4 with 
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
             use = SOAPBinding.Use.LITERAL,
             parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)

I have following interface:

    boolean hasAccess(
            @WebParam(name = "application")
            final String applicationID,
            @WebParam(name = "id")
            final String userID,
            @WebParam(name = "item")
            final String itemID,
            @WebParam(name = "asset")
            final String assetID) ;

And there is generated following wsdl:

    <xs:element name="hasAccess" type="hasAccess"/>
    <xs:complexType name="hasAccess">
        <xs:sequence>
            <xs:element minOccurs="0" name="application" type="xs:string"/>
            <xs:element minOccurs="0" name="id" type="xs:string"/>
            <xs:element minOccurs="0" name="item" type="xs:string"/>
            <xs:element minOccurs="0" name="asset" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>

I think that one solution is to add @RequestWrapper, but it would require
creating JavaBeans for all web service methods, what is not nice. Is there
any better solution?

Thanks,
Wojtek
-- 
View this message in context: 
http://www.nabble.com/Problem-with-minOccurs-tp18382936p18382936.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to