Hi Marc,
You can do it like
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<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" />
<bean id="serviceClass" class="demo.spring.HelloWorldImpl"/>
<bean id="aegisDatabinding"
class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
<bean id="serviceFactory"
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
<property name="dataBinding" ref="aegisDatabinding"/>
</bean>
<bean id="serverBeanFactory"
class="org.apache.cxf.frontend.ServerFactoryBean"
init-method="create">
<property name="address" value="/HelloWorld"/>
<property name="bindingId"
value="http://schemas.xmlsoap.org/soap/"/>
<property name="serviceBean" ref="serviceClass"/>
<property name="serviceFactory" ref="serviceFactory"/>
</bean>
<jaxws:endpoint
id="helloWorld"
implementor="demo.spring.HelloWorldImpl"
address="/HelloWorld">
<jaxws:serviceFactory>
<ref bean="serviceFactory"/>
</jaxws:serviceFactory>
</jaxws:endpoint>
</beans>
Best Regards
Freeman
Marc Baumgartner wrote:
How do I configure in my applicationContext.xml to use Aegis?
Is there anywhere an example?
Regards
Marc
-------- Original-Nachricht --------
Datum: Thu, 12 Jul 2007 13:35:58 -0600
Von: "Dan Diephouse" <[EMAIL PROTECTED]>
An: [email protected]
Betreff: Re:
JAXB can't handle interfaces. What you want to do is configure your
service
to use the Aegis databinding library from XFire instead:
http://cwiki.apache.org/CXF20DOC/aegis-databinding.html
Aegis will handle just about any datatypes you throw at it. Hope that
helps,
- Dan
On 7/12/07, Marc Baumgartner <[EMAIL PROTECTED]> wrote:
Hi,
in Xfire it is possible to define a complex result object from a web
service as an interface like this:
public interface Greeting {
public abstract void setMessage(String msg);
public abstract String getMessage();
}
@WebService
public interface HelloWorldService {
@WebMethod
@WebResult(name="Greeting")
public List<hello.impl.GreetingImpl> getGreeting(String name);
@WebMethod
public String sayHello(String name);
}
With CXF a signature like this causes an error. It seems that JAXB can
not
handle the result interfaces. Is it possible to "tell" JAXB to accept
the
interfaces? Can I use another bindung lib? How do i configure it?
Regards,
Marc
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog