Then on the client side before you send of on the server side before you
do anything your going to have to unmarshall the XML into the object.
If your going to send it as an attachment, you would have to unmarshall
the XML into an object generally a bean (I think) and then add it as an
attachment. I think that if you're going to do this you will have to
use something other thatn SOAP. I believe it only has facilities for
unmarshalling into Envelopes, Body, and other SOAP nameed objects, I
don't think it has anything generic (I could be wrong though). For that
we are using Castor from http://www.exolab.org , there is also GLUE from
http://www.themindelectric.com I think if this isn't it just search for
themindelectric. Once you have unmarshalled into an object you would
then have to add it as an attachment which involves creating a
DataHandler see JAF Javabeans Activation Framework for how to do this,
and then add this datahandler to a BodyPart and set that bodypart into
the message that is going to be sent. The mime sample has an example
where it adds an attachment. To do it on the server side you would send
the XML as an attachment either as an XML file or a String. On the
server you would then extract the attachment and in the service you
would have to unmarshall it into the aformentioned object. The only
thing to think about is that unmarshalling is an expensive operation as
far as time, you might want to do it on the faster side.
Evyatar Shoresh wrote:
>I want to start with xml on the client side and to let the soap
>implementation do all the conversion for me so when my code starts i
>will already have the java object i need.
>
>-----Original Message-----
>From: Rich Catlett [mailto:[EMAIL PROTECTED]]
>Sent: Thu, August 16, 2001 5:56 PM
>To: [EMAIL PROTECTED]
>Subject: Re: xml to bean convertition.
>
>
>How about sending the object as an attachment?
>
>Rich Catlett
>
>Steeve Gilbert wrote:
>
>>Hi!
>>
>>Check that out. I've bean able to transfer bean with this tutorial.
>>
>It should answer you question.
>
>>http://www.eneris.com/~pablo/soapintro
>>
>>Steeve...
>>
>>
>>
>>
>>"Evyatar Shoresh" <[EMAIL PROTECTED]> on 16/08/2001 06:20:42
>>
>>Please respond to [EMAIL PROTECTED]
>>
>>To: <[EMAIL PROTECTED]>
>>cc: (bcc: Steeve Gilbert/G_STGEORGES/CANAM_MANAC)
>>
>>Subject: xml to bean convertition.
>>
>>
>>Hi,
>>I'm having a client-server aplication using soap as my messaging, my
>>
>aim
>
>>is to send a xml document from the client that will be transfered as an
>>object ( pre-defined in a deployment descriptor ) to the method in the
>>server as a parameter.
>>
>>My problem is that no matter which descriptor i use the server takes my
>>xml as is and transfers it to the method as an Element object.
>>
>>Do you have any sample showing such a scenario?
>>
>>Thanx alot.
>>
>>
>>
>>
>>
>>
>
>
>