com.....engine.xmlsoap.SOAPElement incompatible withjava.lang.String - Websphere

This is a discussion on com.....engine.xmlsoap.SOAPElement incompatible withjava.lang.String - Websphere ; Web application deployed inside websphere application server is throwing the error "java.lang.ClassCastException: com.ibm.ws.webservices.engine.xmlsoap.SOAPElement incompatible with java.lang.String" when web service client is executed from the application. Source code public void initializeSession(String compnayName,String userName,String password) { String nameSpaceUri = "http://webservices.intelliview.com"; String serviceName ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: com.....engine.xmlsoap.SOAPElement incompatible withjava.lang.String

  1. com.....engine.xmlsoap.SOAPElement incompatible withjava.lang.String

    Web application deployed inside websphere application server is throwing the error
    "java.lang.ClassCastException: com.ibm.ws.webservices.engine.xmlsoap.SOAPElement incompatible with java.lang.String" when web service client is executed from the application.

    Source code

    public void initializeSession(String compnayName,String userName,String password) {
    String nameSpaceUri = "http://webservices.intelliview.com";
    String serviceName = "IntegratorService";
    String portName = "Integrator";

    URL helloWsdlUrl;
    try {
    helloWsdlUrl = new URL(serviceURL);

    ServiceFactory serviceFactory = ServiceFactory.newInstance();

    Service helloService =
    serviceFactory.createService(helloWsdlUrl,
    new QName(nameSpaceUri, serviceName));

    com.intelliview.webservices.Integrator myProxy =
    (com.intelliview.webservices.Integrator)
    helloService.getPort(
    new QName(nameSpaceUri, portName),
    com.intelliview.webservices.Integrator.class);

    authTicket = myProxy.getAuthenticationTicket(compnayName,userNa me,password);
    } catch (Exception e) {
    e.printStackTrace();
    }
    }

  2. Re: com.....engine.xmlsoap.SOAPElement incompatible withjava.lang.String

    What does the stack trace look like for the ClassCastException? What is the line of code that is failing?

  3. Re: com.....engine.xmlsoap.SOAPElement incompatible withjava.lang.String

    java.lang.ClassCastException: com.ibm.ws.webservices.engine.xmlsoap.SOAPElement incompatible with java.lang.String
    [1/8/09 14:37:21:250 IST] 0000003d SystemErr R at $Proxy1.getReport(Unknown Source)
    [1/8/09 14:37:21:251 IST] 0000003d SystemErr R at com.intelliview.integrator.client.ServiceCaller.ge tReport(ServiceCaller.java:92)
    [1/8/09 14:37:21:251 IST] 0000003d SystemErr R at com.ibm._jsp._TestAPI._jspService(_TestAPI.java:94 )
    [1/8/09 14:37:21:251 IST] 0000003d SystemErr R at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJsp Base.java:85)
    [1/8/09 14:37:21:251 IST] 0000003d SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
    [1/8/09 14:37:21:251 IST] 0000003d SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:966)
    [1/8/09 14:37:21:251 IST] 0000003d SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:478)
    [1/8/09 14:37:21:251 IST] 0000003d SystemErr R at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.h andleRequest(ServletWrapper.java:463)
    [1/8/09 14:37:21:251 IST] 0000003d SystemErr R at com.ibm.wsspi.webcontainer.servlet.GenericServletW rapper.handleRequest(GenericServletWrapper.java:11 5)
    [1/8/09 14:37:21:251 IST] 0000003d SystemErr R at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensio nServletWrapper.handleRequest(AbstractJSPExtension ServletWrapper.java:168)
    [1/8/09 14:37:21:251 IST] 0000003d SystemErr R at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensio nProcessor.handleRequest(AbstractJSPExtensionProce ssor.java:270)
    [1/8/09 14:37:21:251 IST] 0000003d SystemErr R at com.ibm.ws.webcontainer.webapp.WebApp.handleReques t(WebApp.java:3107)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequ est(WebGroup.java:238)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java:811)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.ws.wswebcontainer.WebContainer.handleReque st(WebContainer.java:1425)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java:92)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpInboundLink.java:465)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewInformation(HttpInboundLink.java:394)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.ready(HttpInboundLink.java:274)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.sendToDiscriminators(NewConnectionIniti alReadCallback.java:214)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.complete(NewConnectionInitialReadCallba ck.java:113)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.ws.tcp.channel.impl.AioReadCompletionListe ner.futureCompleted(AioReadCompletionListener.java :152)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.io.async.AbstractAsyncFuture.invokeCallbac k(AbstractAsyncFuture.java:213)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.io.async.AbstractAsyncFuture.fireCompletio nActions(AbstractAsyncFuture.java:195)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.io.async.AsyncFuture.completed(AsyncFuture .java:136)
    [1/8/09 14:37:21:252 IST] 0000003d SystemErr R at com.ibm.io.async.ResultHandler.complete(ResultHand ler.java:193)
    [1/8/09 14:37:21:253 IST] 0000003d SystemErr R at com.ibm.io.async.ResultHandler.runEventProcessingL oop(ResultHandler.java:725)
    [1/8/09 14:37:21:253 IST] 0000003d SystemErr R at com.ibm.io.async.ResultHandler$2.run(ResultHandler .java:847)
    [1/8/09 14:37:21:253 IST] 0000003d SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1498)

  4. Re: com.....engine.xmlsoap.SOAPElement incompatible withjava.lang.String

    The error indicates that the InvocationHandler for a Proxy return a SOAPElement when it should have returned a String. Unfortunately, I am not a webservices expert. As a guess, this is either a mismatch between the client interface and the webservice implementation (i.e., the client is expecting a String, but the implementation returned something else), or this is a bug in the webservices engine.

+ Reply to Thread