6 Replies Latest reply on Mar 12, 2008 2:44 PM by Kevin Conner

    Help needed on ESB Web services

    raghavendra naik Newbie

      Hello,
      I have created and deployed a web service producer using jboss esb.
      In producer i have got a simple method -> printMessage which just prints the input string to the console.

      However the consumer part of it is written using axis apis.
      Consumer code using axis api is as follows.

       try
       {
       String endPoint = "http://localhost:8080/Quickstart_webservice_consumer1/EsbServiceWS?wsdl";
       Service service = new Service();
       Call call = (Call)service.createCall();
       call.setTargetEndpointAddress(new java.net.URL(endPoint));
      
       call.setOperationName(new QName("printMessage"));
       String ret = (String) call.invoke( new Object[] { "Web service consumer......" } );
       System.out.println("Got reply as.." + ret + "'");
       }
       catch(Exception ex)
       {
       System.out.println(ex.getMessage());
      // ex.printStackTrace();
       }
      


      But when i run the above code i am getting exception saying

      Endpoint {http://webservice_producer/esbwebservice}EsbServiceWSPort does not contain operation meta data for: {printMessage}Quickstart_webservice_consumer1

      Kindly help me in resolving this issue.

      Thanks
      R.Naik

        • 1. Re: Help needed on ESB Web services
          Tom Fennelly Master

          From that, it doesn't look as though you're going through the ESB at all i.e. you're going directly to the endpoint on the JBossWS container. You need to post the full stack trace though - you omitted the useful parts.

          If you're intentionally going directly to the JBossWS container endpoint, then you'll need to take the question to the JBossWS User forum.

          • 2. Re: Help needed on ESB Web services
            Kevin Conner Master

             

            "rknaik" wrote:
            {printMessage}Quickstart_webservice_consumer1

            From this I would guess that you have tried to specify the operation name in a number of ways. This looks like the output of a QName.toString and, if so, you have specified the local name name of the operation as the namespace.

            You need to check the WSDL to find the qualified name of the operation and us that in your code.

            As Tom has pointed out, this is pure WS and nothing to do with the ESB.

            • 3. Re: Help needed on ESB Web services
              raghavendra naik Newbie

              Hello Kevin/Tom,
              Thanks for your reply.

              The reason behind choosing the following approach is that i want the ESB to be running on the web service producer machine.
              My consumer will be running in the other machine and i dont want the esb to be running on that machine. i.e, my client code should just make call to end points over web service.

              I dont want ESB to be running on both the machines where producer/consumers are deployed.
              I dont know whether this thought is correct.

              Thanks
              R.Naik

              • 4. Re: Help needed on ESB Web services
                raghavendra naik Newbie

                Hi
                This is the stack trace for your reference

                AxisFault
                 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
                 faultSubcode:
                 faultString: Endpoint {http://webservice_producer/esbwebservice}EsbServiceWSPort does not contain operation meta data for: printMessage
                 faultActor:
                 faultNode:
                 faultDetail:
                 {http://xml.apache.org/axis/}stackTrace:Endpoint {http://webservice_producer/esbwebservice}EsbServiceWSPort does not contain operation meta data for: printMessage
                 at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
                 at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
                 at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
                 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
                 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
                 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
                 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
                 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
                 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
                 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
                 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
                 at javax.xml.parsers.SAXParser.parse(Unknown Source)
                 at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
                 at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
                 at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
                 at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
                 at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
                 at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
                 at org.apache.axis.client.Call.invoke(Call.java:2767)
                 at org.apache.axis.client.Call.invoke(Call.java:2443)
                 at org.apache.axis.client.Call.invoke(Call.java:2366)
                 at org.apache.axis.client.Call.invoke(Call.java:1812)
                 at src.com.test.WSClient.main(WSClient.java:24)
                
                 {http://xml.apache.org/axis/}hostname:ie10dtcgs4k1s
                
                Endpoint {http://webservice_producer/esbwebservice}EsbServiceWSPort does not contain operation meta data for: printMessage
                 at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
                 at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
                 at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
                 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
                 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
                 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
                 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
                 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
                 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
                 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
                 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
                 at javax.xml.parsers.SAXParser.parse(Unknown Source)
                 at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
                 at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
                 at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
                 at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
                 at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
                 at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
                 at org.apache.axis.client.Call.invoke(Call.java:2767)
                 at org.apache.axis.client.Call.invoke(Call.java:2443)
                 at org.apache.axis.client.Call.invoke(Call.java:2366)
                 at org.apache.axis.client.Call.invoke(Call.java:1812)
                 at src.com.test.WSClient.main(WSClient.java:24)
                
                


                • 5. Re: Help needed on ESB Web services
                  Kevin Conner Master

                   

                  "rknaik" wrote:
                  I dont want ESB to be running on both the machines where producer/consumers are deployed.
                  I dont know whether this thought is correct.

                  This is as valid as having the ESB on both but that was not the point we were making :)

                  The issue you are having is just concerned with webservices and is not relevant to the ESB, whether or not the service is backed by the ESB. You really should be chasing this up in the JBossWS forums.

                  • 6. Re: Help needed on ESB Web services
                    Kevin Conner Master

                     

                    "rknaik" wrote:
                    This is the stack trace for your reference

                    I assume you have not looked at the WSDL to get the information you need so here is a wild guess. Try creating the operation name as {http://webservice_producer/esbwebservice}printMessage