Package org.apache.axis.description

Examples of org.apache.axis.description.JavaServiceDesc


            return;
        }
        RPCProvider provider = new EjbContainerProvider(ejbDeploymentContext.getDeploymentInfo(), serviceInfo.getHandlerInfos());
        SOAPService service = new SOAPService(null, provider, null);

        JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();
        service.setServiceDescription(serviceDesc);
       
        ClassLoader classLoader = ejbDeploymentContext.getClassLoader();
               
        Class serviceEndpointInterface =
            classLoader.loadClass(ejbDeploymentContext.getServiceEndpointInterfaceName());
       
        service.setOption("className", serviceEndpointInterface.getName());
        serviceDesc.setImplClass(serviceEndpointInterface);
       
        AxisWebServiceContainer axisContainer = new AxisWebServiceContainer(location, wsdlURI, service, serviceInfo.getWsdlMap(), classLoader);
        if (soapHandler != null) {
            soapHandler.addWebService(location.getPath(), virtualHosts, axisContainer, securityRealmName, realmName, transportGuarantee, authMethod, classLoader);
        }
View Full Code Here


       
        LOG.debug("Publishing JAX-RPC '" + portInfo.getPortComponentName()
                  + "' service at " + portInfo.getContextURI());
       
        ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, cl);
        JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();

        targetGBean.setAttribute("pojoClassName", servletClassName);
        RPCProvider provider = new POJOProvider();

        SOAPService service = new SOAPService(null, provider, null);
        service.setServiceDescription(serviceDesc);
        service.setOption("className", servletClassName);

        HandlerInfoChainFactory handlerInfoChainFactory = new HandlerInfoChainFactory(serviceInfo.getHandlerInfos());
        service.setOption(org.apache.axis.Constants.ATTR_HANDLERINFOCHAIN, handlerInfoChainFactory);

        URI location;
        try {
            location = new URI(serviceDesc.getEndpointURL());
        } catch (URISyntaxException e) {
            throw new DeploymentException("Invalid webservice endpoint URI", e);
        }
        URI wsdlURI;
        try {
            wsdlURI = new URI(serviceDesc.getWSDLFile());
        } catch (URISyntaxException e) {
            throw new DeploymentException("Invalid wsdl URI", e);

        }
View Full Code Here

        LOG.debug("Publishing EJB JAX-RPC '" + portInfo.getPortComponentName()
                  + "' service at " + portInfo.getContextURI());
       
        ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, classLoader);
        targetGBean.setAttribute("serviceInfo", serviceInfo);
        JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();
        URI location = portInfo.getContextURI();
        targetGBean.setAttribute("location", location);
        URI wsdlURI;
        try {
            wsdlURI = new URI(serviceDesc.getWSDLFile());
        } catch (URISyntaxException e) {
            throw new DeploymentException("Invalid wsdl URI", e);
        }
        targetGBean.setAttribute("wsdlURI", wsdlURI);
        return true;
View Full Code Here

    public static final String XSD_NS = "http://www.w3.org/2001/XMLSchema";
    public static final QName SCHEMA_QNAME = new QName(XSD_NS, "schema");


    public static ServiceInfo createServiceInfo(PortInfo portInfo, ClassLoader classLoader) throws DeploymentException {
        JavaServiceDesc serviceDesc = createServiceDesc(portInfo, classLoader);
        List handlerInfos = WSDescriptorParser.createHandlerInfoList(portInfo.getHandlers(), classLoader);
        SchemaInfoBuilder schemaInfoBuilder = portInfo.getSchemaInfoBuilder();
        Map rawWsdlMap = schemaInfoBuilder.getWsdlMap();
        Map wsdlMap = rewriteWsdlMap(portInfo, rawWsdlMap);
        return new ServiceInfo(serviceDesc, handlerInfos, wsdlMap);
View Full Code Here

        Map exceptionMap = WSDescriptorParser.getExceptionMap(portInfo.getJavaWsdlMapping());
        SchemaInfoBuilder schemaInfoBuilder = portInfo.getSchemaInfoBuilder();
        Map schemaTypeKeyToSchemaTypeMap = schemaInfoBuilder.getSchemaTypeKeyToSchemaTypeMap();

        JavaServiceDesc serviceDesc = new JavaServiceDesc();
        String serviceName =  portInfo.getPortQName().toString();
        String location = getAddressLocation(port);
        serviceDesc.setName(serviceName);
        serviceDesc.setEndpointURL(location);
        serviceDesc.setWSDLFile(portInfo.getWsdlLocation());
        Binding binding = port.getBinding();

        serviceDesc.setStyle(getStyle(binding));


        BindingInput bindingInput = ((BindingOperation) binding.getBindingOperations().get(0)).getBindingInput();
        SOAPBody soapBody = (SOAPBody) SchemaInfoBuilder.getExtensibilityElement(SOAPBody.class, bindingInput.getExtensibilityElements());

        if (soapBody.getUse() != null) {
            Use use = Use.getUse(soapBody.getUse());
            serviceDesc.setUse(use);
        } else {
            serviceDesc.setUse(Use.ENCODED);
        }
        boolean hasEncoded = serviceDesc.getUse() == Use.ENCODED;

        boolean isLightweight = portInfo.getServiceEndpointInterfaceMapping() == null;

//        if (isLightweight) {
//            validateLightweightMapping(portInfo.getDefinition());
//        }

        Collection operations = new ArrayList();
        Set wrapperElementQNames = buildOperations(binding, serviceEndpointInterface, isLightweight, portInfo, exceptionMap, classLoader, operations);
        for (Iterator iter = operations.iterator(); iter.hasNext();) {
            OperationDesc operation = (OperationDesc) iter.next();
            serviceDesc.addOperationDesc(operation);
        }

        TypeMappingRegistryImpl tmr = new TypeMappingRegistryImpl();
        tmr.doRegisterFromVersion("1.3");

        TypeMapping typeMapping = tmr.getOrMakeTypeMapping(serviceDesc.getUse().getEncoding());

        serviceDesc.setTypeMappingRegistry(tmr);
        serviceDesc.setTypeMapping(typeMapping);

        List typeInfo;
        if (isLightweight) {
            LightweightTypeInfoBuilder builder = new LightweightTypeInfoBuilder(classLoader, schemaTypeKeyToSchemaTypeMap, wrapperElementQNames);
            typeInfo = builder.buildTypeInfo(portInfo.getJavaWsdlMapping());
        } else {
            HeavyweightTypeInfoBuilder builder = new HeavyweightTypeInfoBuilder(classLoader, schemaTypeKeyToSchemaTypeMap, wrapperElementQNames, operations, hasEncoded);
            typeInfo = builder.buildTypeInfo(portInfo.getJavaWsdlMapping());
        }

        // We register type mappings and invoke serviceDesc.getOperations to trigger an introspection of the
        // operations. By doing these operations during deployment, no introspection is required during runtime.
        TypeInfo.register(typeInfo, typeMapping);
        serviceDesc.getOperations();

        return new ReadOnlyServiceDesc(serviceDesc, typeInfo);
    }
View Full Code Here

        if (portInfo == null) {
            //not ours
            return false;
        }
        ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, cl);
        JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();

        targetGBean.setAttribute("pojoClassName", seiClassName);
        RPCProvider provider = new POJOProvider();

        SOAPService service = new SOAPService(null, provider, null);
        service.setServiceDescription(serviceDesc);
        service.setOption("className", seiClassName);

        HandlerInfoChainFactory handlerInfoChainFactory = new HandlerInfoChainFactory(serviceInfo.getHandlerInfos());
        service.setOption(org.apache.axis.Constants.ATTR_HANDLERINFOCHAIN, handlerInfoChainFactory);

        URI location;
        try {
            location = new URI(serviceDesc.getEndpointURL());
        } catch (URISyntaxException e) {
            throw new DeploymentException("Invalid webservice endpoint URI", e);
        }
        URI wsdlURI;
        try {
            wsdlURI = new URI(serviceDesc.getWSDLFile());
        } catch (URISyntaxException e) {
            throw new DeploymentException("Invalid wsdl URI", e);

        }
View Full Code Here

            //not ours
            return false;
        }
        ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, classLoader);
        targetGBean.setAttribute("serviceInfo", serviceInfo);
        JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();
        URI location = portInfo.getContextURI();
        targetGBean.setAttribute("location", location);
        URI wsdlURI;
        try {
            wsdlURI = new URI(serviceDesc.getWSDLFile());
        } catch (URISyntaxException e) {
            throw new DeploymentException("Invalid wsdl URI", e);
        }
        targetGBean.setAttribute("wsdlURI", wsdlURI);
        return true;
View Full Code Here

            }
        }

        // Set up a ServiceDesc to use to introspect the Service
        if (serviceDesc == null) {
            JavaServiceDesc javaServiceDesc = new JavaServiceDesc();
            serviceDesc = javaServiceDesc;

            javaServiceDesc.setImplClass(cls);

            // Set the typeMapping to the one provided.
            // If not available use the default TM
            if (tm != null) {
                serviceDesc.setTypeMapping(tm);
            } else {
                serviceDesc.setTypeMapping(getDefaultTypeMapping());
            }

            javaServiceDesc.setStopClasses(stopClasses);
            serviceDesc.setAllowedMethods(allowedMethods);
            javaServiceDesc.setDisallowedMethods(disallowedMethods);
            serviceDesc.setStyle(style);

            // If the class passed in is a portType,
            // there may be an implClass that is used to
            // obtain the method parameter names.  In this case,
            // a serviceDesc2 is built to get the method parameter names.
            if ((implCls != null) && (implCls != cls)
                    && (serviceDesc2 == null)) {
                serviceDesc2 = new JavaServiceDesc();

                serviceDesc2.setImplClass(implCls);

                // Set the typeMapping to the one provided.
                // If not available use the default TM
View Full Code Here

        String clsName = getServiceClassName(service);
        if (clsName == null) {
            throw new AxisFault(Messages.getMessage("noServiceClass"));
        }
        Class cls = getServiceClass(clsName, service, msgContext);
        JavaServiceDesc serviceDescription = (JavaServiceDesc)service.getServiceDescription();

        // And the allowed methods, if necessary
        if (serviceDescription.getAllowedMethods() == null && service != null) {
            String allowedMethods = getAllowedMethods(service);
            if (allowedMethods != null && !"*".equals(allowedMethods)) {
                ArrayList methodList = new ArrayList();
                StringTokenizer tokenizer = new StringTokenizer(allowedMethods, " ,");
                while (tokenizer.hasMoreTokens()) {
                    methodList.add(tokenizer.nextToken());
                }
                serviceDescription.setAllowedMethods(methodList);
            }
        }

        serviceDescription.loadServiceDescByIntrospection(cls);
    }
View Full Code Here

            tm = (TypeMapping)tmr.getTypeMapping(encodingStyle);
        }

        // Set up a ServiceDesc to use to introspect the Service
        if (serviceDesc == null) {
            JavaServiceDesc javaServiceDesc = new JavaServiceDesc();
            serviceDesc = javaServiceDesc;

            javaServiceDesc.setImplClass(cls);

            // Set the typeMapping to the one provided.
            serviceDesc.setTypeMapping(tm);

            javaServiceDesc.setStopClasses(stopClasses);
            serviceDesc.setAllowedMethods(allowedMethods);
            javaServiceDesc.setDisallowedMethods(disallowedMethods);
            serviceDesc.setStyle(style);
            serviceDesc.setUse(use);

            // If the class passed in is a portType,
            // there may be an implClass that is used to
            // obtain the method parameter names.  In this case,
            // a serviceDesc2 is built to get the method parameter names.
            if ((implCls != null) && (implCls != cls)
                    && (serviceDesc2 == null)) {
                serviceDesc2 = new JavaServiceDesc();

                serviceDesc2.setImplClass(implCls);

                // Set the typeMapping to the one provided.
                serviceDesc2.setTypeMapping(tm);
View Full Code Here

TOP

Related Classes of org.apache.axis.description.JavaServiceDesc

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.