Package org.apache.axis2.description

Examples of org.apache.axis2.description.WSDL11ToAxisServiceBuilder


                            file1.getName().equals("wsat.wsdl") ||
                            file1.getName().equals("no-service.wsdl")) {
                        continue;
                    }
                    try {
                        WSDL11ToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(new FileInputStream(file1), null, null);
                        AxisService service = builder.populateService();
                        System.out.println("Testinf file: " + file1.getName());
                        configContext.getAxisConfiguration().addService(service);
                        OutputStream out = new FileOutputStream(new File(outLocation, file1.getName()));
                        service.printWSDL(out, "http://google.com/axis2/services" ,"services");
                        out.flush();
View Full Code Here


                                // we have a WSDL 2.0 document here.
                                wsdlToAxisServiceBuilder = new WSDL20ToAxisServiceBuilder(new ByteArrayInputStream(out.toByteArray()), null, null);
                                wsdlToAxisServiceBuilder.setBaseUri(entryName);
                            } else if (Constants.NS_URI_WSDL11.
                                    equals(documentElementNS.getNamespaceURI())) {
                                wsdlToAxisServiceBuilder = new WSDL11ToAxisServiceBuilder(new ByteArrayInputStream(out.toByteArray()), null, null);
                            } else {
                                new DeploymentException(Messages.getMessage("invalidWSDLFound"));
                            }
                            AxisService service = processWSDLFile(wsdlToAxisServiceBuilder, serviceFile, true, new ByteArrayInputStream(out.toByteArray()), entry.getName());
                            if(service != null) {
View Full Code Here

                        in2 = new FileInputStream(file1);
                        wsdlToAxisServiceBuilder = new WSDL20ToAxisServiceBuilder(in2, null, null);
                    } else if (Constants.NS_URI_WSDL11.
                            equals(documentElementNS.getNamespaceURI())) {
                        in2 = new FileInputStream(file1);
                        wsdlToAxisServiceBuilder = new WSDL11ToAxisServiceBuilder(in2, null, null);
                    } else {
                        new DeploymentException(Messages.getMessage("invalidWSDLFound"));
                    }

                    FileInputStream in3 = new FileInputStream(file1);
View Full Code Here

                QName serviceQname = null;
                if (configuration.getServiceName()!=null){
                    serviceQname = new QName(wsdl4jDef.getTargetNamespace(), configuration.getServiceName());
                }

                configuration.setAxisService(new WSDL11ToAxisServiceBuilder(
                        wsdl4jDef,
                        serviceQname,
                        configuration.getPortName()).
                        populateService()
                );
View Full Code Here

       
        // TODO: Change this to use WSDLToAxisServiceBuilder superclass
        // Note that the axis service builder takes only the localpart of the port qname.
        // TODO:: This should check that the namespace of the definition matches the namespace of the portQName per JAXRPC spec
       
        WSDL11ToAxisServiceBuilder serviceBuilder =
          new WSDL11ToAxisServiceBuilder( getServiceDescriptionImpl().getWSDLWrapper().getDefinition(),
              getServiceDescription().getServiceQName(),
              getPortQName().getLocalPart());
       
        if (getServiceDescriptionImpl().isDBCMap()) {
           //this.class.getClass().getClassLoader();
          URIResolverImpl uriResolver =
              new URIResolverImpl(composite.getClassLoader());
          serviceBuilder.setCustomResolver(uriResolver);
        }
        else {
          ClassLoader classLoader = (ClassLoader) AccessController.doPrivileged(new
              PrivilegedAction() {
                public Object run() {
                  return Thread.currentThread().getContextClassLoader();
                }
            });
          URIResolverImpl uriResolver = new URIResolverImpl(classLoader);
          serviceBuilder.setCustomResolver(uriResolver);
        }
       
        // TODO: Currently this only builds the client-side AxisService;
        // it needs to do client and server somehow.
        // Patterned after AxisService.createClientSideAxisService       
        if (getServiceDescriptionImpl().isServerSide())
          serviceBuilder.setServerSide(true);
        else
          serviceBuilder.setServerSide(false);
       
        axisService = serviceBuilder.populateService();
        axisService.setName(createAxisServiceName());
            isBuiltFromWSDL = true;
           
      } catch (AxisFault e) {
        // REVIEW: If we couldn't use the WSDL, should we fail instead of continuing to process using annotations? 
View Full Code Here

           //Decide WSDL Version :
        if(WSDLConstants.WSDL20_2006Constants.DEFAULT_NAMESPACE_URI.equals(documentElementNS.getNamespaceURI())){
            wsdlBuilder = new WSDL20ToAxisServiceBuilder(new ByteArrayInputStream(wsdlContent.getBytes()), serviceQName, null);
        }
        else if(Constants.NS_URI_WSDL11.equals(documentElementNS.getNamespaceURI())){
            wsdlBuilder = new WSDL11ToAxisServiceBuilder(wsdlDefinition, serviceQName , portName);
        }
        //populate with axis2 objects
        AxisService service = wsdlBuilder.populateService();
        service.addParameter(new Parameter(Constants.SERVICE_CLASS, endpointClassName));
        service.setWsdlFound(true);
View Full Code Here

        Definition definition = wsBinding.getWSDLDocument();
        QName serviceQName = wsBinding.getService().getQName();
        Definition def = getDefinition(definition, serviceQName);

        final WSDLToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(def, serviceQName, port.getName());
        builder.setServerSide(true);
        // [rfeng] Add a custom resolver to work around WSCOMMONS-228
        // TODO - 228 is resolved, is this still required
        builder.setCustomResolver(new URIResolverImpl(def));
        builder.setBaseUri(def.getDocumentBaseURI());
        // [rfeng]
        // AxisService axisService = builder.populateService();
        // Allow privileged access to read properties. Requires PropertiesPermission read in
        // security policy.
        AxisService axisService;
        try {
            axisService = AccessController.doPrivileged(new PrivilegedExceptionAction<AxisService>() {
                public AxisService run() throws AxisFault {
                    return builder.populateService();
                }
            });
        } catch (PrivilegedActionException e) {
            throw (AxisFault)e.getException();
        }
View Full Code Here

    public static AxisService createClientSideAxisService(Definition definition,
                                                          QName serviceName,
                                                          String portName,
                                                          Options options) throws AxisFault {
        Definition def = getDefinition(definition, serviceName);
        final WSDL11ToAxisServiceBuilder serviceBuilder = new WSDL11ToAxisServiceBuilder(def, serviceName, portName);
        serviceBuilder.setServerSide(false);
        // [rfeng] Add a custom resolver to work around WSCOMMONS-228
        serviceBuilder.setCustomResolver(new URIResolverImpl(def));
        serviceBuilder.setBaseUri(def.getDocumentBaseURI());
        // [rfeng]
        // Allow access to read properties. Requires PropertiesPermission in security policy.
        AxisService axisService;        
        try {       
            axisService = AccessController.doPrivileged(new PrivilegedExceptionAction<AxisService>() {
                public AxisService run() throws AxisFault {
                    return serviceBuilder.populateService();
                }
            });
            } catch ( PrivilegedActionException e ) {
               throw (AxisFault) e.getException();
            }
View Full Code Here

            service.generateSchema();
           
            WSDL11DefinitionBuilder definitionBuilder = new WSDL11DefinitionBuilder(service);
            Definition definition = definitionBuilder.generateWSDL();

            WSDL11ToAxisServiceBuilder bulder = new WSDL11ToAxisServiceBuilder(definition, null, null);
            bulder.populateService();

        } catch (MetaDataPopulateException e) {
            fail();
        } catch (SchemaGenerationException e) {
            fail();
View Full Code Here

            Definition definition = definitionBuilder.generateWSDL();

//            WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();
//            wsdlWriter.writeWSDL(definition, System.out);

            WSDL11ToAxisServiceBuilder bulder = new WSDL11ToAxisServiceBuilder(definition, null, null);
            bulder.populateService();

        } catch (MetaDataPopulateException e) {
            fail();
        } catch (SchemaGenerationException e) {
            fail();
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.WSDL11ToAxisServiceBuilder

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.