title: CXF Unmarshalling Error when calling a service in non-wrapper style
body: <p>I am developing a web service from a WSDL using CXF and I want to be able to run test sample requests using JUnit.</p>
  
  <p>My Test class creates a mock server, then acts as a client to test the server.</p>
  
  <p>I don't understand why I keep getting <code>Unmarshalling Error: unexpected element</code> exceptions.</p>
  
  <p>I isolated the issue into a minimal project, but even this didn't help. I'm convinced that the problem comes from some stupid mistake I have done... It's been two days and I can't find it...</p>
  
  <p>The error message is: <code>org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (uri:"http://my.project.service", local:"myProperty"). Expected elements are &lt;{http://my.project.service}myObject&gt;</code></p>
  
  <p>It's like if it was expecting an other <code>myObject</code> element inside <code>myObject</code>... Everything is generated using CXF, why wouldn't it be able to unmarshal something that it just marshalled a few milliseconds ago?</p>
  
  <p>I tried soap 1.1 / 1.2, I tried different versions of CXF up to 3.0.5, I tried playing with the namespaces, but it is always the same error.</p>
  
  <p>Here is the entire content of the minimal project that reproduces the error:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" ?&gt;
  &lt;definitions targetNamespace="http://my.project.service"
    xmlns="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:tns="http://my.project.service"&gt;
  
    &lt;types&gt;
      &lt;xsd:schema attributeFormDefault="qualified"
        elementFormDefault="qualified" targetNamespace="http://my.project.service"
        xmlns:tns="http://my.project.service" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
        &lt;xsd:complexType name="MyObject"&gt;
          &lt;xsd:sequence&gt;
            &lt;xsd:element name="myProperty" type="xsd:string" /&gt;
          &lt;/xsd:sequence&gt;
        &lt;/xsd:complexType&gt;
        &lt;xsd:element name="MyOperationRequest"&gt;
          &lt;xsd:complexType&gt;
            &lt;xsd:sequence&gt;
              &lt;xsd:element name="myObject" type="tns:MyObject" /&gt;
            &lt;/xsd:sequence&gt;
          &lt;/xsd:complexType&gt;
        &lt;/xsd:element&gt;
        &lt;xsd:element name="MyOperationResponse"&gt;
          &lt;xsd:complexType&gt;
            &lt;xsd:sequence&gt;
              &lt;xsd:element name="myMessage" type="xsd:string" /&gt;
            &lt;/xsd:sequence&gt;
          &lt;/xsd:complexType&gt;
        &lt;/xsd:element&gt;
      &lt;/xsd:schema&gt;
    &lt;/types&gt;
    &lt;message name="MyOperationResponse"&gt;
      &lt;part element="tns:MyOperationResponse" name="parameters" /&gt;
    &lt;/message&gt;
    &lt;message name="MyOperationRequest"&gt;
      &lt;part element="tns:MyOperationRequest" name="parameters" /&gt;
    &lt;/message&gt;
    &lt;portType name="MyServicePortType"&gt;
      &lt;operation name="MyOperation"&gt;
        &lt;input message="tns:MyOperationRequest" name="MyOperationRequest" /&gt;
        &lt;output message="tns:MyOperationResponse" name="MyOperationResponse" /&gt;
      &lt;/operation&gt;
    &lt;/portType&gt;
    &lt;binding name="MyServiceBinding" type="tns:MyServicePortType"&gt;
      &lt;soap12:binding style="document"
        transport="http://schemas.xmlsoap.org/soap/http" /&gt;
      &lt;operation name="MyOperation"&gt;
        &lt;soap12:operation soapAction="" style="document" /&gt;
        &lt;input name="MyOperationRequest"&gt;
          &lt;soap12:body parts="parameters" use="literal" /&gt;
        &lt;/input&gt;
        &lt;output name="MyOperationResponse"&gt;
          &lt;soap12:body parts="parameters" use="literal" /&gt;
        &lt;/output&gt;
      &lt;/operation&gt;
    &lt;/binding&gt;
    &lt;service name="MyService"&gt;
      &lt;port binding="tns:MyServiceBinding" name="MyServicePort"&gt;
        &lt;soap12:address location="http://my-server:my-port/" /&gt;
      &lt;/port&gt;
    &lt;/service&gt;
  &lt;/definitions&gt;
  </code></pre>
  
  <p>The <code>pom.xml</code> for dependencies:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
  
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;groupId&gt;my.project&lt;/groupId&gt;
    &lt;artifactId&gt;project&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
  
    &lt;name&gt;My project&lt;/name&gt;
    &lt;description&gt;My project description&lt;/description&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;commons-logging&lt;/groupId&gt;
        &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
        &lt;version&gt;1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
        &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
        &lt;scope&gt;provided&lt;/scope&gt;
        &lt;version&gt;2.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;4.11&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
        &lt;artifactId&gt;cxf-rt-frontend-jaxws&lt;/artifactId&gt;
        &lt;version&gt;2.5.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
        &lt;artifactId&gt;cxf-rt-transports-http-jetty&lt;/artifactId&gt;
        &lt;version&gt;2.5.1&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.0&lt;/version&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
          &lt;artifactId&gt;cxf-codegen-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.5.1&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;generate-sources&lt;/id&gt;
              &lt;phase&gt;generate-sources&lt;/phase&gt;
              &lt;configuration&gt;
                &lt;sourceRoot&gt;${project.build.directory}/generated-sources/java&lt;/sourceRoot&gt;
                &lt;wsdlOptions&gt;
                  &lt;wsdlOption&gt;
                    &lt;wsdl&gt;${project.basedir}/src/main/resources/wsdl/my-service.wsdl&lt;/wsdl&gt;
                    &lt;extraargs&gt;
                      &lt;extraarg&gt;-p&lt;/extraarg&gt;
                      &lt;extraarg&gt;http://my.project.service=my.project.service&lt;/extraarg&gt;
                    &lt;/extraargs&gt;
                  &lt;/wsdlOption&gt;
                &lt;/wsdlOptions&gt;
              &lt;/configuration&gt;
              &lt;goals&gt;
                &lt;goal&gt;wsdl2java&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>The implementation:</p>
  
  <pre class="lang-java prettyprint-override"><code>package my.project.service;
  
  @javax.jws.WebService(serviceName = "MyService", portName = "MyServicePort",
      targetNamespace = "http://my.project.service",
      wsdlLocation = "src/main/resources/wsdl/my-service.wsdl",
      endpointInterface = "my.project.service.MyServicePortType")
  public class MyServicePortTypeImpl implements MyServicePortType {
  
    public my.project.service.MyOperationResponse myOperation(MyOperationRequest parameters) {
      MyOperationResponse myOperationResponse = new MyOperationResponse();
      myOperationResponse.setMyMessage("YOUPI!");
      return myOperationResponse;
    }
  
  }
  </code></pre>
  
  <p>The test class:</p>
  
  <pre class="lang-java prettyprint-override"><code>package my.project.test;
  
  import java.io.FileNotFoundException;
  import java.io.IOException;
  import java.net.MalformedURLException;
  import java.net.URL;
  
  import javax.xml.namespace.QName;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.apache.cxf.endpoint.Endpoint;
  import org.apache.cxf.endpoint.Server;
  import org.apache.cxf.frontend.ServerFactoryBean;
  import org.apache.cxf.interceptor.LoggingInInterceptor;
  import org.apache.cxf.interceptor.LoggingOutInterceptor;
  import org.junit.AfterClass;
  import org.junit.BeforeClass;
  import org.junit.Test;
  
  import my.project.service.MyService;
  import my.project.service.MyServicePortTypeImpl;
  import my.project.service.MyObject;
  import my.project.service.ObjectFactory;
  import my.project.service.MyServicePortType;
  import my.project.service.MyOperationRequest;
  import my.project.service.MyOperationResponse;
  
  public class MyWebServiceClientTest {
  
    private static final Log LOG = LogFactory.getLog(MyWebServiceClientTest.class);
  
    private static Server myMockServer;
  
    private static final String MY_MOCK_SERVICE_ADDRESS = "http://localhost:9091/MyService";
    private static final String MY_WSDL_FILE_PATH = "classpath:wsdl/my-service.wsdl";
    private static final String MY_NAMESPACE = "http://my.project.service";
    private static final QName MY_SERVICE_QNAME = new QName(MY_NAMESPACE, "MyService");
    private static final QName MY_SERVICE_PORT_QNAME = new QName(MY_NAMESPACE, "MyServicePort");
  
    public static Server createMockServer(String mockWebServiceAddress, boolean logging) {
      ServerFactoryBean serverFactoryBean = new ServerFactoryBean();
      serverFactoryBean.setAddress(mockWebServiceAddress);
      serverFactoryBean.setServiceClass(MyServicePortTypeImpl.class);
      serverFactoryBean.setWsdlLocation(MY_WSDL_FILE_PATH);
      serverFactoryBean.setServiceName(MY_SERVICE_QNAME);
      serverFactoryBean.setEndpointName(MY_SERVICE_PORT_QNAME);
      Server server = serverFactoryBean.create();
  
      if (logging) {
        Endpoint endpoint = server.getEndpoint();
        LoggingInInterceptor loggingInInterceptor = new LoggingInInterceptor();
        loggingInInterceptor.setPrettyLogging(true);
        endpoint.getBinding().getInInterceptors().add(loggingInInterceptor);
        LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor();
        loggingOutInterceptor.setPrettyLogging(true);
        endpoint.getBinding().getOutInterceptors().add(loggingOutInterceptor);
      }
  
      return server;
    }
  
    @BeforeClass
    public static void setUp() throws FileNotFoundException, IOException {
      myMockServer = createMockServer(MY_MOCK_SERVICE_ADDRESS, true);
      LOG.info("Starting my mock server on " + MY_MOCK_SERVICE_ADDRESS);
      myMockServer.start();
    }
  
    @AfterClass
    public static void tearDown() {
      try {
        if (myMockServer != null) {
          LOG.info("Stopping my mock server");
          myMockServer.stop();
        }
      } catch (Throwable t) {
        LOG.error("Could not stop my mock server: ", t);
      }
    }
  
    @Test
    public void testMedwsClientSOAPCallWorks() {
  
      URL wsdlURL = null;
      try {
        wsdlURL = new URL(MY_MOCK_SERVICE_ADDRESS + "?wsdl");
      } catch (MalformedURLException e) {
        LOG.error("Could not create the URL for MED WSDL", e);
        return;
      }
      MyService myService = new MyService(wsdlURL, MY_SERVICE_QNAME);
      MyServicePortType port = myService.getMyServicePort();  
  
      LOG.info("Invoking myOperation...");
      MyOperationRequest myOperationRequest = new MyOperationRequest();
      ObjectFactory objectFactory = new ObjectFactory();
      MyObject myObject = objectFactory.createMyObject();
      myObject.setMyProperty("Go go go!");
      myOperationRequest.setMyObject(myObject);
      MyOperationResponse myOperationResponse = port.myOperation(myOperationRequest);
      LOG.info(myOperationResponse.getMyMessage());
  
    }
  }
  </code></pre>
  
  <p>And the trace:</p>
  
  <pre><code>31 juil. 2015 17:55:38 org.apache.cxf.service.factory.ReflectionServiceFactoryBean checkServiceClassAnnotations
  ATTENTION: A JAX-WS Annotation was found on my.project.service.MyServicePortTypeImpl while using the Simple frontend.  For better results, use the JAX-WS frontend.
  31 juil. 2015 17:55:38 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
  INFO: Creating Service {http://my.project.service}MyService from WSDL: classpath:wsdl/my-service.wsdl
  31 juil. 2015 17:55:39 org.apache.cxf.endpoint.ServerImpl initDestination
  INFO: Setting the server's publish address to be http://localhost:9091/MyService
  2015-07-31 17:55:39.054:INFO:oejs.Server:jetty-7.5.3.v20111011
  2015-07-31 17:55:39.085:INFO:oejs.AbstractConnector:Started SelectChannelConnector@localhost:9091 STARTING
  2015-07-31 17:55:39.101:INFO:oejsh.ContextHandler:started o.e.j.s.h.ContextHandler{,null}
  2015-07-31 17:55:39 INFO  MyWebServiceClientTest:73 - Starting my mock server on http://localhost:9091/MyService
  31 juil. 2015 17:55:39 org.apache.cxf.services.MyService.MyServicePort.MyServicePortType
  INFO: Inbound Message
  ----------------------------
  ID: 1
  Address: http://localhost:9091/MyService?wsdl
  Encoding: UTF-8
  Http-Method: GET
  Content-Type: text/xml
  Headers: {Accept=[*/*], Cache-Control=[no-cache], connection=[keep-alive], content-type=[text/xml], Host=[localhost:9091], Pragma=[no-cache], User-Agent=[Apache CXF 2.5.1]}
  --------------------------------------
  31 juil. 2015 17:55:39 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
  INFO: Creating Service {http://my.project.service}MyService from WSDL: http://localhost:9091/MyService?wsdl
  2015-07-31 17:55:39 INFO  MyWebServiceClientTest:102 - Invoking myOperation...
  31 juil. 2015 17:55:39 org.apache.cxf.services.MyService.MyServicePort.MyServicePortType
  INFO: Inbound Message
  ----------------------------
  ID: 2
  Address: http://localhost:9091/MyService
  Encoding: UTF-8
  Http-Method: POST
  Content-Type: application/soap+xml; charset=UTF-8
  Headers: {Accept=[*/*], Cache-Control=[no-cache], connection=[keep-alive], Content-Length=[237], content-type=[application/soap+xml; charset=UTF-8], Host=[localhost:9091], Pragma=[no-cache], User-Agent=[Apache CXF 2.5.1]}
  Payload: &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"&gt;
    &lt;soap:Body&gt;
      &lt;MyOperationRequest xmlns="http://my.project.service"&gt;
        &lt;myObject&gt;
          &lt;myProperty&gt;Go go go!&lt;/myProperty&gt;
        &lt;/myObject&gt;
      &lt;/MyOperationRequest&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  
  --------------------------------------
  31 juil. 2015 17:55:39 org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
  ATTENTION: Interceptor for {http://my.project.service}MyService#{http://my.project.service}MyOperation has thrown exception, unwinding now
  org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (uri:"http://my.project.service", local:"myProperty"). Expected elements are &lt;{http://my.project.service}myObject&gt; 
    at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:823)
    at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:644)
    at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
    at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:260)
    at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
    at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:323)
    at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:289)
    at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:942)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:878)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
    at org.eclipse.jetty.server.Server.handle(Server.java:345)
    at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
    at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:52)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
    at java.lang.Thread.run(Thread.java:662)
  Caused by: javax.xml.bind.UnmarshalException
   - with linked exception:
  [javax.xml.bind.UnmarshalException: unexpected element (uri:"http://my.project.service", local:"myProperty"). Expected elements are &lt;{http://my.project.service}myObject&gt;]
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:434)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:371)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:348)
    at org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:784)
    at org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:96)
    at org.apache.cxf.jaxb.JAXBEncoderDecoder$1.run(JAXBEncoderDecoder.java:812)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:810)
    ... 25 more
  Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://my.project.service", local:"myProperty"). Expected elements are &lt;{http://my.project.service}myObject&gt;
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:662)
    at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:258)
    at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:253)
    at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:120)
    at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:105)
    at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:251)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:498)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:480)
    at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:247)
    at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:369)
    ... 31 more
  Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://my.project.service", local:"myProperty"). Expected elements are &lt;{http://my.project.service}myObject&gt;
    ... 42 more
  31 juil. 2015 17:55:39 org.apache.cxf.binding.soap.interceptor.Soap12FaultOutInterceptor$Soap12FaultOutInterceptorInternal handleMessage
  INFO: class org.apache.cxf.binding.soap.interceptor.Soap12FaultOutInterceptor$Soap12FaultOutInterceptorInternalapplication/soap+xml
  2015-07-31 17:55:39 INFO  MyWebServiceClientTest:81 - Stopping my mock server
  2015-07-31 17:55:39.367:INFO:oejsh.ContextHandler:stopped o.e.j.s.h.ContextHandler{,null}
  </code></pre>
  
  <p>Sorry for the fuzziness, I'm willing to improve this question when I'll know more...</p>
  
  <p>Thank you for your time.</p>
  
  <p><strong>Edit 2015-08-18</strong>: In the wsdl, if I rename the element <code>MyOperationRequest</code> into <code>MyOperation</code> (the name of the operation), CXF will enable the wrapper style and the test will pass.</p>
  
  <p>My issue is that I cannot alter the wsdl, I need to make the mock service working with the wrapper style turned off.</p>
  
  <p><strong>Edit 2015-08-21</strong>: Setting the wsdl style as <code>rpc</code> allows me to bypass the problem, but this solution is not acceptable in my situation. Maybe I could alter the wsdl, but the request and the response structure must not change.</p>
  
  <p>I'm removing my solution (set the style to <code>rpc</code>).</p>