CXF
  1. CXF
  2. CXF-4104

wsdl2java generates Wrapped async method for Bare

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.2.10
    • Fix Version/s: Invalid
    • Component/s: Core, Tooling
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      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.

      Is it a known issue? Do we have workaround? thanks.

      Please see test below:

      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>
      
      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
          );
      }
      

      David

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            David Liu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development