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 Marwan Semaan <ma...@incomit.com> on 2003/03/20 09:06:48 UTC

Attachment Not Supported is it a bug or a configuration issue

Hi All,
I am trying to send a SOAP Attachment but whatever I do I get the
following 
Can anybody give me a clue or is it a bug in Axis, in this case it needs
to be fixed before the release of Axis 1.1, being able to send
Attachment is very important.

exception at the client side:
------------------------------------------------------------------------
---

Error:; nested exception is:
        java.lang.RuntimeException: No support for attachments
AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.RuntimeException: No support for attachments
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace:
java.lang.RuntimeException: No support for attachme
nts
        at org.apache.axis.client.Call.setRequestMessage(Call.java:1960)
        at org.apache.axis.client.Call.invoke(Call.java:2205)
        at org.apache.axis.client.Call.invoke(Call.java:2133)

------------------------------------------------------------------------
----

source code:
.....
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setTargetEndpointAddress(new URL(endpoint));
call.setOperationName(new QName("urn:testAttachmentinRequest",
"say_Hello"));
...
AttachmentPart ap = 
	new AttachmentPart(new javax.activation.DataHandler("Now is the
time", "text/plain" ));
ap.setContent(" for all good", "text/plain");
ap.setContentId("href");	//reference the attachment by contentId.
call.addAttachmentPart(ap);
.....
->Object ret = (Object)call.invoke(new Object[]{"12345", "Hello"});     
 // Exception occurs at this line
.....
------------------------------------------------------------------------
----

regards
Marwan


RE: Attachment Not Supported is it a bug or a configuration issue

Posted by Marwan Semaan <ma...@incomit.com>.
Hi, 
Thanks very much Koichi
It, perfectly, works now.
Best regards
Marwan

-----Original Message-----
From: Koichi INOUE [mailto:kinoue@src.ricoh.co.jp] 
Sent: Thursday, March 20, 2003 11:21 AM
To: axis-dev@ws.apache.org
Subject: Re: Attachment Not Supported is it a bug or a configuration
issue

Hi,

  I have experienced similar situation.
What modules are there included in you client-side CLASSPATH?
Axis client needs mail.jar (JavaMail API) to treat SOAP attachment and
disables attachment support automatically if it can't find the
JavaMail classes.

"Marwan Semaan" <ma...@incomit.com> writes:

> Hi All,
> I am trying to send a SOAP Attachment but whatever I do I get the
> following 
> Can anybody give me a clue or is it a bug in Axis, in this case it
needs
> to be fixed before the release of Axis 1.1, being able to send
> Attachment is very important.

-- 
                   ****************************************
                   Koichi Inoue
                   Software R&D Group, Ricoh Co. Ltd.
                   e-mail: kinoue@src.ricoh.co.jp


Re: Attachment Not Supported is it a bug or a configuration issue

Posted by Koichi INOUE <ki...@src.ricoh.co.jp>.
Hi,

  I have experienced similar situation.
What modules are there included in you client-side CLASSPATH?
Axis client needs mail.jar (JavaMail API) to treat SOAP attachment and
disables attachment support automatically if it can't find the
JavaMail classes.

"Marwan Semaan" <ma...@incomit.com> writes:

> Hi All,
> I am trying to send a SOAP Attachment but whatever I do I get the
> following 
> Can anybody give me a clue or is it a bug in Axis, in this case it needs
> to be fixed before the release of Axis 1.1, being able to send
> Attachment is very important.

-- 
                   ****************************************
                   Koichi Inoue
                   Software R&D Group, Ricoh Co. Ltd.
                   e-mail: kinoue@src.ricoh.co.jp