Thanks again Dan,
Using the hello world app I created, I tried using the wsdlLocation in the
JaxWsProxyFactoryBean bean of my spring context file and had an exception
thrown (stack trace below). It looks like the code is making an assumption
that my I have named my service "HelloWorldService" in the wsdl. I changed
the service name in the wsdl to HelloWorldService, rather than Services, and
it was able to properly instantiate the bean. However now when it attempts
to invoke the WS I get a java.net.MalformedURLException: unknown protocol:
jms It is attempting to use an HTTP conduit rather than a JMS. I'm assuming
this is because the WSDL only specifies a soap:address. Is there a way to
configure the bean to use JMS instead when configuring from a wsdl?
Thanks again for you help!
-Chris
Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
Could not find definition for service
{http://mytest.org/hello_world}HelloWorldService.
at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:114)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:312)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:408)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:189)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:164)
at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
at
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:118)
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:344)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:783)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:710)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:66)
at org.cxftest.jmsclient.App.main(App.java:30)
dkulp wrote:
>
>
> Thanks for the test case. Big help.
>
> Basically, we're only binding the Async methods in when the client is
> created
> with a wsdl at runtime. In your case, it's not using the wsdl. If you
> add
> a wsdlLocation attribute to specify the location of the wsdl, it would
> probably work.
>
> That said, it's definitely a bug and I have a fix that I'm going to test
> overnight and hopefully commit in the morning.
>
> Dan
>
>
> On Monday 08 December 2008 6:41:44 pm cxfuser17 wrote:
>> Thanks for the response Dan!
>>
>> I've tried the jaxws:client approach and had the same result. I've
>> attached a "hello world" example I threw together.
>>
>> If you look at the App.java, it starts an embedded broker, attempts to
>> place a message on the queue with the Async method which immediately
>> fails.
>> It then tries to use the synchronous 'blocking' approach which does
>> work,
>> although the client will time out as there is no 'server' to pick the
>> message of the queue.
>>
>> You will have to generate the wsdl source from the wsdl with Maven. Let
>> me
>> know what you think.
>>
>>
>> http://www.nabble.com/file/p20906007/JmsAsyncTest.zip JmsAsyncTest.zip
>
>
>
> --
> Daniel Kulp
> [EMAIL PROTECTED]
> http://dankulp.com/blog
>
>
--
View this message in context:
http://www.nabble.com/CXF-JMS-Asycn-through-Spring-tp20901403p20911908.html
Sent from the cxf-user mailing list archive at Nabble.com.