### XFire Home Bug/Issue Reporting Download FAQ Get Involved License News Stack Comparison Support User's Guide XFire Team ### M5 Javadocs Reports ### M6-SNAPSHOT Javadocs Reports ### Developers Developer Space CVS Building Architecture Interesting Projects Release Process | XMLBeansWSDLBuilder and XMLBeansWSDLBuilderAdapter are included that let XFire generate the types portion of your WSDL. Schemas are included (not imported) into the WSDL. XFire will generate a document-literal style WSDL file. # Using the XMLBeansWSDLBuilderAdapter "UsageExample.java"
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder;

    builder = factory.newDocumentBuilder();

    List schemaList = new ArrayList();

    for (int i = 0; i < mySchema.length; i++) {
    	Resource resource = new FileSystemResource(mySchema[i]);
    	org.w3c.dom.Document schema = builder.parse(resource.getFile());
    	schemaList.add(schema);
    }
    Document[] schemas = (Document[]) schemaList.toArray(new Document[schemaList.size()]);

    ServiceEndpoint endpoint = myServiceRegistry.getServiceEndpoint(myService);

    endpoint.setWSDLWriter(new XMLBeansWSDLBuilderAdapter(endpoint, myTransportManager, schemas));
# Configuring using Spring XMLBeansWSDLBuilderConfigurer lets you configure the XMLBeansWSDLBuilder using Spring. Include the following in your xfire-servlet.xml or in an equivalent applicationContext.xml file.
    <bean id="xfire.xmlbeansConfigurer" class="org.codehaus.xfire.xmlbeans.XMLBeansWSDLBuilder.Configurer"
            init-method="init">
            <property name="transportManager">
                <ref bean="xfire.transportManager"/>
            </property>
            <property name="service">
                <value>CustomerService</value>
            </property>
            <property name="serviceRegistry">
                <ref bean="xfire.serviceRegistry"/>
            </property>
            <property name="schemas">
                <list>
                    <value>schema1.xsd</value>
                    <value>schema2.xsd</value>
                </list>
            </property>
        </bean>
or you can alternatively specify a single schema using:
    <bean id="xfire.xmlbeansConfigurer" class="org.codehaus.xfire.xmlbeans.XMLBeansWSDLBuilder.Configurer"
            init-method="init">

    ...
            <property name="schema">
                <value>schema1.xsd</value>
            </property>
        </bean>