axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thilina Gunarathne" <cset...@gmail.com>
Subject Re: [Axis2] Help with SwA
Date Wed, 19 Jul 2006 22:45:48 GMT
Hi,
See my comments inline....

On 7/19/06, Ben Malek, Hamid <HBenMalek@us.fujitsu.com> wrote:
> I have a big problem making Axis2 work fine with SwA.
>
> 1.    The first problem is that I could not find any documentation on how to
> programmatically construct a SwA SOAP message using AXIOM API only. You can
> only construct MTOM SOAP messages with Axiom but not SwA. The example of SwA
> given by axis2 is just reading a SwA message from a file (the file already
> contains a serialized SwA message).

First of all, It's not an example.. May be you are talking about the testcase:).

>From http://ws.apache.org/axis2/1_0/mtom-guide.html
"MTOM specification is designed to be backward compatible with the
SOAP with Attachments specification. Even though the representation is
different, both technologies have the same wire format. We can safely
assume that any SOAP with Attachments endpoint can accept a MTOM
optimized messages and treat them as SOAP with Attachment messages -
Any MTOM optimized message is a valid SwA message. Because of that
Axis2 does not define a separate programming model or serialization
for SwA. Users can use the MTOM programming model and serialization to
send messages to SwA endpoints."

According to the above mentioned behaviour, Axis2 can send MTOM
messages only. So for testing purposes we needed a NON MTOM, SwA
message, which Axis2 cannot generate at the moment.That's why the file
reading is there. Don't take it as an (bad!) example.
When we tested Axis1.x SwA service was able to understand a Axis2 MTOM
message as a SwA message.

Anyway I too feel it's good to have a programmaming API which will
generate non-MTOM SwA messages. As the first go we can work on adding
the SwA attachments to the MsgContxt.Atttachment object and then
serialising them as SwA. I'll try to see whether we can do that.

>
> 2.    The second problem is that it seems to me so far that axis2 only
> support SwA in one direction only. That is, the axis servlet is able to
> parse a SwA message from the servlet input stream (and it stores the
> attachments in an Attachments object as a property of the MessageContext).
> However, this attachments object is not used anywhere in the code. This
> means that if a service is returning a SwA message (not an MTOM message),
> axis2 will only serialize the SOAP envelope without the attachments. The
> http transport senders only serialize the SOAP envelope on the wire but not
> the attachments (maybe they do it for an MTOM message, but they do not do it
> for a SwA message since the attachments object of the MessageContext is not
> used at all in the code except when parsing the input stream in the axis
> servlet).
Yes. You cannot Echo back a SwA attachment.
Attachment object is meant to be accessed by the service
implementation, by the service implementor.
http://ws.apache.org/axis2/1_0/mtom-guide.html#3
In the above sample WSDLConstants.MESSAGE_LABEL_OUT_VALUE should be
WSDLConstants.MESSAGE_LABEL_IN_VALUE.

Thanks,
~Thilina
>
>
> Please correct me if I am wrong.
>
>
>
> Thank you very much for any help.
>
>
>
> Hamid.


-- 
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message