access attachments from SEI implementation

From: Edoardo Causarano <>
Date: Sat, 3 Sep 2005 15:49:47 +0200

Hello, following WS-I Attachment Profile 1.0 R2940 I declare
attachment swaRefs in elements contained in the body. The
wsdl:binding snip is:

       <operation name="uploadFileArray">
          <soap:operation style="document"/>
                   <soap:body parts="requestPart" use="literal"/>
             <soap:body parts="responsePart" use="literal"/>

I run wscompile and get all the nice stubs/skels I want. My SEI
implementation until now is:

public UploadFileArrayRespT uploadFileArray(SOAPElement requestPart)
throws RemoteException {
         try {
             // Legal according to WS-I Attachments Profile 1.0 (R2929)
             SOAPBody body = ((SOAPEnvelope) requestPart).getBody();
             Node document = body.getChildNodes().item(0);
             NodeList files = document.getChildNodes();
             for (int i=0; i<files.getLength(); i++) {
                 Node file = files.item(i);
                 String ref = file.getAttributes().getNamedItem
         } catch (SOAPException e) {
             // TODO Auto-generated catch block

I want to use the "ref" string to identify the relevant attachment
but my method only gets the body requestPart (the first and root mime
attachment). How can I access the integral SOAP Message containing
all the attachments that was sent by the client?