I want to create a service where the client method signatures are simple i.e.

boolean addFreeTextPredicateRequest(String predicate);

so I define the following in the service XSD:


<xs:element name="addFreeTextPredicateRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="predicate" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addFreeTextPredicateResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>

And then define the endpoint in spring-ws-servlet as:

<bean name="endpointMapping" class="org.springframework.ws.server.endpoint.mapp ing.PayloadRootQNameEndpointMapping">
<property name="mappings">
<props>
<prop key="{http://my/namespace}addFreeTextPredicateRequest">myEndpoint</prop>
</props>
</property>
</bean>

But when I generate a client from this WSDL, I get:


@WebMethod
@WebResult(name = "addFreeTextPredicateResponse", targetNamespace = "http://my/namespace", partName = "addFreeTextPredicateResponse")
public AddFreeTextPredicateResponse addFreeTextPredicate(
@WebParam(name = "addFreeTextPredicateRequest", targetNamespace = "http://my/namespace", partName = "addFreeTextPredicateRequest")
AddFreeTextPredicateRequest addFreeTextPredicateRequest);

So the user has to do

AddFreeTextPredicateRequest req = new AddFreeTextPredicateRequest();
req.setPredicate("something");
if (port.addFreeTextPredicate(req).getReturn()) {
}

instead of just:

if (port.addFreeTextPredicate("something")) {
}

How can I configure my XSD / servlet / endpoint config to simplify things for my users?

Thank you for your assistance.