title: SoapAction Issue under Java 1.3
body: <p>This problem has been bothering me for days. Hopefully someone has come across this before and has developed a workaround.</p>
  
  <p>So I've developed a middleware Java app which during its execution invokes a SOAP action. Now, the behavior of this bit of code under the 1.6 JDK is working well:</p>
  
  <pre><code>        // inside a try-catch block
          SOAPConnectionFactory soapConnectionFactory = 
                       SOAPConnectionFactory.newInstance();
          SOAPConnection connection = 
                    soapConnectionFactory.createConnection();
          MessageFactory messageFactory = MessageFactory.newInstance();          
          SOAPMessage soapMsg = messageFactory.createMessage();
          String soapAction = getHeaderUrl() + "/" + method + "\r\n";
          MimeHeaders headers = soapMsg.getMimeHeaders(); 
          headers.addHeader("SOAPAction", soapAction); 
  
         // review the SOAPAction header
          int header_count = 
             soapMsg.getMimeHeaders().getHeader("SOAPAction").length;
          out("SOAPActions (from Soap header): ");
          if (header_count == 0) out ("No SOAPActions defined.");
          for (int i=0; i&lt;header_count; i++)
              out("SOAPAction["+i+"] = \"" + 
                 soapMsg.getMimeHeaders().getHeader("SOAPAction")[i] 
                    + "\""); 
  
  
          SOAPPart soapPart = soapMsg.getSOAPPart();            
          StreamSource s = new StreamSource(new StringReader(msg));
          soapPart.setContent(s);
          soapMsg.saveChanges();
          ByteArrayOutputStream req_bytes = new ByteArrayOutputStream();
          soapMsg.writeTo(req_bytes);
          String req = new String(req_bytes.toByteArray());         
          SOAPMessage reply = connection.call(soapMsg, Url);      
  </code></pre>
  
  <p>However, when I use this exact same code under 1.3 or 1.4 JDK with the SOAP libraries linked, everything above works/compiles/executes, <b>except for the fact that the SOAPAction field of the header is blank</b>. Weirdly enough, when I check what the value of that header is (the lines immediately following setting up the header) the appropriate value is displayed. However, when it goes over the wire, the field is empty. As this is the field which indicates the resource I want to the processor, my messages are getting turned back at the door. </p>
  
  <p>Has anyone encountered this problem before? If so, are there possible workarounds? (I am, of course, willing to use another library if required.)</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>The libraries on my classpath are as follows:</p>
  
  <ul>
  <li>Xerces (resolver.jar, serializer.jar, xercesImpl.jar, xml-apis.jar)</li>
  <li>Saaj (saaj.jar)</li>
  <li>Axis (axis.jar</li>
  <li>JAX-RPC (jaxrpc.jar)</li>
  <li>Standard SOAP (activation.jar, mail.jar, soap.jar, xerces.jar)</li>
  <li>Commons logging and discovery</li>
  </ul>
  
  <p>Thanks in advance!</p>