axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <stev...@iseran.com>
Subject Re: Problem with the Axis (Java) Attachment sample (v1.1)
Date Thu, 01 Jan 2004 15:41:23 GMT
Carbone Cedric wrote:
> Hi all,
> 
> I have problems with Attachment sample in Axis 1.1 (Java).
> For 5 days I have spent with the Attachment sample, I don't arrive to run it
> :((
> I need your help. I have test to post my request on axis-user mailing list
> but I don't find any person that run correctly the Attachment sample. So I
> try to have responses here about my JavaNullPointerException and the unknown
> method call.setScopedProperty() that prevents me to compil java class !
> 
> 1) the sample don't run I have a java.lang.NullPointerException !
> So, I run the sample using (The binary file C:/web.jpg exists)
>  C:\>java samples.attachments.EchoAttachment C:/web.jpg
> 
> Now this is the response :
> java.lang.NullPointerException
> java.lang.NullPointerException
>      at org.apache.axis.Message.createAttachmentPart(Message.java:638)
>      at
> javax.xml.soap.SOAPMessage.createAttachmentPart(SOAPMessage.java:243)
>      at
> samples.attachments.EchoAttachment.echoUsingSAAJ(EchoAttachment.java:523)
>      at samples.attachments.EchoAttachment.main(EchoAttachment.java:362)

I would recommend you either get the CVS_HEAD version of Axis from CVS, 
or the alpha release of Axis1.2: 
http://archive.apache.org/dist/ws/axis/1_2alpha/

I dont guarantee it will work better, but when things dont work we will 
be in a position to fix them. I dont have a copy of 1.1 around to track 
down line numbers on, see.

> 
> So I bug at line 523 of EchoAttachment.java when I create an AttachmentPart
> !
> javax.xml.soap.AttachmentPart attachment =
> soapMessage.createAttachmentPart(dataHandler);
> 


> Finally, I want to debug this file but I can't  because I don't arrive to
> compil the source EchoAttachment.java.
> javac EchoAttachment.java
>  EchoAttachment.java:239: cannot resolve symbol
>  symbol  : method setScopedProperty (java.lang.String,java.util.Hashtable)
>  location: class org.apache.axis.client.Call
>    call.setScopedProperty(HTTPConstants.REQUEST_HEADERS, myhttp);

In the latest version this is call.setProperty(). It may be that the 
version of EchoAttachment.java you are using is actually a pre1.1 
version, or some other synchronisation problem exists.

Let us know how you get on; if you can't get 1.2alpha to work, post the 
error lines.
-steve

Mime
View raw message