Dear Scott,
I don't do anything special as far as I know. I think the fault is generated
by the apache tool kit.
Let me send you the complete method again. May be its easy to understand
when u look at the full method. If you look at the arguments of my client
method, sourceBytes are never null but thumbBytes are sometimes null. This
is basically the case I am problems in.

public static String uploadContentObjectWithAttachments(long sessionID,
        String containerID, String title, byte[] sourceBytes,
        String sourceFileName, byte[] thumbBytes, String thumbFileName)
        throws Exception {
         System.out.println("uploadContentObjectUsingAttachments...");
        // Process the arguments.
        URL url = null;

        String xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
            "<content>" + "<title>" + title + "</title>" +
            "<source><url><unencoded>" + sourceFileName +
            "</unencoded>  </url></source>";

        if (thumbFileName != null) {
            xmlString += ("<thumbnail><url><unencoded>" + thumbFileName +
            "</unencoded></url></thumbnail>");
        }
  xmlString += "<categorization>"+
           "<category>My Content/cat1</category>"+
           "<category>My Content/cat2</category>"+
           "<category>My Content/cat3</category>"+
           "</categorization>";
        xmlString += "</content>";

        try {
            url = new URL(Simplex.getServerURL());
        } catch (MalformedURLException me) {
            System.err.println("MalformedURLException:" + me.getMessage());
        }

        // Build the call.
        SOAPMappingRegistry smr = new SOAPMappingRegistry();
        Call call = new Call();

  call.setSOAPMappingRegistry(smr);
        call.setTargetObjectURI("urn:CMISOAPContentService");
        call.setMethodName("uploadContentObject");
        call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

        Vector params = new Vector();
        params.addElement(new Parameter("sessionID", long.class,
                new Long(sessionID), null));
        params.addElement(new Parameter("containerID",
containerID.getClass(),
                new String(containerID), null));
        params.addElement(new Parameter("xmlString", xmlString.getClass(),
                new String(xmlString), null));

        DataSource ds = new ByteArrayDataSource(sourceBytes,
"application/octet-stream");
        DataHandler dh = new DataHandler(ds);
        params.addElement(new Parameter("source",
                javax.activation.DataHandler.class, dh, null));

        //            params.addElement(new Parameter("encodedSource",
encodedSource.getClass(), new String(encodedSource), null));
        params.addElement(new Parameter("sourceFileName",
                sourceFileName.getClass(), new String(sourceFileName),
null));

        if (thumbBytes != null && thumbFileName!=null) {
            ds = new ByteArrayDataSource(thumbBytes,
"application/octet-stream");
            dh = new DataHandler(ds);
            params.addElement(new Parameter("thumb",
                    javax.activation.DataHandler.class, dh, null));
            params.addElement(new Parameter("thumbFileName",
                    thumbFileName.getClass(), new String(thumbFileName),
null));
        } else {
            params.addElement(new Parameter("thumb",
                    javax.activation.DataHandler.class, null, null));
            params.addElement(new Parameter("thumbFileName",
                    new String().getClass(), null, null));
        }

        call.setParams(params);

        // Invoke the call.
        Response resp;

        try {
            resp = call.invoke(url, "");

            //System.out.println("Response is: " + resp);
        } catch (SOAPException e) {
         e.printStackTrace();
            System.err.println("Caught SOAPException (" + e.getFaultCode() +
                "): " + e.getMessage());

            return null;
        }

        // Check the response.
        if (!resp.generatedFault()) {
            Parameter ret = resp.getReturnValue();
            String encodedString = (String) ret.getValue();
            String decodedString = new String(Base64.decode(encodedString));

            //  System.out.println("XML String: " + decodedString);
            return decodedString;
        } else {
            Fault fault = resp.getFault();

            System.err.println("Generated fault: ");
            System.out.println("  Fault Code   = " + fault.getFaultCode());
            System.out.println("  Fault String = " +
fault.getFaultString());
            throw new Exception(fault.getFaultString());
        }
    }

Praveen
----- Original Message -----
From: "Scott Nichol" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 07, 2003 6:00 PM
Subject: Re: Urgent: Soap With attachments example


> Interesting.  Do you do anything special to generate the fault, such as
> registering a fault listener?
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Praveen Peddi" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, January 07, 2003 5:50 PM
> Subject: Re: Urgent: Soap With attachments example
>
>
> I think the exception is not thrown by the invoke() method but a fault
> is generated in the response.
>
> try {
>             resp = call.invoke(url, "");
>
>             //System.out.println("Response is: " + resp);
>         } catch (SOAPException e) {
>          e.printStackTrace();
>             System.err.println("Caught SOAPException (" +
> e.getFaultCode() +
>                 "): " + e.getMessage());
>
>             return null;
>         }
>
>         // Check the response.
>         if (!resp.generatedFault()) {
>             Parameter ret = resp.getReturnValue();
>             String encodedString = (String) ret.getValue();
>             String decodedString = new
> String(Base64.decode(encodedString));
>
>             //  System.out.println("XML String: " + decodedString);
>             return decodedString;
>         } else {
>
>             //this is where the error is traced
>             Fault fault = resp.getFault();
>
>             System.err.println("Generated fault: ");
>             System.out.println("  Fault Code   = " +
> fault.getFaultCode());
>             System.out.println("  Fault String = " +
> fault.getFaultString());
>             throw new Exception(fault.getFaultString());
>         }
>
>
> ----- Original Message -----
> From: "Scott Nichol" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, January 07, 2003 5:18 PM
> Subject: Re: Urgent: Soap With attachments example
>
>
> > That's odd.  The error message is when deserializing, but the client
> > only deserializes responses.  Is the line at which the exception is
> > thrown doing the Call#invoke?
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Praveen Peddi" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, January 07, 2003 4:56 PM
> > Subject: Re: Urgent: Soap With attachments example
> >
> >
> > > I am sorry about it. I didn't mean to demand the response or
> anything
> > like
> > > that. I am just kind of under pressure and it looked like the
> problem
> > might
> > > be in the soap tool kit (since u said it didn't handler null
> arguments
> > > before).
> > >
> > > But I appreciate your help. You have been a great help to me.
> > >
> > > uploadContentObject returns a base64 encoded string. But it looks
> like
> > the
> > > request doesn't goto the server at all. I can't see the trace on the
> > server
> > > I should have been seen if the request comes in.
> > >
> > > Praveen
> > >
> > > ----- Original Message -----
> > > From: "Scott Nichol" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, January 07, 2003 4:41 PM
> > > Subject: Re: Urgent: Soap With attachments example
> > >
> > >
> > > > What does uploadContentObject return, specifically, what is the
> Java
> > > > type?  If you have provided a mapping for it in the server's
> > deployment
> > > > descriptor, what is the mapping?
> > > >
> > > > Scott Nichol
> > > >
> > > > P.S.: I appreciate that you are probably working on something with
> a
> > > > deadline and require help to move forward, but putting "urgent" in
> > the
> > > > subject and asking me to "look at the error ASAP" is not the
> > greatest
> > > > etiquette for this list.  I am committed to helping Apache SOAP
> > users
> > > > and improving the Apache SOAP code, but I do so as an unpaid
> > volunteer!
> > > > I am also committed to making my mortgage payments ;-), so I
> cannot
> > > > always get to things in a timely manner.  Please try to be
> patient.
> > > > And, if I (or someone else on the list) cannot respond quickly
> > enough,
> > > > there's always the source code available for you to trace through,
> > as
> > > > well.
> > > >
> > > > ----- Original Message -----
> > > > From: "Praveen Peddi" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Cc: <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, January 07, 2003 4:22 PM
> > > > Subject: Urgent: Soap With attachments example
> > > >
> > > >
> > > > > Hi Scott,
> > > > > Could you please look at the error ASAP and let me know whats
> > wrong in
> > > > my
> > > > > code. I need to fix it ASAP.
> > > > >
> > > > > Thanks in Advance.
> > > > >
> > > > > Praveen
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Praveen Peddi" <[EMAIL PROTECTED]>
> > > > > To: <[EMAIL PROTECTED]>
> > > > > Sent: Tuesday, January 07, 2003 11:50 AM
> > > > > Subject: Re: Soap With attachments example
> > > > >
> > > > >
> > > > > > I updated my jar file with the current jar file that I got
> from
> > the
> > > > > nightly
> > > > > > build. Now this is the error I get when I pass null for
> > DataHandler.
> > > > > >
> > > > > > Uploading ....
> > > > > > uploadContentObjectUsingAttachments...
> > > > > > Generated fault:
> > > > > >   Fault Code   = SOAP-ENV:Client
> > > > > >   Fault String = Can't yet deserialize non-null Objects
> > > > > > java.lang.Exception: Can't yet deserialize non-null Objects
> > > > > >         at
> > > > > >
> > > >
> > com.contextmedia.simplex.domain.content.ContentObjectUtils.uploadCont
> > > > > > entObjectWithAttachments(ContentObjectUtils.java:750)
> > > > > >         at
> > > > > >
> > > >
> > com.contextmedia.simplex.ui.NewContentObjectDialog$DialogActionListen
> > > > > > er.actionPerformed(NewContentObjectDialog.java:275)
> > > > > >         at
> > > > > >
> > > >
> > javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:14
> > > > > > 45)
> > > > > >         at
> > > > > >
> > > >
> > javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
> > > > > > ctButton.java:1499)
> > > > > >         at
> > > > > >
> > > >
> > javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
> > > > > > .java:373)
> > > > > >         at
> > > > > >
> > > >
> > javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:245
> > > > > > )
> > > > > >         at
> > > > > >
> > > >
> > javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
> > > > > > istener.java:211)
> > > > > >         at
> > java.awt.Component.processMouseEvent(Component.java:3710)
> > > > > >         at
> java.awt.Component.processEvent(Component.java:3539)
> > > > > >         at
> java.awt.Container.processEvent(Container.java:1159)
> > > > > >         at
> > java.awt.Component.dispatchEventImpl(Component.java:2588)
> > > > > >         at
> > java.awt.Container.dispatchEventImpl(Container.java:1208)
> > > > > >         at
> java.awt.Component.dispatchEvent(Component.java:2492)
> > > > > >         at
> > > > > >
> > > >
> > java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2446
> > > > > > )
> > > > > >         at
> > > > > >
> > > >
> > java.awt.LightweightDispatcher.processMouseEvent(Container.java:2211)
> > > > > >
> > > > > >         at
> > > > >
> java.awt.LightweightDispatcher.dispatchEvent(Container.java:2120)
> > > > > >         at
> > java.awt.Container.dispatchEventImpl(Container.java:1195)
> > > > > >         at java.awt.Window.dispatchEventImpl(Window.java:923)
> > > > > >         at
> java.awt.Component.dispatchEvent(Component.java:2492)
> > > > > >         at
> > java.awt.EventQueue.dispatchEvent(EventQueue.java:334)
> > > > > >         at
> > > > > >
> > > >
> > java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
> > > > > > read.java:126)
> > > > > >         at
> > > > > >
> > > >
> > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
> > > > > > ad.java:93)
> > > > > >         at java.awt.Dialog.show(Dialog.java:375)
> > > > > >         at java.awt.Component.show(Component.java:941)
> > > > > >         at java.awt.Component.setVisible(Component.java:898)
> > > > > >         at
> > > > > >
> > > >
> > com.contextmedia.simplex.SimplexFrame$FrameActionListener.actionPerfo
> > > > > > rmed(SimplexFrame.java:391)
> > > > > >         at
> > > > > >
> > > >
> > javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:14
> > > > > > 45)
> > > > > >         at
> > > > > >
> > > >
> > javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
> > > > > > ctButton.java:1499)
> > > > > >         at
> > > > > >
> > > >
> > javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
> > > > > > .java:373)
> > > > > >         at
> > > > > >
> > > >
> > javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:245
> > > > > > )
> > > > > >         at
> > > > javax.swing.AbstractButton.doClick(AbstractButton.java:274)
> > > > > >         at
> > > > > >
> > > >
> > javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseRelease
> > > > > > d(BasicMenuItemUI.java:882)
> > > > > >         at
> > java.awt.Component.processMouseEvent(Component.java:3710)
> > > > > >         at
> java.awt.Component.processEvent(Component.java:3539)
> > > > > >         at
> java.awt.Container.processEvent(Container.java:1159)
> > > > > >         at
> > java.awt.Component.dispatchEventImpl(Component.java:2588)
> > > > > >         at
> > java.awt.Container.dispatchEventImpl(Container.java:1208)
> > > > > >         at
> java.awt.Component.dispatchEvent(Component.java:2492)
> > > > > >         at
> > > > > >
> > > >
> > java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2446
> > > > > > )
> > > > > >         at
> > > > > >
> > > >
> > java.awt.LightweightDispatcher.processMouseEvent(Container.java:2211)
> > > > > >
> > > > > >         at
> > > > >
> java.awt.LightweightDispatcher.dispatchEvent(Container.java:2120)
> > > > > >         at
> > java.awt.Container.dispatchEventImpl(Container.java:1195)
> > > > > >         at java.awt.Window.dispatchEventImpl(Window.java:923)
> > > > > >         at
> java.awt.Component.dispatchEvent(Component.java:2492)
> > > > > >         at
> > java.awt.EventQueue.dispatchEvent(EventQueue.java:334)
> > > > > >         at
> > > > > >
> > > >
> > java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
> > > > > > read.java:126)
> > > > > >         at
> > > > > >
> > > >
> > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
> > > > > > ad.java:93)
> > > > > >         at
> > > > > >
> > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
> > > > > >         at
> > > > java.awt.EventDispatchThread.run(EventDispatchThread.java:80)
> > > > > >
> > > > > > Praveen
> > > > > > ----- Original Message -----
> > > > > > From: "Scott Nichol" <[EMAIL PROTECTED]>
> > > > > > To: <[EMAIL PROTECTED]>
> > > > > > Sent: Tuesday, January 07, 2003 9:59 AM
> > > > > > Subject: Re: Soap With attachments example
> > > > > >
> > > > > >
> > > > > > > The newest nightly is right here:
> > > > > > > http://cvs.apache.org/dist/soap/nightly/2003-01-07/
> > > > > > >
> > > > > > > Scott Nichol
> > > > > > >
> > > > > > > ----- Original Message -----
> > > > > > > From: "Praveen Peddi" <[EMAIL PROTECTED]>
> > > > > > > To: <[EMAIL PROTECTED]>
> > > > > > > Sent: Tuesday, January 07, 2003 9:35 AM
> > > > > > > Subject: Re: Soap With attachments example
> > > > > > >
> > > > > > >
> > > > > > > > Hey Scott,
> > > > > > > > I could not find a nightly build dated yesterday or today.
> > Could
> > > > you
> > > > > > > please
> > > > > > > > check it out. If not, where can find the insturctions on
> how
> > to
> > > > > > > compile the
> > > > > > > > src, so that I can compile it and use it. Can I just
> replace
> > the
> > > > old
> > > > > > > > MimePartSerializer class file with the new one or do I
> have
> > to
> > > > replece
> > > > > > > the
> > > > > > > > whole jar.
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > >
> > > > > > > > Praveen
> > > > > > > >
> > > > > > > >
> > > > > > > > ----- Original Message -----
> > > > > > > > From: "Scott Nichol" <[EMAIL PROTECTED]>
> > > > > > > > To: <[EMAIL PROTECTED]>
> > > > > > > > Sent: Monday, January 06, 2003 1:00 PM
> > > > > > > > Subject: Re: Soap With attachments example
> > > > > > > >
> > > > > > > >
> > > > > > > > > This is a "quirk" of the MimePartSerializer.  It is used
> > to
> > > > > > > serialize
> > > > > > > > > InputStream, DataSource, MimeBodyPart and DataHandler.
> > When a
> > > > null
> > > > > > > > > value is passed in for serialization, the serializer
> (for
> > some
> > > > > > > reason)
> > > > > > > > > chooses to serialize it as an Object.  That's why you
> get
> > the
> > > > > > > mismatch.
> > > > > > > > >
> > > > > > > > > I'm going to change the code to use the type specified
> to
> > the
> > > > > > > serializer
> > > > > > > > > when serializing a null.  You can either grab the source
> > > > > > > > >
> > > > > > >
> > > >
> >
> (http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-soap/java/src/org/apac
> > > > > > > > >
> > > > > > >
> > > >
> >
> he/soap/encoding/soapenc/MimePartSerializer.java?rev=HEAD&content-type=t
> > > > > > > > > ext/plain), compile it and use it, or wait until
> tomorrow
> > and
> > > > get a
> > > > > > > > > nightly build
> (http://cvs.apache.org/dist/soap/nightly/).
> > > > > > > > >
> > > > > > > > > Scott Nichol
> > > > > > > > >
> > > > > > > > > ----- Original Message -----
> > > > > > > > > From: "Praveen Peddi" <[EMAIL PROTECTED]>
> > > > > > > > > To: <[EMAIL PROTECTED]>
> > > > > > > > > Sent: Monday, January 06, 2003 11:28 AM
> > > > > > > > > Subject: Re: Soap With attachments example
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Hi Scott,
> > > > > > > > >
> > > > > > > > > Eveyrthing seems to work fine now, except one minor
> > problem.
> > > > When
> > > > > > > there
> > > > > > > > > is nothing to send as argument I am passing in null and
> > thats
> > > > > > > throwing
> > > > > > > > > exception. Please look at the bold lines of my code
> below.
> > I
> > > > am
> > > > > > > passing
> > > > > > > > > in the type of the argument as
> > > > javax.activation.DataHandler.class,
> > > > > > > but
> > > > > > > > > it still takes it as Object. See the exception after the
> > code.
> > > > Look
> > > > > > > at
> > > > > > > > > the 6th argument of the method. It is assuming the
> object
> > type
> > > > as
> > > > > > > > > "Object" not "javax.activation.DataHandler"
> > > > > > > > >
> > > > > > > > > Vector params = new Vector();
> > > > > > > > >         params.addElement(new Parameter("sessionID",
> > > > long.class,
> > > > > > > > >                 new Long(sessionID), null));
> > > > > > > > >         params.addElement(new Parameter("containerID",
> > > > > > > > > containerID.getClass(),
> > > > > > > > >                 new String(containerID), null));
> > > > > > > > >         params.addElement(new Parameter("xmlString",
> > > > > > > > > xmlString.getClass(),
> > > > > > > > >                 new String(xmlString), null));
> > > > > > > > >
> > > > > > > > >         DataSource ds = new
> > ByteArrayDataSource(sourceBytes,
> > > > > > > > > "application/octet-stream");
> > > > > > > > >         DataHandler dh = new DataHandler(ds);
> > > > > > > > >         params.addElement(new Parameter("source",
> > > > > > > > >                 javax.activation.DataHandler.class, dh,
> > > > null));
> > > > > > > > >
> > > > > > > > >         //            params.addElement(new
> > > > > > > Parameter("encodedSource",
> > > > > > > > > encodedSource.getClass(), new String(encodedSource),
> > null));
> > > > > > > > >         params.addElement(new
> Parameter("sourceFileName",
> > > > > > > > >                 sourceFileName.getClass(), new
> > > > > > > String(sourceFileName),
> > > > > > > > > null));
> > > > > > > > >
> > > > > > > > >         if (thumbBytes != null && thumbFileName!=null) {
> > > > > > > > >             ds = new ByteArrayDataSource(thumbBytes,
> > > > > > > > > "application/octet-stream");
> > > > > > > > >             dh = new DataHandler(ds);
> > > > > > > > >             params.addElement(new Parameter("thumb",
> > > > > > > > >                     javax.activation.DataHandler.class,
> > dh,
> > > > null));
> > > > > > > > >             params.addElement(new
> > Parameter("thumbFileName",
> > > > > > > > >                     thumbFileName.getClass(), new
> > > > > > > String(thumbFileName),
> > > > > > > > > null));
> > > > > > > > >         } else {
> > > > > > > > >             params.addElement(new Parameter("thumb",
> > > > > > > > >                     javax.activation.DataHandler.class,
> > null,
> > > > > > > null));
> > > > > > > > >             params.addElement(new
> > Parameter("thumbFileName",
> > > > > > > > >                     new String().getClass(), null,
> null));
> > > > > > > > >         }
> > > > > > > > >
> > > > > > > > > Exception trace is as follows:
> > > > > > > > >
> > > > > > > > > Generated fault:
> > > > > > > > >   Fault Code   = SOAP-ENV:Server
> > > > > > > > >   Fault String = Exception while handling service
> request:
> > > > > > > > > com.contextmedia.ip.s
> > > > > > > > >
> > > > > > >
> > > >
> >
> ession.soap.CMISOAPContentService.uploadContentObject(long,java.lang.Str
> > > > > > > > > ing,java
> > > > > > > > >
> > > > > > >
> > > >
> >
> .lang.String,javax.activation.DataHandler,java.lang.String,java.lang.Obj
> > > > > > > > > ect,java
> > > > > > > > > .lang.String) -- no signature match
> > > > > > > > > java.lang.Exception: Exception while handling service
> > request:
> > > > > > > > > com.contextmedia.
> > > > > > > > >
> > > > > > >
> > > >
> >
> ip.session.soap.CMISOAPContentService.uploadContentObject(long,java.lang
> > > > > > > > > .String,
> > > > > > > > >
> > > > > > >
> > > >
> >
> java.lang.String,javax.activation.DataHandler,java.lang.String,java.lang
> > > > > > > > > .Object,
> > > > > > > > > java.lang.String) -- no signature match
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > com.contextmedia.simplex.domain.content.ContentObjectUtils.uploadCont
> > > > > > > > > entObjectWithAttachments(ContentObjectUtils.java:742)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > com.contextmedia.simplex.ui.NewContentObjectDialog$DialogActionListen
> > > > > > > > > er.actionPerformed(NewContentObjectDialog.java:275)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:14
> > > > > > > > > 45)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
> > > > > > > > > ctButton.java:1499)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
> > > > > > > > > .java:373)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:245
> > > > > > > > > )
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
> > > > > > > > > istener.java:211)
> > > > > > > > >         at
> > > > java.awt.Component.processMouseEvent(Component.java:3710)
> > > > > > > > >         at
> > > > java.awt.Component.processEvent(Component.java:3539)
> > > > > > > > >         at
> > > > java.awt.Container.processEvent(Container.java:1159)
> > > > > > > > >         at
> > > > java.awt.Component.dispatchEventImpl(Component.java:2588)
> > > > > > > > >         at
> > > > java.awt.Container.dispatchEventImpl(Container.java:1208)
> > > > > > > > >         at
> > > > java.awt.Component.dispatchEvent(Component.java:2492)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2446
> > > > > > > > > )
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > java.awt.LightweightDispatcher.processMouseEvent(Container.java:2211)
> > > > > > > > >
> > > > > > > > >         at
> > > > > > > > >
> > > > java.awt.LightweightDispatcher.dispatchEvent(Container.java:2120)
> > > > > > > > >         at
> > > > java.awt.Container.dispatchEventImpl(Container.java:1195)
> > > > > > > > >         at
> > java.awt.Window.dispatchEventImpl(Window.java:923)
> > > > > > > > >         at
> > > > java.awt.Component.dispatchEvent(Component.java:2492)
> > > > > > > > >         at
> > > > java.awt.EventQueue.dispatchEvent(EventQueue.java:334)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
> > > > > > > > > read.java:126)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
> > > > > > > > > ad.java:93)
> > > > > > > > >         at java.awt.Dialog.show(Dialog.java:375)
> > > > > > > > >         at java.awt.Component.show(Component.java:941)
> > > > > > > > >         at
> > java.awt.Component.setVisible(Component.java:898)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > com.contextmedia.simplex.SimplexFrame$FrameActionListener.actionPerfo
> > > > > > > > > rmed(SimplexFrame.java:391)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:14
> > > > > > > > > 45)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
> > > > > > > > > ctButton.java:1499)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
> > > > > > > > > .java:373)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:245
> > > > > > > > > )
> > > > > > > > >         at
> > > > > > > javax.swing.AbstractButton.doClick(AbstractButton.java:274)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseRelease
> > > > > > > > > d(BasicMenuItemUI.java:882)
> > > > > > > > >         at
> > > > java.awt.Component.processMouseEvent(Component.java:3710)
> > > > > > > > >         at
> > > > java.awt.Component.processEvent(Component.java:3539)
> > > > > > > > >         at
> > > > java.awt.Container.processEvent(Container.java:1159)
> > > > > > > > >         at
> > > > java.awt.Component.dispatchEventImpl(Component.java:2588)
> > > > > > > > >         at
> > > > java.awt.Container.dispatchEventImpl(Container.java:1208)
> > > > > > > > >         at
> > > > java.awt.Component.dispatchEvent(Component.java:2492)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2446
> > > > > > > > > )
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > java.awt.LightweightDispatcher.processMouseEvent(Container.java:2211)
> > > > > > > > >
> > > > > > > > >         at
> > > > > > > > >
> > > > java.awt.LightweightDispatcher.dispatchEvent(Container.java:2120)
> > > > > > > > >         at
> > > > java.awt.Container.dispatchEventImpl(Container.java:1195)
> > > > > > > > >         at
> > java.awt.Window.dispatchEventImpl(Window.java:923)
> > > > > > > > >         at
> > > > java.awt.Component.dispatchEvent(Component.java:2492)
> > > > > > > > >         at
> > > > java.awt.EventQueue.dispatchEvent(EventQueue.java:334)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
> > > > > > > > > read.java:126)
> > > > > > > > >         at
> > > > > > > > >
> > > > > > >
> > > >
> > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
> > > > > > > > > ad.java:93)
> > > > > > > > >         at
> > > > > > > > >
> > > >
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
> > > > > > > > >         at
> > > > > > >
> java.awt.EventDispatchThread.run(EventDispatchThread.java:80)
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Praveen
> > > > > > > > >
> > > > > > > > > ----- Original Message -----
> > > > > > > > > From: "Scott Nichol" <[EMAIL PROTECTED]>
> > > > > > > > > To: <[EMAIL PROTECTED]>
> > > > > > > > > Sent: Friday, January 03, 2003 4:41 PM
> > > > > > > > > Subject: Re: Soap With attachments example
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > > As a general recommendation, I encourage you to
> capture
> > a
> > > > stack
> > > > > > > trace
> > > > > > > > > > for your exceptions.  Just having the exception
> message
> > > > makes it
> > > > > > > > > harder
> > > > > > > > > > to understand the cause of most exceptions.
> > > > > > > > > >
> > > > > > > > > > This particular exception means that a
> > ByteArrayDataSource
> > > > was
> > > > > > > created
> > > > > > > > > > with no data array, such as passing a null for the
> byte
> > > > array.
> > > > > > > > > >
> > > > > > > > > > Scott Nichol
> > > > > > > > > >
> > > > > > > > > > ----- Original Message -----
> > > > > > > > > > From: "Praveen Peddi" <[EMAIL PROTECTED]>
> > > > > > > > > > To: <[EMAIL PROTECTED]>
> > > > > > > > > > Sent: Friday, January 03, 2003 4:18 PM
> > > > > > > > > > Subject: Re: Soap With attachments example
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > Yeah. It works now. Its my bad. Sorry about that.
> > > > > > > > > > >
> > > > > > > > > > > BUt I have another problem. When I execute that
> > method, I
> > > > get
> > > > > > > the
> > > > > > > > > > following
> > > > > > > > > > > exception.
> > > > > > > > > > >
> > > > > > > > > > > Caught SOAPException (SOAP-ENV:Client): No data.
> > > > > > > > > > >
> > > > > > > > > > > What does this mean? I double checked that my soap
> > method
> > > > exists
> > > > > > > in
> > > > > > > > > > the
> > > > > > > > > > > descriptor and the implementation also exists on the
> > > > server
> > > > > > > side.
> > > > > > > > > But
> > > > > > > > > > the
> > > > > > > > > > > call doesn't reach the server at all.
> > > > > > > > > > >
> > > > > > > > > > > Praveen
> > > > > > > > > > > ----- Original Message -----
> > > > > > > > > > > From: "Scott Nichol" <[EMAIL PROTECTED]>
> > > > > > > > > > > To: <[EMAIL PROTECTED]>
> > > > > > > > > > > Sent: Friday, January 03, 2003 2:28 PM
> > > > > > > > > > > Subject: Re: Soap With attachments example
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > > This sample that I created from you code works for
> > me,
> > > > i.e. it
> > > > > > > > > does
> > > > > > > > > > not
> > > > > > > > > > > > throw an NPE.
> > > > > > > > > > > >
> > > > > > > > > > > > Scott Nichol
> > > > > > > > > > > >
> > > > > > > > > > > > import java.io.*;
> > > > > > > > > > > > import java.util.*;
> > > > > > > > > > > > import java.net.*;
> > > > > > > > > > > > import org.w3c.dom.*;
> > > > > > > > > > > > import org.xml.sax.*;
> > > > > > > > > > > > import org.apache.soap.util.xml.*;
> > > > > > > > > > > > import org.apache.soap.util.mime.*;
> > > > > > > > > > > > import org.apache.soap.*;
> > > > > > > > > > > > import org.apache.soap.transport.*;
> > > > > > > > > > > > import org.apache.soap.encoding.*;
> > > > > > > > > > > > import org.apache.soap.encoding.soapenc.*;
> > > > > > > > > > > > import org.apache.soap.rpc.*;
> > > > > > > > > > > > import org.apache.soap.messaging.*;
> > > > > > > > > > > > import javax.activation.*;
> > > > > > > > > > > > import javax.mail.internet.*;
> > > > > > > > > > > > import javax.xml.parsers.*;
> > > > > > > > > > > >
> > > > > > > > > > > > public class TestAttachments {
> > > > > > > > > > > >  public static void main(String[] args) {
> > > > > > > > > > > >   try {
> > > > > > > > > > > >       URL url = new URL(args[0]);
> > > > > > > > > > > >
> > > > > > > > > > > >    // Build the call.
> > > > > > > > > > > >    SOAPMappingRegistry smr = new
> > SOAPMappingRegistry();
> > > > > > > > > > > >    Call call = new Call();
> > > > > > > > > > > >    call.setSOAPMappingRegistry(smr);
> > > > > > > > > > > >    call.setTargetObjectURI("urn:MyServiceName");
> > > > > > > > > > > >    call.setMethodName("myMethodName");
> > > > > > > > > > > >
> > call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> > > > > > > > > > > >
> > > > > > > > > > > >    byte[] sourceBytes = new byte[0];
> > > > > > > > > > > >
> > > > > > > > > > > >    Vector params = new Vector();
> > > > > > > > > > > >    DataSource ds = new
> > ByteArrayDataSource(sourceBytes,
> > > > > > > > > > > > "application/octet-stream");
> > > > > > > > > > > >    DataHandler dh = new DataHandler(ds);
> > > > > > > > > > > >    params.addElement(new Parameter("source",
> > > > > > > > > > > >     javax.activation.DataHandler.class, dh,
> null));
> > > > > > > > > > > >
> > > > > > > > > > > >    DataSource ds2 = new
> > ByteArrayDataSource(sourceBytes,
> > > > > > > > > > > > "application/octet-stream");
> > > > > > > > > > > >    DataHandler dh2 = new DataHandler(ds);
> > > > > > > > > > > >    params.addElement(new Parameter("thumb",
> > > > > > > > > > > >      javax.activation.DataHandler.class,
> > > > > > > > > > > >     dh2, null));
> > > > > > > > > > > >
> > > > > > > > > > > >    call.setParams(params);
> > > > > > > > > > > >
> > > > > > > > > > > >    // Invoke the call.
> > > > > > > > > > > >    Response resp;
> > > > > > > > > > > >
> > > > > > > > > > > >    try {
> > > > > > > > > > > >     resp = call.invoke(url, "");
> > > > > > > > > > > >     //System.out.println("Response is: " + resp);
> > > > > > > > > > > >    } catch (SOAPException e) {
> > > > > > > > > > > >     System.err.println("Caught SOAPException");
> > > > > > > > > > > >     e.printStackTrace();
> > > > > > > > > > > >    }
> > > > > > > > > > > >   } catch (Exception e) {
> > > > > > > > > > > >    e.printStackTrace();
> > > > > > > > > > > >   }
> > > > > > > > > > > >  }
> > > > > > > > > > > > }
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > > > > > > For additional commands, e-mail:
> > > > > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > > > > > For additional commands, e-mail:
> > > > > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > > > > For additional commands, e-mail:
> > > > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > To unsubscribe, e-mail:
> > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > > > For additional commands, e-mail:
> > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > To unsubscribe, e-mail:
> > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > > For additional commands, e-mail:
> > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > To unsubscribe, e-mail:
> > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > For additional commands, e-mail:
> > > > <mailto:[EMAIL PROTECTED]>
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > To unsubscribe, e-mail:
> > > > <mailto:[EMAIL PROTECTED]>
> > > > > > For additional commands, e-mail:
> > > > <mailto:[EMAIL PROTECTED]>
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to