You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Lukasz L." <Lu...@sabre.com> on 2008/07/29 15:03:14 UTC

CXF SE endpoint/service name

I noticed that service and endpoint name specified in xbean.xml are ignored:
    <cxfse:endpoint service="xxx:exampleName"
endpoint="xxx:exampleEndpointName">
        <cxfse:pojo>
          <bean class="org.example.ExampleClasss" />
        </cxfse:pojo>
    </cxfse:endpoint>

When I specified service and endpoint (portName) properties using annotation
on the POJO class they are taken into account but when there are no
annotations the service/endpoint name are generated (based on POJO class
name) and settings in xbean.xml are simply disregarded.

Is it a bug?
-- 
View this message in context: http://www.nabble.com/CXF-SE-endpoint-service-name-tp18711641p18711641.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF SE endpoint/service name

Posted by "Lukasz L." <Lu...@sabre.com>.
I see, you're right that if it's inherited it should be like that but the
documentation would certainly help with it :).
I personally wouldn't rely on the fact that endpoint/service values or set
properly because the accidental mismatch can lead to losing a lot of time if
someone doesn't know the actual mechanism behind that. I would force someone
to check annotations. Of course this is personal preference

regards
Lukasz


Freeman Fang wrote:
> 
> Hi Lukasz,
> 
> Actually we use xbean to generate xsd and service endpoint are fields 
> which is inherited from super class.
> Besides that, IMHO I think the attribute servicename and endpoint are 
> still useful, think about this scenario,
> developer A write the cxf se SU, if there is no service and endpoint in 
> the xbean.xml, it's hard for other developer like B who write cxf bc SU 
> figure out what's the targetService/targetEndpoint should be if he want 
> to route message to cxf se SU.
> Of course developver A should guarantee the service/endpoint he specify 
> in xbean.xml should be identical with that from annotation or from 
> auto-generated one, we may need put it into our documentation.
> 
> Regards
> Freeman
> 
> 

-- 
View this message in context: http://www.nabble.com/CXF-SE-endpoint-service-name-tp18711641p18729234.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF SE endpoint/service name

Posted by Freeman Fang <fr...@gmail.com>.
Hi Lukasz,

Actually we use xbean to generate xsd and service endpoint are fields 
which is inherited from super class.
Besides that, IMHO I think the attribute servicename and endpoint are 
still useful, think about this scenario,
developer A write the cxf se SU, if there is no service and endpoint in 
the xbean.xml, it's hard for other developer like B who write cxf bc SU 
figure out what's the targetService/targetEndpoint should be if he want 
to route message to cxf se SU.
Of course developver A should guarantee the service/endpoint he specify 
in xbean.xml should be identical with that from annotation or from 
auto-generated one, we may need put it into our documentation.

Regards
Freeman

Lukasz L. wrote:
> So what is the point of service and endpoint attributes existence on
> cxfse:endpoint element?
> it is confusing for a developer when you can set them (as it is done with
> almost all other components) but they are ignored, 
> if you think that normal approach is to use annotations (or generated ones)
> then why not remove these attributes from XSD?
>
>
> Freeman Fang wrote:
>   
>> No, it's  not a bug.
>> If you use code first approach, all servicemodel info generated from the 
>> code.
>> So if there is annotation in the ExampleClass, it will be used to set 
>> the service/endpoint name.
>> If there is no annotation in the ExampleClass,  the rule is servicename 
>> should be implclassName + "Service", and the endpointname should be 
>> implclassName + "Port".
>>
>> Freeman
>>
>> Lukasz L. wrote:
>>     
>>> I noticed that service and endpoint name specified in xbean.xml are
>>> ignored:
>>>     <cxfse:endpoint service="xxx:exampleName"
>>> endpoint="xxx:exampleEndpointName">
>>>         <cxfse:pojo>
>>>           <bean class="org.example.ExampleClasss" />
>>>         </cxfse:pojo>
>>>     </cxfse:endpoint>
>>>
>>> When I specified service and endpoint (portName) properties using
>>> annotation
>>> on the POJO class they are taken into account but when there are no
>>> annotations the service/endpoint name are generated (based on POJO class
>>> name) and settings in xbean.xml are simply disregarded.
>>>
>>> Is it a bug?
>>>   
>>>       
>>
>>     
>
>   


Re: CXF SE endpoint/service name

Posted by "Lukasz L." <Lu...@sabre.com>.
So what is the point of service and endpoint attributes existence on
cxfse:endpoint element?
it is confusing for a developer when you can set them (as it is done with
almost all other components) but they are ignored, 
if you think that normal approach is to use annotations (or generated ones)
then why not remove these attributes from XSD?


Freeman Fang wrote:
> 
> No, it's  not a bug.
> If you use code first approach, all servicemodel info generated from the 
> code.
> So if there is annotation in the ExampleClass, it will be used to set 
> the service/endpoint name.
> If there is no annotation in the ExampleClass,  the rule is servicename 
> should be implclassName + "Service", and the endpointname should be 
> implclassName + "Port".
> 
> Freeman
> 
> Lukasz L. wrote:
>> I noticed that service and endpoint name specified in xbean.xml are
>> ignored:
>>     <cxfse:endpoint service="xxx:exampleName"
>> endpoint="xxx:exampleEndpointName">
>>         <cxfse:pojo>
>>           <bean class="org.example.ExampleClasss" />
>>         </cxfse:pojo>
>>     </cxfse:endpoint>
>>
>> When I specified service and endpoint (portName) properties using
>> annotation
>> on the POJO class they are taken into account but when there are no
>> annotations the service/endpoint name are generated (based on POJO class
>> name) and settings in xbean.xml are simply disregarded.
>>
>> Is it a bug?
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/CXF-SE-endpoint-service-name-tp18711641p18714257.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF SE endpoint/service name

Posted by Freeman Fang <fr...@gmail.com>.
No, it's  not a bug.
If you use code first approach, all servicemodel info generated from the 
code.
So if there is annotation in the ExampleClass, it will be used to set 
the service/endpoint name.
If there is no annotation in the ExampleClass,  the rule is servicename 
should be implclassName + "Service", and the endpointname should be 
implclassName + "Port".

Freeman

Lukasz L. wrote:
> I noticed that service and endpoint name specified in xbean.xml are ignored:
>     <cxfse:endpoint service="xxx:exampleName"
> endpoint="xxx:exampleEndpointName">
>         <cxfse:pojo>
>           <bean class="org.example.ExampleClasss" />
>         </cxfse:pojo>
>     </cxfse:endpoint>
>
> When I specified service and endpoint (portName) properties using annotation
> on the POJO class they are taken into account but when there are no
> annotations the service/endpoint name are generated (based on POJO class
> name) and settings in xbean.xml are simply disregarded.
>
> Is it a bug?
>