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?



Reply via email to