4 Replies Latest reply on Dec 17, 2004 6:51 AM by peter neville

    document/literal wrapped and jbossws / jbossDotNet

    peter neville Newbie

      Hi,
      I'm about to start work on doc/lit wrapped SOaP client and endpoint on jboss 4.0.0. and am considering using saaj api.
      Before I do, can anyone confirm the following please?

      Can jboss 4.0.0. still l work with jbossDotNET
      If so, does DotNET work with doc/lit wrapped as server/client?

      Am I correct in believing there is no supprt for doc/lit wrapped on jbossws?

      As I need to send ebXML/SOAP messages (that are doc/lit wrapped) is there a better choice than saaj?

      Is the jboss-saaj.jar the same as Sun saaj.jar and what version is it?

      Thanks for you help

        • 1. jboss-saaj attachmentpart problem
          peter neville Newbie

          Hi,
          I'm using jboss 4.0.0. and am having problems with attachments when using saaj. The only success I have is if I attach using MIME type text/plain and set content to a String.
          If I try to set MIME type to application/xml or text/xml and set content to be JDOMSource then I get IllegalArgument exception:



          If I try to set MIME type to application/xml or text/xml and set content to javax.xml.transform.stream.StreamSource then I get null pointer exception :

          13:40:03,032 ERROR [EBXMLTransportActivatorBean] java.lang.NullPointerException
          13:40:03,032 INFO [STDOUT] java.lang.NullPointerException
          13:40:03,042 INFO [STDOUT] at org.apache.axis.attachments.ManagedMemoryData
          Source.<init>(ManagedMemoryDataSource.java:202)
          13:40:03,042 INFO [STDOUT] at org.apache.axis.attachments.AttachmentPartImp
          l.setContent(AttachmentPartImpl.java:491)

          13:47:57,683 ERROR [EBXMLTransportActivatorBean] java.lang.IllegalArgumentExcep
          ion: Cannot content type 'text/xml' for: org.jdom.transform.JDOMSource@2fe64a
          13:47:57,723 INFO [STDOUT] java.lang.IllegalArgumentException: Cannot content
          ype 'text/xml' for: org.jdom.transform.JDOMSource@2fe64a
          13:47:57,763 INFO [STDOUT] at org.apache.axis.attachments.AttachmentPartIm
          l.setContent(AttachmentPartImpl.java:486)



          I would gratefully appreciate it if someone has some experience to offer on adding a StreamSource as an attachment with jboss-saaj.

          Thanks.


          • 2. Re: document/literal wrapped and jbossws / jbossDotNet
            Thomas Diesler Master

            1) yes, no

            2) yes

            3) Since there is no support for the wrapped style, you can either use the saaj manually to construct and send the messages or integrate a toolkit that supports the wrapped style. Which is better I don't know.

            4) no, 1.2

            • 3. Re: document/literal wrapped and jbossws / jbossDotNet
              Thomas Diesler Master

              Indeed, the best support you get for the standard WS4EE technology. The wiki explains in detail the server and client programming model.

              It tells you how to create service endpoints from POJO and SLSB and how to access remote web services from all sorts of J2EE components.

              Your concern about SAAJ I don't understand. SAAJ is mainly interfaces and jboss-saaj is an implementation of those interfaces and factory methods. The only reason not to use jboss-saaj is when you want to completely replace the jboss WS support with some other technology, which probably is not trivial.

              I have heared of people using JWSDP inside jboss, but then of course you loose the standard WS4EE deployment functionality and you are back to propriatory (unportable) code.

              • 4. Re: document/literal wrapped and jbossws / jbossDotNet
                peter neville Newbie

                Hi,
                I have been investigating using jboss-saaj and am fairly happy with this. I notice that with JAXM, there is a JAXMServlet and ReqRespListener class.
                Can you confirm whether it would be wise to use JAXM with JBoss and whether I can simply drop the two JAXM jar files into the jboss server/lib?

                I can just use saaj within an ordinary servlet, but I like the idea of JAXM albeit that I heard it was not favoured by IBM and others.

                Also, I am aiming to use jdom for XML processing - is this good practice for jboss or is it preferred to use dom4j, which ships with jboss?

                One final question, does jboss 4.0.0 allow you to add jdom.jar etc to the ear file? I have tried using a manifest with Class-Path, but the Classloader cannot find it.

                Thanks in advance,
                Peter