Yes, I do have that as a dependency in my pom:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>${cxf.version}</version>
</dependency>
Is there a sample configuration for the way the namespace is declared in the
beans element for jaxws:client? I wonder if I have that wrong.
Thanks
-Sonam
-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]]
Sent: Wednesday, March 05, 2014 1:44 PM
To: [email protected]
Subject: Re: jaxrs:client configuration throws error
You need to add a cxf-rt-rs-client module as described in the docs
Sergey
On 05/03/14 19:25, Sonam Samdupkhangsar wrote:
> After reading the link I tried several combinations of the namespace in the
> beans element such as following but can't find the right way :
>
> <beans default-autowire="byName"
> xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:jaxrs="http://cxf.apache.org/jaxrs"
> xmlns:jaxrs-client="http://cxf.apache.org/jaxrs-client"
> xmlns:context="http://www.springframework.org/schema/context"
> xmlns:util="http://www.springframework.org/schema/util"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
> http://www.springframework.org/schema/context
>
> http://www.springframework.org/schema/context/spring-context-3.0.xsd
> http://www.springframework.org/schema/util
> http://www.springframework.org/schema/util/spring-util-3.0.xsd
> http://cxf.apache.org/jaxrs
> http://cxf.apache.org/jaxrs-client
> http://cxf.apache.org/schemas/jaxrs.xsd
> http://cxf.apache.org/jaxrs-client/schemas/jaxrs-client.xsd">
>
>
> -Sonam
>
> -----Original Message-----
> From: Sergey Beryozkin [mailto:[email protected]]
> Sent: Wednesday, March 05, 2014 10:44 AM
> To: [email protected]
> Subject: Re: jaxrs:client configuration throws error
>
> This is a migration issue:
>
> http://cxf.apache.org/docs/jax-rs.html#JAX-RS-FromCXF2.7.xtoCXF3.0.0
> (with the link to all of CXF changes from there)
>
> Sergey
>
> On 05/03/14 17:36, Sonam Samdupkhangsar wrote:
>> Hi,
>>
>> I am not able to get my jaxrs:client configuration to work using CXF version
>> 3 milestone 2 . The following is my configuration:
>>
>> <?xml version="1.0" encoding="UTF-8"?> <beans
>> default-autowire="byName"
>> xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:jaxrs="http://cxf.apache.org/jaxrs"
>> xmlns:context="http://www.springframework.org/schema/context"
>> xmlns:util="http://www.springframework.org/schema/util"
>> xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
>> http://www.springframework.org/schema/context
>>
>> http://www.springframework.org/schema/context/spring-context-3.0.xsd
>> http://www.springframework.org/schema/util
>>
>> http://www.springframework.org/schema/util/spring-util-3.0.xsd
>> http://cxf.apache.org/jaxrs
>> http://cxf.apache.org/schemas/jaxrs.xsd">
>>
>> <jaxrs:client id="myClient" address="local://books"
>> serviceClass="org.company.MyInterface"
>> inheritHeaders="true">
>> <jaxrs:headers>
>> <entry key="userId"
>> value="${dev.userId}"/>
>> <entry key="password"
>> value="${dev.password}"/>
>> </jaxrs:headers>
>> </jaxrs:client>
>>
>> </beans>
>>
>>
>> I am seeing the following error when running a integ test:
>>
>> Caused by: org.xml.sax.SAXParseException; lineNumber: 54; columnNumber: 25;
>> cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration
>> can be found for element 'jaxrs:client'.
>> at
>> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAX
>> P
>> arseException(Unknown Source)
>>
>>
>> Is the Jaxrs client configuration in a separate namespace?
>>
>> thanks
>> -Sonam
>>
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com
>