Package org.apache.wsdl

Examples of org.apache.wsdl.MessageReference


//                writer.writeEndElement();
                //write the inputs
                //write extensibility elements
                handleExtensibiltyElements(operation.getExtensibilityElements());
                WSDL11Message message;
                MessageReference inputMessage = operation.getInputMessage();
                if (inputMessage != null) {
                    message = (WSDL11Message) messageMap.get(inputMessage.getElementQName());
                    writer.writeStartElement(defaultWSDLPrefix, INPUT_NAME, WSDL1_1_NAMESPACE_URI);
                    writer.writeAttribute("message", targetNamespacePrefix + ":" + message.getMessageName());
                    //write extensibility attributes
                    handleExtensibilityAttributes(inputMessage.getExtensibilityAttributes());
                    writer.writeEndElement();
                }

                //write the outputs
                MessageReference outputMessage = operation.getOutputMessage();
                if (outputMessage != null) {
                    message = (WSDL11Message) messageMap.get(outputMessage.getElementQName());
                    writer.writeStartElement(defaultWSDLPrefix, OUTPUT_NAME, WSDL1_1_NAMESPACE_URI);
                    writer.writeAttribute("message", targetNamespacePrefix + ":" + message.getMessageName());
//                  write extensibility attributes
                    handleExtensibilityAttributes(outputMessage.getExtensibilityAttributes());
                    writer.writeEndElement();
                }

                //todo handle the faults here
View Full Code Here


            WSDLOperation wsdlOperation = womDescription.createOperation();
            wsdlOperation.setName(axisOperation.getName());

            AxisMessage inaxisMessage = axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
            if (inaxisMessage != null) {
                MessageReference messageRefinput = wsdlComponentFactory.createMessageReference();
                messageRefinput.setElementQName(inaxisMessage.getElementQName());
                messageRefinput.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
                wsdlOperation.setInputMessage(messageRefinput);
            }

            try {
                AxisMessage outaxisMessage = axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                if (outaxisMessage != null && outaxisMessage.getElementQName() != null) {
                    MessageReference messageRefout = wsdlComponentFactory.createMessageReference();
                    messageRefout.setElementQName(outaxisMessage.getElementQName());
                    messageRefout.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
                    wsdlOperation.setOutputMessage(messageRefout);
                }
            } catch (UnsupportedOperationException e) {
                // operation does not have an out message so , no need to do anything here
            }
View Full Code Here

        Iterator op_itr = portType.getOperations().keySet().iterator();
        while (op_itr.hasNext()) {
            String opName = (String) op_itr.next();
            WSDLOperation wsdlOperation = portType.getOperation(opName);
            MessageReference inMessage = wsdlOperation.getInputMessage();

            WSDLBindingOperation bindingoperation = wsdlComponentFactory.createWSDLBindingOperation();
            bindingoperation.setName(new QName(opName));
            bindingoperation.setOperation(wsdlOperation);
            binding.addBindingOperation(bindingoperation);

            SOAPOperation soapOpimpl = (SOAPOperation) extensionFactory.getExtensionElement(
                    ExtensionConstants.SOAP_11_OPERATION);
            soapOpimpl.setStyle(style);
            //to do heve to set a proper SOAPAction
            soapOpimpl.setSoapAction(opName);
            bindingoperation.addExtensibilityElement(soapOpimpl);
            if (inMessage != null) {
                WSDLBindingMessageReference bindingInMessage = wsdlComponentFactory.createWSDLBindingMessageReference();
                bindingInMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
                bindingoperation.setInput(bindingInMessage);

                SOAPBody requestSoapbody = (SOAPBody) extensionFactory.getExtensionElement(
                        ExtensionConstants.SOAP_11_BODY);
                requestSoapbody.setUse(use);
                //todo need to fix this
                requestSoapbody.setNamespaceURI(namespeceURI);
                bindingInMessage.addExtensibilityElement(requestSoapbody);
            }

            MessageReference outMessage = wsdlOperation.getOutputMessage();
            if (outMessage != null) {
                WSDLBindingMessageReference bindingOutMessage = wsdlComponentFactory.createWSDLBindingMessageReference();

                bindingOutMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
                bindingoperation.setOutput(bindingOutMessage);
View Full Code Here

            policies.add(bindingInputPolicy);
        }

        // wsdl:portType/wsdl:operation/wsdl:input
        WSDLOperation wsdlOperation = wsdlBindingOperation.getOperation();
        MessageReference operationInput = wsdlOperation.getInputMessage();
        Policy operationInputPolicy = getSinglePolicy(getPoliciesAsExtensibilityAttribute(operationInput));
        if (operationInputPolicy != null) {
            policies.add(operationInputPolicy);
        }
View Full Code Here

            policies.add(getPolicyFromComponent(bindingOutput));
        }

        // wsdl:portType/wsdl:operation/wsdl:output
        WSDLOperation wsdlOperation = wsdlBindingOperation.getOperation();
        MessageReference operationOutput = wsdlOperation.getOutputMessage();
        Policy operationOutputPolicy = getSinglePolicy(getPoliciesAsExtensibilityAttribute(operationOutput));
        if (operationOutputPolicy != null) {
            policies.add(operationOutputPolicy);
        }
View Full Code Here

     * @param operation
     * @return Returns the parameter element.
     */
    private Element getInputParamElement(Document doc, WSDLOperation operation) {
        Element param = doc.createElement("param");
        MessageReference inputMessage = operation.getInputMessage();

        if (inputMessage != null) {
            addAttribute(doc, "name", this.mapper.getParameterName(inputMessage.getElementQName()), param);

            // todo modify the code here to unwrap if requested
            String typeMapping = this.mapper.getTypeMappingName(inputMessage.getElementQName());

            addAttribute(doc, "type", (typeMapping == null)
                    ? ""
                    : typeMapping, param);

            // add an extra attribute to say whether the type mapping is the default
            if (TypeMapper.DEFAULT_CLASS_NAME.equals(typeMapping)) {
                addAttribute(doc, "default", "yes", param);
            }

            addAttribute(doc, "value", getParamInitializer(typeMapping), param);

            // add this as a body parameter
            addAttribute(doc, "location", "body", param);

            Iterator iter = inputMessage.getExtensibilityAttributes().iterator();

            while (iter.hasNext()) {
                WSDLExtensibilityAttribute att = (WSDLExtensibilityAttribute) iter.next();

                addAttribute(doc, att.getKey().getLocalPart(), att.getValue().toString(), param);
View Full Code Here

     * @param operation
     * @return Returns Element.
     */
    private Element getOutputParamElement(Document doc, WSDLOperation operation) {
        Element param = doc.createElement("param");
        MessageReference outputMessage = operation.getOutputMessage();
        String typeMappingStr;
        String parameterName;

        if (outputMessage != null) {
            parameterName = this.mapper.getParameterName(outputMessage.getElementQName());

            String typeMapping = this.mapper.getTypeMappingName(operation.getOutputMessage().getElementQName());

            typeMappingStr = (typeMapping == null)
                    ? ""
View Full Code Here

     * @param operation
     * @return Returns the parameter element.
     */
    private Element getInputParamElement(Document doc, WSDLOperation operation) {
        Element param = doc.createElement("param");
        MessageReference inputMessage = operation.getInputMessage();

        if (inputMessage != null) {
            addAttribute(doc, "name", this.mapper.getParameterName(inputMessage.getElementQName()), param);

            // todo modify the code here to unwrap if requested
            String typeMapping = this.mapper.getTypeMappingName(inputMessage.getElementQName());

            addAttribute(doc, "type", (typeMapping == null)
                    ? ""
                    : typeMapping, param);

            // add an extra attribute to say whether the type mapping is the default
            if (TypeMapper.DEFAULT_CLASS_NAME.equals(typeMapping)) {
                addAttribute(doc, "default", "yes", param);
            }

            addAttribute(doc, "value", getParamInitializer(typeMapping), param);

            // add this as a body parameter
            addAttribute(doc, "location", "body", param);

            Iterator iter = inputMessage.getExtensibilityAttributes().iterator();

            while (iter.hasNext()) {
                WSDLExtensibilityAttribute att = (WSDLExtensibilityAttribute) iter.next();

                addAttribute(doc, att.getKey().getLocalPart(), att.getValue().toString(), param);
View Full Code Here

     * @param operation
     * @return Returns Element.
     */
    private Element getOutputParamElement(Document doc, WSDLOperation operation) {
        Element param = doc.createElement("param");
        MessageReference outputMessage = operation.getOutputMessage();
        String typeMappingStr;
        String parameterName;

        if (outputMessage != null) {
            parameterName = this.mapper.getParameterName(outputMessage.getElementQName());

            String typeMapping = this.mapper.getTypeMappingName(operation.getOutputMessage().getElementQName());

            typeMappingStr = (typeMapping == null)
                    ? ""
View Full Code Here

TOP

Related Classes of org.apache.wsdl.MessageReference

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.