Why don't you parse the XML
file to get it as a document
and then append this to the
body of the SOAP message...

Charlie

-----Original Message-----
From: Roumeliotis, Pete
[mailto:[EMAIL PROTECTED]
rthgrum.com]
Sent: Monday, April 08, 2002
8:19 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Send XML file via
SOAP


Could you just return the
entire xml document as a
string?

Pete R.


-----Original Message-----
From: Maris Orbidans
[mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002
2:33 PM
To: [EMAIL PROTECTED]
Subject: RE: Send XML file via
SOAP



It is more specific  :-)

My question is - how to send
my own XML files.

I know how to do RPCs with
simple datatypes like this:

            Parameter ret =
resp.getReturnValue();
            Object val =
ret.getValue();

            int res =
((Integer) val).intValue();

But what to do if I want to
get XML files:

            Parameter ret =
resp.getReturnValue();
            Object val =
ret.getValue();

            XMLFILE res =
(XMLFILE) val;

            What should I
write instead of XMLFILE ?
Or should I use
different API ?


Maris Orbidans


 // ---------- remote
procedures -------------------
--------------------

    public int
getNumberOfUsers() throws
MalformedURLException,SOAPExce
ption
    {
        if (!isURLValid) throw
new MalformedURLException();
        Call call = new
Call();

call.setTargetObjectURI(SOAP_U
RN);

call.setMethodName("getNumberO
fUsers");
        call.setParams(new
Vector());

        Response resp =
call.invoke(this.rpcrouter,"")
;

        if
(!resp.generatedFault())
        {
            Parameter ret =
resp.getReturnValue();
            Object val =
ret.getValue();

            int res =
((Integer) val).intValue();
            return res;
        } else
        {
            Fault fault =
resp.getFault();
            throw new
SOAPException(fault.getFaultCo
de(),fault.getFaultString());
        }
    }

> -----Original Message-----
> From: Richard L Williams
[mailto:Richard.Williams1@ipap
er.com]
> Sent: Monday, April 08, 2002
7:40 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Send XML file
via SOAP
>
>
>
> You can begin by reading the
documentation provided at
>
http://xml.apache.org/soap/ind
ex.html.
>
> The download and install the
soap distribution.
>
> Then you'll be able to ask
more specific questions.
>
>
>
>
>
>
>
> "Maris Orbidans"
<[EMAIL PROTECTED]> on
04/08/2002 10:31:48 AM
>
> Please respond to
[EMAIL PROTECTED]
>
>
> To:
<[EMAIL PROTECTED]>
> cc:
> bcc:
> Subject:  Send XML file via
SOAP
>
>
>
> hello
>
> I need to send and receive
XML files via SOAP.
>
> How can I do it ?
>
> Maris
>
>
>
>
>
>
>
>

Reply via email to