3 Replies Latest reply: Oct 28, 2011 8:59 AM by dev0 RSS

Can't connect to CXF2 webservice

Sam W Expert

Hi,

 

I have written an EAR backend project, which consists of EJB3,  CXF2 and a Web module.

Deployment gone through successfully, but when I use SOAPUI test its web service call, it failed with the following error:

 

 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

   <soap:Body>

      <soap:Fault>

         <faultcode>soap:Server</faultcode>

         <faultstring>category5-ws-ejb-1.0-SNAPSHOT/CategorySubcategoriesFacade!ix.houseware.category.entity.facade.CategorySubcategoriesFacadeLocal -- service jboss.naming.context.java.app.category5-ws-ear."category5-ws-ejb-1.0-SNAPSHOT"."CategorySubcategoriesFacade!ix.houseware.category.entity.facade.CategorySubcategoriesFacadeLocal"</faultstring>

      </soap:Fault>

   </soap:Body>

</soap:Envelope>

 

 

Here is how I expose the the web service:

 

CategorySubcategoriesFacade.java:

 

 

@Stateless(name = "CategorySubcategoriesFacade")

public class CategorySubcategoriesFacade extends AbstractFacade<CategorySubcategories> implements  CategorySubcategoriesFacadeLocal {

...

 

 

 

CategorySubcategoriesService.java:

 

 

@WebService

public interface CategorySubcategoriesService {

    public final static String CATEGORY_SUBCATEGORIES_SERVICE_URI

            = "java:app/category5-ws-ejb-1.0-SNAPSHOT/CategorySubcategoriesFacade!ix.houseware.category.entity.facade.CategorySubcategoriesFacadeLocal";

@WebMethod

    public int count();

 

 

 

CategorySubcategoriesServiceImpl.java:

 

 

@WebService(endpointInterface = "ix.houseware.category.service.CategorySubcategoriesService")

//@Stateless()

public class CategorySubcategoriesServiceImpl implements CategorySubcategoriesService {

...

private CategorySubcategoriesFacadeLocal callRemote() throws NamingException {

             InitialContext ic = new InitialContext();

            CategorySubcategoriesFacadeLocal remote

                = (CategorySubcategoriesFacadeLocal) ic.lookup(CategorySubcategoriesService.CATEGORY_SUBCATEGORIES_SERVICE_URI);

            return remote;

    }

 

 

 

Any help will be very appreciated.

Thanks

Sam

  • 1. Re: Can't connect to CXF2 webservice
    Sam W Expert

    After deployment, here is what the web services look like:

     

     

    09:49:57,451 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-6) JNDI bindings for session bean named CategorySubcategoriesFacade in deployment unit subdeployment "category5-ws-ejb.jar" of deployment "category5-ws-ear.ear" are as follows:

     

     

            java:global/category5-ws-ear/category5-ws-ejb/CategorySubcategoriesFacade!ix.houseware.category.entity.facade.CategorySubcategoriesFacadeLocal

           java:app/category5-ws-ejb/CategorySubcategoriesFacade!ix.houseware.category.entity.facade.CategorySubcategoriesFacadeLocal

            java:module/CategorySubcategoriesFacade!ix.houseware.category.entity.facade.CategorySubcategoriesFacadeLocal

            java:global/category5-ws-ear/category5-ws-ejb/CategorySubcategoriesFacade

            java:app/category5-ws-ejb/CategorySubcategoriesFacade

            java:module/CategorySubcategoriesFacade

     

     

    I use the "java:app" as highlighted above to reference my webservice.

  • 2. Re: Can't connect to CXF2 webservice
    Richard Opalka Master

    Can U show us your server log when U invoke web service from SOAP UI?

  • 3. Re: Can't connect to CXF2 webservice
    dev0 Newbie

    Have you tried launching using the standalone-preview.xml configuration?

     

    As in:

     

    .\standalone.bat --server-config=standalone-preview.xml

     

    I do not think the webservices subsystem is included in the default configuration.