This is my spring config:

<import resource="classpath:META-INF/cxf/cxf.xml"/>
    <import resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml"/>
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>

    <jaxws:endpoint id="rteServie"
                    implementor="#sessionService"
                    address="/"
                    bindingUri="http://apache.org/cxf/binding/http";>
        <jaxws:serviceFactory>
            <bean class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
                <property name="wrapped" value="false"/>
            </bean>
        </jaxws:serviceFactory>
    </jaxws:endpoint>

And my server use for unit testing:

sessionService.setRandom(new Random(1));
        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.setServiceClass(SessionService.class);
        sf.getServiceFactory().setWrapped(false);
        sf.setBindingId(HttpBindingFactory.HTTP_BINDING_ID);
        sf.setAddress("http://localhost:9001/visits/";);
        sf.getServiceFactory().setInvoker(new BeanInvoker(sessionService));
        svr = sf.create();

----- Original Message -----
From: "Jervis Liu" <[EMAIL PROTECTED]>
To: cxf-user@incubator.apache.org
Sent: Saturday, February 9, 2008 7:50:51 PM (GMT-0600) America/Guatemala
Subject: Re: Rest HTTP binding wrapped=false

Are you sure you have set your wrapped style to false? i.e., using sth
like   sf.getServiceFactory().setWrapped(false); or through spring
configuration. Your service does look alright as far as I can see, this kind
of problems normally happen when you messed up with wrapped style.

Cheers,
Jervis

On Feb 10, 2008 12:43 AM, Julio Arias <[EMAIL PROTECTED]> wrote:

> I have the following service interface:
>
> @Get
> @HttpResource(location = "/student/{id}")
> StudentSession startSession(StartSession startSession);
>
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlType
> public class StartSession {
>     protected long id;
>
>     public long getId() {
>         return id;
>     }
>
>     public void setId(long id) {
>         this.id = id;
>     }
> }
>
> When the StartSession gets unmarshaled the id is always 0, I debug
> JAXBEncoderDecoder and the XMLStreamReader source seams to be fine what can
> be the problem?? I attach the WSDL with the schema defs.
>
> --
> Julio Arias
> Java Developer
> Roundbox Global : enterprise : technology : genius
> -------------------------------------------------------------------------
> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> tel: (011) 506.258.3695 ext. 2001 | cell: (011) 506.849.5981
> email: [EMAIL PROTECTED] | www.rbxglobal.com
> -------------------------------------------------------------------------
>


-- 
Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
-------------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: (011) 506.258.3695 ext. 2001 | cell: (011) 506.849.5981
email: [EMAIL PROTECTED] | www.rbxglobal.com
-------------------------------------------------------------------------

Reply via email to