0 Replies Latest reply on May 29, 2006 9:55 AM by Richard Berg

    Unable to call web service methods from a MDB

    Richard Berg Newbie

      Hi all!

      I know this question is not 100% clear, but I'm sure I can elaborate more if anyone is interested in helping me out. =)

      I'm trying to access a web service from a MDB that runs on my JBoss appserver. No exception is thrown, but the call never reaches it's destination.

      I've checked outgoing TCP traffic and no packets are sent to the server that the web service is located on...

      I also tried to change the generated stub to use invoke(...) instead of invokeOneWay(...) as follows:

       public void callToWebService(namespace.ObjTypesTypes_xsd.Obj obj) throws java.rmi.RemoteException {
       if (super.cachedEndpoint == null) {
       throw new org.apache.axis.NoEndPointException();
       }
       org.apache.axis.client.Call _call = createCall();
       _call.setOperation(_operations[0]);
       _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
       _call.setOperationName(new javax.xml.namespace.QName("MyWebService", "myWSMethod"));
      
       setRequestHeaders(_call);
       setAttachments(_call);
      
       _call.invoke(new java.lang.Object[] {obj});
       }
      
      


      The exception I get is:
      NFO: RemoteException in myWSMethod: org.apache.axis.ConfigurationException: java.lang.ClassCastException
      java.lang.ClassCastException
       at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:302)
       at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
       at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
       at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
       at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
       at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
       at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
       at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
       at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
       at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
       at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
       at org.apache.axis.client.Call.invoke(Call.java:2748)
       at org.apache.axis.client.Call.invoke(Call.java:2424)
       at org.apache.axis.client.Call.invoke(Call.java:2347)
       at org.apache.axis.client.Call.invoke(Call.java:1804)
       at namespace.my_wsdl.MyBindingStub.myWSMethod(MyBindingStub.java:175)
      


      What can possibly make a call to WS from JBoss fail while a call using a stand-alone client (with same stubs!) works?

      Thx!