You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by snowbug <la...@gmail.com> on 2008/11/14 10:00:37 UTC

Including schema for bean classes in thw wsdl file using JAX-WS

Hi,

I am trying out CXF and configured my service use both the simple front end
and the jax-ws front end. To illustrate the problem, let me briefly describe
the service first.

The service expose a method: 
public User getUser(int id);

And the User class is a standard POJO bean that has properties like:
firstName, lastName, address, etc, with corresponding getters and setters. 

What I noticed is that using the simple front end, the wsdl file contains a
generated schema definition for the User class. However, the jax-ws front
end will leave that off. 

I have two questions:
1. Is the schema definition for the User class important? If missing, how
does the client know what to expect?
2. How to configure the jax-ws front end to also include this schema
definition for the User class, if possible?

Thank you in advance for your help.
-- 
View this message in context: http://www.nabble.com/Including-schema-for-bean-classes-in-thw-wsdl-file-using-JAX-WS-tp20496933p20496933.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Including schema for bean classes in thw wsdl file using JAX-WS

Posted by Daniel Kulp <dk...@apache.org>.
Right, there are basically two namespaces that need to be in the correct 
places and matching:

1) The SEI interface.   This would be the @WebService annotation you defined 
on the interface.

2) On the actual implementation.   If you ALSO added a @WebService annotation 
to the impl, that would have worked.   However, the endpointName/serviceName 
attributes on the jaxws:endpoint override those values so that worked for 
you.

Dan


On Sunday 16 November 2008 3:22:44 am snowbug wrote:
> I tried that and it didn't help.
>
> But then I tried the following which fixed the problem:
> In my cxf spring config file, I have:
>     <jaxws:endpoint id="userService" implementor="#userServiceBean"
>         endpointName="e:UserServiceEndpoint"
>         serviceName="s:UserService"
>         address="/user"
>         xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
>         xmlns:s="http://service.jaxws.cxf.apache.org/service" />
>
> I changed the "xmlns:e" and "xmlns:s" to "http://service.mycompany.com/",
> so it looks like this:
>     <jaxws:endpoint id="userService" implementor="#userServiceBean"
>         endpointName="e:UserServiceEndpoint"
>         serviceName="s:UserService"
>        address="/user"
>         xmlns:e="http://service.mycompany.com/"
>         xmlns:s="http://service.mycompany.com/" />
>
> It was copied from the CXF online guide, and I didn't know it's purpose.
> Now it seems that this is how you specify the target name spaces for the
> endpointName and serviceName in the CXF Spring config file, and it should
> be changed to my own domain instead of directly using what's from the
> guide.
>
> Thank you for the helps and inspiration!
>
> Benson Margulies-4 wrote:
> > Put it on the @WebService annotation in the code.
> >
> > On Sat, Nov 15, 2008 at 7:13 PM, snowbug <la...@gmail.com> wrote:
> >> I think that is definitely the reason why it's splitted into two wsdl
> >> files.
> >> However, can you tell me how to set the target namespace? Looks like the
> >> <jaxws:endpoint> tag does not allow targetNamespace attribute, and
> >> setting
> >> the "targetNamespace" in the "@WebService" annotation of my UserService
> >> does
> >> not help.
> >>
> >> I'm using the CXF Spring configuration file and the configuration looks
> >> like
> >> this:
> >>    <jaxws:endpoint id="userService" implementor="#userServiceBean"
> >>        endpointName="e:UserServiceEndpoint"
> >>        serviceName="s:UserService"
> >>        address="/user"
> >>        xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
> >>        xmlns:s="http://service.jaxws.cxf.apache.org/service" />
> >>
> >> Right now, the annotation on the UserService is bare-bone like this:
> >>   @WebService
> >>   public interface UserService {
> >>   ...
> >>   }
> >>
> >> The main wsdl file begins like this:
> >> <wsdl:definitions name="UserService"
> >> targetNamespace="http://service.jaxws.cxf.apache.org/service">
> >> <wsdl:import
> >> location="http://localhost:8080/services/user?wsdl=UserService.wsdl"
> >> namespace="http://service.semarca.com/">
> >>    </wsdl:import>
> >>
> >> And the imported wsdl file begins like this:
> >> <wsdl:definitions name="UserService"
> >> targetNamespace="http://service.mycompany.com/">
> >>
> >> Any idea where I need to change to have it setup correctly? I couldn't
> >> find
> >> any additional information from the official CXF online document.
> >>
> >> Thank you,
> >>
> >> Benson Margulies-4 wrote:
> >>> If you spec out the target namespaces to be the same all around, it
> >>> will all land in the same place.
> >>>
> >>> When you switch from Simple to JAX-WS, you also switch from Aegis to
> >>> JAX-B.
> >>>
> >>> On Sat, Nov 15, 2008 at 1:39 AM, snowbug <la...@gmail.com> wrote:
> >>>> I just found out that the schema for the User object is actually there
> >>>> with
> >>>> the jax-ws implementation.
> >>>>
> >>>> What happens is that in the generated default wsdl, right after the
> >>>> open
> >>>> wsdl element, there is an import line like this:
> >>>> <wsdl:import
> >>>> location="http://localhost:8080/services/user?wsdl=UserService.wsdl"
> >>>> namespace="http://service.mycompany.com/"></wsdl:import>
> >>>>
> >>>> And when I type in that address in browser, I see all the schema
> >>>> definitions
> >>>> for the classes referenced.
> >>>>
> >>>> snowbug wrote:
> >>>>> Thanks for the reply.
> >>>>>
> >>>>> I didn't specify any databinding. For the jax-ws setting, I used:
> >>>>>     <!-- The user soap service -->
> >>>>>     <bean id="userServiceBean"
> >>>>> class="com.mycompany.service.UserServiceBean" />
> >>>>>
> >>>>>     <!-- JAX-WS based configuration -->
> >>>>>     <jaxws:endpoint id="userService" implementor="#userServiceBean"
> >>>>>         endpointName="e:userServiceEndpoint"
> >>>>>         serviceName="s:userService"
> >>>>>         address="/user"
> >>>>>         xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
> >>>>>         xmlns:s="http://service.jaxws.cxf.apache.org/service" />
> >>>>>
> >>>>>
> >>>>> For the simple front end based configuration, I used:
> >>>>>     <simple:server id="userService"
> >>>>>         serviceClass="com.mycompany.service.UserService"
> >>>>>         serviceBean="#userServiceBean"
> >>>>>         address="/user"/>
> >>>>>
> >>>>> As shown above, they both refer to the "userServiceBean" as the
> >>>>> actual implementor bean class.
> >>>>>
> >>>>> Benson Margulies-4 wrote:
> >>>>>> The issue is probably not the front-end but rather the data binding.
> >>>>>> Can you post the full config of the failing case?
> >>>>>>
> >>>>>> On Fri, Nov 14, 2008 at 4:00 AM, snowbug <la...@gmail.com>
> >>>>>>
> >>>>>> wrote:
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> I am trying out CXF and configured my service use both the simple
> >>>>>>> front
> >>>>>>> end
> >>>>>>> and the jax-ws front end. To illustrate the problem, let me briefly
> >>>>>>> describe
> >>>>>>> the service first.
> >>>>>>>
> >>>>>>> The service expose a method:
> >>>>>>> public User getUser(int id);
> >>>>>>>
> >>>>>>> And the User class is a standard POJO bean that has properties
> >>>>>>> like: firstName, lastName, address, etc, with corresponding getters
> >>>>>>> and setters.
> >>>>>>>
> >>>>>>> What I noticed is that using the simple front end, the wsdl file
> >>>>>>> contains a
> >>>>>>> generated schema definition for the User class. However, the jax-ws
> >>>>>>> front
> >>>>>>> end will leave that off.
> >>>>>>>
> >>>>>>> I have two questions:
> >>>>>>> 1. Is the schema definition for the User class important? If
> >>>>>>> missing,
> >>>>>>> how
> >>>>>>> does the client know what to expect?
> >>>>>>> 2. How to configure the jax-ws front end to also include this
> >>>>>>> schema definition for the User class, if possible?
> >>>>>>>
> >>>>>>> Thank you in advance for your help.
> >>>>>>> --
> >>>>>>> View this message in context:
> >>>>>>> http://www.nabble.com/Including-schema-for-bean-classes-in-thw-wsdl
> >>>>>>>-file-using-JAX-WS-tp20496933p20496933.html Sent from the cxf-user
> >>>>>>> mailing list archive at Nabble.com.
> >>>>
> >>>> --
> >>>> View this message in context:
> >>>> http://www.nabble.com/Including-schema-for-bean-classes-in-the-wsdl-fi
> >>>>le-using-JAX-WS-tp20496933p20512939.html Sent from the cxf-user mailing
> >>>> list archive at Nabble.com.
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Including-schema-for-bean-classes-in-the-wsdl-file
> >>-using-JAX-WS-tp20496933p20520962.html Sent from the cxf-user mailing
> >> list archive at Nabble.com.



-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re:

Posted by Coder One <co...@yahoo.com>.
Ugh....big apology..wrong list...


--- On Sun, 11/16/08, Coder One <co...@yahoo.com> wrote:

> From: Coder One <co...@yahoo.com>
> Subject: <stripes:radio checked>
> To: users@cxf.apache.org
> Date: Sunday, November 16, 2008, 7:28 PM
> Stripes 1.5
> 
> <stripes:radio checked=""> does not pass
> "checked" through to the input type radio.  Hence,
> one cannot check a radio option by default
> 
> <stripes:radio checked="checked">
> <stripes:radio checked="true">
> <stripes:radio checked="yes">
> 
> In various combination does not work either...Is this a
> known bug or is it just me? :)
> 
> Thanks...


      


Posted by Coder One <co...@yahoo.com>.
Stripes 1.5

<stripes:radio checked=""> does not pass "checked" through to the input type radio.  Hence, one cannot check a radio option by default

<stripes:radio checked="checked">
<stripes:radio checked="true">
<stripes:radio checked="yes">

In various combination does not work either...Is this a known bug or is it just me? :)

Thanks...


      


Re: Including schema for bean classes in thw wsdl file using JAX-WS

Posted by snowbug <la...@gmail.com>.
I tried that and it didn't help.

But then I tried the following which fixed the problem:
In my cxf spring config file, I have:
    <jaxws:endpoint id="userService" implementor="#userServiceBean"
        endpointName="e:UserServiceEndpoint"
        serviceName="s:UserService"
        address="/user"
        xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
        xmlns:s="http://service.jaxws.cxf.apache.org/service" />

I changed the "xmlns:e" and "xmlns:s" to "http://service.mycompany.com/", so
it looks like this:
    <jaxws:endpoint id="userService" implementor="#userServiceBean"
        endpointName="e:UserServiceEndpoint"
        serviceName="s:UserService"
       address="/user"
        xmlns:e="http://service.mycompany.com/"
        xmlns:s="http://service.mycompany.com/" />

It was copied from the CXF online guide, and I didn't know it's purpose. Now
it seems that this is how you specify the target name spaces for the
endpointName and serviceName in the CXF Spring config file, and it should be
changed to my own domain instead of directly using what's from the guide.

Thank you for the helps and inspiration!





Benson Margulies-4 wrote:
> 
> Put it on the @WebService annotation in the code.
> 
> On Sat, Nov 15, 2008 at 7:13 PM, snowbug <la...@gmail.com> wrote:
>>
>> I think that is definitely the reason why it's splitted into two wsdl
>> files.
>> However, can you tell me how to set the target namespace? Looks like the
>> <jaxws:endpoint> tag does not allow targetNamespace attribute, and
>> setting
>> the "targetNamespace" in the "@WebService" annotation of my UserService
>> does
>> not help.
>>
>> I'm using the CXF Spring configuration file and the configuration looks
>> like
>> this:
>>    <jaxws:endpoint id="userService" implementor="#userServiceBean"
>>        endpointName="e:UserServiceEndpoint"
>>        serviceName="s:UserService"
>>        address="/user"
>>        xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
>>        xmlns:s="http://service.jaxws.cxf.apache.org/service" />
>>
>> Right now, the annotation on the UserService is bare-bone like this:
>>   @WebService
>>   public interface UserService {
>>   ...
>>   }
>>
>> The main wsdl file begins like this:
>> <wsdl:definitions name="UserService"
>> targetNamespace="http://service.jaxws.cxf.apache.org/service">
>> <wsdl:import
>> location="http://localhost:8080/services/user?wsdl=UserService.wsdl"
>> namespace="http://service.semarca.com/">
>>    </wsdl:import>
>>
>> And the imported wsdl file begins like this:
>> <wsdl:definitions name="UserService"
>> targetNamespace="http://service.mycompany.com/">
>>
>> Any idea where I need to change to have it setup correctly? I couldn't
>> find
>> any additional information from the official CXF online document.
>>
>> Thank you,
>>
>>
>>
>> Benson Margulies-4 wrote:
>>>
>>> If you spec out the target namespaces to be the same all around, it
>>> will all land in the same place.
>>>
>>> When you switch from Simple to JAX-WS, you also switch from Aegis to
>>> JAX-B.
>>>
>>> On Sat, Nov 15, 2008 at 1:39 AM, snowbug <la...@gmail.com> wrote:
>>>>
>>>> I just found out that the schema for the User object is actually there
>>>> with
>>>> the jax-ws implementation.
>>>>
>>>> What happens is that in the generated default wsdl, right after the
>>>> open
>>>> wsdl element, there is an import line like this:
>>>> <wsdl:import
>>>> location="http://localhost:8080/services/user?wsdl=UserService.wsdl"
>>>> namespace="http://service.mycompany.com/"></wsdl:import>
>>>>
>>>> And when I type in that address in browser, I see all the schema
>>>> definitions
>>>> for the classes referenced.
>>>>
>>>>
>>>> snowbug wrote:
>>>>>
>>>>> Thanks for the reply.
>>>>>
>>>>> I didn't specify any databinding. For the jax-ws setting, I used:
>>>>>     <!-- The user soap service -->
>>>>>     <bean id="userServiceBean"
>>>>> class="com.mycompany.service.UserServiceBean" />
>>>>>
>>>>>     <!-- JAX-WS based configuration -->
>>>>>     <jaxws:endpoint id="userService" implementor="#userServiceBean"
>>>>>         endpointName="e:userServiceEndpoint"
>>>>>         serviceName="s:userService"
>>>>>         address="/user"
>>>>>         xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
>>>>>         xmlns:s="http://service.jaxws.cxf.apache.org/service" />
>>>>>
>>>>>
>>>>> For the simple front end based configuration, I used:
>>>>>     <simple:server id="userService"
>>>>>         serviceClass="com.mycompany.service.UserService"
>>>>>         serviceBean="#userServiceBean"
>>>>>         address="/user"/>
>>>>>
>>>>> As shown above, they both refer to the "userServiceBean" as the actual
>>>>> implementor bean class.
>>>>>
>>>>>
>>>>>
>>>>> Benson Margulies-4 wrote:
>>>>>>
>>>>>> The issue is probably not the front-end but rather the data binding.
>>>>>> Can you post the full config of the failing case?
>>>>>>
>>>>>> On Fri, Nov 14, 2008 at 4:00 AM, snowbug <la...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am trying out CXF and configured my service use both the simple
>>>>>>> front
>>>>>>> end
>>>>>>> and the jax-ws front end. To illustrate the problem, let me briefly
>>>>>>> describe
>>>>>>> the service first.
>>>>>>>
>>>>>>> The service expose a method:
>>>>>>> public User getUser(int id);
>>>>>>>
>>>>>>> And the User class is a standard POJO bean that has properties like:
>>>>>>> firstName, lastName, address, etc, with corresponding getters and
>>>>>>> setters.
>>>>>>>
>>>>>>> What I noticed is that using the simple front end, the wsdl file
>>>>>>> contains a
>>>>>>> generated schema definition for the User class. However, the jax-ws
>>>>>>> front
>>>>>>> end will leave that off.
>>>>>>>
>>>>>>> I have two questions:
>>>>>>> 1. Is the schema definition for the User class important? If
>>>>>>> missing,
>>>>>>> how
>>>>>>> does the client know what to expect?
>>>>>>> 2. How to configure the jax-ws front end to also include this schema
>>>>>>> definition for the User class, if possible?
>>>>>>>
>>>>>>> Thank you in advance for your help.
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://www.nabble.com/Including-schema-for-bean-classes-in-thw-wsdl-file-using-JAX-WS-tp20496933p20496933.html
>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Including-schema-for-bean-classes-in-the-wsdl-file-using-JAX-WS-tp20496933p20512939.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Including-schema-for-bean-classes-in-the-wsdl-file-using-JAX-WS-tp20496933p20520962.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Including-schema-for-bean-classes-in-the-wsdl-file-using-JAX-WS-tp20496933p20523304.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Including schema for bean classes in thw wsdl file using JAX-WS

Posted by Benson Margulies <bi...@gmail.com>.
Put it on the @WebService annotation in the code.

On Sat, Nov 15, 2008 at 7:13 PM, snowbug <la...@gmail.com> wrote:
>
> I think that is definitely the reason why it's splitted into two wsdl files.
> However, can you tell me how to set the target namespace? Looks like the
> <jaxws:endpoint> tag does not allow targetNamespace attribute, and setting
> the "targetNamespace" in the "@WebService" annotation of my UserService does
> not help.
>
> I'm using the CXF Spring configuration file and the configuration looks like
> this:
>    <jaxws:endpoint id="userService" implementor="#userServiceBean"
>        endpointName="e:UserServiceEndpoint"
>        serviceName="s:UserService"
>        address="/user"
>        xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
>        xmlns:s="http://service.jaxws.cxf.apache.org/service" />
>
> Right now, the annotation on the UserService is bare-bone like this:
>   @WebService
>   public interface UserService {
>   ...
>   }
>
> The main wsdl file begins like this:
> <wsdl:definitions name="UserService"
> targetNamespace="http://service.jaxws.cxf.apache.org/service">
> <wsdl:import
> location="http://localhost:8080/services/user?wsdl=UserService.wsdl"
> namespace="http://service.semarca.com/">
>    </wsdl:import>
>
> And the imported wsdl file begins like this:
> <wsdl:definitions name="UserService"
> targetNamespace="http://service.mycompany.com/">
>
> Any idea where I need to change to have it setup correctly? I couldn't find
> any additional information from the official CXF online document.
>
> Thank you,
>
>
>
> Benson Margulies-4 wrote:
>>
>> If you spec out the target namespaces to be the same all around, it
>> will all land in the same place.
>>
>> When you switch from Simple to JAX-WS, you also switch from Aegis to
>> JAX-B.
>>
>> On Sat, Nov 15, 2008 at 1:39 AM, snowbug <la...@gmail.com> wrote:
>>>
>>> I just found out that the schema for the User object is actually there
>>> with
>>> the jax-ws implementation.
>>>
>>> What happens is that in the generated default wsdl, right after the open
>>> wsdl element, there is an import line like this:
>>> <wsdl:import
>>> location="http://localhost:8080/services/user?wsdl=UserService.wsdl"
>>> namespace="http://service.mycompany.com/"></wsdl:import>
>>>
>>> And when I type in that address in browser, I see all the schema
>>> definitions
>>> for the classes referenced.
>>>
>>>
>>> snowbug wrote:
>>>>
>>>> Thanks for the reply.
>>>>
>>>> I didn't specify any databinding. For the jax-ws setting, I used:
>>>>     <!-- The user soap service -->
>>>>     <bean id="userServiceBean"
>>>> class="com.mycompany.service.UserServiceBean" />
>>>>
>>>>     <!-- JAX-WS based configuration -->
>>>>     <jaxws:endpoint id="userService" implementor="#userServiceBean"
>>>>         endpointName="e:userServiceEndpoint"
>>>>         serviceName="s:userService"
>>>>         address="/user"
>>>>         xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
>>>>         xmlns:s="http://service.jaxws.cxf.apache.org/service" />
>>>>
>>>>
>>>> For the simple front end based configuration, I used:
>>>>     <simple:server id="userService"
>>>>         serviceClass="com.mycompany.service.UserService"
>>>>         serviceBean="#userServiceBean"
>>>>         address="/user"/>
>>>>
>>>> As shown above, they both refer to the "userServiceBean" as the actual
>>>> implementor bean class.
>>>>
>>>>
>>>>
>>>> Benson Margulies-4 wrote:
>>>>>
>>>>> The issue is probably not the front-end but rather the data binding.
>>>>> Can you post the full config of the failing case?
>>>>>
>>>>> On Fri, Nov 14, 2008 at 4:00 AM, snowbug <la...@gmail.com> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am trying out CXF and configured my service use both the simple
>>>>>> front
>>>>>> end
>>>>>> and the jax-ws front end. To illustrate the problem, let me briefly
>>>>>> describe
>>>>>> the service first.
>>>>>>
>>>>>> The service expose a method:
>>>>>> public User getUser(int id);
>>>>>>
>>>>>> And the User class is a standard POJO bean that has properties like:
>>>>>> firstName, lastName, address, etc, with corresponding getters and
>>>>>> setters.
>>>>>>
>>>>>> What I noticed is that using the simple front end, the wsdl file
>>>>>> contains a
>>>>>> generated schema definition for the User class. However, the jax-ws
>>>>>> front
>>>>>> end will leave that off.
>>>>>>
>>>>>> I have two questions:
>>>>>> 1. Is the schema definition for the User class important? If missing,
>>>>>> how
>>>>>> does the client know what to expect?
>>>>>> 2. How to configure the jax-ws front end to also include this schema
>>>>>> definition for the User class, if possible?
>>>>>>
>>>>>> Thank you in advance for your help.
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/Including-schema-for-bean-classes-in-thw-wsdl-file-using-JAX-WS-tp20496933p20496933.html
>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Including-schema-for-bean-classes-in-the-wsdl-file-using-JAX-WS-tp20496933p20512939.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Including-schema-for-bean-classes-in-the-wsdl-file-using-JAX-WS-tp20496933p20520962.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: Including schema for bean classes in thw wsdl file using JAX-WS

Posted by snowbug <la...@gmail.com>.
I think that is definitely the reason why it's splitted into two wsdl files.
However, can you tell me how to set the target namespace? Looks like the
<jaxws:endpoint> tag does not allow targetNamespace attribute, and setting
the "targetNamespace" in the "@WebService" annotation of my UserService does
not help.

I'm using the CXF Spring configuration file and the configuration looks like
this:
    <jaxws:endpoint id="userService" implementor="#userServiceBean" 
        endpointName="e:UserServiceEndpoint"
        serviceName="s:UserService"
        address="/user" 
        xmlns:e="http://service.jaxws.cxf.apache.org/endpoint" 
        xmlns:s="http://service.jaxws.cxf.apache.org/service" />

Right now, the annotation on the UserService is bare-bone like this:
   @WebService
   public interface UserService {
   ...
   }

The main wsdl file begins like this:
<wsdl:definitions name="UserService"
targetNamespace="http://service.jaxws.cxf.apache.org/service">
<wsdl:import
location="http://localhost:8080/services/user?wsdl=UserService.wsdl"
namespace="http://service.semarca.com/">
    </wsdl:import>

And the imported wsdl file begins like this:
<wsdl:definitions name="UserService"
targetNamespace="http://service.mycompany.com/">

Any idea where I need to change to have it setup correctly? I couldn't find
any additional information from the official CXF online document.

Thank you,



Benson Margulies-4 wrote:
> 
> If you spec out the target namespaces to be the same all around, it
> will all land in the same place.
> 
> When you switch from Simple to JAX-WS, you also switch from Aegis to
> JAX-B.
> 
> On Sat, Nov 15, 2008 at 1:39 AM, snowbug <la...@gmail.com> wrote:
>>
>> I just found out that the schema for the User object is actually there
>> with
>> the jax-ws implementation.
>>
>> What happens is that in the generated default wsdl, right after the open
>> wsdl element, there is an import line like this:
>> <wsdl:import
>> location="http://localhost:8080/services/user?wsdl=UserService.wsdl"
>> namespace="http://service.mycompany.com/"></wsdl:import>
>>
>> And when I type in that address in browser, I see all the schema
>> definitions
>> for the classes referenced.
>>
>>
>> snowbug wrote:
>>>
>>> Thanks for the reply.
>>>
>>> I didn't specify any databinding. For the jax-ws setting, I used:
>>>     <!-- The user soap service -->
>>>     <bean id="userServiceBean"
>>> class="com.mycompany.service.UserServiceBean" />
>>>
>>>     <!-- JAX-WS based configuration -->
>>>     <jaxws:endpoint id="userService" implementor="#userServiceBean"
>>>         endpointName="e:userServiceEndpoint"
>>>         serviceName="s:userService"
>>>         address="/user"
>>>         xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
>>>         xmlns:s="http://service.jaxws.cxf.apache.org/service" />
>>>
>>>
>>> For the simple front end based configuration, I used:
>>>     <simple:server id="userService"
>>>         serviceClass="com.mycompany.service.UserService"
>>>         serviceBean="#userServiceBean"
>>>         address="/user"/>
>>>
>>> As shown above, they both refer to the "userServiceBean" as the actual
>>> implementor bean class.
>>>
>>>
>>>
>>> Benson Margulies-4 wrote:
>>>>
>>>> The issue is probably not the front-end but rather the data binding.
>>>> Can you post the full config of the failing case?
>>>>
>>>> On Fri, Nov 14, 2008 at 4:00 AM, snowbug <la...@gmail.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I am trying out CXF and configured my service use both the simple
>>>>> front
>>>>> end
>>>>> and the jax-ws front end. To illustrate the problem, let me briefly
>>>>> describe
>>>>> the service first.
>>>>>
>>>>> The service expose a method:
>>>>> public User getUser(int id);
>>>>>
>>>>> And the User class is a standard POJO bean that has properties like:
>>>>> firstName, lastName, address, etc, with corresponding getters and
>>>>> setters.
>>>>>
>>>>> What I noticed is that using the simple front end, the wsdl file
>>>>> contains a
>>>>> generated schema definition for the User class. However, the jax-ws
>>>>> front
>>>>> end will leave that off.
>>>>>
>>>>> I have two questions:
>>>>> 1. Is the schema definition for the User class important? If missing,
>>>>> how
>>>>> does the client know what to expect?
>>>>> 2. How to configure the jax-ws front end to also include this schema
>>>>> definition for the User class, if possible?
>>>>>
>>>>> Thank you in advance for your help.
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Including-schema-for-bean-classes-in-thw-wsdl-file-using-JAX-WS-tp20496933p20496933.html
>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Including-schema-for-bean-classes-in-the-wsdl-file-using-JAX-WS-tp20496933p20512939.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Including-schema-for-bean-classes-in-the-wsdl-file-using-JAX-WS-tp20496933p20520962.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Including schema for bean classes in thw wsdl file using JAX-WS

Posted by Benson Margulies <bi...@gmail.com>.
If you spec out the target namespaces to be the same all around, it
will all land in the same place.

When you switch from Simple to JAX-WS, you also switch from Aegis to JAX-B.

On Sat, Nov 15, 2008 at 1:39 AM, snowbug <la...@gmail.com> wrote:
>
> I just found out that the schema for the User object is actually there with
> the jax-ws implementation.
>
> What happens is that in the generated default wsdl, right after the open
> wsdl element, there is an import line like this:
> <wsdl:import
> location="http://localhost:8080/services/user?wsdl=UserService.wsdl"
> namespace="http://service.mycompany.com/"></wsdl:import>
>
> And when I type in that address in browser, I see all the schema definitions
> for the classes referenced.
>
>
> snowbug wrote:
>>
>> Thanks for the reply.
>>
>> I didn't specify any databinding. For the jax-ws setting, I used:
>>     <!-- The user soap service -->
>>     <bean id="userServiceBean"
>> class="com.mycompany.service.UserServiceBean" />
>>
>>     <!-- JAX-WS based configuration -->
>>     <jaxws:endpoint id="userService" implementor="#userServiceBean"
>>         endpointName="e:userServiceEndpoint"
>>         serviceName="s:userService"
>>         address="/user"
>>         xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
>>         xmlns:s="http://service.jaxws.cxf.apache.org/service" />
>>
>>
>> For the simple front end based configuration, I used:
>>     <simple:server id="userService"
>>         serviceClass="com.mycompany.service.UserService"
>>         serviceBean="#userServiceBean"
>>         address="/user"/>
>>
>> As shown above, they both refer to the "userServiceBean" as the actual
>> implementor bean class.
>>
>>
>>
>> Benson Margulies-4 wrote:
>>>
>>> The issue is probably not the front-end but rather the data binding.
>>> Can you post the full config of the failing case?
>>>
>>> On Fri, Nov 14, 2008 at 4:00 AM, snowbug <la...@gmail.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am trying out CXF and configured my service use both the simple front
>>>> end
>>>> and the jax-ws front end. To illustrate the problem, let me briefly
>>>> describe
>>>> the service first.
>>>>
>>>> The service expose a method:
>>>> public User getUser(int id);
>>>>
>>>> And the User class is a standard POJO bean that has properties like:
>>>> firstName, lastName, address, etc, with corresponding getters and
>>>> setters.
>>>>
>>>> What I noticed is that using the simple front end, the wsdl file
>>>> contains a
>>>> generated schema definition for the User class. However, the jax-ws
>>>> front
>>>> end will leave that off.
>>>>
>>>> I have two questions:
>>>> 1. Is the schema definition for the User class important? If missing,
>>>> how
>>>> does the client know what to expect?
>>>> 2. How to configure the jax-ws front end to also include this schema
>>>> definition for the User class, if possible?
>>>>
>>>> Thank you in advance for your help.
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Including-schema-for-bean-classes-in-thw-wsdl-file-using-JAX-WS-tp20496933p20496933.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Including-schema-for-bean-classes-in-the-wsdl-file-using-JAX-WS-tp20496933p20512939.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: Including schema for bean classes in thw wsdl file using JAX-WS

Posted by snowbug <la...@gmail.com>.
I just found out that the schema for the User object is actually there with
the jax-ws implementation. 

What happens is that in the generated default wsdl, right after the open
wsdl element, there is an import line like this:
<wsdl:import
location="http://localhost:8080/services/user?wsdl=UserService.wsdl"
namespace="http://service.mycompany.com/"></wsdl:import>

And when I type in that address in browser, I see all the schema definitions
for the classes referenced.


snowbug wrote:
> 
> Thanks for the reply.
> 
> I didn't specify any databinding. For the jax-ws setting, I used:
>     <!-- The user soap service -->
>     <bean id="userServiceBean"
> class="com.mycompany.service.UserServiceBean" />
> 
>     <!-- JAX-WS based configuration -->
>     <jaxws:endpoint id="userService" implementor="#userServiceBean" 
>         endpointName="e:userServiceEndpoint"
>         serviceName="s:userService" 
>         address="/user" 
>         xmlns:e="http://service.jaxws.cxf.apache.org/endpoint" 
>         xmlns:s="http://service.jaxws.cxf.apache.org/service" />
> 
> 
> For the simple front end based configuration, I used:
>     <simple:server id="userService" 
>         serviceClass="com.mycompany.service.UserService"
>         serviceBean="#userServiceBean"
>         address="/user"/>
> 
> As shown above, they both refer to the "userServiceBean" as the actual
> implementor bean class.
> 
> 
> 
> Benson Margulies-4 wrote:
>> 
>> The issue is probably not the front-end but rather the data binding.
>> Can you post the full config of the failing case?
>> 
>> On Fri, Nov 14, 2008 at 4:00 AM, snowbug <la...@gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I am trying out CXF and configured my service use both the simple front
>>> end
>>> and the jax-ws front end. To illustrate the problem, let me briefly
>>> describe
>>> the service first.
>>>
>>> The service expose a method:
>>> public User getUser(int id);
>>>
>>> And the User class is a standard POJO bean that has properties like:
>>> firstName, lastName, address, etc, with corresponding getters and
>>> setters.
>>>
>>> What I noticed is that using the simple front end, the wsdl file
>>> contains a
>>> generated schema definition for the User class. However, the jax-ws
>>> front
>>> end will leave that off.
>>>
>>> I have two questions:
>>> 1. Is the schema definition for the User class important? If missing,
>>> how
>>> does the client know what to expect?
>>> 2. How to configure the jax-ws front end to also include this schema
>>> definition for the User class, if possible?
>>>
>>> Thank you in advance for your help.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Including-schema-for-bean-classes-in-thw-wsdl-file-using-JAX-WS-tp20496933p20496933.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Including-schema-for-bean-classes-in-the-wsdl-file-using-JAX-WS-tp20496933p20512939.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Including schema for bean classes in thw wsdl file using JAX-WS

Posted by snowbug <la...@gmail.com>.
Thanks for the reply.

I didn't specify any databinding. For the jax-ws setting, I used:
    <!-- The user soap service -->
    <bean id="userServiceBean" class="com.mycompany.service.UserServiceBean"
/>

    <!-- JAX-WS based configuration -->
    <jaxws:endpoint id="userService" implementor="#userServiceBean" 
        endpointName="e:userServiceEndpoint"
        serviceName="s:userService" 
        address="/user" 
        xmlns:e="http://service.jaxws.cxf.apache.org/endpoint" 
        xmlns:s="http://service.jaxws.cxf.apache.org/service" />


For the simple front end based configuration, I used:
    <simple:server id="userService" 
        serviceClass="com.mycompany.service.UserService"
        serviceBean="#userServiceBean"
        address="/user"/>

As shown above, they both refer to the "userServiceBean" as the actual
implementor bean class.



Benson Margulies-4 wrote:
> 
> The issue is probably not the front-end but rather the data binding.
> Can you post the full config of the failing case?
> 
> On Fri, Nov 14, 2008 at 4:00 AM, snowbug <la...@gmail.com> wrote:
>>
>> Hi,
>>
>> I am trying out CXF and configured my service use both the simple front
>> end
>> and the jax-ws front end. To illustrate the problem, let me briefly
>> describe
>> the service first.
>>
>> The service expose a method:
>> public User getUser(int id);
>>
>> And the User class is a standard POJO bean that has properties like:
>> firstName, lastName, address, etc, with corresponding getters and
>> setters.
>>
>> What I noticed is that using the simple front end, the wsdl file contains
>> a
>> generated schema definition for the User class. However, the jax-ws front
>> end will leave that off.
>>
>> I have two questions:
>> 1. Is the schema definition for the User class important? If missing, how
>> does the client know what to expect?
>> 2. How to configure the jax-ws front end to also include this schema
>> definition for the User class, if possible?
>>
>> Thank you in advance for your help.
>> --
>> View this message in context:
>> http://www.nabble.com/Including-schema-for-bean-classes-in-thw-wsdl-file-using-JAX-WS-tp20496933p20496933.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Including-schema-for-bean-classes-in-the-wsdl-file-using-JAX-WS-tp20496933p20512857.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Including schema for bean classes in thw wsdl file using JAX-WS

Posted by Benson Margulies <bi...@gmail.com>.
The issue is probably not the front-end but rather the data binding.
Can you post the full config of the failing case?

On Fri, Nov 14, 2008 at 4:00 AM, snowbug <la...@gmail.com> wrote:
>
> Hi,
>
> I am trying out CXF and configured my service use both the simple front end
> and the jax-ws front end. To illustrate the problem, let me briefly describe
> the service first.
>
> The service expose a method:
> public User getUser(int id);
>
> And the User class is a standard POJO bean that has properties like:
> firstName, lastName, address, etc, with corresponding getters and setters.
>
> What I noticed is that using the simple front end, the wsdl file contains a
> generated schema definition for the User class. However, the jax-ws front
> end will leave that off.
>
> I have two questions:
> 1. Is the schema definition for the User class important? If missing, how
> does the client know what to expect?
> 2. How to configure the jax-ws front end to also include this schema
> definition for the User class, if possible?
>
> Thank you in advance for your help.
> --
> View this message in context: http://www.nabble.com/Including-schema-for-bean-classes-in-thw-wsdl-file-using-JAX-WS-tp20496933p20496933.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>