I assume you're trying to create a web service provider and not just a SOAP
client. Perhaps the configuration and/or build files in my WSDL-first
tutorial may be of help for you:
http://www.jroller.com/gmazza/entry/web_service_tutorial. Hopefully I'm
doing something different that might work for you instead.
Glen
Juan David wrote:
>
> Sorry I'm trying to format the message
>
>
> Juan David wrote:
>>
>> Hi All
>> I’m try to get cxf to work with a WSDL that is constructed using
>> WebSphere Integration Developer (WID). This a common case of interaction
>> because some times the wsdl are designed on WID because a mediation is
>> goin to be deployed on the ESB platform and some applications have to
>> implement the services as designed.
>>
>> This is the procedure I´m following:
>> 1) I create the WSDL on WID (see attached file)
>> 2) I run wsdl2java (wsdl2java -server -impl
>> wsdl/suramericana/test/wsdlfirst/TestW sdlFirst_ws.wsdl)
>> 3) Then I implement the class OperacionesBasicasImpl. This is the
>> service implementation generate by the
>> wsdl2java tool it has just one simple metod:
>>
>> public Boolean actualizarAfiliado(Afiliado afiliado) throws
>> ActualizarAfiliadoTechnicalExceptionMsg,
>>
>> ActualizarAfiliadoBusinessExceptionMsg { LOG.info("Executing
>> operation actualizarAfiliado");
>> System.out.println(afiliado);
>> try {
>> Boolean resultado = false;
>> if (afiliado.getTipoDocumento() != ""){
>> resultado = true;
>> }
>> return resultado;
>> } catch (Exception ex) {
>> ex.printStackTrace();
>> throw new RuntimeException(ex);
>> }
>> }
>>
>> 4) I set up my web.xml and my cxf.xml:
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:jaxws="http://cxf.apache.org/jaxws"
>> xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans.xsd
>> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
>>
>> <import resource="classpath:META-INF/cxf/cxf.xml" />
>> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>>
>> <jaxws:endpoint id="opBasicas"
>> implementor="wsdlfirst.test.suramericana.OperacionesBasicasImpl"
>> address="/OperacionesBasicas" />
>> </beans>
>>
>>
>> 5) Then I start the server and I got the following exception:
>>
>> 10/04/15 16:26:48 oracle.oc4j.admin.internal.DeployerException: Error
>> creating bean with name 'opBasicas': Invocation of init method failed;
>> nested exception is javax.xml.ws.WebServiceException:
>> org.apache.cxf.service.factory.ServiceConstructionException: Failed to
>> create service.
>> 10/04/15 16:26:48 at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1175)
>> 10/04/15 16:26:48 at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
>> 10/04/15 16:26:48 at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
>> 10/04/15 16:26:48 at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
>> 10/04/15 16:26:48 at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>> 10/04/15 16:26:48 at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>> 10/04/15 16:26:48 at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
>> 10/04/15 16:26:48 at
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>> 10/04/15 16:26:48 at
>> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
>> 10/04/15 16:26:48 at
>> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
>> 10/04/15 16:26:48 at
>> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
>>
>>
>> 6) Then I try to change the cxf.xml to address the wsdl location:
>>
>> <jaxws:endpoint id="opBasicas"
>> implementor="wsdlfirst.test.suramericana.OperacionesBasicasImpl"
>> wsdlLocation="wsdl/suramericana/test/wsdlfirst/TestWsdlFirst_ws.wsdl"
>> address="/OperacionesBasicas"/>
>>
>>
>> 7) Then I tart the server and got this nice exception:
>>
>> 10/04/16 09:21:48 oracle.oc4j.admin.internal.DeployerException: Error
>> creating bean with name 'opBasicas': Invocation of init method failed;
>> nested exception is java.lang.StackOverflowError
>> 10/04/16 09:21:48 at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1175)
>> 10/04/16 09:21:48 at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
>> 10/04/16 09:21:48 at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
>> 10/04/16 09:21:48 at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
>> 10/04/16 09:21:48 at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>> 10/04/16 09:21:48 at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>> 10/04/16 09:21:48 at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
>> 10/04/16 09:21:48 at
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>> 10/04/16 09:21:48 at
>> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
>> 10/04/16 09:21:48 at
>> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
>> 10/04/16 09:21:48 at
>> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
>>
>>
>> If I do the same procedure using Axis it works just ok
>> Maybe the wsdl is not compatible with cxf but if it is the case I don´t
>> understand why when I run the java2wsdl –validation it shows no errors
>>
>> I really appreciate any help on this issue I been working a lot on this
>> unsusessfully and we are using cxf on clients and services with no
>> problems always that we use the java first approach
>>
>> Thanks in advance
>>
>>
>
>
--
View this message in context:
http://old.nabble.com/WSDL-First-Approach-issues-tp28271221p28286469.html
Sent from the cxf-user mailing list archive at Nabble.com.