ADDING xml to the SOAP Message from client

Hi, does anyone know how to add an xml file to the SOAP message passed by the client to the server?

I need to send an xml file, I have already tried attachments but they dont meet the purpose. I need to send the xml as part of the soap message in AXIS 1_4.

I read this somewhere about

SOAPEnvelope env = message.getSOAPEnvelope;

env.addBodyElement(new RPCElement("SOAPaccess","webservicename",new

Object[]{}) );

FileInputStream file =new FileInputStream("c:\\abcd.xml");

SOAPBodyElement aBody =new SOAPBodyElement( file );

file.close();

env.addBodyElement( aBody );

However I am not certain how to go about doing this in axis.

I have been trying to find something related to this, but havent been able to.

Please let me know if you know how to add xml file to the body of a SOAP message.

[1135 byte] By [ABC_SUN_a] at [2007-11-26 22:54:12]
# 1

If anyone is interested...I got this working,

//b is the byte form of the xml document.

InputStream is = new ByteArrayInputStream(b);

Document doc =XMLUtils.newDocument(is);

SOAPElement me = new MessageElement(doc.getDocumentElement());

SOAPElement a=message.getSOAPBody().addChildElement(me);

MessageContext mc=_call.getMessageContext();

mc.setMessage(message);

mc.getMessage().getSOAPBody().detachNode();

SOAPBody sb = (SOAPBody)mc.getMessage().getSOAPPart().getEnvelope().addBody();

sb.addChild(new MessageElement(doc.getDocumentElement()));

mc.getMessage().saveChanges();

System.out.println(mc.getMessage().getSOAPPart().getEnvelope());

SOAPEnvelope env=(SOAPEnvelope)mc.getMessage().getSOAPPart().getEnvelope();

ABC_SUN_a at 2007-7-10 12:17:58 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...