Re: Rest services response into

2007-10-04 Thread Vincenzo Vitale
Thank you very much Dan,

I'm not an AOP expert but I will try to do it and let you know.


Ciao,
V.

On 10/3/07, Daniel Kulp <[EMAIL PROTECTED]> wrote:
>
>
> it's definitely not something that falls into the "simple to implement"
> ball park.
>
> One option that comes to mind is to write an interceptor that sits
> immediately AFTER the StaxOutInterceptor and wrappers the
> XmlStreamWriter with a new XmlStreamWriter that forwards the
> writeCharacters calls to writeCDATA instead.   That would make all the
> strings CDATA sections.   You could probably analyze the string a bit
> first.   That probably wouldn't be too hard to do.
>
> Dan
>
>
> On Wednesday 03 October 2007, Vincenzo Vitale wrote:
> > No one with the same requirement? :-(
> >
> > I know that with normal XML parsers having a CDATA section or an
> > escaped one should not be a problem but in my case maybe the third
> > party are soing to use a custom old style parser... I'm thing about
> > creating a servlet filter to substitute the output in the rest case
> > but it seems to me really really old style!
> >
> >
> > Ciao,
> > V.
> >
> > On 9/28/07, Vincenzo Vitale <[EMAIL PROTECTED]> wrote:
> > > Hi All,
> > >
> > > I'm exposing a rest services (using annotation) and the return value
> > > is a string with html code inside. The result value is escaped but I
> > > would like to have it between 

Re: WebServiceContext is null

2007-10-04 Thread Mustafa Egilmezbilek
Hi Willem,

Thanks for your effort. I got the latest trunk this morning but had a
problem during maven install. I am using jdk1.6 and it gave me some trouble
.

I switched to jdk 1.5 and I was able to build the latest trunk but then my
test failed:

Oct 4, 2007 2:29:23 PM
org.apache.cxf.common.annotation.AnnotationProcessorvisitAnnotatedElement
SEVERE: an AnnotationVisitor (
[EMAIL PROTECTED]) raised an exception
on element public javax.xml.ws.WebServiceContext
aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext.
java.lang.IllegalArgumentException: Can not set
javax.xml.ws.WebServiceContext field
aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext to $Proxy32
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
UnsafeFieldAccessorImpl.java:146)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
UnsafeFieldAccessorImpl.java:150)
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(
UnsafeFieldAccessorImpl.java:37)
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(
UnsafeObjectFieldAccessorImpl.java:57)
at java.lang.reflect.Field.set(Field.java:657)
at org.apache.cxf.common.injection.ResourceInjector.injectField(
ResourceInjector.java:273)
at org.apache.cxf.common.injection.ResourceInjector.visitField(
ResourceInjector.java:164)
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:597)
at
org.apache.cxf.common.annotation.AnnotationProcessor.visitAnnotatedElement(
AnnotationProcessor.java:131)
at org.apache.cxf.common.annotation.AnnotationProcessor.processFields(
AnnotationProcessor.java:110)
at org.apache.cxf.common.annotation.AnnotationProcessor.accept(
AnnotationProcessor.java:89)
at org.apache.cxf.common.injection.ResourceInjector.inject(
ResourceInjector.java:81)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.injectResources(
JaxWsServerFactoryBean.java:201)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.init(
JaxWsServerFactoryBean.java:157)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
JaxWsServerFactoryBean.java:150)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:291)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:231)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:182)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:344)
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:597)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod
(AbstractAutowireCapableBeanFactory.java:1240)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
(AbstractAutowireCapableBeanFactory.java:1205)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
(AbstractAutowireCapableBeanFactory.java:1171)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
(AbstractAutowireCapableBeanFactory.java:425)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
(DefaultListableBeanFactory.java:287)
at
org.springframework.context.support.AbstractApplicationContext.refresh(
AbstractApplicationContext.java:352)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(
ContextLoader.java:244)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(
ContextLoader.java:187)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(
ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(
StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java
:4334)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(

Re: WebServiceContext is null

2007-10-04 Thread Willem2

Hi,

 
Maybe you can try it with the set method Injection.
@Resource
public final void setWebContext(final WebServiceContext argResource) {
this.resource = argResource1;
}

BTW,
Current  CXF trunk is changing to use JAXB2.1 , so you can't use jdk1.6 to
build without endorsing the JAXB API.

Willem.


blacksheep wrote:
> 
> Hi Willem,
> 
> Thanks for your effort. I got the latest trunk this morning but had a
> problem during maven install. I am using jdk1.6 and it gave me some
> trouble
> .
> 
> I switched to jdk 1.5 and I was able to build the latest trunk but then my
> test failed:
> 
> Oct 4, 2007 2:29:23 PM
> org.apache.cxf.common.annotation.AnnotationProcessorvisitAnnotatedElement
> SEVERE: an AnnotationVisitor (
> [EMAIL PROTECTED]) raised an
> exception
> on element public javax.xml.ws.WebServiceContext
> aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext.
> java.lang.IllegalArgumentException: Can not set
> javax.xml.ws.WebServiceContext field
> aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext to $Proxy32
> at
> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
> UnsafeFieldAccessorImpl.java:146)
> at
> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
> UnsafeFieldAccessorImpl.java:150)
> at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(
> UnsafeFieldAccessorImpl.java:37)
> at sun.reflect.UnsafeObjectFieldAccessorImpl.set(
> UnsafeObjectFieldAccessorImpl.java:57)
> at java.lang.reflect.Field.set(Field.java:657)
> at org.apache.cxf.common.injection.ResourceInjector.injectField(
> ResourceInjector.java:273)
> at org.apache.cxf.common.injection.ResourceInjector.visitField(
> ResourceInjector.java:164)
> 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:597)
> at
> org.apache.cxf.common.annotation.AnnotationProcessor.visitAnnotatedElement(
> AnnotationProcessor.java:131)
> at org.apache.cxf.common.annotation.AnnotationProcessor.processFields(
> AnnotationProcessor.java:110)
> at org.apache.cxf.common.annotation.AnnotationProcessor.accept(
> AnnotationProcessor.java:89)
> at org.apache.cxf.common.injection.ResourceInjector.inject(
> ResourceInjector.java:81)
> at org.apache.cxf.jaxws.JaxWsServerFactoryBean.injectResources(
> JaxWsServerFactoryBean.java:201)
> at org.apache.cxf.jaxws.JaxWsServerFactoryBean.init(
> JaxWsServerFactoryBean.java:157)
> at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
> JaxWsServerFactoryBean.java:150)
> at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:291)
> at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:231)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:182)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:344)
> 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:597)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod
> (AbstractAutowireCapableBeanFactory.java:1240)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
> (AbstractAutowireCapableBeanFactory.java:1205)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
> (AbstractAutowireCapableBeanFactory.java:1171)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
> (AbstractAutowireCapableBeanFactory.java:425)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
> AbstractBeanFactory.java:251)
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
> (DefaultSingletonBeanRegistry.java:156)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean
> (AbstractBeanFactory.java:248)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean
> (AbstractBeanFactory.java:160)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
> (DefaultListableBeanFactory.java:287)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(
> AbstractApplicationContext.java:352)
> at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(
> ContextLoader.java:244)
> at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(
> ContextLoader.java:187)
> at
> org.sp

Re: WebServiceContext is null

2007-10-04 Thread Mustafa Egilmezbilek
I noticed it and set endorsing lib to use jaxb-2.1.jar.

By the way I changed my code to:
@Resource
public WebServiceContext wsContext;

@Resource
public final void setWebContext(final WebServiceContext wsContext) {
this.wsContext = wsContext;
}

Is this right because I still got the problem:

SEVERE: an AnnotationVisitor (
[EMAIL PROTECTED]) raised an exception
on element public javax.xml.ws.WebServiceContext
aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext.
java.lang.IllegalArgumentException: Can not set
javax.xml.ws.WebServiceContext field
aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext to $Proxy32
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
UnsafeFieldAccessorImpl.java:146)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
UnsafeFieldAccessorImpl.java:150)
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(
UnsafeFieldAccessorImpl.java:37)
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(
UnsafeObjectFieldAccessorImpl.java:57)
at java.lang.reflect.Field.set(Field.java:657)
at org.apache.cxf.common.injection.ResourceInjector.injectField(
ResourceInjector.java:273)
at org.apache.cxf.common.injection.ResourceInjector.visitField(
ResourceInjector.java:164)
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:597)
at
org.apache.cxf.common.annotation.AnnotationProcessor.visitAnnotatedElement(
AnnotationProcessor.java:131)
at org.apache.cxf.common.annotation.AnnotationProcessor.processFields(
AnnotationProcessor.java:110)
at org.apache.cxf.common.annotation.AnnotationProcessor.accept(
AnnotationProcessor.java:89)
at org.apache.cxf.common.injection.ResourceInjector.inject(
ResourceInjector.java:81)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.injectResources(
JaxWsServerFactoryBean.java:201)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.init(
JaxWsServerFactoryBean.java:157)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
JaxWsServerFactoryBean.java:150)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:291)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:231)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:182)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:344)
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:597)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod
(AbstractAutowireCapableBeanFactory.java:1240)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
(AbstractAutowireCapableBeanFactory.java:1205)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
(AbstractAutowireCapableBeanFactory.java:1171)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
(AbstractAutowireCapableBeanFactory.java:425)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
(DefaultListableBeanFactory.java:287)
at
org.springframework.context.support.AbstractApplicationContext.refresh(
AbstractApplicationContext.java:352)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(
ContextLoader.java:244)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(
ContextLoader.java:187)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(
ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(
StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java
:4334)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java
:443

Re: WebServiceContext is null

2007-10-04 Thread Mustafa Egilmezbilek
I did it already but no luck :(

On 10/4/07, Willem2 <[EMAIL PROTECTED]> wrote:
>
>
> Can you try to remove the @Resource for the wsContext class member?
> I just wrote some tests on the proxy object injection, I always get some
> java.lang.IllegalArgumentException here. :(
>
> Willem.
>
> blacksheep wrote:
> >
> > I noticed it and set endorsing lib to use jaxb-2.1.jar.
> >
> > By the way I changed my code to:
> > @Resource
> > public WebServiceContext wsContext;
> >
> > @Resource
> > public final void setWebContext(final WebServiceContext wsContext) {
> > this.wsContext = wsContext;
> > }
> >
> > Is this right because I still got the problem:
> >
> > SEVERE: an AnnotationVisitor (
> > [EMAIL PROTECTED]) raised an
> > exception
> > on element public javax.xml.ws.WebServiceContext
> > aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext.
> > java.lang.IllegalArgumentException: Can not set
> > javax.xml.ws.WebServiceContext field
> > aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext to
> $Proxy32
> > at
> > sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
> > UnsafeFieldAccessorImpl.java:146)
> > at
> > sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
> > UnsafeFieldAccessorImpl.java:150)
> > at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(
> > UnsafeFieldAccessorImpl.java:37)
> > at sun.reflect.UnsafeObjectFieldAccessorImpl.set(
> > UnsafeObjectFieldAccessorImpl.java:57)
> > at java.lang.reflect.Field.set(Field.java:657)
> > at org.apache.cxf.common.injection.ResourceInjector.injectField(
> > ResourceInjector.java:273)
> > at org.apache.cxf.common.injection.ResourceInjector.visitField(
> > ResourceInjector.java:164)
> > 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:597)
> > at
> >
> org.apache.cxf.common.annotation.AnnotationProcessor.visitAnnotatedElement
> (
> > AnnotationProcessor.java:131)
> > at
> org.apache.cxf.common.annotation.AnnotationProcessor.processFields(
> > AnnotationProcessor.java:110)
> > at org.apache.cxf.common.annotation.AnnotationProcessor.accept(
> > AnnotationProcessor.java:89)
> > at org.apache.cxf.common.injection.ResourceInjector.inject(
> > ResourceInjector.java:81)
> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.injectResources(
> > JaxWsServerFactoryBean.java:201)
> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.init(
> > JaxWsServerFactoryBean.java:157)
> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
> > JaxWsServerFactoryBean.java:150)
> > at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java
> :291)
> > at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java
> :231)
> > at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:182)
> > at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:344)
> > 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:597)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod
> > (AbstractAutowireCapableBeanFactory.java:1240)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
> > (AbstractAutowireCapableBeanFactory.java:1205)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
> > (AbstractAutowireCapableBeanFactory.java:1171)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
> > (AbstractAutowireCapableBeanFactory.java:425)
> > at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
> > AbstractBeanFactory.java:251)
> > at
> >
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
> > (DefaultSingletonBeanRegistry.java:156)
> > at
> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean
> > (AbstractBeanFactory.java:248)
> > at
> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean
> > (AbstractBeanFactory.java:160)
> > at
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
> > (DefaultListableBeanFactory.java:287)
> > at
> > org.springframework.context.support.AbstractApplicationContext.refresh(
> > AbstractApplicationContext.java:352)
> > at
> >
> org.springframework.web.context.ContextLoader.createWebA

logging and spring and jetty

2007-10-04 Thread Benson Margulies
If I just deploy a webapp along the lines of the samples, I get ...

 

[jetty] 2007-10-04 09:42:53.129::INFO:  No Transaction manager found -
if your webapp requires one, please configure one.

[jetty] 2007-10-04 09:42:53.535:rlpws:INFO:  Initializing Spring
root WebApplicationContext

[jetty] log4j:WARN No appenders could be found for logger
(org.springframework.web.context.ContextLoader).

  

 

If I try to add in the Spring class 

 

org.springframework.web.util.Log4jConfigListener

 

My CXF services just disappear.

 

I'm using the 2.0.2 release package. Anybody got a clue?

 



Re: WebServiceContext is null

2007-10-04 Thread Willem2

Can you try to remove the @Resource for the wsContext class member?
I just wrote some tests on the proxy object injection, I always get some
java.lang.IllegalArgumentException here. :(

Willem.

blacksheep wrote:
> 
> I noticed it and set endorsing lib to use jaxb-2.1.jar.
> 
> By the way I changed my code to:
> @Resource
> public WebServiceContext wsContext;
> 
> @Resource
> public final void setWebContext(final WebServiceContext wsContext) {
> this.wsContext = wsContext;
> }
> 
> Is this right because I still got the problem:
> 
> SEVERE: an AnnotationVisitor (
> [EMAIL PROTECTED]) raised an
> exception
> on element public javax.xml.ws.WebServiceContext
> aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext.
> java.lang.IllegalArgumentException: Can not set
> javax.xml.ws.WebServiceContext field
> aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext to $Proxy32
> at
> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
> UnsafeFieldAccessorImpl.java:146)
> at
> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
> UnsafeFieldAccessorImpl.java:150)
> at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(
> UnsafeFieldAccessorImpl.java:37)
> at sun.reflect.UnsafeObjectFieldAccessorImpl.set(
> UnsafeObjectFieldAccessorImpl.java:57)
> at java.lang.reflect.Field.set(Field.java:657)
> at org.apache.cxf.common.injection.ResourceInjector.injectField(
> ResourceInjector.java:273)
> at org.apache.cxf.common.injection.ResourceInjector.visitField(
> ResourceInjector.java:164)
> 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:597)
> at
> org.apache.cxf.common.annotation.AnnotationProcessor.visitAnnotatedElement(
> AnnotationProcessor.java:131)
> at org.apache.cxf.common.annotation.AnnotationProcessor.processFields(
> AnnotationProcessor.java:110)
> at org.apache.cxf.common.annotation.AnnotationProcessor.accept(
> AnnotationProcessor.java:89)
> at org.apache.cxf.common.injection.ResourceInjector.inject(
> ResourceInjector.java:81)
> at org.apache.cxf.jaxws.JaxWsServerFactoryBean.injectResources(
> JaxWsServerFactoryBean.java:201)
> at org.apache.cxf.jaxws.JaxWsServerFactoryBean.init(
> JaxWsServerFactoryBean.java:157)
> at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
> JaxWsServerFactoryBean.java:150)
> at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:291)
> at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:231)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:182)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:344)
> 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:597)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod
> (AbstractAutowireCapableBeanFactory.java:1240)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
> (AbstractAutowireCapableBeanFactory.java:1205)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
> (AbstractAutowireCapableBeanFactory.java:1171)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
> (AbstractAutowireCapableBeanFactory.java:425)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
> AbstractBeanFactory.java:251)
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
> (DefaultSingletonBeanRegistry.java:156)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean
> (AbstractBeanFactory.java:248)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean
> (AbstractBeanFactory.java:160)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
> (DefaultListableBeanFactory.java:287)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(
> AbstractApplicationContext.java:352)
> at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(
> ContextLoader.java:244)
> at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(
> ContextLoader.java:187)
> at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(
> ContextLoaderListener.java:49)
> at org.apache.catalina.core.StandardContex

Re: WebServiceContext is null

2007-10-04 Thread Willem2

OK, on the bright side, we have a small test case to show how to get the
exception.
I will try to dig the resource injection part then :)

Willem.


blacksheep wrote:
> 
> I did it already but no luck :(
> 
> On 10/4/07, Willem2 <[EMAIL PROTECTED]> wrote:
>>
>>
>> Can you try to remove the @Resource for the wsContext class member?
>> I just wrote some tests on the proxy object injection, I always get some
>> java.lang.IllegalArgumentException here. :(
>>
>> Willem.
>>
>> blacksheep wrote:
>> >
>> > I noticed it and set endorsing lib to use jaxb-2.1.jar.
>> >
>> > By the way I changed my code to:
>> > @Resource
>> > public WebServiceContext wsContext;
>> >
>> > @Resource
>> > public final void setWebContext(final WebServiceContext wsContext)
>> {
>> > this.wsContext = wsContext;
>> > }
>> >
>> > Is this right because I still got the problem:
>> >
>> > SEVERE: an AnnotationVisitor (
>> > [EMAIL PROTECTED]) raised an
>> > exception
>> > on element public javax.xml.ws.WebServiceContext
>> > aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext.
>> > java.lang.IllegalArgumentException: Can not set
>> > javax.xml.ws.WebServiceContext field
>> > aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext to
>> $Proxy32
>> > at
>> > sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
>> > UnsafeFieldAccessorImpl.java:146)
>> > at
>> > sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
>> > UnsafeFieldAccessorImpl.java:150)
>> > at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(
>> > UnsafeFieldAccessorImpl.java:37)
>> > at sun.reflect.UnsafeObjectFieldAccessorImpl.set(
>> > UnsafeObjectFieldAccessorImpl.java:57)
>> > at java.lang.reflect.Field.set(Field.java:657)
>> > at org.apache.cxf.common.injection.ResourceInjector.injectField(
>> > ResourceInjector.java:273)
>> > at org.apache.cxf.common.injection.ResourceInjector.visitField(
>> > ResourceInjector.java:164)
>> > 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:597)
>> > at
>> >
>> org.apache.cxf.common.annotation.AnnotationProcessor.visitAnnotatedElement
>> (
>> > AnnotationProcessor.java:131)
>> > at
>> org.apache.cxf.common.annotation.AnnotationProcessor.processFields(
>> > AnnotationProcessor.java:110)
>> > at org.apache.cxf.common.annotation.AnnotationProcessor.accept(
>> > AnnotationProcessor.java:89)
>> > at org.apache.cxf.common.injection.ResourceInjector.inject(
>> > ResourceInjector.java:81)
>> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.injectResources(
>> > JaxWsServerFactoryBean.java:201)
>> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.init(
>> > JaxWsServerFactoryBean.java:157)
>> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
>> > JaxWsServerFactoryBean.java:150)
>> > at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java
>> :291)
>> > at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java
>> :231)
>> > at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:182)
>> > at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:344)
>> > 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:597)
>> > at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod
>> > (AbstractAutowireCapableBeanFactory.java:1240)
>> > at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
>> > (AbstractAutowireCapableBeanFactory.java:1205)
>> > at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
>> > (AbstractAutowireCapableBeanFactory.java:1171)
>> > at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
>> > (AbstractAutowireCapableBeanFactory.java:425)
>> > at
>> >
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
>> > AbstractBeanFactory.java:251)
>> > at
>> >
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
>> > (DefaultSingletonBeanRegistry.java:156)
>> > at
>> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean
>> > (AbstractBeanFactory.java:248)
>> > at
>> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean
>> > (AbstractBeanFactory.java:160)
>> > at
>> >
>> org.springframework.beans.factory.support

Re: logging and spring and jetty

2007-10-04 Thread Willem2

Hi Benson,

you still need to use
"org.springframework.web.context.ContextLoaderListener" as the listener,
which will provide the application context for CXFServlet bus to load.

Willem.

bmargulies wrote:
> 
> If I just deploy a webapp along the lines of the samples, I get ...
> 
>  
> 
> [jetty] 2007-10-04 09:42:53.129::INFO:  No Transaction manager found -
> if your webapp requires one, please configure one.
> 
> [jetty] 2007-10-04 09:42:53.535:rlpws:INFO:  Initializing Spring
> root WebApplicationContext
> 
> [jetty] log4j:WARN No appenders could be found for logger
> (org.springframework.web.context.ContextLoader).
> 
>   
> 
>  
> 
> If I try to add in the Spring class 
> 
>  
> 
> org.springframework.web.util.Log4jConfigListener er-class>
> 
>  
> 
> My CXF services just disappear.
> 
>  
> 
> I'm using the 2.0.2 release package. Anybody got a clue?
> 
>  
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/logging-and-spring-and-jetty-tf4569112.html#a13041502
Sent from the cxf-user mailing list archive at Nabble.com.



more on logging in jetty

2007-10-04 Thread Benson Margulies
Sending in a random URL provoked this. Would it make sense to make a
JIRA requesting that this situation result in a more concise log
message?

 

[jetty] org.apache.cxf.interceptor.Fault: No such operation: 

[jetty] at
org.apache.cxf.interceptor.URIMappingInterceptor.handleMessage(URIMappin
gInterceptor.java:77)

[jetty] at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:207)

[jetty] at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
onObserver.java:73)

[jetty] at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDes
tination.java:79)

[jetty] at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
vletController.java:235)

[jetty] at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
ler.java:140)

[jetty] at
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:278)

[jetty] at
org.apache.cxf.transport.servlet.CXFServlet.doGet(CXFServlet.java:260)

[jetty] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

[jetty] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

[jetty] at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

[jetty] at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)

[jetty] at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:2
16)

[jetty] at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

[jetty] at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)

[jetty] at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

[jetty] at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
Collection.java:211)

[jetty] at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
a:114)

[jetty] at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

[jetty] at org.mortbay.jetty.Server.handle(Server.java:285)

[jetty] at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)

[jetty] at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConne
ction.java:821)

[jetty] at
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)

[jetty] at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)

[jetty] at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)

[jetty] at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
368)

[jetty] at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
va:442)



RE: logging and spring and jetty

2007-10-04 Thread Benson Margulies
I did. When I list both listeners, CXF stops working. When I only list
the CXF listener, all is well. It is very mysterious. If that is
mysterious to you, I'll fire up my trusty debugger.

> -Original Message-
> From: Willem2 [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 04, 2007 10:48 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: logging and spring and jetty
> 
> 
> Hi Benson,
> 
> you still need to use
> "org.springframework.web.context.ContextLoaderListener" as the
listener,
> which will provide the application context for CXFServlet bus to load.
> 
> Willem.
> 
> bmargulies wrote:
> >
> > If I just deploy a webapp along the lines of the samples, I get ...
> >
> >
> >
> > [jetty] 2007-10-04 09:42:53.129::INFO:  No Transaction manager found
-
> > if your webapp requires one, please configure one.
> >
> > [jetty] 2007-10-04 09:42:53.535:rlpws:INFO:  Initializing Spring
> > root WebApplicationContext
> >
> > [jetty] log4j:WARN No appenders could be found for logger
> > (org.springframework.web.context.ContextLoader).
> >
> >
> >
> >
> >
> > If I try to add in the Spring class
> >
> >
> >
> >
org.springframework.web.util.Log4jConfigListener > er-class>
> >
> >
> >
> > My CXF services just disappear.
> >
> >
> >
> > I'm using the 2.0.2 release package. Anybody got a clue?
> >
> >
> >
> >
> >
> 
> --
> View this message in context:
http://www.nabble.com/logging-and-spring-
> and-jetty-tf4569112.html#a13041502
> Sent from the cxf-user mailing list archive at Nabble.com.



Preferred JDK Version?

2007-10-04 Thread David W Sica
I'm prototyping with CXF and am looking to choose my deployment
environment.  Right now I'm prototyping with JDK5 but was wondering if there
are really and JDK version requirements for CXF?  Also, should I pursue
using JDK6 for deployment?  Do I gain anything with JDK6 as far as CXF is
concerned?

Thanks,
David


Re: WebServiceContext is null

2007-10-04 Thread Willem2

Hi,

I just get the unit test workable :)
Can you try it  with the setter Resource annotation?

Willem.


Willem2 wrote:
> 
> OK, on the bright side, we have a small test case to show how to get the
> exception.
> I will try to dig the resource injection part then :)
> 
> Willem.
> 
> 
> blacksheep wrote:
>> 
>> I did it already but no luck :(
>> 
>> On 10/4/07, Willem2 <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>> Can you try to remove the @Resource for the wsContext class member?
>>> I just wrote some tests on the proxy object injection, I always get some
>>> java.lang.IllegalArgumentException here. :(
>>>
>>> Willem.
>>>
>>> blacksheep wrote:
>>> >
>>> > I noticed it and set endorsing lib to use jaxb-2.1.jar.
>>> >
>>> > By the way I changed my code to:
>>> > @Resource
>>> > public WebServiceContext wsContext;
>>> >
>>> > @Resource
>>> > public final void setWebContext(final WebServiceContext wsContext)
>>> {
>>> > this.wsContext = wsContext;
>>> > }
>>> >
>>> > Is this right because I still got the problem:
>>> >
>>> > SEVERE: an AnnotationVisitor (
>>> > [EMAIL PROTECTED]) raised an
>>> > exception
>>> > on element public javax.xml.ws.WebServiceContext
>>> > aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext.
>>> > java.lang.IllegalArgumentException: Can not set
>>> > javax.xml.ws.WebServiceContext field
>>> > aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext to
>>> $Proxy32
>>> > at
>>> > sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
>>> > UnsafeFieldAccessorImpl.java:146)
>>> > at
>>> > sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
>>> > UnsafeFieldAccessorImpl.java:150)
>>> > at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(
>>> > UnsafeFieldAccessorImpl.java:37)
>>> > at sun.reflect.UnsafeObjectFieldAccessorImpl.set(
>>> > UnsafeObjectFieldAccessorImpl.java:57)
>>> > at java.lang.reflect.Field.set(Field.java:657)
>>> > at org.apache.cxf.common.injection.ResourceInjector.injectField(
>>> > ResourceInjector.java:273)
>>> > at org.apache.cxf.common.injection.ResourceInjector.visitField(
>>> > ResourceInjector.java:164)
>>> > 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:597)
>>> > at
>>> >
>>> org.apache.cxf.common.annotation.AnnotationProcessor.visitAnnotatedElement
>>> (
>>> > AnnotationProcessor.java:131)
>>> > at
>>> org.apache.cxf.common.annotation.AnnotationProcessor.processFields(
>>> > AnnotationProcessor.java:110)
>>> > at org.apache.cxf.common.annotation.AnnotationProcessor.accept(
>>> > AnnotationProcessor.java:89)
>>> > at org.apache.cxf.common.injection.ResourceInjector.inject(
>>> > ResourceInjector.java:81)
>>> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.injectResources(
>>> > JaxWsServerFactoryBean.java:201)
>>> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.init(
>>> > JaxWsServerFactoryBean.java:157)
>>> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
>>> > JaxWsServerFactoryBean.java:150)
>>> > at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java
>>> :291)
>>> > at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java
>>> :231)
>>> > at
>>> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:182)
>>> > at
>>> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:344)
>>> > 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:597)
>>> > at
>>> >
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod
>>> > (AbstractAutowireCapableBeanFactory.java:1240)
>>> > at
>>> >
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
>>> > (AbstractAutowireCapableBeanFactory.java:1205)
>>> > at
>>> >
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
>>> > (AbstractAutowireCapableBeanFactory.java:1171)
>>> > at
>>> >
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
>>> > (AbstractAutowireCapableBeanFactory.java:425)
>>> > at
>>> >
>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
>>> > AbstractBeanFactory.java:251)
>>> > at
>>> >
>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
>>> > (DefaultSingletonBeanRegistry.java:156)
>>> > at
>>> > org.springframework.beans.fa

Url parameters in rest web services

2007-10-04 Thread Vincenzo Vitale
Hi,

I developed some web services using the HttpResource annotation.

So for example I have the annotation:

@HttpResource(location =
"/myService/{firstParameter}/{secondParameter}/{urlParameter}/{lastParameter}")


The problem has that my parameters can contain url and I solved the problems
with for example something like "http://";, double encoding it in
"http%253A%252F%252F".

In my development environment (Jboss under Windows) the method gets the
single encoded version "http%3A%2F%2F" and that's fine. But in the test
environment under linux the parameter in the URL is decoded twice and
actually the / in the URL is interpreted by cxf like a parameter separator.

Any suggestion on what can cause this? Maybe a Jboss or locale configuration
I need to change. I'm also wondering if it's possible to use normal
parameters in a rest service exposed with cxf instead of url template. there
is the queryParameter attribute in the @HttpResource but I have not found
any example on how to use it.


Thanks,
Vincenzo.


Re: more on logging in jetty

2007-10-04 Thread Willem2

CXF support to access the web services with get method.
Here is a example [1] for it.
[1]
https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java

Willem.

bmargulies wrote:
> 
> Sending in a random URL provoked this. Would it make sense to make a
> JIRA requesting that this situation result in a more concise log
> message?
> 
>  
> 
> [jetty] org.apache.cxf.interceptor.Fault: No such operation: 
> 
> [jetty] at
> org.apache.cxf.interceptor.URIMappingInterceptor.handleMessage(URIMappin
> gInterceptor.java:77)
> 
> [jetty] at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> hain.java:207)
> 
> [jetty] at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
> onObserver.java:73)
> 
> [jetty] at
> org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDes
> tination.java:79)
> 
> [jetty] at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
> vletController.java:235)
> 
> [jetty] at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
> ler.java:140)
> 
> [jetty] at
> org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:278)
> 
> [jetty] at
> org.apache.cxf.transport.servlet.CXFServlet.doGet(CXFServlet.java:260)
> 
> [jetty] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> 
> [jetty] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 
> [jetty] at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 
> [jetty] at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
> 
> [jetty] at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:2
> 16)
> 
> [jetty] at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> 
> [jetty] at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> 
> [jetty] at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> 
> [jetty] at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
> Collection.java:211)
> 
> [jetty] at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
> a:114)
> 
> [jetty] at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> 
> [jetty] at org.mortbay.jetty.Server.handle(Server.java:285)
> 
> [jetty] at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
> 
> [jetty] at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConne
> ction.java:821)
> 
> [jetty] at
> org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
> 
> [jetty] at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
> 
> [jetty] at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
> 
> [jetty] at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
> 368)
> 
> [jetty] at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
> va:442)
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/more-on-logging-in-jetty-tf4569314.html#a13041968
Sent from the cxf-user mailing list archive at Nabble.com.



RE: more on logging in jetty

2007-10-04 Thread Benson Margulies
Willem,

I'm not following. I didn't expect this to work, I just expected it to
log a simple 'request for a URL that doesn't correspond to a service'
instead of a full stacktrace.

> -Original Message-
> From: Willem2 [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 04, 2007 11:09 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: more on logging in jetty
> 
> 
> CXF support to access the web services with get method.
> Here is a example [1] for it.
> [1]
>
https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j
av
> a/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java
> 
> Willem.
> 
> bmargulies wrote:
> >
> > Sending in a random URL provoked this. Would it make sense to make a
> > JIRA requesting that this situation result in a more concise log
> > message?
> >
> >
> >
> > [jetty] org.apache.cxf.interceptor.Fault: No such operation:
> >
> > [jetty] at
> >
org.apache.cxf.interceptor.URIMappingInterceptor.handleMessage(URIMappin
> > gInterceptor.java:77)
> >
> > [jetty] at
> >
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> > hain.java:207)
> >
> > [jetty] at
> >
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
> > onObserver.java:73)
> >
> > [jetty] at
> >
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDes
> > tination.java:79)
> >
> > [jetty] at
> >
org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
> > vletController.java:235)
> >
> > [jetty] at
> >
org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
> > ler.java:140)
> >
> > [jetty] at
> >
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:278)
> >
> > [jetty] at
> >
org.apache.cxf.transport.servlet.CXFServlet.doGet(CXFServlet.java:260)
> >
> > [jetty] at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> >
> > [jetty] at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> >
> > [jetty] at
> >
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> >
> > [jetty] at
> >
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
> >
> > [jetty] at
> >
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:2
> > 16)
> >
> > [jetty] at
> >
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> >
> > [jetty] at
> >
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> >
> > [jetty] at
> >
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> >
> > [jetty] at
> >
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
> > Collection.java:211)
> >
> > [jetty] at
> >
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
> > a:114)
> >
> > [jetty] at
> >
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> >
> > [jetty] at org.mortbay.jetty.Server.handle(Server.java:285)
> >
> > [jetty] at
> >
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
> >
> > [jetty] at
> >
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConne
> > ction.java:821)
> >
> > [jetty] at
> > org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
> >
> > [jetty] at
> > org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
> >
> > [jetty] at
> > org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
> >
> > [jetty] at
> >
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
> > 368)
> >
> > [jetty] at
> >
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
> > va:442)
> >
> >
> >
> 
> --
> View this message in context:
http://www.nabble.com/more-on-logging-in-
> jetty-tf4569314.html#a13041968
> Sent from the cxf-user mailing list archive at Nabble.com.



RE: logging and spring and jetty

2007-10-04 Thread Willem2

Yes, it is weird. :(

Willem.

 

bmargulies wrote:
> 
> I did. When I list both listeners, CXF stops working. When I only list
> the CXF listener, all is well. It is very mysterious. If that is
> mysterious to you, I'll fire up my trusty debugger.
> 
>> -Original Message-
>> From: Willem2 [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, October 04, 2007 10:48 AM
>> To: cxf-user@incubator.apache.org
>> Subject: Re: logging and spring and jetty
>> 
>> 
>> Hi Benson,
>> 
>> you still need to use
>> "org.springframework.web.context.ContextLoaderListener" as the
> listener,
>> which will provide the application context for CXFServlet bus to load.
>> 
>> Willem.
>> 
>> bmargulies wrote:
>> >
>> > If I just deploy a webapp along the lines of the samples, I get ...
>> >
>> >
>> >
>> > [jetty] 2007-10-04 09:42:53.129::INFO:  No Transaction manager found
> -
>> > if your webapp requires one, please configure one.
>> >
>> > [jetty] 2007-10-04 09:42:53.535:rlpws:INFO:  Initializing Spring
>> > root WebApplicationContext
>> >
>> > [jetty] log4j:WARN No appenders could be found for logger
>> > (org.springframework.web.context.ContextLoader).
>> >
>> >
>> >
>> >
>> >
>> > If I try to add in the Spring class
>> >
>> >
>> >
>> >
> org.springframework.web.util.Log4jConfigListener> > er-class>
>> >
>> >
>> >
>> > My CXF services just disappear.
>> >
>> >
>> >
>> > I'm using the 2.0.2 release package. Anybody got a clue?
>> >
>> >
>> >
>> >
>> >
>> 
>> --
>> View this message in context:
> http://www.nabble.com/logging-and-spring-
>> and-jetty-tf4569112.html#a13041502
>> Sent from the cxf-user mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/logging-and-spring-and-jetty-tf4569112.html#a13042120
Sent from the cxf-user mailing list archive at Nabble.com.



RE: more on logging in jetty

2007-10-04 Thread Willem2

Here is a flag contextMatchStrategy in the AbstractHttpDetination. 
If contextMatchStrategy set to be "exact",  
CXF will just consume the message with exact url.
And the default value of it is null, so we will pass the all the message's
url start with the service address into the interceptors, so you will get
the stack trace on the server side.

Anyway , You can fill your wishes in the JIRA :)

Willem.

bmargulies wrote:
> 
> Willem,
> 
> I'm not following. I didn't expect this to work, I just expected it to
> log a simple 'request for a URL that doesn't correspond to a service'
> instead of a full stacktrace.
> 
>> -Original Message-
>> From: Willem2 [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, October 04, 2007 11:09 AM
>> To: cxf-user@incubator.apache.org
>> Subject: Re: more on logging in jetty
>> 
>> 
>> CXF support to access the web services with get method.
>> Here is a example [1] for it.
>> [1]
>>
> https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j
> av
>> a/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java
>> 
>> Willem.
>> 
>> bmargulies wrote:
>> >
>> > Sending in a random URL provoked this. Would it make sense to make a
>> > JIRA requesting that this situation result in a more concise log
>> > message?
>> >
>> >
>> >
>> > [jetty] org.apache.cxf.interceptor.Fault: No such operation:
>> >
>> > [jetty] at
>> >
> org.apache.cxf.interceptor.URIMappingInterceptor.handleMessage(URIMappin
>> > gInterceptor.java:77)
>> >
>> > [jetty] at
>> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
>> > hain.java:207)
>> >
>> > [jetty] at
>> >
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
>> > onObserver.java:73)
>> >
>> > [jetty] at
>> >
> org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDes
>> > tination.java:79)
>> >
>> > [jetty] at
>> >
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
>> > vletController.java:235)
>> >
>> > [jetty] at
>> >
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
>> > ler.java:140)
>> >
>> > [jetty] at
>> >
> org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:278)
>> >
>> > [jetty] at
>> >
> org.apache.cxf.transport.servlet.CXFServlet.doGet(CXFServlet.java:260)
>> >
>> > [jetty] at
>> > javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>> >
>> > [jetty] at
>> > javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>> >
>> > [jetty] at
>> >
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>> >
>> > [jetty] at
>> >
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
>> >
>> > [jetty] at
>> >
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:2
>> > 16)
>> >
>> > [jetty] at
>> >
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>> >
>> > [jetty] at
>> >
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
>> >
>> > [jetty] at
>> >
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>> >
>> > [jetty] at
>> >
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
>> > Collection.java:211)
>> >
>> > [jetty] at
>> >
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
>> > a:114)
>> >
>> > [jetty] at
>> >
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>> >
>> > [jetty] at org.mortbay.jetty.Server.handle(Server.java:285)
>> >
>> > [jetty] at
>> >
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
>> >
>> > [jetty] at
>> >
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConne
>> > ction.java:821)
>> >
>> > [jetty] at
>> > org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
>> >
>> > [jetty] at
>> > org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
>> >
>> > [jetty] at
>> > org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
>> >
>> > [jetty] at
>> >
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
>> > 368)
>> >
>> > [jetty] at
>> >
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
>> > va:442)
>> >
>> >
>> >
>> 
>> --
>> View this message in context:
> http://www.nabble.com/more-on-logging-in-
>> jetty-tf4569314.html#a13041968
>> Sent from the cxf-user mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/more-on-logging-in-jetty-tf4569314.html#a13042331
Sent from the cxf-user mailing list archive at Nabble.com.



Invalid namespace with CXF 2.0.2 wsdl2java

2007-10-04 Thread Jarada, Hussam
Hi,
 
I am using wsdl2java tool to generate client stub library for the client
as follows
C:\Program Files\Apache Software
Foundation\apache-cxf-2.0.2-incubator\bin>wsdl2java.bat -d
C:\svnwork\reg\trunk\reg\reg-ws\ws-madcap\src\main\java -compile -all
-exsh true -verbose
C:\svnwork\reg\trunk\reg\reg-ws\ws-madcap\src\wsdl\madcap.wsdl
 
then from my client side I am calling
import org.apache.cxf.frontend.ClientProxyFactoryBean;

import com.aol.madcap._2007._06.*;

ClientProxyFactoryBean factory = new ClientProxyFactoryBean();

factory.setServiceClass(com.aol.madcap._2007._06.MadcapPort.class);

factory.setAddress(getServiceURL());

MadcapPort port = (com.aol.madcap._2007._06.MadcapPort)
factory.create();

Then invoke reserveLoginId

 

>From logging

Oct 4, 2007 11:38:06 AM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
INFO: Creating Service {http://_06._2007.madcap.aol.com/}MadcapPort from
class com.aol.madcap._2007._06.MadcapPort
Oct 4, 2007 11:39:18 AM
org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
INFO: Outbound Message
--
http://schemas.xmlsoap.org/soap/envelope/";>http://_06._2007.madcap.aol.com/";>http://madc
ap.aol.com/2007/06"
reserveSeconds="5">HussamJaradaaol.in17en-in
--
Oct 4, 2007 11:39:19 AM org.apache.cxf.interceptor.LoggingInInterceptor
handleMessage
INFO: Inbound Message
--

http://schemas.xmlsoap.org/soap/envelope/";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema
-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:mc="http://madcap.aol.com/2006/10";>SOAP-ENV:Sende
rInvalid
namespace

--

The backend server report invalid namespace cause in the soap body
reserveLoginId xmlns=http://_06._2007.madcap.aol.com/  at which it
should be xmlns:ns2="http://madc  
ap.aol.com/2007/06" 
 
Can someone please help me in resolving this issue, I tried using early
Xfire 1.2.6, then CXF 2.0 then 2.0.1 all report issues related to
namespace.
 
why CXF 2.0.2 wsdl2java generate a soap body with
xmlns="http://_06._2007.madcap.aol.com
  ? since the
wsdl we have 
 
Do I have issue in my wsdl2java arugments or the way I invoke the web
service from the ClientProxyFactoryBean?

targetNamespace=http://madcap.aol.com/2007/06

Thanks in advance,

Jarada

 


JAX-WS, WSA, CXF, and .NET

2007-10-04 Thread Mulligan, Patrick
This is a basic question about EPRs and specs. 

 

 When you use the EPR Endpoint reference Tools
(org.apache.cxf.wsdlendpointreferenceutil), it generates metadata which
includes service name (the service port), interface name (the porttype),
and endpoint name (the operation) in the metadata section of the WSA
schema.  But, an EPR generated by .NET does not create this metadata.
The wsa spec specifies an "any type" in the metadata field.  In the big
picture this makes sense to define an open type in the metadata.  The
CXF documentation also only states that the address field is mandatory
(per the WSA specification).

 

Why do our cxf utils generate this stuff?   I found nothing really
regarding this in the jax-ws spec itself, or this being a specialization
of the WSA spec itself.

 

With JAX-WS 2.0, or 2.1, does anyone know if things like this are
specified?

 

-- Patrick

 

__

Patrick Mulligan
PRINCIPAL CONSULTANT
[EMAIL PROTECTED]  
---
IONA Technologies
Tel: (321) 626-0006
Fax: (321) 459-0148
Cell: (321) 626-0006
---
Making Software Work Together TM

 



Re: Preferred JDK Version?

2007-10-04 Thread Daniel Kulp
On Thursday 04 October 2007, David W Sica wrote:
> I'm prototyping with CXF and am looking to choose my deployment
> environment.  Right now I'm prototyping with JDK5 but was wondering if
> there are really and JDK version requirements for CXF?  

Well, to pass the TCK, we needed 1.5.0_12.   Versions from _07 to _11 had 
parser issues that caused some problems.   Thus, I do recommend 1.5.0_12 
(I think _13 is now out).


> Also, should I 
> pursue using JDK6 for deployment?  Do I gain anything with JDK6 as far
> as CXF is concerned?

I would not use jdk6 for right now.   JDK6 is definitely going to cause 
us problems on trunk.   jk6 includes older versions of the jaxws and 
jaxb jars which may conflict with the ones we require.   Thus, to work 
with jdk6, some stuff may need to be copied from our lib dir to the 
jre/lib dir.   We haven't spent much time investigating that yet as 
trunk is still moving/changing pretty fast.2.0.2 SHOULD work OK with 
Java 6.   It's mostly the new stuff on trunk that will be a problem.


-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Re: WebServiceContext is null

2007-10-04 Thread Mustafa Egilmezbilek
Hi Willem,

Mine still fails :( Last version of my code is like this:

public WebServiceContext wsContext;

@Resource
public final void setWsContext(final WebServiceContext wsContext) {
this.wsContext = wsContext;
}


On 10/4/07, Willem2 <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I just get the unit test workable :)
> Can you try it  with the setter Resource annotation?
>
> Willem.
>
>
> Willem2 wrote:
> >
> > OK, on the bright side, we have a small test case to show how to get the
> > exception.
> > I will try to dig the resource injection part then :)
> >
> > Willem.
> >
> >
> > blacksheep wrote:
> >>
> >> I did it already but no luck :(
> >>
> >> On 10/4/07, Willem2 <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>> Can you try to remove the @Resource for the wsContext class member?
> >>> I just wrote some tests on the proxy object injection, I always get
> some
> >>> java.lang.IllegalArgumentException here. :(
> >>>
> >>> Willem.
> >>>
> >>> blacksheep wrote:
> >>> >
> >>> > I noticed it and set endorsing lib to use jaxb-2.1.jar .
> >>> >
> >>> > By the way I changed my code to:
> >>> > @Resource
> >>> > public WebServiceContext wsContext;
> >>> >
> >>> > @Resource
> >>> > public final void setWebContext(final WebServiceContext
> wsContext)
> >>> {
> >>> > this.wsContext = wsContext;
> >>> > }
> >>> >
> >>> > Is this right because I still got the problem:
> >>> >
> >>> > SEVERE: an AnnotationVisitor (
> >>> > [EMAIL PROTECTED]) raised an
> >>> > exception
> >>> > on element public javax.xml.ws.WebServiceContext
> >>> > aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext.
> >>> > java.lang.IllegalArgumentException: Can not set
> >>> > javax.xml.ws.WebServiceContext field
> >>> > aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext to
> >>> $Proxy32
> >>> > at
> >>> > sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
> >>> > UnsafeFieldAccessorImpl.java:146)
> >>> > at
> >>> > sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException
> (
> >>> > UnsafeFieldAccessorImpl.java :150)
> >>> > at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(
> >>> > UnsafeFieldAccessorImpl.java:37)
> >>> > at sun.reflect.UnsafeObjectFieldAccessorImpl.set(
> >>> > UnsafeObjectFieldAccessorImpl.java:57)
> >>> > at java.lang.reflect.Field.set(Field.java:657)
> >>> > at org.apache.cxf.common.injection.ResourceInjector.injectField(
> >>> > ResourceInjector.java:273)
> >>> > at org.apache.cxf.common.injection.ResourceInjector.visitField(
> >>> > ResourceInjector.java:164)
> >>> > 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:597)
> >>> > at
> >>> >
> >>>
> org.apache.cxf.common.annotation.AnnotationProcessor.visitAnnotatedElement
> >>> (
> >>> > AnnotationProcessor.java:131)
> >>> > at
> >>> org.apache.cxf.common.annotation.AnnotationProcessor.processFields(
> >>> > AnnotationProcessor.java :110)
> >>> > at org.apache.cxf.common.annotation.AnnotationProcessor.accept(
> >>> > AnnotationProcessor.java:89)
> >>> > at org.apache.cxf.common.injection.ResourceInjector.inject (
> >>> > ResourceInjector.java:81)
> >>> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.injectResources(
> >>> > JaxWsServerFactoryBean.java:201)
> >>> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.init (
> >>> > JaxWsServerFactoryBean.java:157)
> >>> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
> >>> > JaxWsServerFactoryBean.java:150)
> >>> > at org.apache.cxf.jaxws.EndpointImpl.getServer (
> EndpointImpl.java
> >>> :291)
> >>> > at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java
> >>> :231)
> >>> > at
> >>> org.apache.cxf.jaxws.EndpointImpl.publish (EndpointImpl.java:182)
> >>> > at
> >>> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:344)
> >>> > 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:597)
> >>> > at
> >>> >
> >>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod
> >>> > (AbstractAutowireCapableBeanFactory.java:1240)
> >>> > at
> >>> >
> >>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
> >>> > (AbstractAutowireCapableBeanFactory.java:1205)
> >>> > at
> >>> >
> >>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
> >>

Re: WebServiceContext is null

2007-10-04 Thread Willem2

Can you show me the stack trace and  try the code that I just committed ?
Willem.


blacksheep wrote:
> 
> Hi Willem,
> 
> Mine still fails :( Last version of my code is like this:
> 
> public WebServiceContext wsContext;
> 
> @Resource
> public final void setWsContext(final WebServiceContext wsContext) {
> this.wsContext = wsContext;
> }
> 
> 
> On 10/4/07, Willem2 <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi,
>>
>> I just get the unit test workable :)
>> Can you try it  with the setter Resource annotation?
>>
>> Willem.
>>
>>
>> Willem2 wrote:
>> >
>> > OK, on the bright side, we have a small test case to show how to get
>> the
>> > exception.
>> > I will try to dig the resource injection part then :)
>> >
>> > Willem.
>> >
>> >
>> > blacksheep wrote:
>> >>
>> >> I did it already but no luck :(
>> >>
>> >> On 10/4/07, Willem2 <[EMAIL PROTECTED]> wrote:
>> >>>
>> >>>
>> >>> Can you try to remove the @Resource for the wsContext class member?
>> >>> I just wrote some tests on the proxy object injection, I always get
>> some
>> >>> java.lang.IllegalArgumentException here. :(
>> >>>
>> >>> Willem.
>> >>>
>> >>> blacksheep wrote:
>> >>> >
>> >>> > I noticed it and set endorsing lib to use jaxb-2.1.jar .
>> >>> >
>> >>> > By the way I changed my code to:
>> >>> > @Resource
>> >>> > public WebServiceContext wsContext;
>> >>> >
>> >>> > @Resource
>> >>> > public final void setWebContext(final WebServiceContext
>> wsContext)
>> >>> {
>> >>> > this.wsContext = wsContext;
>> >>> > }
>> >>> >
>> >>> > Is this right because I still got the problem:
>> >>> >
>> >>> > SEVERE: an AnnotationVisitor (
>> >>> > [EMAIL PROTECTED]) raised an
>> >>> > exception
>> >>> > on element public javax.xml.ws.WebServiceContext
>> >>> > aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext.
>> >>> > java.lang.IllegalArgumentException: Can not set
>> >>> > javax.xml.ws.WebServiceContext field
>> >>> > aero.tav.afis.service.ActiveFlightInfoOperationsImpl.wsContext to
>> >>> $Proxy32
>> >>> > at
>> >>> >
>> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
>> >>> > UnsafeFieldAccessorImpl.java:146)
>> >>> > at
>> >>> >
>> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException
>> (
>> >>> > UnsafeFieldAccessorImpl.java :150)
>> >>> > at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(
>> >>> > UnsafeFieldAccessorImpl.java:37)
>> >>> > at sun.reflect.UnsafeObjectFieldAccessorImpl.set(
>> >>> > UnsafeObjectFieldAccessorImpl.java:57)
>> >>> > at java.lang.reflect.Field.set(Field.java:657)
>> >>> > at
>> org.apache.cxf.common.injection.ResourceInjector.injectField(
>> >>> > ResourceInjector.java:273)
>> >>> > at org.apache.cxf.common.injection.ResourceInjector.visitField(
>> >>> > ResourceInjector.java:164)
>> >>> > 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:597)
>> >>> > at
>> >>> >
>> >>>
>> org.apache.cxf.common.annotation.AnnotationProcessor.visitAnnotatedElement
>> >>> (
>> >>> > AnnotationProcessor.java:131)
>> >>> > at
>> >>> org.apache.cxf.common.annotation.AnnotationProcessor.processFields(
>> >>> > AnnotationProcessor.java :110)
>> >>> > at org.apache.cxf.common.annotation.AnnotationProcessor.accept(
>> >>> > AnnotationProcessor.java:89)
>> >>> > at org.apache.cxf.common.injection.ResourceInjector.inject (
>> >>> > ResourceInjector.java:81)
>> >>> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.injectResources(
>> >>> > JaxWsServerFactoryBean.java:201)
>> >>> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.init (
>> >>> > JaxWsServerFactoryBean.java:157)
>> >>> > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
>> >>> > JaxWsServerFactoryBean.java:150)
>> >>> > at org.apache.cxf.jaxws.EndpointImpl.getServer (
>> EndpointImpl.java
>> >>> :291)
>> >>> > at
>> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java
>> >>> :231)
>> >>> > at
>> >>> org.apache.cxf.jaxws.EndpointImpl.publish (EndpointImpl.java:182)
>> >>> > at
>> >>> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:344)
>> >>> > 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:597)
>> >>> > at
>> >>> >
>> >>>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod
>> >>> > (AbstractAutowireCapableBeanFactory.java:1240)
>> >>> > at
>> >>> >
>> >>>
>> org.sp

Re: WebServiceContext is null

2007-10-04 Thread Mustafa Egilmezbilek
When did you commit your code ? I started to get the latest trunk version .

Here is the stack trace (looks like the old ones):

Oct 5, 2007 8:51:23 AM
org.apache.cxf.common.annotation.AnnotationProcessorvisitAnnotatedElement
SEVERE: an AnnotationVisitor (
[EMAIL PROTECTED]) raised an exception
on element public final void
aero.tav.afis.service.ActiveFlightInfoOperationsImpl.setWebContext(
javax.xml.ws.WebServiceContext).
java.lang.IllegalArgumentException: object is not an instance of declaring
class
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:597)
at org.apache.cxf.common.injection.ResourceInjector.invokeSetter(
ResourceInjector.java:241)
at org.apache.cxf.common.injection.ResourceInjector.visitMethod(
ResourceInjector.java:185)
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:597)
at
org.apache.cxf.common.annotation.AnnotationProcessor.visitAnnotatedElement(
AnnotationProcessor.java:131)
at org.apache.cxf.common.annotation.AnnotationProcessor.processMethods(
AnnotationProcessor.java:103)
at org.apache.cxf.common.annotation.AnnotationProcessor.accept(
AnnotationProcessor.java:90)
at org.apache.cxf.common.injection.ResourceInjector.inject(
ResourceInjector.java:81)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.injectResources(
JaxWsServerFactoryBean.java:201)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.init(
JaxWsServerFactoryBean.java:157)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
JaxWsServerFactoryBean.java:150)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:291)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:231)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:182)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:344)
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:597)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod
(AbstractAutowireCapableBeanFactory.java:1240)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
(AbstractAutowireCapableBeanFactory.java:1205)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
(AbstractAutowireCapableBeanFactory.java:1171)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
(AbstractAutowireCapableBeanFactory.java:425)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
(DefaultListableBeanFactory.java:287)
at
org.springframework.context.support.AbstractApplicationContext.refresh(
AbstractApplicationContext.java:352)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(
ContextLoader.java:244)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(
ContextLoader.java:187)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(
ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(
StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java
:4334)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java
:443)
at org.apache.catalina.core.StandardService.start(StandardService.java
:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java
:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at s