Hi Benson,

Here is the part of jaxws:endpoint schema
<xsd:element name="endpoint">
   <xsd:complexType>
     <xsd:complexContent>
       <xsd:extension base="beans:identifiedType">
         <xsd:all>
             ......
<xsd:element name="serviceFactory" type="xsd:anyType" minOccurs="0"/>
         </xsd:all>
         <xsd:attributeGroup ref="cxf-beans:beanAttributes"/>
             .......
         <xsd:attribute name="implementor" type="xsd:string"/>
         <xsd:attribute name="implementorClass" type="xsd:string"/>
         <xsd:attribute name="publish" type="xsd:boolean" default="true"/>
         <xsd:attribute name="endpointName" type="xsd:QName" />
         <xsd:attribute name="serviceName" type="xsd:QName" />
         <xsd:attribute name="wsdlLocation" type="xsd:string" />
       </xsd:extension>
     </xsd:complexContent>
   </xsd:complexType>
 </xsd:element>

There is not attribute of serviceFactory that is defined in the jaxws:endpoint element. Because if we put the serviceFactory as the element of the endpoint, we can support not only ref bean but also inner bean.

<jaxws:endpoint id="inlineImplementor" 
address="http://localhost:8080/simpleWithAddress";>
   <jaxws:implementor>
     <bean class="org.apache.hello_world_soap_http.GreeterImpl">
        <property name="prefix" value="hello"/>
</bean> </jaxws:implementor>
 </jaxws:endpoint>



And if we only has the serviceFactory attribute in the endpoint element, I am afraid we just only support the ref bean.

If you want wrap the more detail of jaxws:endpoint, I think xslt with some kind of template may be your another option.

You could define a more easy understanding element, just like this
<endpoint  implementor="#index_service" address="/NameIndex" />

and then use the xslt to transform it to the CXF wanted jaxws:endpoint

<jaxws:endpoint id="index_service_endpoint"
   implementor="#index_service"
   address="/NameIndex">
<jaxws:serviceFactory>
<ref bean='aegis-service-factory'/>
</jaxws:serviceFactory>
</jaxws:endpoint>

Willem.

Benson Margulies wrote:
Willem,

Thanks, Can you tell me, in passing, why jaxws:serviceFactory is a
nested element and not (even optionally) an attribute pointing to a
top-level bean?

I've currently written the following, on the theory that my parser could
insist that a conventionally named service factory would be defined in
an included spring file, and so all I'd have to organize in Java is the
EndpointImpl corresponding to the endpoint decl. I still get this
sinking feeling that I'm capturing a lot of CXF internals into my Java
code, and I should be able to think of a way to tell my users to
interact with a simple XML file without that.

At the end of the day, I want to hand a user a webapp that they can
easily configure to specify (1) the address of the endpoint and (2) a
list of items like <x:index pathname='some real pathname'
writable='true'>
         <description>some verbose description</description>
     </x:index>

I don't want my users to have to edit into the middle of a minefield of
CXF details that, if disturbed, result in a disaster.

I've already done a spring parser for the x:index thing. I could do one
for my service implementation class in two shakes. It's the
jaxws:endpoint that has me going around in circles.

<!-- begin stuff to put in an import file -->
<bean id='aegis-service-factory'
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"> <property name="dataBinding" ref="aegisBean"/>
                 <property name="serviceConfigurations">
                     <list>
                       <bean
class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration"/>
                       <bean
class="org.apache.cxf.aegis.databinding.AegisServiceConfiguration"/>
                       <bean
class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/> </list>
                </property>
        </bean>
<bean id="aegisBean"
class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>

<!-- end stuff for the import file -->

<!-- begin stuff to produce in a Parser -->

<jaxws:endpoint
          id="index_service_endpoint"
          implementor="#index_service"
          address="/NameIndex"
> <jaxws:serviceFactory> <ref bean='aegis-service-factory'/>
          </jaxws:serviceFactory>
    </jaxws:endpoint>
<!-- end -->

-----Original Message-----
From: Willem Jiang [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 01, 2007 9:29 PM
To: [email protected]
Subject: Re: bean stalks

Hi Benson,

You can find the jaxws.xsd from this url [1]
Here is the code [2] which deals with the jaxws:endpoint parsing.


[1]http://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/frontend/jaxws
/s
rc/main/resources/schemas/jaxws.xsd

[2]http://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/frontend/jaxws
/s
rc/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java


Willem.

Benson Margulies wrote:
I'd like to build my own spring XML extension that wraps up the
complex
specification of an Aegis service endpoint.



Can someone tell me what the fully expanded spring XML would be for
jaxws:endpoint, or should I just start reading the source?






Reply via email to