axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murray Spork <m.sp...@qut.edu.au>
Subject Re: passing xml documents
Date Thu, 25 Jul 2002 01:13:05 GMT

Andrew,

I sent some notes to the list on this in June:

http://www.mail-archive.com/axis-user@xml.apache.org/msg03251.html

Also note Jill's response.

There is also a potential problem with namespaces with my code - you
may need to do a call.setTargetService in the client or add a default
namespace to the Configuration.xml document. The Call class does a
check to make sure there is either a target service or the
SOAPBodyElement has a namespace - so you need to set at least
one of these.

hth

Andrew Vardeman wrote:

> I think I've heard other people mention that there's a similar 
> signature that takes a DOM document, something like this:
>
> public Element[] process(Document doc) throws Exception{}
>
> (sorry for confusing the parameter & return value in the last email)
>
> In beta 1 the MessageContext was one of the parameters to the method, 
> but now you're supposed to fetch it with:
>
> MessageContext msgc = MessageContext.getCurrentContext();
>
> so whatever you could do before via the MessageContext you can still 
> do in one of these methods--
>
> Andrew
>
> At 03:03 PM 7/24/2002 -0500, you wrote:
>
>> It seems like this is a rather unintuitive way of doing it. I thought 
>> i read
>> somewhere that the function could just take a MsgContext instead of a 
>> Vector
>> of elements, but maybe that was only for handers.
>>
>> -----Original Message-----
>> From: Andrew Vardeman [mailto:andrewv@iastate.edu]
>> Sent: Wednesday, July 24, 2002 3:03 PM
>> To: axis-user@xml.apache.org
>> Subject: RE: passing xml documents
>>
>>
>> public Element[] process(Vector elems) throws Exception{}
>>
>> It takes an array of DOM Elements because the SOAP body can have more 
>> than
>> one child element.  If you're just passing an XML document, it'll 
>> only have
>> one child.
>>
>> Check out the "message" directory in the Axis samples for a good
>> example.  Note the deploy.wsdd file, which specifies that this service
>> should be treated as a message service rather than RPC.
>>
>> Andrew
>>
>> At 02:53 PM 7/24/2002 -0500, you wrote:
>> >thanks for the reply. What does your method signature look like for the
>> >method that recieves the document?
>> >
>> >-----Original Message-----
>> >From: Andrew Vardeman [mailto:andrewv@iastate.edu]
>> >Sent: Wednesday, July 24, 2002 2:52 PM
>> >To: axis-user@xml.apache.org
>> >Subject: Re: passing xml documents
>> >
>> >
>> >I'm passing XML documents back and forth between Axis and .NET using
>> >doc/lit (message style).  I figured it was the most natural way to 
>> go since
>> >the SOAP envelope is XML.  Axis makes doc/lit really easy; .NET is 
>> so bent
>> >on serializing and deserializing everything for you that it took 
>> some work
>> >figuring out how to give it an XML document and say "just stick this 
>> in the
>> >SOAP Body."  RPC works fine too (just XML-encode the document to escape
>> >the >'s, &'s, etc. and send it as a string), and it might save you some
>> >hassle, but the escaping will make your messages a little longer if 
>> size is
>> >important.  I guess it depends on what you plan to do with the document
>> >when it gets to the other end...
>> >
>> >Andrew
>> >
>> >At 02:37 PM 7/24/2002 -0500, you wrote:
>> > >i'm trying to figure out the best way to do this. Has anyone 
>> implemented
>> a
>> > >web service with axis where you pass an entire xml document as the
>> payload?
>> > >if so, did you use a rpc style or a message style service?
>> > >
>> > >thanks!
>> > >mark
>
>
>
>
>




Mime
View raw message