cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <sergey.beryoz...@iona.com>
Subject Re: re[jira] stful uri binding value not set to input parameter bean property
Date Thu, 20 Mar 2008 17:29:51 GMT
Hi

Please try the same with the current JAX-RS implementation in CXF.
I'm not qute sure why this does not work for the CXF HTTP binding, but one thing is that
this binding can be considered depecated...unless someone can confirm they're going to mantain
it...

Cheers, Sergey

>
> I have tried calling the following service using the cxf 2.0.4 and 2.1 code
> and when using both the accountNumber is not set to the GetForAccount bean.
> When debugging through the code I can see that
> the values are being read from the URL and an XML element is being generated
> in the form:
>
> <getTelephoneForAccount>
>    <accountNumber>ab123</accountNumber>
> </getTelephoneForAccount>
>
> This is then added to the message but never gets set to the GetForAccount
> bean.  Does anybody know why the property is not being set?
>
> Service definition:
>
> @WebService(targetNamespace = "http://uk.co.jdwilliams/account")
> public interface AccountTelephoneNumberService {
>    @Get
>    @HttpResource(location = "/telnos/{accountNumber}")
>    @WebResult(name = "telephoneNo")
>    TelephoneNumberTO getTelephoneForAccount(GetForAccount getForAccount);
> }
>
> input bean:
>
> public class GetForAccount {
>    private String accountNumber;
>
>    /**
>     * @return the accountNumber
>     */
>    public String getAccountNumber() {
>        return accountNumber;
>    }
>
>    /**
>     * @param accountNumber the accountNumber to set
>     */
>    public void setAccountNumber(String accountNumber) {
>        this.accountNumber = accountNumber;
>    }
> }
>
> Spring bean definition:
>
> <jaxws:endpoint id="accountTelNoService"
>            implementor="#accountTelephoneNumberService"
>            address="/xml/account"
>            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>
>
> -- 
> View this message in context: 
> http://www.nabble.com/restful-uri-binding-value-not-set-to-input-parameter-bean-property-tp16183429p16183429.html
> Sent from the cxf-issues mailing list archive at Nabble.com. 

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Mime
View raw message