Package org.codehaus.xfire.wsdl11.builder

Examples of org.codehaus.xfire.wsdl11.builder.DefaultWSDLBuilderFactory


    }
   

    public Service create(Class clazz, QName name, Definition def, Map properties)
    {
      return create(clazz, name, def, properties, new DefinitionWSDL(def));
    }
View Full Code Here


        this("", is);
    }

    public WSDLServiceBuilder(String baseURI, InputStream is) throws WSDLException
    {
        this(WSDLFactory.newInstance().newWSDLReader().readWSDL(new ResolverWSDLLocator(baseURI, new InputSource(is))));
        this.definition.setDocumentBaseURI(baseURI);
        this.systemId = baseURI;
    }
View Full Code Here

    {
        try
        {
            return create(clazz,
                          name,
                          WSDLFactory.newInstance().newWSDLReader().readWSDL(new ResolverWSDLLocator(null, new InputSource(wsdlUrl.openStream()))),
                          properties,
                          new ResourceWSDL(wsdlUrl));
        }
        catch (WSDLException e)
        {
View Full Code Here

    public Port createPort(WSDLBuilder builder, javax.wsdl.Binding wbinding)
    {
        Transport t = builder.getTransportManager().getTransport(getBindingId());
        if (!(t instanceof WSDL11Transport)) return null;
       
        WSDL11Transport transport = (WSDL11Transport) t;
       
        SOAPAddressImpl add = new SOAPAddressImpl();
        add.setLocationURI(transport.getServiceURL(builder.getService()));
       
        Port port = builder.getDefinition().createPort();
        port.setBinding( wbinding );
        QName portName = (QName) builder.getService().getProperty(ObjectServiceFactory.PORT_NAME);
        if (portName != null)
        {
            port.setName(portName.getLocalPart());  
        }
        else
        {
            port.setName( builder.getService().getSimpleName() + transport.getName() + "Port" );
        }
        port.addExtensibilityElement( add );
      
        return port;
    }
View Full Code Here

{
    public void testExtensions()
        throws Exception
    {
        ObjectServiceFactory osf = (ObjectServiceFactory) getServiceFactory();
        DefaultWSDLBuilderFactory factory = (DefaultWSDLBuilderFactory) osf.getWsdlBuilderFactory();

        Service service = getServiceFactory().create(Echo.class);
        service.setInvoker(new BeanInvoker(new EchoImpl()));

        getServiceRegistry().register(service);
       
        List exts = new ArrayList();
        exts.add(new CustomExtension());
        factory.setWSDLBuilderExtensions(exts);

        Document wsdl = getWSDLDocument("Echo");
        addNamespace("w", WSDLWriter.WSDL11_NS);
        addNamespace("f", "urn:foo");
        assertValid("//w:message[@name='Test']", wsdl);
View Full Code Here

        if (schemas != null)
        {
            ObjectServiceFactory osf = (ObjectServiceFactory) serviceFactory;
           
            DefaultWSDLBuilderFactory wbf =
                (DefaultWSDLBuilderFactory) osf.getWsdlBuilderFactory();
            wbf.setSchemaLocations(schemas);
        }

        // set up in handlers
        if (xfireService.getInHandlers() == null)
            xfireService.setInHandlers(getInHandlers());
View Full Code Here

        final ObjectInvoker invoker = new ObjectInvoker(ScopePolicyEditor.toScopePolicy(theScope));       
        endpoint.setInvoker(invoker);
        endpoint.setFaultSerializer(new SoapFaultSerializer());

        endpoint.setWSDLWriter(new WSDLBuilderAdapter(getWsdlBuilderFactory(), endpoint, transportManager));
        initializeOperations(endpoint, theStyle);

        endpoint.setProperty(STYLE, theStyle);
        endpoint.setProperty(USE, theUse);
View Full Code Here

    extends AbstractXFireTest
{
    public void testVisitor()
        throws Exception
    {
        WSDLServiceBuilder builder = new WSDLServiceBuilder(getResourceAsStream("echoHeader.wsdl"));
        builder.setBindingProvider(new MessageBindingProvider());
        builder.build();
       
        Map serviceMap = builder.getServices();
        assertEquals(1, serviceMap.size());
       
        Collection services = builder.getAllServices();       
        assertEquals(1, services.size());
       
        Service service = (Service) services.iterator().next();
       
        QName name = service.getName();
View Full Code Here

    extends AbstractXFireTest
{
    public void testVisitor()
        throws Exception
    {
        WSDLServiceBuilder builder = new WSDLServiceBuilder(getResourceAsStream("echo.wsdl"));
        builder.setBindingProvider(new MessageBindingProvider());
        builder.build();
       
        Collection services = builder.getAllServices();       
        assertEquals(1, services.size());
       
        Service service = (Service) services.iterator().next();
       
        QName name = service.getName();
View Full Code Here

    }
   
    public void testUnknownBinding()
        throws Exception
    {
        WSDLServiceBuilder builder = new WSDLServiceBuilder(getResourceAsStream("echoHttp.wsdl"));
        builder.setBindingProvider(new MessageBindingProvider());
        builder.build();
       
        Collection services = builder.getAllServices();       
        assertEquals(1, services.size());
       
        Service service = (Service) services.iterator().next();
       
        QName name = service.getName();
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.wsdl11.builder.DefaultWSDLBuilderFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.