Re: SOAP with attachment

"Ying Ying" <[email protected]>
Newsgroups gmane.text.xml.soap.user
Message-ID <00ab01c40c7c$f0cbc2a0$a1bdfea9@amysunshine>
Sorry, i might not express clearly. Actually, what i wanna is server send
back a SOAP message with attachment and the attachment is the one just send
from the client-side.

Thanks,
ying

----- Original Message -----
From: "Scott Nichol" <[email protected]>
To: <[email protected]>
Sent: Wednesday, March 17, 2004 11:48 PM
Subject: Re: SOAP with attachment


That is what the code below shows, how to return an attachment from the
server.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Ying Ying" <[email protected]>
To: <[email protected]>
Sent: Wednesday, March 17, 2004 6:11 PM
Subject: Re: SOAP with attachment


Hi Scott,

If I wanna the server to return the attachment (still as a MimeBodyPart),
how could I add it to the response message?


Thanks,
ying


----- Original Message -----
From: "Scott Nichol" <[email protected]>
To: <[email protected]>
Sent: Thursday, March 11, 2004 10:26 PM
Subject: Re: SOAP with attachment


For an RPC service where the attachment is not referenced by a parameter,
you would insert a first parameter of type SOAPContext in the service
method.

For example, if your method is currently

    void MyMethod(void) {...}

change it to

    void MyMethod(SOAPContext ctx) {
        MimeBodyPart bp = ctx.getBodyPart(1);
        ...
    }

You change nothing on the client, i.e. do *not* attempt to send a
SOAPContext parameter.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Ying Ying" <[email protected]>
To: <[email protected]>
Sent: Thursday, March 11, 2004 5:10 PM
Subject: SOAP with attachment


Hi all,

If I add attachment like this:

Call call = new Call();
MimeBodyPart bp = new MimeBodyPart();
....
call.addBodyPart(bp);

call.invoke(......)

How can I access the MimeBodyPart on the server-side?

All the best,
ying
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.