Hi,

try this:

       Service  service = new Service();
       Call     call    = (Call) service.createCall();
       call.setTargetEndpointAddress( new java.net.URL( endpoint ) );
   
       SOAPEnvelope env = new SOAPEnvelope();
       env.addBodyElement( new RPCElement("MyWebService", "myMethod", new
Object[] { }) );

       FileInputStream file = new FileInputStream( "E:\\temp\\anyfile.xml"
);
       SOAPBodyElement aBody = new SOAPBodyElement( file );
       file.close();

       env.addBodyElement( aBody );

       SOAPEnvelope retEnv = call.invoke( env );



best regards
Matthias Wimmer




-----Original Message-----
From: Sunil Tripathy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 7:58 PM
To: [EMAIL PROTECTED]
Subject: soap messaging question


Hi,
  I am using Apache Soap/Axis to write a web service. I am using soap
messaging to send a message to the service using soap message router. I want
to construct the soap message dynamically using java/xml. The message will
also have some documents as binary data (using base64 encoding). I want to
send the data as part of the message and not as an attachment.
The problem I am facing is to construct the soap(xml) message which will
contain binary data. I looked at the SOAP/AXIS sample programs and I could
not find anything. I will appreciate if anybody has experiance in doing this
will help me.
Thanks
Sunil


Reply via email to