cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <>
Subject RE: Problem configuring CXF DOSGi to run with JAX-WS
Date Tue, 27 Oct 2009 22:25:30 GMT


I only added 'javax.jws.*', both to the interface and impl bundles.
By the way, are you using 1.1-SNAPSHOT ?

I might have to repeat the test and send the zip

cheers, Sergey

-----Original Message-----
From: FrozenQ [] 
Sent: 27 October 2009 13:19
Subject: Re: Problem configuring CXF DOSGi to run with JAX-WS

Hi Sergey,

thanks for your quick reply. Unfortunately, I d'ont succeed in getting the
greeter demo run with JAXB and JAXWS. I tried the greeter example to come
along and so I have modified the greeter demo maven projects as follows:

1. I added the options "" = "jaxb" and
"" = "jaxws" to the service activator class and
the remote-services.xml of the client.
2. I have annotated the interface
(org.apache.cxf.dosgi.samples.greeter.GreeterService) with the corresponding
annotations "@Webservice" and "@WebMethod" for the interface and the
interface's methods, respectively. In addition, I have added the following
import directives to the code "javax.jws.*"
 and "javax.xml.bind.annotation.*". The interface now looks like:

package org.apache.cxf.dosgi.samples.greeter;

import java.util.Map;
import javax.jws.*;
import javax.xml.bind.annotation.*;

public interface GreeterService {
    Map<GreetingPhrase, String> greetMe(String name);
    GreetingPhrase [] greetMe(GreeterData name) throws GreeterException;

Finally, I have added the following "import-package" directives to the
interface bundles build with maven:

- javax.jws
- javax.jws.soap
- javax.xml.bind.annotation
- javax.xml.bind.annotation.adapters

3. I have repeated the same steps as mentioned in 2. for the service
implementation class. Furthermore, I have added the mentioned
"import-package" directives to the client bundle.
Now, when launching the service, the published wsdl looks like:

<wsdl:definitions name="GreeterServiceService"
<wsdl:portType name="GreeterService">
<wsdl:binding name="GreeterServiceServiceSoapBinding"
<soap:binding style="document"
<wsdl:service name="GreeterServiceService">
<wsdl:port binding="tns:GreeterServiceServiceSoapBinding"
<soap:address location="http://localhost:9090/greeter"/>

As you can see, there are no type definitions or operation specifications
included in the contract.

Do you have an idea what I am doing wrong? Could you please give me an

Many thanks in advance, again.

Sergey Beryozkin-2 wrote:
> Hi
> Few weeks ago, while looking at the issue reported against deploying the
> jaxrs services I also tested the deployment of jaxws 
> services and I updated the reference guide a a result.
> I had no problems with updating a greeter demo to use JAXWS - note that
> you have to ensure JAXWS and/or JAXB annotations are 
> available at runtime by adding the right Import-Package directives. In
> case of the demo, I updated the greeter-client component to 
> use JAXWS annotations and updated the pom.xml to import the annotations,
> and then I did update the pom for the greeter_impl as 
> well...
> here's the note from the reference page which you linked to :
> "Note that for JAXWS to work a javax.jws.* has to be imported into the
> interface and/or implementation and client bundles for 
> annotations like @WebService and @WebMethod be recognized", there's a
> similar note for JAXB....
> cheers, Sergey
> ----- Original Message ----- 
> From: "FrozenQ" <>
> To: <>
> Sent: Friday, October 23, 2009 1:42 PM
> Subject: Problem configuring CXF DOSGi to run with JAX-WS
>> Hi guys,
>> I have a problem configuring a DOSGi/CXF service to use JAXB databinding
>> and
>> JAX-WS frontend. I have set the following bundle registration properties
>> in
>> the service activator as described on the DOSGi/CXF reference page
>> (
>> 1) : "jaxb"
>> 2) : "jaxws"
>> Unfortunately, the generated WSDL does not include any type defintions or
>> operation specifications. The same problem is already described in this
>> thread:
>> ,
>> but there is no working solution provided. I also have added the imports
>> (javax.jws.*, javax.xml.bind.annotation.*) to the bundles as suggested on
>> the reference page mentioned above.
>> Does anybody know how to solve this issue?
>> Many thanks in advance.
>> -- 
>> View this message in context:
>> Sent from the cxf-user mailing list archive at

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message