You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jeremy Isikoff <ji...@yahoo.com> on 2007/07/28 07:51:26 UTC
webservice proxied with trasaction interceptor throwing errors on WSDL generation
Well I got reads with spring-hibernate-cxf working but when I went to save in turned out that the opensessioninview interceptor leaves the session in flushmode.never which causes an error for writes. Apparently to try to get around this I wired up a transactional proxy around my service implementation and made the jaxws endpoint point to this instead but then cxf throws this error:
[Fatal Error] :2:72: The value of the attribute "prefix="xmlns",localpart="ns2",rawname="xmlns:ns2"" is invalid. Prefixed namespace bindings may not be empty.
Jul 28, 2007 1:43:05 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet CXFServlet threw exception
org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="ns2",rawname="xmlns:ns2"" is invalid. Prefixed namespace bindings may not be empty.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:239)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
Relevant bean definitions:
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
<bean id="WebService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="target"><ref local="reportingServiceImpl"/></property>
<property name="transactionManager"><ref local="transactionManager"/></property>
<property name="transactionAttributes">
<props>
<prop key="get*">PROPAGATION_SUPPORTS,readOnly</prop>
<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="Save*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
<bean id="urlMapping"class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="interceptors">
<list>
<ref bean="openSessionInViewInterceptor"/>
</list>
</property>
</bean>
<bean name="openSessionInViewInterceptor"
class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
</bean>
<!--*******************WEB SERVICES************************* -->
<jaxws:endpoint
id="reportingService"
implementor="#WebService"
address="/ReportingService" >
<!-- bindingUri="http://apache.org/cxf/binding/http" >
<jaxws:serviceFactory>
<bean class=" org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
<property name="wrapped" value="true" />
<property name="dataBinding" ref="aegisBean"/>
</bean>
</jaxws:serviceFactory> -->
</jaxws:endpoint>
Any ideas?
____________________________________________________________________________________
Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545433
Re: webservice proxied with trasaction interceptor throwing errors on WSDL generation
Posted by Brad Harper <br...@gmail.com>.
This is the exact same error I get when I apply an aop transaction aspect to
my service impls. Strangely enough, 80 percent of my services still pass
under unit tests when I enable the transx advice but if I try to view the
wsdl from a browser or testing tool, I get the same error as below. FWIW,
I'm using the OpenSessionInViewFilter instead of the interceptor.
On 7/28/07, Jeremy Isikoff <ji...@yahoo.com> wrote:
>
> Well I got reads with spring-hibernate-cxf working but when I went to save
> in turned out that the opensessioninview interceptor leaves the session in
> flushmode.never which causes an error for writes. Apparently to try to
> get around this I wired up a transactional proxy around my service
> implementation and made the jaxws endpoint point to this instead but then
> cxf throws this error:
>
> [Fatal Error] :2:72: The value of the attribute
> "prefix="xmlns",localpart="ns2",rawname="xmlns:ns2"" is invalid. Prefixed
> namespace bindings may not be empty.
> Jul 28, 2007 1:43:05 AM org.apache.catalina.core.StandardWrapperValveinvoke
> SEVERE: Servlet.service() for servlet CXFServlet threw exception
> org.xml.sax.SAXParseException: The value of the attribute
> "prefix="xmlns",localpart="ns2",rawname="xmlns:ns2"" is invalid. Prefixed
> namespace bindings may not be empty.
> at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(
> DOMParser.java:239)
> at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(
> DocumentBuilderImpl.java:283)
>
> Relevant bean definitions:
>
>
> <bean id="transactionManager" class="
> org.springframework.orm.hibernate3.HibernateTransactionManager">
> <property name="sessionFactory">
> <ref local="sessionFactory"/>
> </property>
> </bean>
>
> <bean id="WebService" class="
> org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
> <property name="target"><ref local="reportingServiceImpl"/></property>
> <property name="transactionManager"><ref
> local="transactionManager"/></property>
> <property name="transactionAttributes">
> <props>
> <prop key="get*">PROPAGATION_SUPPORTS,readOnly</prop>
> <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
> <prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
> <prop key="save*">PROPAGATION_REQUIRED</prop>
> <prop key="Save*">PROPAGATION_REQUIRED</prop>
> </props>
> </property>
> </bean>
>
> <bean id="urlMapping"class="
> org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
> <property name="interceptors">
> <list>
> <ref bean="openSessionInViewInterceptor"/>
> </list>
> </property>
> </bean>
>
> <bean name="openSessionInViewInterceptor"
> class="
> org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
> <property name="sessionFactory"><ref
> bean="sessionFactory"/></property>
> </bean>
>
> <!--*******************WEB SERVICES************************* -->
> <jaxws:endpoint
> id="reportingService"
> implementor="#WebService"
> address="/ReportingService" >
> <!-- bindingUri="http://apache.org/cxf/binding/http" >
> <jaxws:serviceFactory>
> <bean class=" org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
> <property name="wrapped" value="true" />
> <property name="dataBinding" ref="aegisBean"/>
> </bean>
> </jaxws:serviceFactory> -->
> </jaxws:endpoint>
>
> Any ideas?
>
>
>
>
> ____________________________________________________________________________________
> Be a better Heartthrob. Get better relationship answers from someone who
> knows. Yahoo! Answers - Check it out.
> http://answers.yahoo.com/dir/?link=list&sid=396545433
>