Package org.apache.geronimo.webservices.builder

Examples of org.apache.geronimo.webservices.builder.SchemaInfoBuilder


        assertNotNull(operationInfo);
    }

    public void testBuildFullServiceProxy() throws Exception {
        Definition definition = buildDefinition();
        SchemaInfoBuilder schemaInfoBuilder = new SchemaInfoBuilder(null, definition);
        JavaWsdlMappingType mapping = buildLightweightMappingType();
        QName serviceQName = new QName(NAMESPACE, "MockService");
        AxisBuilder builder = new AxisBuilder(null);
        Object reference = builder.createService(MockService.class, schemaInfoBuilder, mapping, serviceQName, SOAPConstants.SOAP11_CONSTANTS, handlerInfos, gerServiceRefType, module, isolatedCl);
        assertNotNull(reference);
View Full Code Here


    public void testBuildBookQuoteProxy() throws Exception {
        File wsdl = new File(BASEDIR, "src/test/resources/BookQuote.wsdl");
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        Definition definition = reader.readWSDL(wsdl.toURI().toString());
        SchemaInfoBuilder schemaInfoBuilder = new SchemaInfoBuilder(null, definition);
        File jaxrpcMapping = new File(BASEDIR, "src/test/resources/BookQuote.xml");
        JavaWsdlMappingDocument mappingDocument = JavaWsdlMappingDocument.Factory.parse(jaxrpcMapping);
        JavaWsdlMappingType mapping = mappingDocument.getJavaWsdlMapping();
        QName serviceQName = new QName("http://www.Monson-Haefel.com/jwsbook/BookQuote", "BookQuoteService");
        AxisBuilder builder = new AxisBuilder(null);
View Full Code Here

    //needs to have heavyweight mapping
    public void xtestBuildInteropProxy() throws Exception {
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        Definition definition = reader.readWSDL(wsdlFile.toURI().toString());
        SchemaInfoBuilder schemaInfoBuilder = new SchemaInfoBuilder(null, definition);
        File jaxrpcMapping = new File(BASEDIR, "src/test/resources/interop/interop-jaxrpcmapping.xml");
        JavaWsdlMappingDocument mappingDocument = JavaWsdlMappingDocument.Factory.parse(jaxrpcMapping);
        JavaWsdlMappingType mapping = mappingDocument.getJavaWsdlMapping();
        QName serviceQName = new QName("http://tempuri.org/4s4c/1/3/wsdl/def/interopLab", "interopLab");
        AxisBuilder builder = new AxisBuilder(null);
View Full Code Here

    public void testBuildComplexTypeMap() throws Exception {
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        Definition definition = reader.readWSDL(wsdlFile.toURI().toString());
        SchemaInfoBuilder schemaInfoBuilder = new SchemaInfoBuilder(null, definition);
        Map complexTypeMap = schemaInfoBuilder.getComplexTypesInWsdl();
        assertEquals(7, complexTypeMap.size());
    }
View Full Code Here

    //ServicereferenceBuilder
    public Object createService(Class serviceInterface, URI wsdlURI, URI jaxrpcMappingURI, QName serviceQName, Map portComponentRefMap, List handlerInfos, Object serviceRefType, Module module, ClassLoader classLoader) throws DeploymentException {
        GerServiceRefType gerServiceRefType = (GerServiceRefType) serviceRefType;
        JarFile moduleFile = module.getModuleFile();
        SchemaInfoBuilder schemaInfoBuilder = null;
        JavaWsdlMappingType mapping = null;
        if (wsdlURI != null) {
            schemaInfoBuilder = new SchemaInfoBuilder(moduleFile, wsdlURI);

            mapping = WSDescriptorParser.readJaxrpcMapping(moduleFile, jaxrpcMappingURI);
        }

        return createService(serviceInterface, schemaInfoBuilder, mapping, serviceQName, SOAP_VERSION, handlerInfos, gerServiceRefType, module, classLoader);
View Full Code Here

                throw new DeploymentException("Could not compile schema type system: errors: " + errors);
            }
        } catch (XmlException e) {
            throw new DeploymentException("Could not compile schema type system", e);
        }
        schemaInfoBuilder = new SchemaInfoBuilder(null, new URI(""), schemaTypeSystem);
        Map map = schemaInfoBuilder.getSchemaTypeKeyToSchemaTypeMap();
        for (Iterator iterator = map.entrySet().iterator(); iterator.hasNext();) {
            Map.Entry entry = (Map.Entry) iterator.next();
            log.debug(entry.getKey() + " --> " + entry.getValue());
        }
View Full Code Here

            try {
                jaxrpcMappingURI = new URI(webserviceDescription.getJaxrpcMappingFile().getStringValue().trim());
            } catch (URISyntaxException e) {
                throw new DeploymentException("Could not construct jaxrpc mapping uri from " + webserviceDescription.getJaxrpcMappingFile(), e);
            }
            SchemaInfoBuilder schemaInfoBuilder =  new SchemaInfoBuilder(moduleFile, wsdlURI);
            Map wsdlPortMap = schemaInfoBuilder.getPortMap();

            JavaWsdlMappingType javaWsdlMapping = readJaxrpcMapping(moduleFile, jaxrpcMappingURI);
            HashMap seiMappings = new HashMap();
            ServiceEndpointInterfaceMappingType[] mappings = javaWsdlMapping.getServiceEndpointInterfaceMappingArray();
            for (int j = 0; j < mappings.length; j++) {
                ServiceEndpointInterfaceMappingType seiMapping = mappings[j];
                seiMappings.put(seiMapping.getServiceEndpointInterface().getStringValue(), seiMapping);
            }

            PortComponentType[] portComponents = webserviceDescription.getPortComponentArray();
            for (int j = 0; j < portComponents.length; j++) {
                PortComponentType portComponent = portComponents[j];
                String portComponentName = portComponent.getPortComponentName().getStringValue().trim();
                QName portQName = portComponent.getWsdlPort().getQNameValue();
                String seiInterfaceName = portComponent.getServiceEndpointInterface().getStringValue().trim();
                ServiceImplBeanType serviceImplBeanType = portComponent.getServiceImplBean();
                if (isEJB == serviceImplBeanType.isSetServletLink()) {
                    throw new DeploymentException("Wrong kind of web service described in web service descriptor: expected " + (isEJB ? "EJB" : "POJO(Servlet)"));
                }
                String linkName;
                String servletLocation;
                if (serviceImplBeanType.isSetServletLink()) {
                    linkName = serviceImplBeanType.getServletLink().getStringValue().trim();
                    servletLocation = (String) servletLocations.get(linkName);
                    if (servletLocation == null) {
                        throw new DeploymentException("No servlet mapping for port " + portQName);
                    }
                    schemaInfoBuilder.movePortLocation(portQName.getLocalPart(), servletLocation);
                } else {
                    linkName = serviceImplBeanType.getEjbLink().getStringValue().trim();
                    servletLocation = (String) servletLocations.get(linkName);
                    servletLocation = schemaInfoBuilder.movePortLocation(portQName.getLocalPart(), servletLocation);
                }
                PortComponentHandlerType[] handlers = portComponent.getHandlerArray();

                Port port = (Port) wsdlPortMap.get(portQName.getLocalPart());
                if (port == null) {
View Full Code Here

        assertNotNull(operationInfo);
    }

    public void testBuildFullServiceProxy() throws Exception {
        Definition definition = buildDefinition();
        SchemaInfoBuilder schemaInfoBuilder = new SchemaInfoBuilder(null, definition);
        JavaWsdlMappingType mapping = buildLightweightMappingType();
        QName serviceQName = new QName(NAMESPACE, "MockService");
        AxisBuilder builder = new AxisBuilder(null);
        Object reference = builder.createService(MockService.class, schemaInfoBuilder, mapping, serviceQName, SOAPConstants.SOAP11_CONSTANTS, handlerInfos, gerServiceRefType, module, isolatedCl);
        assertNotNull(reference);
View Full Code Here

    public void testBuildBookQuoteProxy() throws Exception {
        File wsdl = new File(BASEDIR, "src/test/resources/BookQuote.wsdl");
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        Definition definition = reader.readWSDL(wsdl.toURI().toString());
        SchemaInfoBuilder schemaInfoBuilder = new SchemaInfoBuilder(null, definition);
        File jaxrpcMapping = new File(BASEDIR, "src/test/resources/BookQuote.xml");
        JavaWsdlMappingDocument mappingDocument = JavaWsdlMappingDocument.Factory.parse(jaxrpcMapping);
        JavaWsdlMappingType mapping = mappingDocument.getJavaWsdlMapping();
        QName serviceQName = new QName("http://www.Monson-Haefel.com/jwsbook/BookQuote", "BookQuoteService");
        AxisBuilder builder = new AxisBuilder(null);
View Full Code Here

    //needs to have heavyweight mapping
    public void xtestBuildInteropProxy() throws Exception {
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        Definition definition = reader.readWSDL(wsdlFile.toURI().toString());
        SchemaInfoBuilder schemaInfoBuilder = new SchemaInfoBuilder(null, definition);
        File jaxrpcMapping = new File(BASEDIR, "src/test/resources/interop/interop-jaxrpcmapping.xml");
        JavaWsdlMappingDocument mappingDocument = JavaWsdlMappingDocument.Factory.parse(jaxrpcMapping);
        JavaWsdlMappingType mapping = mappingDocument.getJavaWsdlMapping();
        QName serviceQName = new QName("http://tempuri.org/4s4c/1/3/wsdl/def/interopLab", "interopLab");
        AxisBuilder builder = new AxisBuilder(null);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.webservices.builder.SchemaInfoBuilder

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.