cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem2 <ning.ji...@iona.com>
Subject Re: WebServiceContext is null
Date Thu, 04 Oct 2007 05:43:29 GMT

Hi blacksheep, 

I just committed a quick fix for CXF-1074. Can you test it (the trunk
version of CXF) with your application?
I did not test it with your configuration file , because I did not have all
your environments yet. 
Tell me if it works :)

Willem.


blacksheep wrote:
> 
> Hi Willem,
> 
> Any luck ? Please inform me.
> 
> Thanks,
> 
> 
> blacksheep wrote:
>> 
>> Thanks. I attached my spring configuration file.
>> 
>> On 9/30/07, Willem2 <ning.jiang@iona.com> wrote:
>>>
>>>
>>> I just wrote a test case of injecting  the resource to an enhanced
>>> object
>>> by
>>> CGLIB, and it worked well.
>>> Currently , I can't inject any resource to the  instance  of JDK
>>> Dynamical
>>> Proxy which is also a part of Spring AOP solution.
>>>
>>> Can you send me a same sample of using the tx:annotation-driven ?
>>> I can test my solution with it, hope it is not implemented with JDK
>>> Dynamical Proxy.
>>>
>>> Willem.
>>>
>>>
>>> blacksheep wrote:
>>> >
>>> > Hi,
>>> >
>>> > I am using <tx:annotation-driven/> in my spring.xml .
>>> > What's the workaround for this case ?
>>> >
>>> > Thanks,
>>> >
>>> > Karakoyun
>>> >
>>> >
>>> > On 9/28/07, Willem Jiang <ning.jiang@iona.com> wrote:
>>> >>
>>> >> Hi ,
>>> >>
>>> >> How do you set up your endpoint implementor?
>>> >>
>>> >> I  know there is an issue that if your implementor is came from a
>>> Spring
>>> >> bean which is enhanced by Spirng AOP will not get any
>>> WebServiceContext
>>> >> resource injected.
>>> >>
>>> >> You can find the detail information about the JIRA here [1]
>>> >> [1]https://issues.apache.org/jira/browse/CXF-1074
>>> >>
>>> >> Willem.
>>> >>
>>> >>
>>> >> Mustafa Egilmezbilek wrote:
>>> >> > Hi,
>>> >> >
>>> >> > I am trying to access WebServiceContext to be able use HttpSession
>>> as
>>> >> > described in:
>>> http://cwiki.apache.org/CXF20DOC/servlet-transport.html
>>> ,
>>> >> but I
>>> >> > keep getting null. What might be the reason ?
>>> >> >
>>> >> >
>>> >> > @Resource
>>> >> >
>>> >> > *public* WebServiceContext wsContext;
>>> >> >  protected HttpSession getHttpSession() {
>>> >> >   MessageContext mc = *wsContext*.getMessageContext();
>>> >> >         HttpSession session =
>>> ((javax.servlet.http.HttpServletRequest
>>> >> > )mc.get(MessageContext.SERVLET_REQUEST)).getSession();
>>> >> >         return session;
>>> >> >  }
>>> >> >
>>> >> >
>>> >> >
>>> >> > Thanks,
>>> >> >
>>> >> > Karakoyun
>>> >> >
>>> >> >
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Mustafa Egilmezbilek
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/WebServiceContext-is-null-tf4528676.html#a12961806
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> -- 
>> Mustafa Egilmezbilek
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> 	xmlns:jaxws="http://cxf.apache.org/jaxws"
>> 	xmlns:tx="http://www.springframework.org/schema/tx"
>> 	xsi:schemaLocation="http://www.springframework.org/schema/beans 
>>       	http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>> 	  	http://cxf.apache.org/jaxws
>> file:///C:/tools/WebServices/apache-cxf-2.0.2-incubator/xsd/jaxws.xsd
>> 	  	http://www.springframework.org/schema/tx
>> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
>> 	
>> 	<tx:annotation-driven/>
>> 	
>> 	<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="AFServices"
>>         implementor="#activeFlightInfoOps"
>>        
>> implementorClass="aero.tav.afis.service.ActiveFlightInfoOperationsImpl"
>>         address="/ActiveFlightOperations" />
>> 		
>> 
>> 	<bean id="entityManagerFactory"
>> 	
>> class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
>> 		<property name="dataSource" ref="dataSource" />
>> 		<property name="jpaVendorAdapter">
>> 			<bean
>> 				class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter">
>> 				<property name="showSql" value="true" />
>> 				<property name="generateDdl" value="true" />
>> 				<property name="database" value="ORACLE" />
>> 			</bean>
>> 		</property>
>> 		<property name="loadTimeWeaver">
>> 			<bean
>> class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/>
	
>> 		</property>
>> 	</bean>
>> 
>> 	<bean id="dataSource"
>> 		class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>> 		<property name="driverClassName"
>> 			value="oracle.jdbc.driver.OracleDriver" />
>> 		<property name="url"
>> 			value="jdbc:oracle:thin:@localhost:1521:XE" />
>> 		<property name="username" value="XXXX" />
>> 		<property name="password" value="ZZZZ" />
>> 	</bean>
>> 
>> 	<bean id="transactionManager"
>> 		class="org.springframework.orm.jpa.JpaTransactionManager">
>> 		<property name="entityManagerFactory"
>> 			ref="entityManagerFactory" />
>> 		<property name="dataSource" ref="dataSource" />
>> 	</bean>
>> 
>> 	<bean id="activeFlightInfoOps"
>> 		class="aero.tav.afis.service.ActiveFlightInfoOperationsImpl">
>> 		<property name="serviceUsageDao" ref="serviceUsageDao" />
>> 	</bean>
>> 
>> 	<bean id="serviceUsageDao"
>> 		class="aero.tav.afis.dao.ServiceUsageDao">
>> 		<property name="entityManagerFactory" ref="entityManagerFactory" />
>> 	</bean>
>> 
>> </beans>
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/WebServiceContext-is-null-tf4528676.html#a13032959
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message