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