You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by ji...@philips.com on 2002/11/21 22:10:08 UTC

How to configure SOAPContext parameter

System configuration: Win2000, Tomcat 4.1.12, Apache Soap 2.3.1, and Jdk 1.4.
I have a service method like,

Object func1(SOAPContext soapContext, String str1, String str2)

My question is how to configure soapContext parameter, let's say if I also want to add an attachment to the invoking call?

Thanks in advance,

Jingkun


Re: How to configure SOAPContext parameter

Posted by Scott Nichol <sn...@scottnichol.com>.
You only have access to the SOAPContext for the incoming message, not
the outgoing.  If you want to return an attachment with the RPC API, you
have to use a return Class like DataHandler.  If you want to return
several attachements, you can return DataHandler[] or a Vector of
DataHandler, etc.

With the Messaging API, you have access to SOAPContext for both incoming
and outgoing messages, so you can easily add attachments to the return
message.

Scott Nichol

----- Original Message -----
From: <ji...@philips.com>
To: <so...@xml.apache.org>
Sent: Thursday, November 21, 2002 4:10 PM
Subject: How to configure SOAPContext parameter


> System configuration: Win2000, Tomcat 4.1.12, Apache Soap 2.3.1, and
Jdk 1.4.
> I have a service method like,
>
> Object func1(SOAPContext soapContext, String str1, String str2)
>
> My question is how to configure soapContext parameter, let's say if I
also want to add an attachment to the invoking call?
>
> Thanks in advance,
>
> Jingkun
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: How to configure SOAPContext parameter

Posted by Scott Nichol <sn...@scottnichol.com>.
You only have access to the SOAPContext for the incoming message, not
the outgoing.  If you want to return an attachment with the RPC API, you
have to use a return Class like DataHandler.  If you want to return
several attachements, you can return DataHandler[] or a Vector of
DataHandler, etc.

With the Messaging API, you have access to SOAPContext for both incoming
and outgoing messages, so you can easily add attachments to the return
message.

Scott Nichol

----- Original Message -----
From: <ji...@philips.com>
To: <so...@xml.apache.org>
Sent: Thursday, November 21, 2002 4:10 PM
Subject: How to configure SOAPContext parameter


> System configuration: Win2000, Tomcat 4.1.12, Apache Soap 2.3.1, and
Jdk 1.4.
> I have a service method like,
>
> Object func1(SOAPContext soapContext, String str1, String str2)
>
> My question is how to configure soapContext parameter, let's say if I
also want to add an attachment to the invoking call?
>
> Thanks in advance,
>
> Jingkun
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>