Package org.apache.openejb.jee

Examples of org.apache.openejb.jee.WsdlReturnValueMapping


        Class returnClass = null;

        if (output == null) {
            throw new DeploymentException("No output message, but a mapping for it for operation " + operationName);
        }
        WsdlReturnValueMapping wsdlReturnValueMapping = methodMapping.getWsdlReturnValueMapping();
        String returnClassName = wsdlReturnValueMapping.getMethodReturnValue();
        try {
            returnClass = ClassLoading.loadClass(returnClassName, bundle);
        } catch (ClassNotFoundException e) {
            throw new DeploymentException("Could not load return type for operation " + operationName, e);
        }

        QName wsdlMessageQName = wsdlReturnValueMapping.getWsdlMessage();

        if (!wsdlMessageQName.equals(output.getQName())) {
            throw new DeploymentException("OutputMessage has QName: " + output.getQName() + " but mapping specifies: " + wsdlMessageQName + " for operation " + operationName);
        }

        if (wsdlReturnValueMapping.getWsdlMessagePartName() != null) {
            String wsdlMessagePartName = wsdlReturnValueMapping.getWsdlMessagePartName();
            if (outParamNames.contains(wsdlMessagePartName)) {
                throw new DeploymentException("output message part " + wsdlMessagePartName + " has both an INOUT or OUT mapping and a return value mapping for operation " + operationName);
            }

            if (wrappedStyle) {
View Full Code Here


        if (outputMessage == null) {
            throw new OpenEJBException("No output message, but a mapping for it for operation " + operationName);
        }

        // verify mapped return value qname matches expected output message name
        final WsdlReturnValueMapping wsdlReturnValueMapping = methodMapping.getWsdlReturnValueMapping();
        if (!wsdlReturnValueMapping.getWsdlMessage().equals(outputMessage.getQName())) {
            throw new OpenEJBException("OutputMessage has QName: " + outputMessage.getQName() + " but mapping specifies: " + wsdlReturnValueMapping.getWsdlMessage() + " for operation " + operationName);
        }

        //
        // Determind return type qname and xml schema type
        //
        QName returnQName = null;
        QName returnXmlType = null;
        if (wsdlReturnValueMapping.getWsdlMessagePartName() != null) {
            final String wsdlMessagePartName = wsdlReturnValueMapping.getWsdlMessagePartName();
            if (outParamNames.contains(wsdlMessagePartName)) {
                throw new OpenEJBException("output message part " + wsdlMessagePartName + " has both an INOUT or OUT mapping and a return value mapping for operation " + operationName);
            }

            if (bindingStyle.isWrapped()) {
                final Part outPart = getWrappedPart(outputMessage);
                final XmlElementInfo returnParticle = getWrapperChild(outPart, wsdlMessagePartName);

                returnQName = new QName("", returnParticle.qname.getLocalPart());
                returnXmlType = returnParticle.xmlType;
            } else if (bindingStyle.isRpc()) {
                final Part part = outputMessage.getPart(wsdlMessagePartName);
                if (part == null) {
                    throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in output message for operation " + operationName);
                }

                returnQName = new QName("", part.getName());

                // RPC can only use type
                returnXmlType = part.getTypeName();
            } else {
                final Part part = outputMessage.getPart(wsdlMessagePartName);
                if (part == null) {
                    throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in output message for operation " + operationName);
                }

                returnQName = getPartName(part);
                returnXmlType = returnQName;
            }

            outParamNames.add(wsdlMessagePartName);
        } else {
            // what does this mean????
        }

        operationInfo.returnQName = returnQName;
        operationInfo.returnXmlType = returnXmlType;
        operationInfo.returnJavaType = wsdlReturnValueMapping.getMethodReturnValue();
    }
View Full Code Here

        if (outputMessage == null) {
            throw new OpenEJBException("No output message, but a mapping for it for operation " + operationName);
        }

        // verify mapped return value qname matches expected output message name
        WsdlReturnValueMapping wsdlReturnValueMapping = methodMapping.getWsdlReturnValueMapping();
        if (!wsdlReturnValueMapping.getWsdlMessage().equals(outputMessage.getQName())) {
            throw new OpenEJBException("OutputMessage has QName: " + outputMessage.getQName() + " but mapping specifies: " + wsdlReturnValueMapping.getWsdlMessage() + " for operation " + operationName);
        }

        //
        // Determind return type qname and xml schema type
        //
        QName returnQName = null;
        QName returnXmlType = null;
        if (wsdlReturnValueMapping.getWsdlMessagePartName() != null) {
            String wsdlMessagePartName = wsdlReturnValueMapping.getWsdlMessagePartName();
            if (outParamNames.contains(wsdlMessagePartName)) {
                throw new OpenEJBException("output message part " + wsdlMessagePartName + " has both an INOUT or OUT mapping and a return value mapping for operation " + operationName);
            }

            if (bindingStyle.isWrapped()) {
                Part outPart = getWrappedPart(outputMessage);
                XmlElementInfo returnParticle = getWrapperChild(outPart, wsdlMessagePartName);

                returnQName = new QName("", returnParticle.qname.getLocalPart());
                returnXmlType = returnParticle.xmlType;
            } else if (bindingStyle.isRpc()) {
                Part part = outputMessage.getPart(wsdlMessagePartName);
                if (part == null) {
                    throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in output message for operation " + operationName);
                }

                returnQName = new QName("", part.getName());

                // RPC can only use type
                returnXmlType = part.getTypeName();
            } else {
                Part part = outputMessage.getPart(wsdlMessagePartName);
                if (part == null) {
                    throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in output message for operation " + operationName);
                }

                returnQName = getPartName(part);
                returnXmlType = returnQName;
            }

            outParamNames.add(wsdlMessagePartName);
        } else {
            // what does this mean????
        }

        operationInfo.returnQName = returnQName;
        operationInfo.returnXmlType = returnXmlType;
        operationInfo.returnJavaType = wsdlReturnValueMapping.getMethodReturnValue();
    }
View Full Code Here

        if (outputMessage == null) {
            throw new OpenEJBException("No output message, but a mapping for it for operation " + operationName);
        }

        // verify mapped return value qname matches expected output message name
        WsdlReturnValueMapping wsdlReturnValueMapping = methodMapping.getWsdlReturnValueMapping();
        if (!wsdlReturnValueMapping.getWsdlMessage().equals(outputMessage.getQName())) {
            throw new OpenEJBException("OutputMessage has QName: " + outputMessage.getQName() + " but mapping specifies: " + wsdlReturnValueMapping.getWsdlMessage() + " for operation " + operationName);
        }

        //
        // Determind return type qname and xml schema type
        //
        QName returnQName = null;
        QName returnXmlType = null;
        if (wsdlReturnValueMapping.getWsdlMessagePartName() != null) {
            String wsdlMessagePartName = wsdlReturnValueMapping.getWsdlMessagePartName();
            if (outParamNames.contains(wsdlMessagePartName)) {
                throw new OpenEJBException("output message part " + wsdlMessagePartName + " has both an INOUT or OUT mapping and a return value mapping for operation " + operationName);
            }

            if (bindingStyle.isWrapped()) {
                Part outPart = getWrappedPart(outputMessage);
                XmlElementInfo returnParticle = getWrapperChild(outPart, wsdlMessagePartName);

                returnQName = new QName("", returnParticle.qname.getLocalPart());
                returnXmlType = returnParticle.xmlType;
            } else if (bindingStyle.isRpc()) {
                Part part = outputMessage.getPart(wsdlMessagePartName);
                if (part == null) {
                    throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in output message for operation " + operationName);
                }

                returnQName = new QName("", part.getName());

                // RPC can only use type
                returnXmlType = part.getTypeName();
            } else {
                Part part = outputMessage.getPart(wsdlMessagePartName);
                if (part == null) {
                    throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in output message for operation " + operationName);
                }

                returnQName = getPartName(part);
                returnXmlType = returnQName;
            }

            outParamNames.add(wsdlMessagePartName);
        } else {
            // what does this mean????
        }

        operationInfo.returnQName = returnQName;
        operationInfo.returnXmlType = returnXmlType;
        operationInfo.returnJavaType = wsdlReturnValueMapping.getMethodReturnValue();
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.jee.WsdlReturnValueMapping

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.