Dear Mark,
 
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
----- Original Message -----
Sent: Saturday, March 30, 2002 10:01 PM
Subject: Re: Where the Hell is the greetingService.log?

If it works like LogHandler, you'll find the log file in the bin directory of your server.
If you're using Tomcat, check in $TOMCAT_HOME/bin.
It took me a while to figure that out too!
----- Original Message -----
From: Li Bing
Sent: Saturday, March 30, 2002 4:51 PM
Subject: Where the Hell is the greetingService.log?

Dear all,
 
After solving the previous problem, I keep on learning the Axis. This time I try to add handlers to the GreetingService.
 
A handler program is designed. It is EventRecorder.java which record the number of times that the greeting service has been called. A log file, greetingService.log, is generated. The new deploy.wsdd is registered successfully and I copy it GreetingService.class and EventRecorder.class to $TOMCAT_HOME/webapps/axis/WEB-INF/classes. Then, I run a client that invoke the GreetingService.class several times. Unfortunately, I can't find where the greetingService.log is! By the way, the $TOMCAT_HOME/webapps/axis/WEB-INF/server-config.wsdd is modified, i.e., the tag, <parameter name="enableRemoteAdmin" value="true"/>.
 
Anyone could give me some help? Thanks so much in advance!
Li Bing

Attachment: GreetingService2.java
Description: Binary data

Attachment: AxisClient3.java
Description: Binary data

Attachment: deploy3.wsdd
Description: Binary data

Attachment: user.properties
Description: Binary data

Reply via email to