View Javadoc

1   package org.codehaus.xfire.jaxb;
2   
3   import org.codehaus.xfire.XFireRuntimeException;
4   import org.codehaus.xfire.service.Service;
5   import org.codehaus.xfire.transport.TransportManager;
6   import org.codehaus.xfire.wsdl11.WSDL11ParameterBinding;
7   import org.codehaus.xfire.wsdl11.builder.WSDLBuilder;
8   import org.codehaus.xfire.wsdl11.builder.WSDLBuilderFactory;
9   import org.codehaus.yom.Document;
10  
11  import javax.wsdl.WSDLException;
12  import javax.xml.stream.XMLStreamException;
13  import java.util.List;
14  
15  /***
16   * User: chris
17   * Date: Aug 18, 2005
18   * Time: 6:20:34 PM
19   */
20  public class JaxbWSDLBuilderFactory implements WSDLBuilderFactory
21  {
22      Document[] schemas;
23      private JaxbSchemaProvider jaxbSchemaProvider;
24  
25      public JaxbWSDLBuilderFactory(List schemaLocations) throws XMLStreamException
26      {
27          jaxbSchemaProvider = new JaxbSchemaProvider(schemaLocations);
28      }
29  
30      public WSDLBuilder createWSDLBuilder(Service service, WSDL11ParameterBinding paramBinding, TransportManager transportManager)
31      {
32          try
33          {
34              return new JaxbWsdlBuilder(service, transportManager, paramBinding, jaxbSchemaProvider);
35          } catch (WSDLException e)
36          {
37              throw new XFireRuntimeException("error instantiating jaxbwsdlfactory", e);
38          }
39      }
40  
41      List schemaLocations;
42  
43  }