Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 82276 invoked from network); 5 Sep 2008 12:21:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Sep 2008 12:21:46 -0000 Received: (qmail 70928 invoked by uid 500); 5 Sep 2008 12:21:42 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 70879 invoked by uid 500); 5 Sep 2008 12:21:42 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 70868 invoked by uid 99); 5 Sep 2008 12:21:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2008 05:21:42 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of oliver.wulff@iona.com designates 12.170.54.180 as permitted sender) Received: from [12.170.54.180] (HELO amer-mx1.iona.com) (12.170.54.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2008 12:20:44 +0000 X-IronPort-AV: E=Sophos;i="4.32,320,1217822400"; d="scan'208,217";a="14396727" Received: from amer-ems1.ionaglobal.com ([10.65.6.25]) by amer-mx1.iona.com with ESMTP; 05 Sep 2008 08:21:14 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C90F51.E32E0F65" Subject: Injection support for client side proxy (jaxws:client) unclear Date: Fri, 5 Sep 2008 08:21:13 -0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Injection support for client side proxy (jaxws:client) unclear Thread-Index: AckPUeMkdzKqRtOIQLmmYUVBobf5jQ== From: "Wulff, Oliver" To: X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C90F51.E32E0F65 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi there I develop a custom feature which registers an OutInterceptor which = invokes another webservice within the handleMessage method. The idea is = to use injection and configure the jaxws:client bean in the spring = configuration. There are two options: 1) set/get Method in Feature class 2) Java Resource annotation in Feature class Both doesn't work for me. option 1: --------- public class MyFeature... .... public EncryptionInterfaceV10 getEncryptionProxy() { return encryptionProxy; } public void setEncryptionProxy(EncryptionInterfaceV10 encryptionProxy) { this.encryptionProxy =3D encryptionProxy; } ... Here the configuration on the client side: =20 =20 When I run the cxf client, I get the following exception: 05.09.2008 13:48:06 org.apache.cxf.bus.spring.SpringBusFactory createBus WARNUNG: Failed to create application context. org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'cxf': Cannot resolve reference to bean 'PMPFeature' = while setting bean property 'features' with key [0]; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'PMPFeature' defined in class path resource [client.xml]: = Cannot resolve reference to bean 'encryptionProxyId' while setting bean = property 'encryptionProxy'; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'encryptionProxyId': Instantiation of bean failed; nested = exception is = org.springframework.beans.factory.BeanDefinitionStoreException: Factory = method [public java.lang.Object = org.apache.cxf.frontend.ClientProxyFactoryBean.create()] threw = exception; nested exception is java.lang.NullPointerException Caused by: org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'PMPFeature' defined in class path = resource [client.xml]: Cannot resolve reference to bean = 'encryptionProxyId' while setting bean property 'encryptionProxy'; = nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'encryptionProxyId': Instantiation of bean failed; nested = exception is = org.springframework.beans.factory.BeanDefinitionStoreException: Factory = method [public java.lang.Object = org.apache.cxf.frontend.ClientProxyFactoryBean.create()] threw = exception; nested exception is java.lang.NullPointerException Caused by: org.springframework.beans.factory.BeanCreationException: = Error creating bean with name 'encryptionProxyId': Instantiation of bean = failed; nested exception is = org.springframework.beans.factory.BeanDefinitionStoreException: Factory = method [public java.lang.Object = org.apache.cxf.frontend.ClientProxyFactoryBean.create()] threw = exception; nested exception is java.lang.NullPointerException Caused by: = org.springframework.beans.factory.BeanDefinitionStoreException: Factory = method [public java.lang.Object = org.apache.cxf.frontend.ClientProxyFactoryBean.create()] threw = exception; nested exception is java.lang.NullPointerException Caused by: java.lang.NullPointerException Option 2: --------- public class MyFeature... ... @Resource(name =3D "encryptionProxyId") private EncryptionInterfaceV10 encryptionProxy; ... The proxy instance is null. It looks like that CXF doesn't try to = initialize it at all. I don't understand why injection doesn't work in this situation whereas = it works fine for a jaxws:endpoint bean. Any ideas? Thanks Oliver ------_=_NextPart_001_01C90F51.E32E0F65--