httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naeem Malik (Ext. 797)" <>
Subject [users@httpd] Accessing attachment in message-style or document/literal servic e
Date Mon, 27 Feb 2006 13:13:06 GMT
Hi all

>From long time I am not able to access the attachment. could any one please
help me regarding the following problem

I am using message-style service method (not RPC mode), now at client side I
can attach any attachment (i.e. binary file or in my case xml file) and can
send our the wire by using the HTTP protocol  but now the server side I cant
access the only attachment because there are only 4 methods (see axis user
guide for reference) allowed in messaging-style service. which are

1>>public Element [] method(Element [] bodies); 
2>>public SOAPBodyElement [] method (SOAPBodyElement [] bodies); 
3>>public Document method(Document body); 
4>>public void method(SOAPEnvelope req, SOAPEnvelope resp); 

now I am using the 4th one after trying the 3rd one, now I can get the
soapEnvelope but not able to get the soapMessage actually which contain
attachments and soapEnvelope etc.

Now the each method doesn't allow to access the soapMessage object( kind of
container for AttachementPart & SOAPPart), or there might be another way to
access the SOAPmessage object because if I get the soapMessage object then I
will use the following method and can retrieve any number of attachments.
Now do any one know how to access the attachment by using above 4 method

 here is my client application code where I am attaching the file 

 SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance();

 SOAPConnection sc = scf.createConnection();
 MessageFactory msgFactory = MessageFactory.newInstance();
 SOAPMessage message = msgFactory.createMessage(new 
 new ByteArrayInputStream(getXMLMessage).getBytes()));
 SOAPPart soapPart = message.getSOAPPart();          
 AttachmentPart attpart = message.createAttachmentPart();
        //there i am attaching the XML document
           URLEndpoint urlEndPoint = new
           //System.out.println("before call service
          SOAPMessage response =, urlEndPoint);
 but on server side I am not able to access the SOAPMessage 
 object because of the limitation of 4 types of method 
I would really appreciate if some one could help me in this matter.

Thanks & regards

Naeem Malik

Naeem Malik
Technical Consultancy Team 

FINEOS Corporation

Pembroke House
8 - 10 Lower Pembroke St
Dublin 2

Ph:	+353 1 6399797(Direct)
Fax: 	+353 1 6399701
Why don't you visit our website at


The information contained in this e-mail is confidential, may be 
privileged and is intended only for the user of the recipient named above.  
If you are not the intended recipient or a representative of the intended 
recipient, you have received this e-mail in error and must not copy, use 
or disclose the contents of this e-mail to anybody else.  If you have 
received this e-mail in error, please notify the sender immediately 
by return e-mail and permanently delete the copy you received.  
This e-mail has been swept for computer viruses.  However, you should 
carry out your own virus checks. 
Registered in Ireland, No. 205721.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message