3 Replies Latest reply on Jan 20, 2005 9:08 AM by thomas.diesler

    Error while using SoapMessage.saveChanges()

    pani_rd

      Hi,

      I have an application which is working fine in JBoss 3.2.3.

      Now, I'm trying to port it to JBoss 4.0.1. When I send a SOAP Message, the application's business logic does its work and tries to throw back a SoapMessage. While constructing a Soap response, its throwing an error exactly at SoapMessage.saveChanges(). The error its throwing is attached.

      When I remove jboss-saaj.jar and replace it with saaj-impl and saaj-api, it works fine.

      Here is the error snippet:

      005-01-13 10:53:56,724 WARN [org.apache.axis.attachments.AttachmentsImpl] Exception:
      AxisFault
       faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
       faultSubcode:
       faultString: Namespace URI cannot be null
       faultActor:
       faultNode:
       faultDetail:
       {http://xml.apache.org/axis/}stackTrace: java.lang.IllegalArgumentException: Namespace URI cannot be null
       at org.apache.axis.utils.Mapping.setNamespaceURI(Mapping.java:87)
       at org.apache.axis.utils.Mapping.<init>(Mapping.java:71)
       at org.apache.axis.utils.NSStack.add(NSStack.java:226)
       at org.apache.axis.encoding.SerializationContextImpl.registerPrefixForURI(SerializationContextImpl.java:529)
       at org.apache.axis.encoding.SerializationContextImpl.qName2String(SerializationContextImpl.java:571)
       at org.apache.axis.encoding.SerializationContextImpl.startElement(SerializationContextImpl.java:1047)
       at org.apache.axis.message.SOAPFaultImpl.outputImpl(SOAPFaultImpl.java:117)
       at org.apache.axis.message.SOAPElementAxisImpl.output(SOAPElementAxisImpl.java:1456)
       at org.apache.axis.message.SOAPBodyAxisImpl.outputImpl(SOAPBodyAxisImpl.java:156)
       at org.apache.axis.message.SOAPEnvelopeAxisImpl.outputImpl(SOAPEnvelopeAxisImpl.java:588)
       at org.apache.axis.message.SOAPElementAxisImpl.output(SOAPElementAxisImpl.java:1456)
       at org.apache.axis.MessagePart.writeTo(MessagePart.java:276)
       at org.apache.axis.MessagePart.getAsString(MessagePart.java:568)
       at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:569)
       at org.apache.axis.Message.saveChanges(Message.java:672)
       at com.en.es.pn.gw.common.parser.plugins.TcFault.createFaultResponse(TcFault.java:99)

      ....

      I appreciate any response. Thanks.

      Pani


        • 1. Re: Error while using SoapMessage.saveChanges()
          thomas.diesler

          Please take this to

          http://jira.jboss.com/jira/browse/JBWS

          and attach a simple sample deployment that allows me to reproduce the issue.

          • 2. Re: Error while using SoapMessage.saveChanges()
            pani_rd

            Hi,

            I'm not using any of JBoss's Web Service. I'm having a servlet which extends JAXMServlet. Then in onMessage() I have implemented to receive, validate & parse the SOAP Message that is coming in. During the process I do load my DTO's and make the business call.

            Based on the response from the business call, I construct back a SoapMessage and send it back to the client.

            Now, all of these worked fine in JBoss 3.2.3 where I'm using saaj-impl and saaj-api.jar. When I port it to JBoss 4.0.1, I'm not able to use 'em any more as JBoss 4.x has it own implementation of SAAJ.

            When I delete the jboss-saaj and replacing it with saaj related jar's, everything works fine. But, I dont want to do that. Is there any other way I can make this work?

            Thanks,
            Pani

            • 3. Re: Error while using SoapMessage.saveChanges()
              thomas.diesler

              Are you calling into the propratory Axis API, if yes can you avoid that and use the standard jaxrpc, saaj API only?