users@jax-rpc.java.net

access attachments from SEI implementation

From: Edoardo Causarano <curious.corn_at_katamail.com>
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"/>
          <input>
             <mime:multipartRelated>
                <mime:part>
                   <soap:body parts="requestPart" use="literal"/>
                </mime:part>
             </mime:multipartRelated>
          </input>
          <output>
             <soap:body parts="responsePart" use="literal"/>
          </output>
       </operation>

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
("contentID").getNodeValue();
                 ...
             }
         } catch (SOAPException e) {
             // TODO Auto-generated catch block
             e.printStackTrace();
         }

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?

e