Hi All, When i am deploying my CXF web service on glass fish i am not able to get the endpoint that i configured in bean file.
I am not able to understand why glassfish is exposing the service at following: listening at address at http://xyz:8080/camel-example-reportincident-2.14.0/DefaultPayloadProviderSEI And if i try to access that url i can not get to the wsdl so basically noting is exposed. Appreciate if anyone can help. Below is my bean file: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:cxf="http://camel.apache.org/schema/cxf" xsi:schemaLocation=" http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml"/> <cxf:cxfEndpoint id="reportIncident" address="/webservices/incident" wsdlURL="etc/report_incident.wsdl" serviceClass="org.apache.camel.example.reportincident.ReportIncidentEndpoint"/> <bean id="ReportIncidentRoutes" class="org.apache.camel.example.reportincident.ReportIncidentRoutes"/> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <camel:propertyPlaceholder id="properties" location="classpath:incident.properties"/> <routeBuilder ref="ReportIncidentRoutes"/> </camelContext> </beans> Below is my web.xml: <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> <display-name>My Web Application</display-name> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:camel-config.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>CXFServlet</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>CXFServlet</servlet-name> <url-pattern>/webservices/*</url-pattern> </servlet-mapping> </web-app> The glassfish server log shows following: Info: Webservice Endpoint deployed org.apache.camel.component.cxf.DefaultPayloadProviderSEI listening at address at http://xyz:8080/camel-example-reportincident-2.14.0/DefaultPayloadProviderSEI. Info: WebModule[null] ServletContext.log():No Spring WebApplicationInitializer types detected on classpath Info: WebModule[null] ServletContext.log():Initializing Spring root WebApplicationContext Info: 2014-10-31 17:12:54,785 [min-listener(6)] INFO ContextLoader - Root WebApplicationContext: initialization started Info: 2014-10-31 17:12:55,143 [min-listener(6)] INFO XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Fri Oct 31 17:12:55 PDT 2014]; root of context hierarchy Info: 2014-10-31 17:12:55,334 [min-listener(6)] INFO XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [camel-config.xml] Info: 2014-10-31 17:12:55,619 [min-listener(6)] INFO XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml] Info: 2014-10-31 17:12:57,942 [min-listener(6)] INFO XmlWebApplicationContext - Bean 'cxf' of type [class org.apache.cxf.bus.spring.SpringBus] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) Info: 2014-10-31 17:12:57,961 [min-listener(6)] INFO DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@414683e: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,reportIncident,ReportIncidentRoutes,properties,template,consumerTemplate,camel:beanPostProcessor,camel]; root of factory hierarchy Info: 2014-10-31 17:12:58,692 [min-listener(6)] INFO SpringCamelContext - Apache Camel 2.14.0 (CamelContext: camel) is starting Info: 2014-10-31 17:12:58,694 [min-listener(6)] INFO ManagedManagementStrategy - JMX is enabled Info: 2014-10-31 17:12:58,971 [min-listener(6)] INFO DefaultTypeConverter - Loaded 197 type converters Info: 2014-10-31 17:12:59,377 [min-listener(6)] INFO SpringCamelContext - AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance. Info: 2014-10-31 17:12:59,377 [min-listener(6)] INFO SpringCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html Info: 2014-10-31 17:12:59,494 [min-listener(6)] INFO ReflectionServiceFactoryBean - Creating Service {http://reportincident.example.camel.apache.org}ReportIncidentEndpointService from WSDL: etc/report_incident.wsdl Info: 2014-10-31 17:13:01,022 [min-listener(6)] WARN stractWSDLBasedEndpointFactory - Could not find endpoint/port for {http://reportincident.example.camel.apache.org}ReportIncidentEndpointPort in wsdl. Using {http://reportincident.example.camel.apache.org}ReportIncidentService. Info: 2014-10-31 17:13:01,063 [min-listener(6)] INFO ServerImpl - Setting the server's publish address to be /webservices/incident Info: 2014-10-31 17:13:01,143 [min-listener(6)] INFO SpringCamelContext - Route: route1 started and consuming from: Endpoint[cxf://bean:reportIncident] Info: 2014-10-31 17:13:01,162 [min-listener(6)] INFO SpringCamelContext - Route: route2 started and consuming from: Endpoint[file://target/subfolder] Info: 2014-10-31 17:13:01,162 [min-listener(6)] INFO SpringCamelContext - Total 2 routes, of which 2 is started. Info: 2014-10-31 17:13:01,165 [min-listener(6)] INFO SpringCamelContext - Apache Camel 2.14.0 (CamelContext: camel) started in 2.473 seconds Info: 2014-10-31 17:13:01,173 [min-listener(6)] INFO ContextLoader - Root WebApplicationContext: initialization completed in 6387 ms Info: Loading application [camel-example-reportincident-2.14.0] at [/camel-example-reportincident-2.14.0] Info: camel-example-reportincident-2.14.0 was successfully deployed in 26,220 milliseconds. -- View this message in context: http://camel.465427.n5.nabble.com/CXF-webservice-deployment-on-glassfish-tp5758405.html Sent from the Camel - Users mailing list archive at Nabble.com.