Java Code Examples for com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation#setSoapAction()

The following examples show how to use com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation#setSoapAction() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RuntimeWSDLParser.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private void parseBindingOperation(XMLStreamReader reader, EditableWSDLBoundPortType binding) {
    String bindingOpName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
    if (bindingOpName == null) {
        //TODO: throw exception?
        //skip wsdl:binding element for now
        XMLStreamReaderUtil.skipElement(reader);
        return;
    }

    QName opName = new QName(binding.getPortTypeName().getNamespaceURI(), bindingOpName);
    EditableWSDLBoundOperation bindingOp = new WSDLBoundOperationImpl(reader,binding, opName);
    binding.put(opName, bindingOp);
    extensionFacade.bindingOperationAttributes(bindingOp, reader);

    while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
        QName name = reader.getName();
        String style = null;
        if (WSDLConstants.QNAME_INPUT.equals(name)) {
            parseInputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_OUTPUT.equals(name)) {
            parseOutputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_FAULT.equals(name)) {
            parseFaultBinding(reader, bindingOp);
        } else if (SOAPConstants.QNAME_OPERATION.equals(name) ||
                SOAPConstants.QNAME_SOAP12OPERATION.equals(name)) {
            style = reader.getAttributeValue(null, "style");
            String soapAction = reader.getAttributeValue(null, "soapAction");

            if (soapAction != null)
                bindingOp.setSoapAction(soapAction);

            goToEnd(reader);
        } else {
            extensionFacade.bindingOperationElements(bindingOp, reader);
        }
        /**
         *  If style attribute is present set it otherwise set the style as defined
         *  on the <soap:binding> element
         */
        if (style != null) {
            if (style.equals("rpc"))
                bindingOp.setStyle(Style.RPC);
            else
                bindingOp.setStyle(Style.DOCUMENT);
        } else {
            bindingOp.setStyle(binding.getStyle());
        }
    }
}
 
Example 2
Source File: RuntimeWSDLParser.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private void parseBindingOperation(XMLStreamReader reader, EditableWSDLBoundPortType binding) {
    String bindingOpName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
    if (bindingOpName == null) {
        //TODO: throw exception?
        //skip wsdl:binding element for now
        XMLStreamReaderUtil.skipElement(reader);
        return;
    }

    QName opName = new QName(binding.getPortTypeName().getNamespaceURI(), bindingOpName);
    EditableWSDLBoundOperation bindingOp = new WSDLBoundOperationImpl(reader,binding, opName);
    binding.put(opName, bindingOp);
    extensionFacade.bindingOperationAttributes(bindingOp, reader);

    while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
        QName name = reader.getName();
        String style = null;
        if (WSDLConstants.QNAME_INPUT.equals(name)) {
            parseInputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_OUTPUT.equals(name)) {
            parseOutputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_FAULT.equals(name)) {
            parseFaultBinding(reader, bindingOp);
        } else if (SOAPConstants.QNAME_OPERATION.equals(name) ||
                SOAPConstants.QNAME_SOAP12OPERATION.equals(name)) {
            style = reader.getAttributeValue(null, "style");
            String soapAction = reader.getAttributeValue(null, "soapAction");

            if (soapAction != null)
                bindingOp.setSoapAction(soapAction);

            goToEnd(reader);
        } else {
            extensionFacade.bindingOperationElements(bindingOp, reader);
        }
        /**
         *  If style attribute is present set it otherwise set the style as defined
         *  on the <soap:binding> element
         */
        if (style != null) {
            if (style.equals("rpc"))
                bindingOp.setStyle(Style.RPC);
            else
                bindingOp.setStyle(Style.DOCUMENT);
        } else {
            bindingOp.setStyle(binding.getStyle());
        }
    }
}
 
Example 3
Source File: RuntimeWSDLParser.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private void parseBindingOperation(XMLStreamReader reader, EditableWSDLBoundPortType binding) {
    String bindingOpName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
    if (bindingOpName == null) {
        //TODO: throw exception?
        //skip wsdl:binding element for now
        XMLStreamReaderUtil.skipElement(reader);
        return;
    }

    QName opName = new QName(binding.getPortTypeName().getNamespaceURI(), bindingOpName);
    EditableWSDLBoundOperation bindingOp = new WSDLBoundOperationImpl(reader,binding, opName);
    binding.put(opName, bindingOp);
    extensionFacade.bindingOperationAttributes(bindingOp, reader);

    while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
        QName name = reader.getName();
        String style = null;
        if (WSDLConstants.QNAME_INPUT.equals(name)) {
            parseInputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_OUTPUT.equals(name)) {
            parseOutputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_FAULT.equals(name)) {
            parseFaultBinding(reader, bindingOp);
        } else if (SOAPConstants.QNAME_OPERATION.equals(name) ||
                SOAPConstants.QNAME_SOAP12OPERATION.equals(name)) {
            style = reader.getAttributeValue(null, "style");
            String soapAction = reader.getAttributeValue(null, "soapAction");

            if (soapAction != null)
                bindingOp.setSoapAction(soapAction);

            goToEnd(reader);
        } else {
            extensionFacade.bindingOperationElements(bindingOp, reader);
        }
        /**
         *  If style attribute is present set it otherwise set the style as defined
         *  on the <soap:binding> element
         */
        if (style != null) {
            if (style.equals("rpc"))
                bindingOp.setStyle(Style.RPC);
            else
                bindingOp.setStyle(Style.DOCUMENT);
        } else {
            bindingOp.setStyle(binding.getStyle());
        }
    }
}
 
Example 4
Source File: RuntimeWSDLParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private void parseBindingOperation(XMLStreamReader reader, EditableWSDLBoundPortType binding) {
    String bindingOpName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
    if (bindingOpName == null) {
        //TODO: throw exception?
        //skip wsdl:binding element for now
        XMLStreamReaderUtil.skipElement(reader);
        return;
    }

    QName opName = new QName(binding.getPortTypeName().getNamespaceURI(), bindingOpName);
    EditableWSDLBoundOperation bindingOp = new WSDLBoundOperationImpl(reader,binding, opName);
    binding.put(opName, bindingOp);
    extensionFacade.bindingOperationAttributes(bindingOp, reader);

    while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
        QName name = reader.getName();
        String style = null;
        if (WSDLConstants.QNAME_INPUT.equals(name)) {
            parseInputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_OUTPUT.equals(name)) {
            parseOutputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_FAULT.equals(name)) {
            parseFaultBinding(reader, bindingOp);
        } else if (SOAPConstants.QNAME_OPERATION.equals(name) ||
                SOAPConstants.QNAME_SOAP12OPERATION.equals(name)) {
            style = reader.getAttributeValue(null, "style");
            String soapAction = reader.getAttributeValue(null, "soapAction");

            if (soapAction != null)
                bindingOp.setSoapAction(soapAction);

            goToEnd(reader);
        } else {
            extensionFacade.bindingOperationElements(bindingOp, reader);
        }
        /**
         *  If style attribute is present set it otherwise set the style as defined
         *  on the <soap:binding> element
         */
        if (style != null) {
            if (style.equals("rpc"))
                bindingOp.setStyle(Style.RPC);
            else
                bindingOp.setStyle(Style.DOCUMENT);
        } else {
            bindingOp.setStyle(binding.getStyle());
        }
    }
}
 
Example 5
Source File: RuntimeWSDLParser.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private void parseBindingOperation(XMLStreamReader reader, EditableWSDLBoundPortType binding) {
    String bindingOpName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
    if (bindingOpName == null) {
        //TODO: throw exception?
        //skip wsdl:binding element for now
        XMLStreamReaderUtil.skipElement(reader);
        return;
    }

    QName opName = new QName(binding.getPortTypeName().getNamespaceURI(), bindingOpName);
    EditableWSDLBoundOperation bindingOp = new WSDLBoundOperationImpl(reader,binding, opName);
    binding.put(opName, bindingOp);
    extensionFacade.bindingOperationAttributes(bindingOp, reader);

    while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
        QName name = reader.getName();
        String style = null;
        if (WSDLConstants.QNAME_INPUT.equals(name)) {
            parseInputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_OUTPUT.equals(name)) {
            parseOutputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_FAULT.equals(name)) {
            parseFaultBinding(reader, bindingOp);
        } else if (SOAPConstants.QNAME_OPERATION.equals(name) ||
                SOAPConstants.QNAME_SOAP12OPERATION.equals(name)) {
            style = reader.getAttributeValue(null, "style");
            String soapAction = reader.getAttributeValue(null, "soapAction");

            if (soapAction != null)
                bindingOp.setSoapAction(soapAction);

            goToEnd(reader);
        } else {
            extensionFacade.bindingOperationElements(bindingOp, reader);
        }
        /**
         *  If style attribute is present set it otherwise set the style as defined
         *  on the <soap:binding> element
         */
        if (style != null) {
            if (style.equals("rpc"))
                bindingOp.setStyle(Style.RPC);
            else
                bindingOp.setStyle(Style.DOCUMENT);
        } else {
            bindingOp.setStyle(binding.getStyle());
        }
    }
}
 
Example 6
Source File: RuntimeWSDLParser.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private void parseBindingOperation(XMLStreamReader reader, EditableWSDLBoundPortType binding) {
    String bindingOpName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
    if (bindingOpName == null) {
        //TODO: throw exception?
        //skip wsdl:binding element for now
        XMLStreamReaderUtil.skipElement(reader);
        return;
    }

    QName opName = new QName(binding.getPortTypeName().getNamespaceURI(), bindingOpName);
    EditableWSDLBoundOperation bindingOp = new WSDLBoundOperationImpl(reader,binding, opName);
    binding.put(opName, bindingOp);
    extensionFacade.bindingOperationAttributes(bindingOp, reader);

    while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
        QName name = reader.getName();
        String style = null;
        if (WSDLConstants.QNAME_INPUT.equals(name)) {
            parseInputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_OUTPUT.equals(name)) {
            parseOutputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_FAULT.equals(name)) {
            parseFaultBinding(reader, bindingOp);
        } else if (SOAPConstants.QNAME_OPERATION.equals(name) ||
                SOAPConstants.QNAME_SOAP12OPERATION.equals(name)) {
            style = reader.getAttributeValue(null, "style");
            String soapAction = reader.getAttributeValue(null, "soapAction");

            if (soapAction != null)
                bindingOp.setSoapAction(soapAction);

            goToEnd(reader);
        } else {
            extensionFacade.bindingOperationElements(bindingOp, reader);
        }
        /**
         *  If style attribute is present set it otherwise set the style as defined
         *  on the <soap:binding> element
         */
        if (style != null) {
            if (style.equals("rpc"))
                bindingOp.setStyle(Style.RPC);
            else
                bindingOp.setStyle(Style.DOCUMENT);
        } else {
            bindingOp.setStyle(binding.getStyle());
        }
    }
}
 
Example 7
Source File: RuntimeWSDLParser.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private void parseBindingOperation(XMLStreamReader reader, EditableWSDLBoundPortType binding) {
    String bindingOpName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
    if (bindingOpName == null) {
        //TODO: throw exception?
        //skip wsdl:binding element for now
        XMLStreamReaderUtil.skipElement(reader);
        return;
    }

    QName opName = new QName(binding.getPortTypeName().getNamespaceURI(), bindingOpName);
    EditableWSDLBoundOperation bindingOp = new WSDLBoundOperationImpl(reader,binding, opName);
    binding.put(opName, bindingOp);
    extensionFacade.bindingOperationAttributes(bindingOp, reader);

    while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
        QName name = reader.getName();
        String style = null;
        if (WSDLConstants.QNAME_INPUT.equals(name)) {
            parseInputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_OUTPUT.equals(name)) {
            parseOutputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_FAULT.equals(name)) {
            parseFaultBinding(reader, bindingOp);
        } else if (SOAPConstants.QNAME_OPERATION.equals(name) ||
                SOAPConstants.QNAME_SOAP12OPERATION.equals(name)) {
            style = reader.getAttributeValue(null, "style");
            String soapAction = reader.getAttributeValue(null, "soapAction");

            if (soapAction != null)
                bindingOp.setSoapAction(soapAction);

            goToEnd(reader);
        } else {
            extensionFacade.bindingOperationElements(bindingOp, reader);
        }
        /**
         *  If style attribute is present set it otherwise set the style as defined
         *  on the <soap:binding> element
         */
        if (style != null) {
            if (style.equals("rpc"))
                bindingOp.setStyle(Style.RPC);
            else
                bindingOp.setStyle(Style.DOCUMENT);
        } else {
            bindingOp.setStyle(binding.getStyle());
        }
    }
}
 
Example 8
Source File: RuntimeWSDLParser.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private void parseBindingOperation(XMLStreamReader reader, EditableWSDLBoundPortType binding) {
    String bindingOpName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
    if (bindingOpName == null) {
        //TODO: throw exception?
        //skip wsdl:binding element for now
        XMLStreamReaderUtil.skipElement(reader);
        return;
    }

    QName opName = new QName(binding.getPortTypeName().getNamespaceURI(), bindingOpName);
    EditableWSDLBoundOperation bindingOp = new WSDLBoundOperationImpl(reader,binding, opName);
    binding.put(opName, bindingOp);
    extensionFacade.bindingOperationAttributes(bindingOp, reader);

    while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
        QName name = reader.getName();
        String style = null;
        if (WSDLConstants.QNAME_INPUT.equals(name)) {
            parseInputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_OUTPUT.equals(name)) {
            parseOutputBinding(reader, bindingOp);
        } else if (WSDLConstants.QNAME_FAULT.equals(name)) {
            parseFaultBinding(reader, bindingOp);
        } else if (SOAPConstants.QNAME_OPERATION.equals(name) ||
                SOAPConstants.QNAME_SOAP12OPERATION.equals(name)) {
            style = reader.getAttributeValue(null, "style");
            String soapAction = reader.getAttributeValue(null, "soapAction");

            if (soapAction != null)
                bindingOp.setSoapAction(soapAction);

            goToEnd(reader);
        } else {
            extensionFacade.bindingOperationElements(bindingOp, reader);
        }
        /**
         *  If style attribute is present set it otherwise set the style as defined
         *  on the <soap:binding> element
         */
        if (style != null) {
            if (style.equals("rpc"))
                bindingOp.setStyle(Style.RPC);
            else
                bindingOp.setStyle(Style.DOCUMENT);
        } else {
            bindingOp.setStyle(binding.getStyle());
        }
    }
}