2 Replies Latest reply on Nov 22, 2004 7:14 PM by thomas.diesler

    JBoss-net.sar changed in 3.2.6 Final

    efrinmn

      Hello,

      I noticed that JBoss-net.sar is different in JBoss 3.2.6 final (axis.jar has been replaced with axis-ws4ee.jar). I was able to get my RPC-style webservice (.ear) to work correctly, however I am having difficulties with my Message-style/Java Web Service webservice (.wsr).

      I think I need to change all instances of org.apache.axis.message.SOAPEnvelope to org.apache.axis.message.SOAPEnvelopeAxisImpl, however the constructor method I used before does not appear to work with the new interface:

      org.apache.axis.message.SOAPEnvelopeAxisImpl newmsg = new org.apache.axis.message.SOAPEnvelopeAxisImpl(new ByteArrayInputStream(respstr.getBytes("UTF-8")));


      this however generates a compiler error:

      [javac] D:\myfiles\JBOSS\2200JBoss\test\soapMSGstyle\src\com\unisys\os2200\j
      2ee\websvc\examples\msgService\HelloMsg.java:97: cannot resolve symbol
      [javac] symbol : constructor SOAPEnvelopeAxisImpl (java.io.ByteArrayInputStream)
      [javac] location: class org.apache.axis.message.SOAPEnvelopeAxisImpl
      [javac] newmsg = new org.apache.axis.message.SOAPEnvelopeAxisIm
      pl(new ByteArrayInputStream(respstr.getBytes("UTF-8")));
      [javac] ^
      [javac] 1 error

      this used to work in previous JBoss 3.2.6 versions as:

      org.apache.axis.message.SOAPEnvelope newmsg = new org.apache.axis.message.SOAPEnvelope(new ByteArrayInputStream(respstr.getBytes("UTF-8")));



      Any suggestions? I really would like to be able to create a SOAPEnvelope from a String.....

      Thanks
      Elizabeth Roush
      Unisys Corp



        • 1. Re: JBoss-net.sar changed in 3.2.6 Final
          thomas.diesler

          Your code should use the SAAJ API to create SOAPEnvelope objects and should (if possible) stay clear of dependencies on Axis.

          javax.xml.soap.SOAPFactory
          


          The functionality you are looking for it still available through the factory method

          SOAPEnvelopeAxisImpl.newSOAPEnvelope(InputStream input)
          


          • 2. Re: JBoss-net.sar changed in 3.2.6 Final
            thomas.diesler

            Please also have a look at

            javax.xml.soap.MessageFactory.createMessage(MimeHeaders headers, InputStream in)
            
            
            Internalizes the contents of the given InputStream object into a new SOAPMessage object and returns the SOAPMessage object.