Examples of SDDocumentSource


Examples of com.sun.xml.internal.ws.api.server.SDDocumentSource

        Map<String, SDDocument> docs = new HashMap<String, SDDocument>();

        public SDDocument resolveEntity(String systemId) {
            SDDocument sdi = docs.get(systemId);
            if (sdi == null) {
                SDDocumentSource sds;
                try {
                    sds = SDDocumentSource.create(new URL(systemId));
                } catch(MalformedURLException e) {
                    throw new WebServiceException(e);
                }
View Full Code Here

Examples of com.sun.xml.internal.ws.api.server.SDDocumentSource

        }

        public SDDocument resolveEntity(String systemId) {
            SDDocument sdi = docs.get(systemId);
            if (sdi == null) {
                SDDocumentSource sds;
                try {
                    sds = SDDocumentSource.create(new URL(systemId));
                } catch(MalformedURLException e) {
                    throw new WebServiceException(e);
                }
View Full Code Here

Examples of com.sun.xml.internal.ws.api.server.SDDocumentSource

            }
        }

        public Parser resolveEntity (String publicId, String systemId) throws IOException, XMLStreamException {
            if (systemId != null) {
                SDDocumentSource doc = metadata.get(systemId);
                if (doc != null)
                    return new Parser(doc);
            }
            return null;
        }
View Full Code Here

Examples of com.sun.xml.internal.ws.api.server.SDDocumentSource

            }
            String systemId = source.getSystemId();

            //TODO: can we do anything if the given mex Source has no systemId?
            if(systemId != null){
                SDDocumentSource doc = SDDocumentSource.create(JAXWSUtils.getFileOrURL(systemId), xsbr.getXMLStreamBuffer());
                this.wsdls.put(systemId, doc);
            }
        }
    }
View Full Code Here

Examples of com.sun.xml.internal.ws.api.server.SDDocumentSource

        }
    }

    public Parser resolveEntity(String publicId, String systemId) throws SAXException, IOException, XMLStreamException {
        if (systemId != null) {
            SDDocumentSource src = wsdls.get(systemId);
            if (src != null)
                return new Parser(src);
        }
        return null;
    }
View Full Code Here

Examples of com.sun.xml.internal.ws.api.server.SDDocumentSource

            return null;                // Don't generate abstract WSDL
        }
        URL url = createURL(filename.value);
        MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
        xsb.setSystemId(url.toExternalForm());
        SDDocumentSource abstractWsdlSource = SDDocumentSource.create(url,xsb);
        newDocs.add(abstractWsdlSource);
        XMLStreamBufferResult r = new XMLStreamBufferResult(xsb);
        r.setSystemId(filename.value);
        return r;
    }
View Full Code Here

Examples of com.sun.xml.internal.ws.api.server.SDDocumentSource

        }

        URL url = createURL(filename.value);
        MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
        xsb.setSystemId(url.toExternalForm());
        SDDocumentSource sd = SDDocumentSource.create(url,xsb);
        newDocs.add(sd);

        XMLStreamBufferResult r = new XMLStreamBufferResult(xsb);
        r.setSystemId(filename.value);
        return r;
View Full Code Here

Examples of com.sun.xml.internal.ws.api.server.SDDocumentSource

            String implementationName =
                    getMandatoryNonEmptyAttribute(reader, attrs, ATTR_IMPLEMENTATION);
            Class<?> implementorClass = getImplementorClass(implementationName,reader);
            EndpointFactory.verifyImplementorClass(implementorClass);

            SDDocumentSource primaryWSDL = getPrimaryWSDL(reader, attrs, implementorClass);

            QName serviceName = getQNameAttribute(attrs, ATTR_SERVICE);
            if (serviceName == null)
                serviceName = EndpointFactory.getDefaultServiceName(implementorClass);
View Full Code Here

Examples of com.sun.xml.internal.ws.api.server.SDDocumentSource

            }
            if (wsdl == null) {
                throw new LocatableWebServiceException(
                    ServerMessages.RUNTIME_PARSER_WSDL_NOT_FOUND(wsdlFile), xsr );
            }
            SDDocumentSource docInfo = docs.get(wsdl.toExternalForm());
            assert docInfo != null;
            return docInfo;
        }

        return null;
View Full Code Here

Examples of com.sun.xml.ws.api.server.SDDocumentSource

        // Get the proper binding using BindingID
        String givenBinding = endpoint.getProtocolBinding();

        // Get list of all wsdls and schema
        SDDocumentSource primaryWsdl = null;
        Collection docs = null;
        if(endpoint.getWebService().hasWsdlFile()) {
            BaseManager mgr;
            if(endpoint.getBundleDescriptor().getApplication().isVirtual()) {
                mgr = DeploymentServiceUtils.getInstanceManager(DeployableObjectType.WEB);
            } else {
                mgr = DeploymentServiceUtils.getInstanceManager(DeployableObjectType.APP);
            }
            String deployedDir =
                mgr.getLocation(endpoint.getBundleDescriptor().getApplication().getRegistrationName());
            File pkgedWsdl = null;
            if(deployedDir != null) {
                if(endpoint.getBundleDescriptor().getApplication().isVirtual()) {
                    pkgedWsdl = new File(deployedDir+File.separator+
                                endpoint.getWebService().getWsdlFileUri());
                } else {
                    pkgedWsdl = new File(deployedDir+File.separator+
                            endpoint.getBundleDescriptor().getModuleDescriptor().getArchiveUri().replaceAll("\\.", "_") +
                            File.separator + endpoint.getWebService().getWsdlFileUri());
                }
            } else {
                pkgedWsdl = new File(endpoint.getWebService().getWsdlFileUrl().getFile());
            }
            if(pkgedWsdl.exists()) {
                //Canonicalize the filename.  Since getWsdlsAndSchemas canonicalizes
                //the filenames of the metatdata documents, JAXWS might get into have
                //trouble detecting common root paths.
                //ie C://foo.wsdl and c://schema.wsdl
                pkgedWsdl = pkgedWsdl.getCanonicalFile();
               
                primaryWsdl = SDDocumentSource.create(pkgedWsdl.toURL());
                docs = wsu.getWsdlsAndSchemas(pkgedWsdl);
               
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.INFO, "Creating endpoint with packaged WSDL " +
                            primaryWsdl.getSystemId().toString());
                    logger.log(Level.FINE, "Metadata documents:");
                    for (Object source: docs) {
                        logger.log(Level.FINE, ((SDDocumentSource)source).getSystemId().toString());
                    }
                }
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.