aspose file tools*
The moose likes Web Services and the fly likes Different Behavior between SAAJ Implementations (Axis2 and glassfish) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Different Behavior between SAAJ Implementations (Axis2 and glassfish)" Watch "Different Behavior between SAAJ Implementations (Axis2 and glassfish)" New topic
Author

Different Behavior between SAAJ Implementations (Axis2 and glassfish)

Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

Hi all,

I'm trying to add the SOAP header in the SOAP message using SAAJ. I use Axis2 SAAJ implementation for this. But the SOAP message produced by Axis2 isn't really what I want. It seems that in every child element, there is always additional namespace declaration, i.e. xmlns:axis2ns1, xmlns:axis2ns2. With GlassFish SAAJ implementation, it's able to produce the correct SOAP message.

Java


Axis2


GlassFish


By the way, do both SOAP messages actually have the same meaning?

Thanks in advance


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
Originally posted by Freddy Wong:
By the way, do both SOAP messages actually have the same meaning?


As far as I can tell the envelopes are equivalent.

  • They use different prefixes for the SOAP 1.1 namespace but they both refer to the same namespace {http://schemas.xmlsoap.org/soap/envelope/}.
  • Axis2 adds the peculiar namespace declarations but they actually don't have any effect in this particular case. In any case they just create additional prefixes for the same namespace.


  • "Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
    Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
    Freddy Wong
    Ranch Hand

    Joined: Sep 11, 2006
    Posts: 959

    Thanks a lot, Peer
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Different Behavior between SAAJ Implementations (Axis2 and glassfish)
     
    Similar Threads
    SOAP Header problem SAAJ
    Consume .Net webservice
    SOAP
    Display SOAP request line by line
    SOAP Fault for SOAP Action property