Announcement Announcement Module
No announcement yet.
XSD/config for simple method signature? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • XSD/config for simple method signature?

    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:element name="predicate" type="xs:string"/>
    <xs:element name="addFreeTextPredicateResponse">
    <xs:element name="return" type="xs:boolean"/>

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

    <bean name="endpointMapping" class=" ing.PayloadRootQNameEndpointMapping">
    <property name="mappings">
    <prop key="{http://my/namespace}addFreeTextPredicateRequest">myEndpoint</prop>

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

    @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();
    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.