Examples of WSDL4JWrapper


Examples of org.apache.axis2.jaxws.util.WSDL4JWrapper

        URL catalogURL = JAXWSUtils.getOASISCatalogURL(bundle, this.catalogName);
        if (catalogURL != null) {
            catalogManager.setCatalogFiles(catalogURL.toString());
        }
        URL wsdlURL = getWsdlURL(wsdlFile, bundle);
        WSDL4JWrapper wsdlWrapper = new WSDL4JWrapper(wsdlURL, this.configurationContext, catalogManager);
        Definition wsdlDefinition = wsdlWrapper.getDefinition();

        Service wsdlService = wsdlDefinition.getService(serviceQName);
        if (wsdlService == null) {
            throw new Exception("Service '" + serviceQName + "' not found in WSDL");
        }
View Full Code Here

Examples of org.apache.axis2.jaxws.util.WSDL4JWrapper

            //This is not correct in OSGi environment, so considering that one Catalog instance will be shared per OASISCatalogManager
            //instance, we will call the parseCatalog(URL) to add the file
            //catalogManager.setCatalogFiles(catalogURL.toString());
        }
        URL wsdlURL = JAXWSUtils.getWsdlURL(bundle, wsdlFile);
        WSDL4JWrapper wsdlWrapper = new WSDL4JWrapper(wsdlURL, this.configurationContext, catalogManager);
        Definition wsdlDefinition = wsdlWrapper.getDefinition();

        Service wsdlService = wsdlDefinition.getService(serviceQName);
        if (wsdlService == null) {
            throw new Exception("Service '" + serviceQName + "' not found in WSDL");
        }
View Full Code Here

Examples of org.apache.axis2.jaxws.util.WSDL4JWrapper

      URL url = getURLFromLocation(wsdlLocation);
     
      try{
      OASISCatalogManager catalogManager = new OASISCatalogManager();
            catalogManager.setCatalogFiles(getURLFromLocation(catalogFile).toString());
        WSDL4JWrapper w4j = new WSDL4JWrapper(url, catalogManager, false);
        w4j.getDefinition();
        fail("Should have received a WSDLException due to the invalid WSDL location "
              + "not redirected by the catalog.");
      } catch(WSDLException e) {
        // do nothing - successful test case
      } catch(Exception e){
View Full Code Here

Examples of org.apache.axis2.jaxws.util.WSDL4JWrapper

      } catch (MalformedURLException e) {
          e.printStackTrace();
          fail();
      }
      try{
        WSDL4JWrapper w4j = new WSDL4JWrapper(url);
        Definition wsdlDef = w4j.getDefinition();
        assertNotNull(wsdlDef);
        Set<String> pkg = sri.readPackagesFromSchema(wsdlDef);
            TestLogger.logger.debug("Packages:");
        for(String pkgName:pkg){
                TestLogger.logger.debug(pkgName);
View Full Code Here

Examples of org.apache.axis2.jaxws.util.WSDL4JWrapper

      URL url = getURLFromLocation(wsdlLocation);
     
      try{
      OASISCatalogManager catalogManager = new OASISCatalogManager();
      catalogManager.setCatalogFiles(getURLFromLocation(catalogFile).toString());
            WSDL4JWrapper w4j = new WSDL4JWrapper(url, catalogManager, false);
        Definition wsdlDef = w4j.getDefinition();
        assertNotNull(wsdlDef);  
        QName portTypeName = new QName("http://www.example.com/test/calculator",
                                   "CalculatorService",
                                   "");
        PortType portType = wsdlDef.getPortType(portTypeName);
View Full Code Here

Examples of org.apache.axis2.jaxws.util.WSDL4JWrapper

        HashMap<String, DescriptionBuilderComposite> map = converter.produceDBC();
       
        DescriptionBuilderComposite composite = map.get(PlainService.class.getName());
       
        URL wsdlUrl = new URL("file:./" + wsdlLocation);
        WSDL4JWrapper wrapper = new WSDL4JWrapper(wsdlUrl, false, 0);
       
        composite.setwsdlURL(wsdlUrl);
        composite.setWsdlDefinition(wrapper.getDefinition());
       
        List<ServiceDescription> sdList = null;
        try {
            sdList = DescriptionFactory.createServiceDescriptionFromDBCMap(map);
        }
View Full Code Here

Examples of org.apache.axis2.jaxws.util.WSDL4JWrapper

        HashMap<String, DescriptionBuilderComposite> map = converter.produceDBC();
       
        DescriptionBuilderComposite composite = map.get(DisabledService.class.getName());
       
        URL wsdlUrl = new URL("file:./" + wsdlLocation);
        WSDL4JWrapper wrapper = new WSDL4JWrapper(wsdlUrl, false, 0);
       
        composite.setwsdlURL(wsdlUrl);
        composite.setWsdlDefinition(wrapper.getDefinition());
       
        List<ServiceDescription> sdList = DescriptionFactory.createServiceDescriptionFromDBCMap(map);
        ServiceDescription sd = sdList.get(0);
       
        EndpointDescription ed = sd.getEndpointDescription(new QName(ns, disabledServicePortName));
View Full Code Here

Examples of org.apache.axis2.jaxws.util.WSDL4JWrapper

        HashMap<String, DescriptionBuilderComposite> map = converter.produceDBC();
       
        DescriptionBuilderComposite composite = map.get(DefaultService.class.getName());
       
        URL wsdlUrl = new URL("file:./" + wsdlLocation);
        WSDL4JWrapper wrapper = new WSDL4JWrapper(wsdlUrl, false, 0);
       
        composite.setwsdlURL(wsdlUrl);
        composite.setWsdlDefinition(wrapper.getDefinition());
       
        List<ServiceDescription> sdList = DescriptionFactory.createServiceDescriptionFromDBCMap(map);
        ServiceDescription sd = sdList.get(0);
       
        EndpointDescription ed = sd.getEndpointDescription(new QName(ns, defaultServicePortName));
View Full Code Here

Examples of org.apache.axis2.jaxws.util.WSDL4JWrapper

                    }
                }
               
              wsdlURL = new URL(wsdlDocumentLocation);
              // This is a temporary usage, so use a memory sensitive wrapper
                WSDLWrapper wrapper = new WSDL4JWrapper(wsdlURL, true, 2);
             
                if (serviceName != null) {
                   
                    QName serviceNameNoTrailingSlash = new QName("");
                    // TODO: why in the world would we have to do this?
                    if (serviceName.getNamespaceURI().endsWith("/")) {
                        String ns = serviceName.getNamespaceURI();
                        serviceNameNoTrailingSlash = new QName(ns.substring(0, ns.length()-1), serviceName.getLocalPart());
                    }
                   
                    if ((wrapper.getService(serviceName) == null) && (wrapper.getService(serviceNameNoTrailingSlash) == null)) {
                        throw new IllegalStateException(
                            Messages.getMessage("MissingServiceName",
                                                serviceName.toString(),
                                                wsdlDocumentLocation));
                    }
                    if (portName != null) {
                        String[] ports = wrapper.getPorts(serviceName);
                        // search the other name.  TODO: again, why do we have to do this?
                        if (ports == null) {
                            ports = wrapper.getPorts(serviceNameNoTrailingSlash);
                        }
                        String portLocalName = portName.getLocalPart();
                        boolean found = false;

                        if (ports != null) {
View Full Code Here

Examples of org.apache.axis2.jaxws.util.WSDL4JWrapper

                if (log.isDebugEnabled()) {
                    log.debug("@WebService wsdlLocation is " + wsdlLocation);
                }
               
                Definition def = null;
                WSDL4JWrapper wsdl4j = null;
                try {
                    File file = new File(wsdlLocation);
                    URL url = file.toURL();
                    wsdl4j = new WSDL4JWrapper(url, true, 2)// In this context, limit the wsdl memory
                    def = wsdl4j.getDefinition();
                } catch (Throwable t) {
                    if (log.isDebugEnabled()) {
                        log.debug("Error occurred while loading WSDL.  " +
                                        "Procesing continues without AttachmentDescription " +
                                        "information. " + t);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.