com.sun.xml.internal.ws.wsdl.parser.WSDLConstants Java Examples

The following examples show how to use com.sun.xml.internal.ws.wsdl.parser.WSDLConstants. 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: WSDLPatcher.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void handleEndElement() throws XMLStreamException {
    QName name = in.getName();
    if (name.equals(WSDLConstants.QNAME_SERVICE)) {
        serviceName = null;
    } else if (name.equals(WSDLConstants.QNAME_PORT)) {
        portName = null;
    } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME)
                    || name.equals(MemberSubmissionAddressingConstants.WSA_EPR_QNAME)) {
        if (inEpr) {
            inEpr = false;
        }
            } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME)
                            || name.equals(MemberSubmissionAddressingConstants.WSA_ADDRESS_QNAME)) {
                    if (inEprAddress) {
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Fixing EPR Address for service:"+serviceName+ " port:"+portName
                            + " address with "+value);
                out.writeCharacters(value);
            }
            inEprAddress = false;
        }
    }
    super.handleEndElement();
}
 
Example #2
Source File: WSDLPatcher.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void handleEndElement() throws XMLStreamException {
    QName name = in.getName();
    if (name.equals(WSDLConstants.QNAME_SERVICE)) {
        serviceName = null;
    } else if (name.equals(WSDLConstants.QNAME_PORT)) {
        portName = null;
    } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME)
                    || name.equals(MemberSubmissionAddressingConstants.WSA_EPR_QNAME)) {
        if (inEpr) {
            inEpr = false;
        }
            } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME)
                            || name.equals(MemberSubmissionAddressingConstants.WSA_ADDRESS_QNAME)) {
                    if (inEprAddress) {
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Fixing EPR Address for service:"+serviceName+ " port:"+portName
                            + " address with "+value);
                out.writeCharacters(value);
            }
            inEprAddress = false;
        }
    }
    super.handleEndElement();
}
 
Example #3
Source File: WSDLPatcher.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void handleEndElement() throws XMLStreamException {
    QName name = in.getName();
    if (name.equals(WSDLConstants.QNAME_SERVICE)) {
        serviceName = null;
    } else if (name.equals(WSDLConstants.QNAME_PORT)) {
        portName = null;
    } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME)
                    || name.equals(MemberSubmissionAddressingConstants.WSA_EPR_QNAME)) {
        if (inEpr) {
            inEpr = false;
        }
            } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME)
                            || name.equals(MemberSubmissionAddressingConstants.WSA_ADDRESS_QNAME)) {
                    if (inEprAddress) {
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Fixing EPR Address for service:"+serviceName+ " port:"+portName
                            + " address with "+value);
                out.writeCharacters(value);
            }
            inEprAddress = false;
        }
    }
    super.handleEndElement();
}
 
Example #4
Source File: WSDLPatcher.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void handleEndElement() throws XMLStreamException {
    QName name = in.getName();
    if (name.equals(WSDLConstants.QNAME_SERVICE)) {
        serviceName = null;
    } else if (name.equals(WSDLConstants.QNAME_PORT)) {
        portName = null;
    } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME)
                    || name.equals(MemberSubmissionAddressingConstants.WSA_EPR_QNAME)) {
        if (inEpr) {
            inEpr = false;
        }
            } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME)
                            || name.equals(MemberSubmissionAddressingConstants.WSA_ADDRESS_QNAME)) {
                    if (inEprAddress) {
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Fixing EPR Address for service:"+serviceName+ " port:"+portName
                            + " address with "+value);
                out.writeCharacters(value);
            }
            inEprAddress = false;
        }
    }
    super.handleEndElement();
}
 
Example #5
Source File: WSDLPatcher.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void handleEndElement() throws XMLStreamException {
    QName name = in.getName();
    if (name.equals(WSDLConstants.QNAME_SERVICE)) {
        serviceName = null;
    } else if (name.equals(WSDLConstants.QNAME_PORT)) {
        portName = null;
    } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME)
                    || name.equals(MemberSubmissionAddressingConstants.WSA_EPR_QNAME)) {
        if (inEpr) {
            inEpr = false;
        }
            } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME)
                            || name.equals(MemberSubmissionAddressingConstants.WSA_ADDRESS_QNAME)) {
                    if (inEprAddress) {
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Fixing EPR Address for service:"+serviceName+ " port:"+portName
                            + " address with "+value);
                out.writeCharacters(value);
            }
            inEprAddress = false;
        }
    }
    super.handleEndElement();
}
 
Example #6
Source File: WSDLPatcher.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void handleEndElement() throws XMLStreamException {
    QName name = in.getName();
    if (name.equals(WSDLConstants.QNAME_SERVICE)) {
        serviceName = null;
    } else if (name.equals(WSDLConstants.QNAME_PORT)) {
        portName = null;
    } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME)
                    || name.equals(MemberSubmissionAddressingConstants.WSA_EPR_QNAME)) {
        if (inEpr) {
            inEpr = false;
        }
            } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME)
                            || name.equals(MemberSubmissionAddressingConstants.WSA_ADDRESS_QNAME)) {
                    if (inEprAddress) {
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Fixing EPR Address for service:"+serviceName+ " port:"+portName
                            + " address with "+value);
                out.writeCharacters(value);
            }
            inEprAddress = false;
        }
    }
    super.handleEndElement();
}
 
Example #7
Source File: WSDLPatcher.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void handleEndElement() throws XMLStreamException {
    QName name = in.getName();
    if (name.equals(WSDLConstants.QNAME_SERVICE)) {
        serviceName = null;
    } else if (name.equals(WSDLConstants.QNAME_PORT)) {
        portName = null;
    } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME)
                    || name.equals(MemberSubmissionAddressingConstants.WSA_EPR_QNAME)) {
        if (inEpr) {
            inEpr = false;
        }
            } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME)
                            || name.equals(MemberSubmissionAddressingConstants.WSA_ADDRESS_QNAME)) {
                    if (inEprAddress) {
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Fixing EPR Address for service:"+serviceName+ " port:"+portName
                            + " address with "+value);
                out.writeCharacters(value);
            }
            inEprAddress = false;
        }
    }
    super.handleEndElement();
}
 
Example #8
Source File: WSDLPatcher.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void handleEndElement() throws XMLStreamException {
    QName name = in.getName();
    if (name.equals(WSDLConstants.QNAME_SERVICE)) {
        serviceName = null;
    } else if (name.equals(WSDLConstants.QNAME_PORT)) {
        portName = null;
    } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME)
                    || name.equals(MemberSubmissionAddressingConstants.WSA_EPR_QNAME)) {
        if (inEpr) {
            inEpr = false;
        }
            } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME)
                            || name.equals(MemberSubmissionAddressingConstants.WSA_ADDRESS_QNAME)) {
                    if (inEprAddress) {
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Fixing EPR Address for service:"+serviceName+ " port:"+portName
                            + " address with "+value);
                out.writeCharacters(value);
            }
            inEprAddress = false;
        }
    }
    super.handleEndElement();
}
 
Example #9
Source File: MemberSubmissionEndpointReference.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs a Source containing the wsdl from the MemberSubmissionEndpointReference
 *
 * @return Source A source object containing the wsdl in the MemeberSubmissionEndpointReference, if present.
 */
public Source toWSDLSource() {
    Element wsdlElement = null;

    for (Element elem : elements) {
        if (elem.getNamespaceURI().equals(WSDLConstants.NS_WSDL) &&
                elem.getLocalName().equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) {
            wsdlElement = elem;
        }
    }

    return new DOMSource(wsdlElement);
}
 
Example #10
Source File: MemberSubmissionEndpointReference.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs a Source containing the wsdl from the MemberSubmissionEndpointReference
 *
 * @return Source A source object containing the wsdl in the MemeberSubmissionEndpointReference, if present.
 */
public Source toWSDLSource() {
    Element wsdlElement = null;

    for (Element elem : elements) {
        if (elem.getNamespaceURI().equals(WSDLConstants.NS_WSDL) &&
                elem.getLocalName().equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) {
            wsdlElement = elem;
        }
    }

    return new DOMSource(wsdlElement);
}
 
Example #11
Source File: WSDLPatcher.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void handleAttribute(int i) throws XMLStreamException {
    QName name = in.getName();
    String attLocalName = in.getAttributeLocalName(i);

    if((name.equals(SCHEMA_INCLUDE_QNAME) && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_IMPORT_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_REDEFINE_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(WSDLConstants.QNAME_IMPORT)  && attLocalName.equals("location"))) {
        // patch this attribute value.

        String relPath = in.getAttributeValue(i);
        String actualPath = getPatchedImportLocation(relPath);
        if (actualPath == null) {
            return; // skip this attribute to leave it up to "implicit reference".
        }

        logger.fine("Fixing the relative location:"+relPath
                +" with absolute location:"+actualPath);
        writeAttribute(i, actualPath);
        return;
    }

    if (name.equals(WSDLConstants.NS_SOAP_BINDING_ADDRESS) ||
        name.equals(WSDLConstants.NS_SOAP12_BINDING_ADDRESS)) {

        if(attLocalName.equals("location")) {
            portAddress = in.getAttributeValue(i);
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Service:"+serviceName+ " port:"+portName
                        + " current address "+portAddress+" Patching it with "+value);
                writeAttribute(i, value);
                return;
            }
        }
    }

    super.handleAttribute(i);
}
 
Example #12
Source File: WSEndpointReference.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static void writeWsdl(StreamWriterBufferCreator writer, QName service, String wsdlAddress) throws XMLStreamException {
    // Inline-wsdl
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_DEFINITIONS.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeNamespace(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.NS_WSDL);
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_IMPORT.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeAttribute("namespace", service.getNamespaceURI());
    writer.writeAttribute("location", wsdlAddress);
    writer.writeEndElement();
    writer.writeEndElement();
}
 
Example #13
Source File: MemberSubmissionEndpointReference.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs a Source containing the wsdl from the MemberSubmissionEndpointReference
 *
 * @return Source A source object containing the wsdl in the MemeberSubmissionEndpointReference, if present.
 */
public Source toWSDLSource() {
    Element wsdlElement = null;

    for (Element elem : elements) {
        if (elem.getNamespaceURI().equals(WSDLConstants.NS_WSDL) &&
                elem.getLocalName().equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) {
            wsdlElement = elem;
        }
    }

    return new DOMSource(wsdlElement);
}
 
Example #14
Source File: WSDLPatcher.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void handleAttribute(int i) throws XMLStreamException {
    QName name = in.getName();
    String attLocalName = in.getAttributeLocalName(i);

    if((name.equals(SCHEMA_INCLUDE_QNAME) && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_IMPORT_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_REDEFINE_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(WSDLConstants.QNAME_IMPORT)  && attLocalName.equals("location"))) {
        // patch this attribute value.

        String relPath = in.getAttributeValue(i);
        String actualPath = getPatchedImportLocation(relPath);
        if (actualPath == null) {
            return; // skip this attribute to leave it up to "implicit reference".
        }

        logger.fine("Fixing the relative location:"+relPath
                +" with absolute location:"+actualPath);
        writeAttribute(i, actualPath);
        return;
    }

    if (name.equals(WSDLConstants.NS_SOAP_BINDING_ADDRESS) ||
        name.equals(WSDLConstants.NS_SOAP12_BINDING_ADDRESS)) {

        if(attLocalName.equals("location")) {
            portAddress = in.getAttributeValue(i);
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Service:"+serviceName+ " port:"+portName
                        + " current address "+portAddress+" Patching it with "+value);
                writeAttribute(i, value);
                return;
            }
        }
    }

    super.handleAttribute(i);
}
 
Example #15
Source File: WSEndpointReference.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private static void writeWsdl(StreamWriterBufferCreator writer, QName service, String wsdlAddress) throws XMLStreamException {
    // Inline-wsdl
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_DEFINITIONS.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeNamespace(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.NS_WSDL);
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_IMPORT.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeAttribute("namespace", service.getNamespaceURI());
    writer.writeAttribute("location", wsdlAddress);
    writer.writeEndElement();
    writer.writeEndElement();
}
 
Example #16
Source File: MemberSubmissionEndpointReference.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs a Source containing the wsdl from the MemberSubmissionEndpointReference
 *
 * @return Source A source object containing the wsdl in the MemeberSubmissionEndpointReference, if present.
 */
public Source toWSDLSource() {
    Element wsdlElement = null;

    for (Element elem : elements) {
        if (elem.getNamespaceURI().equals(WSDLConstants.NS_WSDL) &&
                elem.getLocalName().equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) {
            wsdlElement = elem;
        }
    }

    return new DOMSource(wsdlElement);
}
 
Example #17
Source File: WSDLPatcher.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void handleAttribute(int i) throws XMLStreamException {
    QName name = in.getName();
    String attLocalName = in.getAttributeLocalName(i);

    if((name.equals(SCHEMA_INCLUDE_QNAME) && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_IMPORT_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_REDEFINE_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(WSDLConstants.QNAME_IMPORT)  && attLocalName.equals("location"))) {
        // patch this attribute value.

        String relPath = in.getAttributeValue(i);
        String actualPath = getPatchedImportLocation(relPath);
        if (actualPath == null) {
            return; // skip this attribute to leave it up to "implicit reference".
        }

        logger.fine("Fixing the relative location:"+relPath
                +" with absolute location:"+actualPath);
        writeAttribute(i, actualPath);
        return;
    }

    if (name.equals(WSDLConstants.NS_SOAP_BINDING_ADDRESS) ||
        name.equals(WSDLConstants.NS_SOAP12_BINDING_ADDRESS)) {

        if(attLocalName.equals("location")) {
            portAddress = in.getAttributeValue(i);
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Service:"+serviceName+ " port:"+portName
                        + " current address "+portAddress+" Patching it with "+value);
                writeAttribute(i, value);
                return;
            }
        }
    }

    super.handleAttribute(i);
}
 
Example #18
Source File: WSEndpointReference.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private static void writeWsdl(StreamWriterBufferCreator writer, QName service, String wsdlAddress) throws XMLStreamException {
    // Inline-wsdl
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_DEFINITIONS.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeNamespace(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.NS_WSDL);
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_IMPORT.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeAttribute("namespace", service.getNamespaceURI());
    writer.writeAttribute("location", wsdlAddress);
    writer.writeEndElement();
    writer.writeEndElement();
}
 
Example #19
Source File: MemberSubmissionEndpointReference.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs a Source containing the wsdl from the MemberSubmissionEndpointReference
 *
 * @return Source A source object containing the wsdl in the MemeberSubmissionEndpointReference, if present.
 */
public Source toWSDLSource() {
    Element wsdlElement = null;

    for (Element elem : elements) {
        if (elem.getNamespaceURI().equals(WSDLConstants.NS_WSDL) &&
                elem.getLocalName().equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) {
            wsdlElement = elem;
        }
    }

    return new DOMSource(wsdlElement);
}
 
Example #20
Source File: WSDLPatcher.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void handleAttribute(int i) throws XMLStreamException {
    QName name = in.getName();
    String attLocalName = in.getAttributeLocalName(i);

    if((name.equals(SCHEMA_INCLUDE_QNAME) && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_IMPORT_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_REDEFINE_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(WSDLConstants.QNAME_IMPORT)  && attLocalName.equals("location"))) {
        // patch this attribute value.

        String relPath = in.getAttributeValue(i);
        String actualPath = getPatchedImportLocation(relPath);
        if (actualPath == null) {
            return; // skip this attribute to leave it up to "implicit reference".
        }

        logger.fine("Fixing the relative location:"+relPath
                +" with absolute location:"+actualPath);
        writeAttribute(i, actualPath);
        return;
    }

    if (name.equals(WSDLConstants.NS_SOAP_BINDING_ADDRESS) ||
        name.equals(WSDLConstants.NS_SOAP12_BINDING_ADDRESS)) {

        if(attLocalName.equals("location")) {
            portAddress = in.getAttributeValue(i);
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Service:"+serviceName+ " port:"+portName
                        + " current address "+portAddress+" Patching it with "+value);
                writeAttribute(i, value);
                return;
            }
        }
    }

    super.handleAttribute(i);
}
 
Example #21
Source File: WSEndpointReference.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static void writeWsdl(StreamWriterBufferCreator writer, QName service, String wsdlAddress) throws XMLStreamException {
    // Inline-wsdl
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_DEFINITIONS.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeNamespace(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.NS_WSDL);
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_IMPORT.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeAttribute("namespace", service.getNamespaceURI());
    writer.writeAttribute("location", wsdlAddress);
    writer.writeEndElement();
    writer.writeEndElement();
}
 
Example #22
Source File: WSDLPatcher.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void handleAttribute(int i) throws XMLStreamException {
    QName name = in.getName();
    String attLocalName = in.getAttributeLocalName(i);

    if((name.equals(SCHEMA_INCLUDE_QNAME) && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_IMPORT_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_REDEFINE_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(WSDLConstants.QNAME_IMPORT)  && attLocalName.equals("location"))) {
        // patch this attribute value.

        String relPath = in.getAttributeValue(i);
        String actualPath = getPatchedImportLocation(relPath);
        if (actualPath == null) {
            return; // skip this attribute to leave it up to "implicit reference".
        }

        logger.fine("Fixing the relative location:"+relPath
                +" with absolute location:"+actualPath);
        writeAttribute(i, actualPath);
        return;
    }

    if (name.equals(WSDLConstants.NS_SOAP_BINDING_ADDRESS) ||
        name.equals(WSDLConstants.NS_SOAP12_BINDING_ADDRESS)) {

        if(attLocalName.equals("location")) {
            portAddress = in.getAttributeValue(i);
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Service:"+serviceName+ " port:"+portName
                        + " current address "+portAddress+" Patching it with "+value);
                writeAttribute(i, value);
                return;
            }
        }
    }

    super.handleAttribute(i);
}
 
Example #23
Source File: MemberSubmissionEndpointReference.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs a Source containing the wsdl from the MemberSubmissionEndpointReference
 *
 * @return Source A source object containing the wsdl in the MemeberSubmissionEndpointReference, if present.
 */
public Source toWSDLSource() {
    Element wsdlElement = null;

    for (Element elem : elements) {
        if (elem.getNamespaceURI().equals(WSDLConstants.NS_WSDL) &&
                elem.getLocalName().equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) {
            wsdlElement = elem;
        }
    }

    return new DOMSource(wsdlElement);
}
 
Example #24
Source File: WSEndpointReference.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static void writeWsdl(StreamWriterBufferCreator writer, QName service, String wsdlAddress) throws XMLStreamException {
    // Inline-wsdl
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_DEFINITIONS.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeNamespace(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.NS_WSDL);
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_IMPORT.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeAttribute("namespace", service.getNamespaceURI());
    writer.writeAttribute("location", wsdlAddress);
    writer.writeEndElement();
    writer.writeEndElement();
}
 
Example #25
Source File: WSEndpointReference.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static void writeWsdl(StreamWriterBufferCreator writer, QName service, String wsdlAddress) throws XMLStreamException {
    // Inline-wsdl
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_DEFINITIONS.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeNamespace(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.NS_WSDL);
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_IMPORT.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeAttribute("namespace", service.getNamespaceURI());
    writer.writeAttribute("location", wsdlAddress);
    writer.writeEndElement();
    writer.writeEndElement();
}
 
Example #26
Source File: WSDLPatcher.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void handleAttribute(int i) throws XMLStreamException {
    QName name = in.getName();
    String attLocalName = in.getAttributeLocalName(i);

    if((name.equals(SCHEMA_INCLUDE_QNAME) && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_IMPORT_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_REDEFINE_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(WSDLConstants.QNAME_IMPORT)  && attLocalName.equals("location"))) {
        // patch this attribute value.

        String relPath = in.getAttributeValue(i);
        String actualPath = getPatchedImportLocation(relPath);
        if (actualPath == null) {
            return; // skip this attribute to leave it up to "implicit reference".
        }

        logger.fine("Fixing the relative location:"+relPath
                +" with absolute location:"+actualPath);
        writeAttribute(i, actualPath);
        return;
    }

    if (name.equals(WSDLConstants.NS_SOAP_BINDING_ADDRESS) ||
        name.equals(WSDLConstants.NS_SOAP12_BINDING_ADDRESS)) {

        if(attLocalName.equals("location")) {
            portAddress = in.getAttributeValue(i);
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Service:"+serviceName+ " port:"+portName
                        + " current address "+portAddress+" Patching it with "+value);
                writeAttribute(i, value);
                return;
            }
        }
    }

    super.handleAttribute(i);
}
 
Example #27
Source File: WSDLPatcher.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void handleAttribute(int i) throws XMLStreamException {
    QName name = in.getName();
    String attLocalName = in.getAttributeLocalName(i);

    if((name.equals(SCHEMA_INCLUDE_QNAME) && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_IMPORT_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(SCHEMA_REDEFINE_QNAME)  && attLocalName.equals("schemaLocation"))
    || (name.equals(WSDLConstants.QNAME_IMPORT)  && attLocalName.equals("location"))) {
        // patch this attribute value.

        String relPath = in.getAttributeValue(i);
        String actualPath = getPatchedImportLocation(relPath);
        if (actualPath == null) {
            return; // skip this attribute to leave it up to "implicit reference".
        }

        logger.fine("Fixing the relative location:"+relPath
                +" with absolute location:"+actualPath);
        writeAttribute(i, actualPath);
        return;
    }

    if (name.equals(WSDLConstants.NS_SOAP_BINDING_ADDRESS) ||
        name.equals(WSDLConstants.NS_SOAP12_BINDING_ADDRESS)) {

        if(attLocalName.equals("location")) {
            portAddress = in.getAttributeValue(i);
            String value = getAddressLocation();
            if (value != null) {
                logger.fine("Service:"+serviceName+ " port:"+portName
                        + " current address "+portAddress+" Patching it with "+value);
                writeAttribute(i, value);
                return;
            }
        }
    }

    super.handleAttribute(i);
}
 
Example #28
Source File: MemberSubmissionEndpointReference.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs a Source containing the wsdl from the MemberSubmissionEndpointReference
 *
 * @return Source A source object containing the wsdl in the MemeberSubmissionEndpointReference, if present.
 */
public Source toWSDLSource() {
    Element wsdlElement = null;

    for (Element elem : elements) {
        if (elem.getNamespaceURI().equals(WSDLConstants.NS_WSDL) &&
                elem.getLocalName().equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) {
            wsdlElement = elem;
        }
    }

    return new DOMSource(wsdlElement);
}
 
Example #29
Source File: WSEndpointReference.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static void writeWsdl(StreamWriterBufferCreator writer, QName service, String wsdlAddress) throws XMLStreamException {
    // Inline-wsdl
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_DEFINITIONS.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeNamespace(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.NS_WSDL);
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_IMPORT.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeAttribute("namespace", service.getNamespaceURI());
    writer.writeAttribute("location", wsdlAddress);
    writer.writeEndElement();
    writer.writeEndElement();
}
 
Example #30
Source File: WSEndpointReference.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static void writeWsdl(StreamWriterBufferCreator writer, QName service, String wsdlAddress) throws XMLStreamException {
    // Inline-wsdl
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_DEFINITIONS.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeNamespace(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.NS_WSDL);
    writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
            WSDLConstants.QNAME_IMPORT.getLocalPart(),
            WSDLConstants.NS_WSDL);
    writer.writeAttribute("namespace", service.getNamespaceURI());
    writer.writeAttribute("location", wsdlAddress);
    writer.writeEndElement();
    writer.writeEndElement();
}