title: Issue between web service client Weblogic 12.2.1 and publisher Weblogic 12.1.2
body: <p>We're facing a integration problem between our newer Weblogic (12.2.1), where we have a client jax-ws, and the publisher (Weblogic 12.1.3).</p>
  
  <p>My webservice client (WL 12.2.1) call a webservice published on WL 12.1.3 but we are getting this error:</p>
  
  <p><strong>javax.xml.ws.WebServiceException: Old format work area header is disabled.</strong></p>
  
  <pre class="lang-none prettyprint-override"><code>javax.xml.ws.WebServiceException: Old format work area header is disabled.
    at weblogic.wsee.jaxws.workcontext.WorkContextClientTube.processResponse(WorkContextClientTube.java: 61)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java: 1147)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java: 1050)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java: 1019)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java: 877)
    at com.sun.xml.ws.client.Stub.process(Stub.java: 463)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java: 191)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java: 108)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java: 92)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java: 161)
    at com.sun.proxy.$Proxy948.consulta(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 43)
    at java.lang.reflect.Method.invoke(Method.java: 497)
    at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java: 147)
    at com.sun.proxy.$Proxy949.consulta(Unknown Source)
  </code></pre>
  
  <p>We intercept the envelope request (<strong>through Eclipse TCP/IP Monitor</strong>) that we was sending and we seen the header block below:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;S:Header&gt;
      &lt;WorkContext xmlns="http://oracle.com/weblogic/soap/workarea/"&gt;rO0ABXdUABh3ZWJsb2dpYy5hcHAud3NhdXRlbnRpY2EAAADWAAAAI3dlYmxvZ2ljLndvcmthcmVhLlN0cmluZ1dvcmtDb250ZXh0AAsxLjIuMTUtMDAzMQAA&lt;/WorkContext&gt;
  &lt;/S:Header&gt;
  </code></pre>
  
  <p>Manipulating the WorkContextMap we can clean up and don't send the header block:</p>
  
  <pre class="lang-java prettyprint-override"><code>public static void cleanUpWorkContext() {
      try {
          WorkContextMap rc = (WorkContextMap)
          new InitialContext().lookup("java:comp/WorkContextMap");
  
          if (rc != null) {
              ArrayList &lt; String &gt; lista_para_remover = new ArrayList &lt; String &gt; ();
              if (rc.keys() != null) {
                  for (Iterator &lt; String &gt; keys = rc.keys(); keys.hasNext();) {
                      String s = (String) keys.next();
                      log.info("Found " + s + " - " + rc.get(s));
                      if (s.startsWith("weblogic.app")) {
                          log.info("Removing " + s);
                          lista_para_remover.add(s);
                      }
  
                  }
  
                  for (Iterator &lt; String &gt; iterator = lista_para_remover.iterator(); iterator.hasNext();) {
                      String string = (String) iterator.next();
                      rc.remove(string);
                  }
              }
          }
          log.info("RC IS NULL? " + (rc == null));
  
      } catch (Exception e) {
          log.error("Exception: ", e);
          e.printStackTrace();
      }
  }
  </code></pre>
  
  
  
  <p>After cleaning up the work context and sending a envelope without header we still getting the same error (<strong>Old format...</strong>)</p>
  
  <p>And through Eclipse TCP/IP Monitor we can see the envelope response that looks like:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;env:Header xmlns:work="http://bea.com/2004/06/soap/workarea/"&gt;
      &lt;work:WorkContext xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility"&gt;
          &lt;java class="java.beans.XMLDecoder"&gt;
              &lt;string&gt;weblogic.app.sgrcioaiaws&lt;/string&gt;
              &lt;int&gt;214&lt;/int&gt;
              &lt;string&gt;weblogic.workarea.StringWorkContext&lt;/string&gt;
              &lt;string&gt;20170504054331.0&lt;/string&gt;
              &lt;string&gt;weblogic.app.eori&lt;/string&gt;
              &lt;int&gt;214&lt;/int&gt;
              &lt;string&gt;weblogic.workarea.StringWorkContext&lt;/string&gt;
              &lt;string&gt;20170530052023.0&lt;/string&gt;
              &lt;string/&gt;
          &lt;/java&gt;
      &lt;/work:WorkContext&gt;
  &lt;/env:Header&gt;
  &lt;env:Body&gt;
      &lt;m:consultaResponse xmlns:m="http://xpto"&gt;
          &lt;m:ConsultaResponse&gt;
              &lt;java:Object xmlns:java="java:com.xpto" xmlns:n3="java:com.xpto"&gt;
                  ... some data...
              &lt;/java:Object&gt;
          &lt;/m:ConsultaResponse&gt;
      &lt;/m:consultaResponse&gt;
  &lt;/env:Body&gt;
  </code></pre>
  
  <p></p>
  
  <p>But after this (by some reason????) we're getting the "Old format..." exception.</p>
  
  <p>The problem could be the header response block? Perhaps this block version (<strong>xmlns:work="http://bea.com/2004/06/soap/workarea/"</strong>) is not acceptable by newer Weblogic's, like our 12.2.1 version?</p>
  
  <p>Thanks for your attention, guys.</p>
  
  <p><strong>ps: We don't get this error if invoke the webservice through a simple java app or soapUI, only when a call is through a code deployed on WL 12.2.1.</strong></p>
  
  <p><strong>Update (weblogic-application.xml)</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;weblogic-application
      xmlns="http://xmlns.oracle.com/weblogic/weblogic-application"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.4/weblogic-application.xsd"&gt;
      &lt;xml&gt;
          &lt;parser-factory&gt;
              &lt;saxparser-factory&gt;org.apache.xerces.jaxp.SAXParserFactoryImpl&lt;/saxparser-factory&gt;
              &lt;document-builder-factory&gt;weblogic.xml.jaxp.WebLogicDocumentBuilderFactory&lt;/document-builder-factory&gt;
              &lt;transformer-factory&gt;org.apache.xalan.processor.TransformerFactoryImpl&lt;/transformer-factory&gt;
          &lt;/parser-factory&gt;
      &lt;/xml&gt;
      &lt;application-param&gt;
          &lt;param-name&gt;webapp.encoding.default&lt;/param-name&gt;
          &lt;param-value&gt;UTF-8&lt;/param-value&gt;
      &lt;/application-param&gt;
      &lt;prefer-application-packages&gt;
          &lt;package-name&gt;org.springframework.*&lt;/package-name&gt;
          &lt;package-name&gt;org.apache.xerces.parsers.*&lt;/package-name&gt;
          &lt;package-name&gt;org.apache.xalan.*&lt;/package-name&gt;
      &lt;/prefer-application-packages&gt;
  &lt;/weblogic-application&gt;
  </code></pre>