This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 2922
    
    5
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.

  • Freddy Wong
    Ranch Hand

    Joined: Sep 11, 2006
    Posts: 959

    Thanks a lot, Peer
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
     
    subject: Different Behavior between SAAJ Implementations (Axis2 and glassfish)
     
    Similar Threads
    Consume .Net webservice
    SOAP
    SOAP Header problem SAAJ
    SOAP Fault for SOAP Action property
    Display SOAP request line by line