Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

java.lang.String cannot be cast to org.apache.axis.message.SOAPBodyElement

user10070648Jul 9 2013 — edited Jul 9 2013

Hi I'm getting cast error.

    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[2]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("urn:ReconReport");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
   

_call.setOperationName(new javax.xml.namespace.QName("http://paymentGateway.celcom.com", "ReconReport"));

SOAPEnvelope env = new SOAPEnvelope(_call.getMessageContext().getSOAPConstants(),_call.getMessageContext().getSchemaVersion());

java.lang.Object[] pr = new java.lang.Object[] {login, pass, filename, desc, null};

    env.addBodyElement((SOAPBodyElement) pr[0]);
   env.addBodyElement((SOAPBodyElement) pr[1]);
   env.addBodyElement((SOAPBodyElement) pr[2]);
   env.addBodyElement((SOAPBodyElement) pr[3]);

   

Im getting the exception at line


env.addBodyElement((SOAPBodyElement) pr[0]);



Exception is


Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.axis.message.SOAPBodyElement





In fact,  im doing some implementation of  invok(). Please any advice ?


Regards

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 6 2013
Added on Jul 9 2013
4 comments
1,621 views