tags:

views:

44

answers:

0

I'm using CXF Java2WS to generate WSDL from my java code.

I want to define that myEntity argument to the web service is mandatory - that CXF will generate the WSDL with minOccurs="1". I didn't find any annotation that do this.

@WebService 
public interface MyWebService {
 public int helloWorld(@WebParam(name="myEntity") MyEntity myEntity);
}

Desired [part of] WSDL:

<xs:complexType name="helloWorld">
    <xs:sequence>
        <xs:element minOccurs="1" name="myEntity" type="tns:myEntity"/>
    </xs:sequence>
</xs:complexType>