You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by 蘇 軼(CEC) <s_...@cec-ltd.co.jp> on 2006/05/26 04:40:13 UTC

[Axis 1.4] Unexpected return type of Attachment when add wsse header to SOAPEnvelope, bug?

hi all,

I have got a problem when I tried to run the attachment sample 
of Axis1.4. All works fine when I don't change anything, but when
I tried to use WsseClientHandler, just adding below :
    ---->
    call.setProperty(WsseClientHandler.PASSWORD_OPTION,
                WsseClientHandler.PASSWORD_CLEARTEXT);
    call.setClientHandlers(new WsseClientHandler(), null);
    <----

the echoDir() method got errors :
    ---> Received unexpected type :[Ljava.lang.Object;

because the expected return type is javax.activation.DataHandler[].
I found out that the return type is :
    ---> java.lang.Object[] {
                    org.apache.axis.attachment.AttachmentPart,
                    org.apache.axis.attachment.AttachmentPart
            }

Is it a bug, or I must to do more works on the return value?

BTW: the echo() method has no such error.

Any help or web resource are greatly appreciated !

- sukie

Re: [Axis 1.4] Unexpected return type of Attachment when add wsse header to SOAPEnvelope, bug?

Posted by 蘇 軼(CEC) <s_...@cec-ltd.co.jp>.
More information:
The attachment is the WsseClientHandler class, it just adds a wsse
header to the SOAPEnvelope object.

Anyone can help?  or I should add a jira?

- sukie

  ----- Original Message ----- 
  From: 蘇 軼(CEC)
  To: axis-user@ws.apache.org
  Sent: Friday, May 26, 2006 11:40 AM
  Subject: [Axis 1.4] Unexpected return type of Attachment when add wsse
header to SOAPEnvelope, bug?


  hi all,

  I have got a problem when I tried to run the attachment sample
  of Axis1.4. All works fine when I don't change anything, but when
  I tried to use WsseClientHandler, just adding below :
      ---->
      call.setProperty(WsseClientHandler.PASSWORD_OPTION,
                  WsseClientHandler.PASSWORD_CLEARTEXT);
      call.setClientHandlers(new WsseClientHandler(), null);
      <----

  the echoDir() method got errors :
      ---> Received unexpected type :[Ljava.lang.Object;

  because the expected return type is javax.activation.DataHandler[].
  I found out that the return type is :
      ---> java.lang.Object[] {
                      org.apache.axis.attachment.AttachmentPart,
                      org.apache.axis.attachment.AttachmentPart
              }

  Is it a bug, or I must to do more works on the return value?

  BTW: the echo() method has no such error.

  Any help or web resource are greatly appreciated !

  - sukie