My soap client recives the error

Attachment tag "item" refers to a Mime attachment with label "cid:12568800.1054615058828.apache-soap.%B1%E8%C8%F1%C1%A4102179" which could not be found.


The SOAP Client is sending a Vector that consists of 3 elements

File Name
Checksum for the file
DataHandler for the file

Here is the relevant code:


                String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
                URL url;
                SOAPMappingRegistry smr = new SOAPMappingRegistry();
                Vector params;
                Response resp = null;
                Parameter ret = null;

                XferResponse myResp = new XferResponse();
                try {
                        url = "" URL(targetURL);
                }
                catch (Exception e) {
                        /*
                        System.err.println ("Caught exception " + e);
                        System.err.print ("while connecting to " + targetURL);
                        System.err.print (" remoteURI = " + remoteURI);
                        System.err.println (" remoteMethod =  " + methodName);
                        */
                        myResp.errorCode = 1;
                        myResp.errorMessage = e.getMessage();
                        return (myResp);
                }

                if (parmVector.size() > 0) {
                        params = new Vector();
                        params.addElement(new Parameter("test",
                                                java.util.Vector.class,
                                                       parmVector, encodingStyleURI));

                                       
                        Call call = new Call();
                        call.setSOAPMappingRegistry(smr);
                        call.setTargetObjectURI(remoteURI);
                        call.setMethodName(methodName);
                        call.setEncodingStyleURI(encodingStyleURI);
                        call.setParams(params);

                        try {
                                resp = call.invoke(url, "");
                        } catch (SOAPException e) {
                               
                                System.err.println("Caught SOAPException (" +
                                e.getFaultCode() + "): " +
                                e.getMessage());
                                e.printStackTrace();
                                myResp.errorCode = 32;
                                myResp.errorMessage = e.getMessage();
                                return (myResp);
                        }

                        // Check the response.
                        if (!resp.generatedFault()) {
                                ret = resp.getReturnValue();
                                if(ret == null){
                                        myResp.errorCode = 33;
                                        myResp.errorMessage = "No return value from call.";
                                }
                                    else  {
                                        //System.err.println("Response: " + resp);
                                        // printObject(ret.getValue());
                                        myResp.errorCode = 0;
                                    }
                                myResp.retParm = ret;
                        } else {
                                Fault fault = resp.getFault();
                                System.err.println("Generated fault: ");
                                System.err.println ("  Fault Code   = " + fault.getFaultCode());
                                System.err.println ("  Fault String = " + fault.getFaultString());
                                myResp.errorCode = 1;
                                myResp.errorMessage = fault.getFaultString();
                        }
                }
                return (myResp);

        }



Please help

Thanks
Komal

[EMAIL PROTECTED]

Reply via email to