Hi,

is it possible to get the value of a @Path annotation in the cxf client?

What i have is:

Webservice Interface:
@Path("/RegistrationService")
@Consumes( { "application/xml" })
@Produces( { "application/xml" })
public interface RegistrationService {
        
        @POST
        @Path("/user/register")
        public void register(RegistrationData registrationData);
}

Client-Side Implementation:
public class RegistrationServiceImpl implements RegistrationService {
        
        private RegistrationService service;
        private Client client;
        
        public RegistrationServiceImpl() {

                // create proxy
                this.service = JAXRSClientFactory.create("http://localhost";,
RegistrationService.class);
                
                // convert proxy to client (acts then like a browser)
                this.client =
WebClient.client(this.service).accept(MediaType.APPLICATION_XML).type(MediaType.APPLICATION_XML);

        }
        
        @Override
        public void register(final RegistrationData registrationData) {

                String path = ??? // path should be "/user/register"

                registrationData.setMessageId(createMessageId(path,
registrationData.getMail()));
                
                this.service.register(registrationData);
                
        }
}

does cxf offer a way to get that path value or do i have to get it with
reflection?

Thanks in advance
mike
-- 
View this message in context: 
http://cxf.547215.n5.nabble.com/How-to-get-Path-annotation-value-in-cxf-client-tp3326670p3326670.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to