Dear Mark and all,
 
Sorry to bother you again! I don't know why I got stuck again whwen tring to run the sample of SOAP Attachment. Do you have the book, Professional Java Web Services? I am now following the book to learn Web Services.
 
In the part of Axis, it says it is possible to send a SOAP message with attachments. Similar to past experiences, I didn't find any configurations errors exited on my system. But it doesn't work. The exception is as follows,
 
[libing@enpc1932 SOAPAttachments]$ run.sh
java.lang.NullPointerException
 at org.apache.axis.encoding.JAFDataHandlerSerializer.serialize(JAFDataHandlerSerializer.java:87)
 at org.apache.axis.encoding.TypeMappingRegistry.serialize(TypeMappingRegistry.java:275)
 at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:417)
 at org.apache.axis.encoding.SerializationContext.outputMultiRefs(SerializationContext.java:442)
 at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:357)
 at org.apache.axis.message.MessageElement.output(MessageElement.java:448)
 at org.apache.axis.SOAPPart.getAsString(SOAPPart.java:329)
 at org.apache.axis.SOAPPart.getAsBytes(SOAPPart.java:272)
 at org.apache.axis.Message.getContentLength(Message.java:293)
 at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:354)
 at org.apache.axis.SimpleTargetedChain.invoke(SimpleTargetedChain.java:104)
 at org.apache.axis.client.AxisClient.invoke(AxisClient.java:178)
 at org.apache.axis.client.Call.invoke(Call.java:1254)
 at org.apache.axis.client.Call.invoke(Call.java:1113)
 at org.apache.axis.client.Call.invoke(Call.java:1043)
 at org.apache.axis.client.Call.invoke(Call.java:676)
 at AxisClient3.main(AxisClient3.java:43)
Can't convert 3 to Bytes
java.lang.NullPointerException
[libing@enpc1932 SOAPAttachments]$
 
The service code, client code, deploy.wsdd and attachment (user.properties) are attached.
 
Thanks so much for your help!
Li Bing
                        _.--"""--._
                      .'       '-. `.
                   __/__    (-.   `\ \
                  /o `o \      \    \ \
                 _\__.__/ ))    |    | ;
            .--;"               |    |  \
           (    `)              |    |   \
          _|`---' .'      _,   _|    |    `\
        '`_\  \     '_,.-';_.-`\|     \     \_
        .'  '--'---;`  / /     |\     |_..--' \
                   \'-'.'     .--'.__/    __.-;
                    `"`      (___...---''`     \
                             _/_                \
                            /ASU\ [EMAIL PROTECTED]
                            \___/ 480-965-9038(L), 602-743-9767(C)
                            http://www.public.asu.edu/~libing

Reply via email to