You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jan Kriesten <ja...@renitence.de> on 2007/07/04 11:10:38 UTC

[Fwd: CXFServlet-Config]

Hi!

I still need some help on thins issue to get the CXFServlet configured using
AegisDatabinding with <jaxws:...>-syntax.

Someone there knowing the proper hints?

Thanks! :-)

Best regards, --- Jan.


-------- Original Message --------
Subject: CXFServlet-Config
Date: Fri, 29 Jun 2007 17:23:49 +0200
From: Jan Kriesten <ja...@renitence.de>
Reply-To: cxf-user@incubator.apache.org
To: cxf-user@incubator.apache.org


Hi,

I'm not really a Spring-wizard, so I'm having some trouble getting the
CXFServlet configured as I wish...

The following properties work to have the Service responding:

---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"
       xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans-2.0.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" />

  <jaxws:endpoint id="AuthService"
                  implementor="test.AcegiAuthService"
                  address="/AuthService" />

</beans>
---8<---

Now I want to have the service use AegisDatabinding, but I don't get it working...

Could someone provide me with a hint - the following approach which Willem
posted (on my marshalling exception) only leads to an unresponsive service, so
the above is the only working version I have right now:

---8<---
<bean id="AegisDatabinding"
class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>

<bean id="JaxWsServiceFactoryBean"
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
   <property name="wrapped" value="false"/>
   <property name="dataBinding" ref="AegisDatabinding"/>
</bean>

<bean id="authServiceFactory"
   class="org.apache.cxf.jaxws.JaxWsServerFactoryBean" init-method="create">
   <property name="serviceClass" value="test.AcegiAuthService" />
   <property name="serviceBean">
     <bean class="test.AcegiAuthService"/>
   </property>
   <property name="address" value="/AuthService"/>
   <property name="bus" ref="cxf"/>
   <property name="serviceFactory" ref="JaxWsServiceFactoryBean"/>
</bean>
---8<---


Best regards, --- Jan.


Re: [Fwd: CXFServlet-Config]

Posted by Jim Ma <em...@iona.com>.
Hi Jan ,

I think this is an issue or unsupported. I see there is no item for 
databinding in jaxws.xsd :

  <xsd:element name="endpoint">
    <xsd:complexType>
      <xsd:complexContent>
        <xsd:extension base="beans:identifiedType">
          <xsd:sequence>
            <xsd:element name="binding" type="xsd:anyType" minOccurs="0"/>
            <xsd:element name="executor" type="xsd:anyType" minOccurs="0"/>
            <xsd:element name="features" type="xsd:anyType" minOccurs="0"/>
            <xsd:element name="implementor" type="xsd:anyType" 
minOccurs="0"/>
            <xsd:element name="inInterceptors" type="xsd:anyType" 
minOccurs="0"/>
            <xsd:element name="inFaultInterceptors" type="xsd:anyType" 
minOccurs="0"/>
            <xsd:element name="outInterceptors" type="xsd:anyType" 
minOccurs="0"/>
            <xsd:element name="outFaultInterceptors" type="xsd:anyType" 
minOccurs="0"/>
            <xsd:element name="properties" type="beans:mapType" 
minOccurs="0"/>
            <xsd:element name="serviceFactory" type="xsd:anyType" 
minOccurs="0"/>
          </xsd:sequence>
          <xsd:attributeGroup ref="cxf-beans:beanAttributes"/>
          <xsd:attribute name="address" type="xsd:string" />
          <xsd:attribute name="bindingUri" type="xsd:string" />
          <xsd:attribute name="bus" type="xsd:string" />
          <xsd:attribute name="implementor" type="xsd:string"/>
          <xsd:attribute name="publish" type="xsd:boolean" default="true"/>
          <xsd:attribute name="endpointName" type="xsd:QName" />
          <xsd:attribute name="serviceName" type="xsd:QName" />
          <xsd:attribute name="wsdlLocation" type="xsd:string" />
        </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
  </xsd:element>

Please feel free to log a Jira issue for it .

Regards

Jim


Jan Kriesten wrote:
> Hi!
>
> I still need some help on thins issue to get the CXFServlet configured using
> AegisDatabinding with <jaxws:...>-syntax.
>
> Someone there knowing the proper hints?
>
> Thanks! :-)
>
> Best regards, --- Jan.
>
>
> -------- Original Message --------
> Subject: CXFServlet-Config
> Date: Fri, 29 Jun 2007 17:23:49 +0200
> From: Jan Kriesten <ja...@renitence.de>
> Reply-To: cxf-user@incubator.apache.org
> To: cxf-user@incubator.apache.org
>
>
> Hi,
>
> I'm not really a Spring-wizard, so I'm having some trouble getting the
> CXFServlet configured as I wish...
>
> The following properties work to have the Service responding:
>
> ---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"
>        xsi:schemaLocation="http://www.springframework.org/schema/beans
>
> http://www.springframework.org/schema/beans/spring-beans-2.0.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" />
>
>   <jaxws:endpoint id="AuthService"
>                   implementor="test.AcegiAuthService"
>                   address="/AuthService" />
>
> </beans>
> ---8<---
>
> Now I want to have the service use AegisDatabinding, but I don't get it working...
>
> Could someone provide me with a hint - the following approach which Willem
> posted (on my marshalling exception) only leads to an unresponsive service, so
> the above is the only working version I have right now:
>
> ---8<---
> <bean id="AegisDatabinding"
> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
>
> <bean id="JaxWsServiceFactoryBean"
> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>    <property name="wrapped" value="false"/>
>    <property name="dataBinding" ref="AegisDatabinding"/>
> </bean>
>
> <bean id="authServiceFactory"
>    class="org.apache.cxf.jaxws.JaxWsServerFactoryBean" init-method="create">
>    <property name="serviceClass" value="test.AcegiAuthService" />
>    <property name="serviceBean">
>      <bean class="test.AcegiAuthService"/>
>    </property>
>    <property name="address" value="/AuthService"/>
>    <property name="bus" ref="cxf"/>
>    <property name="serviceFactory" ref="JaxWsServiceFactoryBean"/>
> </bean>
> ---8<---
>
>
> Best regards, --- Jan.
>
>   

Re: JaxWsServiceFactoryBean / Aegis

Posted by Jan Kriesten <ja...@renitence.de>.
Hi Jim,

> Did you test  ReflectionServiceFactoryBean  with Aegis ? Is it working ?

no, it's not! Same strange behavior, the web-parameters are empty:

08:15:06.099 DEBUG [.footprint.www.services.auth.AcegiAuthService] - authenticate(,)

            ^^^ there should be username/password! :-O

if i again comment out  dataBinding in the serviceFactory it works again!?

very strange.

best regards, --- jan.



Re: JaxWsServiceFactoryBean / Aegis

Posted by Jim Ma <em...@iona.com>.
Hi Jan,

Did you test  ReflectionServiceFactoryBean  with Aegis ? Is it working ?

 <bean id="serviceFactory" class="org.apache.cxf.service.factory.ReflectionServiceFactoryBean">
     <property name="dataBinding" ref="aegisDatabinding"/>
 </bean>

I think you can use ClientProxyFactoryBean to invoke service used 
AegisDatabinding :

        ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
        ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
        clientBean.setAddress("http://localhost:8088/Hello");
        clientBean.setBus(CXFBusFactory.getDefaultBus());
        clientBean.setTransportId("http://schemas.xmlsoap.org/wsdl/http/");
        clientBean.setServiceClass(BookService.class);
        proxyFactory.getServiceFactory().setDataBinding(new 
AegisDatabinding());
        BookService client = (BookService) proxyFactory.create();
        client.getBook("isbn")

Cheers

Jim


Jan Kriesten wrote:
> Hi Jim,
>
> did some tests again.
>
> There really seems to be an issue with JaxWsServiceFactoryBean and Aegis.
>
> Based on your suggestion, I tried the following (CXFServlet):
>
> ---8<---
>   <bean id="serviceClass" class="de.footprint.www.services.auth.AcegiAuthService"/>
>   <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="/AuthService"/>
>           <property name="bindingId" value="http://schemas.xmlsoap.org/soap/"/>
>           <property name="serviceBean" ref="serviceClass"/>
>           <property name="serviceFactory" ref="serviceFactory"/>
>   </bean>
> ---8<---
>
> This did _not_ work. The services-log tells me, that the WebService-Parameters
> are blank (btw, only Strings are used). Commenting out the dataBinding-property
> in the serviceFactory-bean solves it again - all parameters are ok!
>
> My client looks like this:
>
> ---8<---
> Bus bus = new SpringBusFactory().createBus();
> AegisDatabinding aegisBinding = new AegisDatabinding();
> JaxWsProxyFactoryBean proxyBean = new JaxWsProxyFactoryBean();
> proxyBean.setBus( bus );
> proxyBean.getServiceFactory().setDataBinding( aegisBinding );
> proxyBean.setAddress( "http://wicket.silberlicht.de/service/AuthService" );
> proxyBean.setServiceClass( IAuthService.class );
> service = (IAuthService) proxyBean.create();
> ---8<---
>
>
> Best regards, --- Jan.
>
>   

JaxWsServiceFactoryBean / Aegis

Posted by Jan Kriesten <ja...@renitence.de>.
Hi Jim,

did some tests again.

There really seems to be an issue with JaxWsServiceFactoryBean and Aegis.

Based on your suggestion, I tried the following (CXFServlet):

---8<---
  <bean id="serviceClass" class="de.footprint.www.services.auth.AcegiAuthService"/>
  <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="/AuthService"/>
          <property name="bindingId" value="http://schemas.xmlsoap.org/soap/"/>
          <property name="serviceBean" ref="serviceClass"/>
          <property name="serviceFactory" ref="serviceFactory"/>
  </bean>
---8<---

This did _not_ work. The services-log tells me, that the WebService-Parameters
are blank (btw, only Strings are used). Commenting out the dataBinding-property
in the serviceFactory-bean solves it again - all parameters are ok!

My client looks like this:

---8<---
Bus bus = new SpringBusFactory().createBus();
AegisDatabinding aegisBinding = new AegisDatabinding();
JaxWsProxyFactoryBean proxyBean = new JaxWsProxyFactoryBean();
proxyBean.setBus( bus );
proxyBean.getServiceFactory().setDataBinding( aegisBinding );
proxyBean.setAddress( "http://wicket.silberlicht.de/service/AuthService" );
proxyBean.setServiceClass( IAuthService.class );
service = (IAuthService) proxyBean.create();
---8<---


Best regards, --- Jan.

Re: [Fwd: CXFServlet-Config]

Posted by Jan Kriesten <ja...@renitence.de>.
hi jim,

> By default  CXF will use JaxWsServiceFactoryBean to construct
> JaxwsServerFactoryBean when it parse the <jaxws:endpoint/>  configuration .
> We do not have many tests for  JaxwsServiceFactoryBean working with
> AegisDatabinding .  I think the ReflectionServiceFactoryBean and
> AegisDatabinding
> is a good choice , I wrote the follow configuration sample for your
> reference :
> 
>   <bean id="serviceClass" class="org.apache.cxf.ImplClass"/>
>   <bean id="aegisDatabinding"
> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
>   <bean id="serviceFactory"
> class="org.apache.cxf.service.factory.ReflectionServiceFactoryBean">
>     <property name="dataBinding" ref="aegisDatabinding"/>
>   </bean>
>   <bean id="serverBeanFactory"
> class="org.apache.cxf.frontend.ServerFactoryBean" init-method="create">
>           <property name="address" value="/aegis"/>
>           <property name="bindingId"
> value="http://schemas.xmlsoap.org/soap/"/>
>           <property name="serviceBean" ref="serviceClass"/>
>           <property name="serviceFactory" ref="serviceFactory"/>
>   </bean>
> 

will this work with jsr-181 annotations as well?

i give it a try.

best regards, --- jan.


Re: [Fwd: CXFServlet-Config]

Posted by Jim Ma <em...@iona.com>.
Hi Jan,

By default  CXF will use JaxWsServiceFactoryBean to construct 
JaxwsServerFactoryBean when it parse the <jaxws:endpoint/>  configuration .
We do not have many tests for  JaxwsServiceFactoryBean working with 
AegisDatabinding .  I think the ReflectionServiceFactoryBean and 
AegisDatabinding
is a good choice , I wrote the follow configuration sample for your 
reference :

   <bean id="serviceClass" class="org.apache.cxf.ImplClass"/>
   <bean id="aegisDatabinding" 
class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
   <bean id="serviceFactory" 
class="org.apache.cxf.service.factory.ReflectionServiceFactoryBean">
     <property name="dataBinding" ref="aegisDatabinding"/>
   </bean>
   <bean id="serverBeanFactory" 
class="org.apache.cxf.frontend.ServerFactoryBean" init-method="create">
           <property name="address" value="/aegis"/>
           <property name="bindingId" 
value="http://schemas.xmlsoap.org/soap/"/>
           <property name="serviceBean" ref="serviceClass"/>
           <property name="serviceFactory" ref="serviceFactory"/>
   </bean>

BTW, If you think it's an issue(JaxwsServiceFactoryBean working with 
AegisDatabinding)  in CXF , please feel free to log a jira issue for it 
: https://issues.apache.org/jira/browse/CXF .

Cheers

Jim


Jan Kriesten wrote:
> hi,
>
>   
>>> I think this can inject the databinding in ServiceFactoryBean  :
>>>
>>>     <bean id="aegisDatabinding"
>>> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>    <bean
>>> id="JaxWsServiceFactoryBean"
>>> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>>>                           <property name="dataBinding"
>>> ref="aegisDatabinding"/>
>>>    </bean>
>>>    <jaxws:endpoint">
>>>            <jaxws:serviceFactory>
>>>              <ref bean="JaxWsServiceFactoryBean"/>                     
>>> </jaxws:serviceFactory>
>>>    </jaxws:endpoint>
>>>       
>> the service seems to be created, but my client doesn't get a response any more.
>> the wsdl looks good afaik. i'll have to dig a bit deeper...
>>
>> best regards, --- jan.
>>     
>
>
> i don't get jaxws:endpoint working with aegis CXFServlet. if i configure it the
> way above, the client doesn't get any connection with the server any more. if i
> remove the service-factory all is well though. just that jaxb is used again and
> this doesn't support interfaces, which i need for the acegi authentication...
>
> this spring-bean-xml is driving me nuts.
>
> any more ideas? as cxf works fine with jaxb (i.e. default config) - it shouldn't
> be that hard to just change to aegis.
>
>
> best regards, --- jan.
>
>   

Re: [Fwd: CXFServlet-Config]

Posted by Jan Kriesten <ja...@renitence.de>.
hi,

>> I think this can inject the databinding in ServiceFactoryBean  :
>>
>>     <bean id="aegisDatabinding"
>> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>    <bean
>> id="JaxWsServiceFactoryBean"
>> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>>                           <property name="dataBinding"
>> ref="aegisDatabinding"/>
>>    </bean>
>>    <jaxws:endpoint">
>>            <jaxws:serviceFactory>
>>              <ref bean="JaxWsServiceFactoryBean"/>                     
>> </jaxws:serviceFactory>
>>    </jaxws:endpoint>
> 
> the service seems to be created, but my client doesn't get a response any more.
> the wsdl looks good afaik. i'll have to dig a bit deeper...
> 
> best regards, --- jan.


i don't get jaxws:endpoint working with aegis CXFServlet. if i configure it the
way above, the client doesn't get any connection with the server any more. if i
remove the service-factory all is well though. just that jaxb is used again and
this doesn't support interfaces, which i need for the acegi authentication...

this spring-bean-xml is driving me nuts.

any more ideas? as cxf works fine with jaxb (i.e. default config) - it shouldn't
be that hard to just change to aegis.


best regards, --- jan.

Re: [Fwd: CXFServlet-Config]

Posted by Jan Kriesten <ja...@renitence.de>.
hi jim,

> I think this can inject the databinding in ServiceFactoryBean  :
> 
>     <bean id="aegisDatabinding"
> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>    <bean
> id="JaxWsServiceFactoryBean"
> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>                           <property name="dataBinding"
> ref="aegisDatabinding"/>
>    </bean>
>    <jaxws:endpoint">
>            <jaxws:serviceFactory>
>              <ref bean="JaxWsServiceFactoryBean"/>                     
> </jaxws:serviceFactory>
>    </jaxws:endpoint>

the service seems to be created, but my client doesn't get a response any more.
the wsdl looks good afaik. i'll have to dig a bit deeper...

best regards, --- jan.



Re: [Fwd: CXFServlet-Config]

Posted by Willem Jiang <ni...@iona.com>.
Hi

 I just try to start up the server with Jim's suggestion. But I got a 
NPE when I try to run the testEndpointRestService
 
INFO: Interceptor has thrown exception, unwinding now
java.lang.NullPointerException
    at 
org.apache.cxf.binding.http.IriDecoderHelper.buildDocument(IriDecoderHelper.java:222)
    at 
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.mergeParams(URIParameterInInterceptor.java:129)
    at 
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handleMessage(URIParameterInInterceptor.java:105)
    at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
    at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:67)
    at 
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:78)
    at 
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:224)
    at 
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:103)
    at 
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:261)

The file I changed is
/cxf-systests/src/test/java/org/apache/cxf/systest/servlet/restful_service.xml
just set the dataBinding to aegisDatabinding.

I found the NPE is thrown by we can't get the cplxType right if  the 
schemaAnnotation is null.
So it may be a bug of CXF when aegisDatabinding work with http-binding , 
any thoughts?

Willem.





Jim Ma wrote:
> Hi Jan ,
>
> I think this can inject the databinding in ServiceFactoryBean  :
>
>     <bean id="aegisDatabinding" 
> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>    <bean 
> id="JaxWsServiceFactoryBean" 
> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>                           <property name="dataBinding" 
> ref="aegisDatabinding"/>
>    </bean>
>    <jaxws:endpoint">
>            <jaxws:serviceFactory>
>              <ref bean="JaxWsServiceFactoryBean"/>           
>            </jaxws:serviceFactory>
>    </jaxws:endpoint>
>
> Cheers
> Jim
>
> Jan Kriesten wrote:
>> hi dan,
>>
>>  
>>> We do need a <databinding> element yet... This may work though:
>>>
>>> <jaxws:endpoint ....>
>>> <property name="databinding">
>>>  <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
>>> </property>
>>> </jaxws:endpoint>
>>>     
>>
>> actually, it doesn't. :-(
>>
>> it tells me
>>
>> ---8<---
>> [20:36:53.938]
>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: 
>> Line 15
>> in XML document from class path resour
>> ce [META-INF/CXF/services.xml] is invalid; nested exception is
>> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid conten
>> t was found starting with element 'property'. One of
>> '{"http://cxf.apache.org/jaxws":binding, 
>> "http://cxf.apache.org/jaxws":executor
>> , "http://cxf.apache.org/jaxws":features,
>> "http://cxf.apache.org/jaxws":implementor,
>> "http://cxf.apache.org/jaxws":inInterceptors, "
>> http://cxf.apache.org/jaxws":inFaultInterceptors,
>> "http://cxf.apache.org/jaxws":outInterceptors, 
>> "http://cxf.apache.org/jaxws":outFa
>> ultInterceptors, "http://cxf.apache.org/jaxws":properties,
>> "http://cxf.apache.org/jaxws":serviceFactory}' is expected.
>> [20:36:53.938] Caused by: org.xml.sax.SAXParseException: 
>> cvc-complex-type.2.4.a:
>> Invalid content was found starting with element 'pr
>> operty'. One of '{"http://cxf.apache.org/jaxws":binding,
>> "http://cxf.apache.org/jaxws":executor, 
>> "http://cxf.apache.org/jaxws":featu
>> res, "http://cxf.apache.org/jaxws":implementor,
>> "http://cxf.apache.org/jaxws":inInterceptors, 
>> "http://cxf.apache.org/jaxws":inFaultI
>> nterceptors, "http://cxf.apache.org/jaxws":outInterceptors,
>> "http://cxf.apache.org/jaxws":outFaultInterceptors, "http://cxf.apache.o
>> rg/jaxws":properties, "http://cxf.apache.org/jaxws":serviceFactory}' 
>> is expected.
>> ---8<---
>>
>> i saw the jaxws:binding in there, but didn't find out, how to 
>> possibly make use
>> of it...
>>
>> any more ideas, dan?
>>
>> best regards, --- jan.
>>
>>   
>
>

Re: [Fwd: CXFServlet-Config]

Posted by Jim Ma <em...@iona.com>.
Hi Jan ,

I think this can inject the databinding in ServiceFactoryBean  :

     <bean id="aegisDatabinding" 
class="org.apache.cxf.aegis.databinding.AegisDatabinding"/> 
    <bean id="JaxWsServiceFactoryBean" 
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
                           <property name="dataBinding" 
ref="aegisDatabinding"/>
    </bean>
    <jaxws:endpoint">
            <jaxws:serviceFactory>
              <ref bean="JaxWsServiceFactoryBean"/>           
            </jaxws:serviceFactory>
    </jaxws:endpoint>

Cheers
Jim

Jan Kriesten wrote:
> hi dan,
>
>   
>> We do need a <databinding> element yet... This may work though:
>>
>> <jaxws:endpoint ....>
>> <property name="databinding">
>>  <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
>> </property>
>> </jaxws:endpoint>
>>     
>
> actually, it doesn't. :-(
>
> it tells me
>
> ---8<---
> [20:36:53.938]
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 15
> in XML document from class path resour
> ce [META-INF/CXF/services.xml] is invalid; nested exception is
> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid conten
> t was found starting with element 'property'. One of
> '{"http://cxf.apache.org/jaxws":binding, "http://cxf.apache.org/jaxws":executor
> , "http://cxf.apache.org/jaxws":features,
> "http://cxf.apache.org/jaxws":implementor,
> "http://cxf.apache.org/jaxws":inInterceptors, "
> http://cxf.apache.org/jaxws":inFaultInterceptors,
> "http://cxf.apache.org/jaxws":outInterceptors, "http://cxf.apache.org/jaxws":outFa
> ultInterceptors, "http://cxf.apache.org/jaxws":properties,
> "http://cxf.apache.org/jaxws":serviceFactory}' is expected.
> [20:36:53.938] Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a:
> Invalid content was found starting with element 'pr
> operty'. One of '{"http://cxf.apache.org/jaxws":binding,
> "http://cxf.apache.org/jaxws":executor, "http://cxf.apache.org/jaxws":featu
> res, "http://cxf.apache.org/jaxws":implementor,
> "http://cxf.apache.org/jaxws":inInterceptors, "http://cxf.apache.org/jaxws":inFaultI
> nterceptors, "http://cxf.apache.org/jaxws":outInterceptors,
> "http://cxf.apache.org/jaxws":outFaultInterceptors, "http://cxf.apache.o
> rg/jaxws":properties, "http://cxf.apache.org/jaxws":serviceFactory}' is expected.
> ---8<---
>
> i saw the jaxws:binding in there, but didn't find out, how to possibly make use
> of it...
>
> any more ideas, dan?
>
> best regards, --- jan.
>
>   

Re: [Fwd: CXFServlet-Config]

Posted by Jan Kriesten <ja...@renitence.de>.
hi dan,

> We do need a <databinding> element yet... This may work though:
> 
> <jaxws:endpoint ....>
> <property name="databinding">
>  <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
> </property>
> </jaxws:endpoint>

actually, it doesn't. :-(

it tells me

---8<---
[20:36:53.938]
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 15
in XML document from class path resour
ce [META-INF/CXF/services.xml] is invalid; nested exception is
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid conten
t was found starting with element 'property'. One of
'{"http://cxf.apache.org/jaxws":binding, "http://cxf.apache.org/jaxws":executor
, "http://cxf.apache.org/jaxws":features,
"http://cxf.apache.org/jaxws":implementor,
"http://cxf.apache.org/jaxws":inInterceptors, "
http://cxf.apache.org/jaxws":inFaultInterceptors,
"http://cxf.apache.org/jaxws":outInterceptors, "http://cxf.apache.org/jaxws":outFa
ultInterceptors, "http://cxf.apache.org/jaxws":properties,
"http://cxf.apache.org/jaxws":serviceFactory}' is expected.
[20:36:53.938] Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a:
Invalid content was found starting with element 'pr
operty'. One of '{"http://cxf.apache.org/jaxws":binding,
"http://cxf.apache.org/jaxws":executor, "http://cxf.apache.org/jaxws":featu
res, "http://cxf.apache.org/jaxws":implementor,
"http://cxf.apache.org/jaxws":inInterceptors, "http://cxf.apache.org/jaxws":inFaultI
nterceptors, "http://cxf.apache.org/jaxws":outInterceptors,
"http://cxf.apache.org/jaxws":outFaultInterceptors, "http://cxf.apache.o
rg/jaxws":properties, "http://cxf.apache.org/jaxws":serviceFactory}' is expected.
---8<---

i saw the jaxws:binding in there, but didn't find out, how to possibly make use
of it...

any more ideas, dan?

best regards, --- jan.


Re: [Fwd: CXFServlet-Config]

Posted by Dan Diephouse <da...@envoisolutions.com>.
We do need a <databinding> element yet... This may work though:


<jaxws:endpoint ....>
<property name="databinding">
  <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding">
</property>
</jaxws:endpoint>

- Dan

On 7/4/07, Jan Kriesten <ja...@renitence.de> wrote:
>
>
> Hi!
>
> I still need some help on thins issue to get the CXFServlet configured
> using
> AegisDatabinding with <jaxws:...>-syntax.
>
> Someone there knowing the proper hints?
>
> Thanks! :-)
>
> Best regards, --- Jan.
>
>
> -------- Original Message --------
> Subject: CXFServlet-Config
> Date: Fri, 29 Jun 2007 17:23:49 +0200
> From: Jan Kriesten <ja...@renitence.de>
> Reply-To: cxf-user@incubator.apache.org
> To: cxf-user@incubator.apache.org
>
>
> Hi,
>
> I'm not really a Spring-wizard, so I'm having some trouble getting the
> CXFServlet configured as I wish...
>
> The following properties work to have the Service responding:
>
> ---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"
>        xsi:schemaLocation="http://www.springframework.org/schema/beans
>
> http://www.springframework.org/schema/beans/spring-beans-2.0.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" />
>
>   <jaxws:endpoint id="AuthService"
>                   implementor="test.AcegiAuthService"
>                   address="/AuthService" />
>
> </beans>
> ---8<---
>
> Now I want to have the service use AegisDatabinding, but I don't get it
> working...
>
> Could someone provide me with a hint - the following approach which Willem
> posted (on my marshalling exception) only leads to an unresponsive
> service, so
> the above is the only working version I have right now:
>
> ---8<---
> <bean id="AegisDatabinding"
> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
>
> <bean id="JaxWsServiceFactoryBean"
> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>    <property name="wrapped" value="false"/>
>    <property name="dataBinding" ref="AegisDatabinding"/>
> </bean>
>
> <bean id="authServiceFactory"
>    class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"
> init-method="create">
>    <property name="serviceClass" value="test.AcegiAuthService" />
>    <property name="serviceBean">
>      <bean class="test.AcegiAuthService"/>
>    </property>
>    <property name="address" value="/AuthService"/>
>    <property name="bus" ref="cxf"/>
>    <property name="serviceFactory" ref="JaxWsServiceFactoryBean"/>
> </bean>
> ---8<---
>
>
> Best regards, --- Jan.
>
>


-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog