axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marwan Semaan" <marwan.sem...@incomit.com>
Subject Attachment Not Supported is it a bug or a configuration issue
Date Thu, 20 Mar 2003 08:06:48 GMT
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


Mime
View raw message