wsdl2java generates Wrapped async method for Bare
-------------------------------------------------

                 Key: CXF-4104
                 URL: https://issues.apache.org/jira/browse/CXF-4104
             Project: CXF
          Issue Type: Bug
          Components: Core, Tooling
    Affects Versions: 2.2.10
            Reporter: David Liu


It looks like CXF 2.2.10 can only generate a wrapped async method when we set 
enableAsyncMapping. After I change enableWrapperStyle=false, it failed to 
generate Bare style Async method. Please see test below:

{code:title=binding.xml}
<jaxws:bindings wsdlLocation="http://localhost:7650/Calculator?wsdl";
                xmlns:jaxws="http://java.sun.com/xml/ns/jaxws";
                xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";
                xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
                xmlns:xs="http://www.w3.org/2001/XMLSchema";>

  <jaxws:bindings node="wsdl:definitions">
    <jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping>
    <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
  </jaxws:bindings>

</jaxws:bindings>
{code}

{code:title=generated HelloWorld.java}
@WebService(targetNamespace = "http://helloworld.webservice.com";, name = 
"HelloWorld")
@XmlSeeAlso({ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface HelloWorld {

    @WebMethod(operationName = "sayHello")
    public Response<test.client.generated.SayHelloResponse> sayHelloAsync(
        @WebParam(name = "name", targetNamespace = 
"http://helloworld.webservice.com";)
        java.lang.String name,
        @WebParam(name = "another", targetNamespace = 
"http://helloworld.webservice.com";)
        java.lang.String another,
        @WebParam(name = "timestamp", targetNamespace = 
"http://helloworld.webservice.com";)
        java.lang.String timestamp
    );

    @WebMethod(operationName = "sayHello")
    public Future<?> sayHelloAsync(
        @WebParam(name = "name", targetNamespace = 
"http://helloworld.webservice.com";)
        java.lang.String name,
        @WebParam(name = "another", targetNamespace = 
"http://helloworld.webservice.com";)
        java.lang.String another,
        @WebParam(name = "timestamp", targetNamespace = 
"http://helloworld.webservice.com";)
        java.lang.String timestamp,
        @WebParam(name = "asyncHandler", targetNamespace = "")
        AsyncHandler<test.client.generated.SayHelloResponse> asyncHandler
    );

    @WebResult(name = "sayHelloResponse", targetNamespace = 
"http://helloworld.webservice.com";, partName = "parameters")
    @WebMethod
    public SayHelloResponse sayHello(
        @WebParam(partName = "parameters", name = "sayHello", targetNamespace = 
"http://helloworld.webservice.com";)
        SayHello parameters
    );
}
{Code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to