1 Reply Latest reply on Aug 27, 2008 9:57 AM by davinci25

    Urgent!!! End point has service description No matching endpoint found

    jayasreeb

      Hi,

       

      I have developed and deployed external web service in Axis1.4 using Tomcat. By giving following external web service location (http://localhost:8080/axis/services/fibonacci?wsdl) in browser I am able to see the generated wsdl file.

       

      My requirement is to write a client in servicemix and call a method in external web service and get response from it.I have followed following steps..

       

      1.I have created service unit (cxf-se) and placed the fib.wsdl(external webservice wsdl) under (main\src\resource) and generated the client stubs required to call the external webservice from service mix.

       

      2. I have written following client program in cxf-se service unit to call this external web service.Its under (main\src\java)

       

      package org.apache.servicemix.samples.webservice;

      import org.apache.servicemix.samples.fibonacci.*;

       

      import java.io.File;

      import java.net.URL;

      import javax.xml.namespace.QName;

      import javax.xml.ws.Service;

       

      import java.util.logging.Logger;

       

       

      import javax.jbi.messaging.InOut;

      import javax.xml.namespace.QName;

      import org.apache.cxf.common.logging.LogUtils;

      import org.apache.cxf.endpoint.Endpoint;

      import org.apache.cxf.endpoint.Server;

      import org.apache.cxf.interceptor.LoggingInInterceptor;

      import org.apache.cxf.interceptor.LoggingOutInterceptor;

      import org.apache.cxf.jaxws.JaxWsServerFactoryBean;

      import org.apache.cxf.service.model.ServiceInfo;

      import org.apache.servicemix.client.DefaultServiceMixClient;

      import org.apache.servicemix.cxfse.CxfSeComponent;

      import org.apache.servicemix.jbi.jaxp.SourceTransformer;

      import org.apache.servicemix.jbi.jaxp.StringSource;

      //import org.servicemix.jbi.container.JBIContainer;

      import org.apache.servicemix.jbi.container.SpringJBIContainer;

       

       

       

       

       

       

       

      public class FibonacciClient {

       

      private static final Logger LOG = LogUtils.getL7dLogger(org.apache.servicemix.samples.webservice.FibonacciClient.class);

           

          private DefaultServiceMixClient client;

          private InOut io;

          private CxfSeComponent component;

          private SpringJBIContainer jbi;

       

       

          public void testProvider() throws Exception{

       

           //start external service

           LOG.info("inside test provider---");

            

           jbi = new SpringJBIContainer();

           jbi.init();

              jbi.start();

       

       

              JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();

              factory.setServiceClass(FibonacciServiceService.class);

              factory.setServiceBean(new FibonacciServiceImpl());

              String address = "http://localhost:8080/axis/services/fibonacci";

              factory.setAddress(address);

              factory.setBindingId("http://schemas.xmlsoap.org/wsdl/soap12/");

              Server server = factory.create();

              Endpoint endpoint = server.getEndpoint();

              endpoint.getInInterceptors().add(new LoggingInInterceptor());

              endpoint.getOutInterceptors().add(new LoggingOutInterceptor());

              ServiceInfo service = endpoint.getEndpointInfo().getService();

            

              client = new DefaultServiceMixClient(jbi);

              io = client.createInOutExchange();

       

              io.setService(new QName("http://schemas.xmlsoap.org/soap/", "fibonacci"));

              io.setInterfaceName(new QName("http://schemas.xmlsoap.org/soap/", "urn:fibonacci"));

              io.setOperation(new QName("http://schemas.xmlsoap.org/soap/", "calculateFibonacci"));

               

           //send message to proxy

       

              io.getInMessage().setContent(new StringSource(

                      "

       

      6. After this I created service assembly and successfully able to deploy it in service mix.

       

      7. In service mix i got the following trace::

       

      INFO - WSDL1Processor - Endpoint ServiceEndpointservice=FibonacciService,endpoint=FibonacciClient has a service description, but no matching endpoint found in fibonacci

       

      A) Can you provide me suggestion in resolving this?

       

      B) Am I following right approach in calling external web service from servicemix client? If so how to test the response?

       

      C)How to use log4j in service mix so that I can see the logs of my FibonacciClient.java.

       

      Its urgent..Pls help me..

      Jayasree.B

        • 1. Re: Urgent!!! End point has service description No matching endpoint found
          davinci25

          I tried creating a webservice with the cxf-bc/cxf-se components and had some problems doing this.

          First thing I did was trying to get everything working with my task but realised it would not be that easy.

          So I reverted back to the wsdlfirst example and tried getting it running and worked my way from there.

          Have you got the WSDL first example up and running? I realise it is not much help but it's a start and how I tackled my problems.