You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Carbone Cedric <C....@NEOPOST.FR> on 2003/12/31 14:19:57 UTC
Problem with the Axis (Java) Attachment sample (v1.1)
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)
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);
org.apache.axis.client.Call API
[http://ws.apache.org/axis/java/apiDocs/org/apache/axis/client/Call.html]
Call don't support a method called setScopedProperty(String, Hashmap)
Futhermore, org.apache.axis.client.Call implements the interface
javax.xml.rpc.Call
http://ws.apache.org/axis/java/apiDocs/javax/xml/rpc/Call.html
This interface don't support a method called setScopedProperty(String,
Hashmap)
... I don't understand this (pechaps a depreciated method in AXIS 1.1 ??)
Thank you in advance for your help... I'm completlty lost.
PS :
I saw on the mailling list the problem about namespace. According to an
message of november on your mailinglist, I have deleted the namespace (in
the WSSD file) and thanks this, Axis autogenerates the WSDL without
SOAPException (good).
PS2 :
May I take this opportunity to wish you a very happy New Year.
With all my very best wishes.
See U next year,
Cedric
NeoPost
Re: Problem with the Axis (Java) Attachment sample (v1.1)
Posted by Steve Loughran <st...@iseran.com>.
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