title: How to get EclipseLink MOXy working in WebLogic in a JAX-WS based web service?
body: <p>I want to use EclipseLink in WebLogic 10.3.6.0 to host web-services using JAX-WS. This works perfectly in Tomcat.</p>
  
  <p>Environment:</p>
  
  <ul>
  <li>Java 1.6</li>
  <li>WebLogic 10.3.6.0</li>
  <li>EclipseLink 2.4.0.v20120608-r11652</li>
  <li>JAXWS 2.2.7-20120813</li>
  </ul>
  
  <p>WEB-INF/lib contains:</p>
  
  <ul>
  <li>eclipselink.jar</li>
  <li>FastInfoset.jar</li>
  <li>gmbal-api-only.jar</li>
  <li>ha-api.jar</li>
  <li>javax.annotation.jar</li>
  <li>jaxb-api.jar</li>
  <li>jaxb-impl.jar</li>
  <li>jaxb-xjc.jar</li>
  <li>jaxws-api.jar</li>
  <li>jaxws-eclipselink-plugin.jar</li>
  <li>jaxws-rt.jar</li>
  <li>jaxws-tools.jar</li>
  <li>jsr181-api.jar</li>
  <li>mail.jar</li>
  <li>management-api.jar</li>
  <li>mimepull.jar</li>
  <li>policy.jar</li>
  <li>saaj-api.jar</li>
  <li>saaj-impl.jar</li>
  <li>stax-ex.jar</li>
  <li>stax2-api.jar</li>
  <li>streambuffer.jar</li>
  <li>woodstox-core-asl.jar</li>
  </ul>
  
  <p>My code is as follows:</p>
  
  <p>TestRequestDTO.java</p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  @XmlRootElement(name = "test_request")
  public class TestRequestDTO implements Serializable {
      @XmlPath("request/name/text()")
      private String requestName;
      @XmlPath("request/value/text()")
      private String requestValue;
      //getter setters
  }
  </code></pre>
  
  <p>TestResponseDTO.java</p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  @XmlRootElement(name = "test_response")
  public class TestResponseDTO implements Serializable {
      @XmlPath("response/name/text()")
      private String responseName;
      @XmlPath("response/value/text()")
      private String responseValue;
      //getter setters
  }
  </code></pre>
  
  <p>The Service: SampleTest.java</p>
  
  <pre><code>@WebService
  public class SampleTest {
      @WebMethod
      public TestResponseDTO fetchResponse(TestRequestDTO request) {
          System.out.println("request.getRequestName()" + request.getRequestName());
          System.out.println("request.getRequestValue()" + request.getRequestValue());
          TestResponseDTO response = new TestResponseDTO();
          response.setResponseName("Service Response");
          response.setResponseValue(new Date().toString());
          return response;
      }
  }
  </code></pre>
  
  <p>Perfect XML in Tomcat:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="http://service.test.services.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;soapenv:Body&gt;
          &lt;q0:fetchResponse&gt;
              &lt;arg0&gt;
                  &lt;request&gt;
                      &lt;name&gt;this-that&lt;/name&gt; 
                      &lt;value&gt;home-run&lt;/value&gt; 
                  &lt;/request&gt;
              &lt;/arg0&gt;
          &lt;/q0:fetchResponse&gt;
      &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  
  &lt;S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"&gt;
      &lt;S:Body&gt;
          &lt;ns0:fetchResponseResponse xmlns:ns0="http://service.test.services.com/"&gt;
              &lt;return&gt;
                  &lt;response&gt;
                      &lt;name&gt;Service Response&lt;/name&gt; 
                      &lt;value&gt;Wed Feb 06 20:21:13 XXX 2013&lt;/value&gt; 
                  &lt;/response&gt;
              &lt;/return&gt;
          &lt;/ns0:fetchResponseResponse&gt;
      &lt;/S:Body&gt;
  &lt;/S:Envelope&gt;
  </code></pre>
  
  <p>wrong XML in weblogic:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="http://service.test.services.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;soapenv:Body&gt;
          &lt;q0:fetchResponse&gt;
              &lt;arg0&gt;
                  &lt;requestName&gt;hello&lt;/requestName&gt; 
                  &lt;requestValue&gt;wassup&lt;/requestValue&gt; 
              &lt;/arg0&gt;
          &lt;/q0:fetchResponse&gt;
      &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  
  &lt;S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"&gt;
      &lt;S:Body&gt;
          &lt;ns2:fetchResponseResponse xmlns:ns2="http://service.test.services.com/"&gt;
              &lt;return&gt;
                  &lt;responseName&gt;Service Response&lt;/responseName&gt; 
                  &lt;responseValue&gt;Wed Feb 06 20:30:06 IST 2013&lt;/responseValue&gt; 
              &lt;/return&gt;
          &lt;/ns2:fetchResponseResponse&gt;
      &lt;/S:Body&gt;
  &lt;/S:Envelope&gt;
  </code></pre>
  
  <p>If you think I need to put out more code, please let me know.</p>
  
  <p>I want to see the XML output from tomcat in the output from weblogic </p>