Java Code Examples for com.sun.xml.internal.ws.api.addressing.WSEndpointReference#getAddress()

The following examples show how to use com.sun.xml.internal.ws.api.addressing.WSEndpointReference#getAddress() . 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: W3CWsaServerTube.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void checkAnonymousSemantics(WSDLBoundOperation wbo, WSEndpointReference replyTo, WSEndpointReference faultTo) {
    String replyToValue = null;
    String faultToValue = null;

    if (replyTo != null)
        replyToValue = replyTo.getAddress();

    if (faultTo != null)
        faultToValue = faultTo.getAddress();
    WSDLBoundOperation.ANONYMOUS responseRequirement = getResponseRequirement(wbo);

    switch (responseRequirement) {
        case prohibited:
            if (replyToValue != null && replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        case required:
            if (replyToValue != null && !replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && !faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        default:
            // ALL: no check
    }
}
 
Example 2
Source File: WSServiceDelegate.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private QName addPortEpr(WSEndpointReference wsepr) {
    if (wsepr == null)
        throw new WebServiceException(ProviderApiMessages.NULL_EPR());
    QName eprPortName = getPortNameFromEPR(wsepr, null);
    //add Port, if it does n't exist;
    // TODO: what if it has different epr address?
    {
        PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName,
                getPortModel(wsdlService, eprPortName).getBinding().getBindingId());
        if (!ports.containsKey(eprPortName)) {
            ports.put(eprPortName, portInfo);
        }
    }
    return eprPortName;
}
 
Example 3
Source File: W3CWsaServerTube.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void checkAnonymousSemantics(WSDLBoundOperation wbo, WSEndpointReference replyTo, WSEndpointReference faultTo) {
    String replyToValue = null;
    String faultToValue = null;

    if (replyTo != null)
        replyToValue = replyTo.getAddress();

    if (faultTo != null)
        faultToValue = faultTo.getAddress();
    WSDLBoundOperation.ANONYMOUS responseRequirement = getResponseRequirement(wbo);

    switch (responseRequirement) {
        case prohibited:
            if (replyToValue != null && replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        case required:
            if (replyToValue != null && !replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && !faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        default:
            // ALL: no check
    }
}
 
Example 4
Source File: WSServiceDelegate.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private QName addPortEpr(WSEndpointReference wsepr) {
    if (wsepr == null)
        throw new WebServiceException(ProviderApiMessages.NULL_EPR());
    QName eprPortName = getPortNameFromEPR(wsepr, null);
    //add Port, if it does n't exist;
    // TODO: what if it has different epr address?
    {
        PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName,
                getPortModel(wsdlService, eprPortName).getBinding().getBindingId());
        if (!ports.containsKey(eprPortName)) {
            ports.put(eprPortName, portInfo);
        }
    }
    return eprPortName;
}
 
Example 5
Source File: W3CWsaServerTube.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void checkAnonymousSemantics(WSDLBoundOperation wbo, WSEndpointReference replyTo, WSEndpointReference faultTo) {
    String replyToValue = null;
    String faultToValue = null;

    if (replyTo != null)
        replyToValue = replyTo.getAddress();

    if (faultTo != null)
        faultToValue = faultTo.getAddress();
    WSDLBoundOperation.ANONYMOUS responseRequirement = getResponseRequirement(wbo);

    switch (responseRequirement) {
        case prohibited:
            if (replyToValue != null && replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        case required:
            if (replyToValue != null && !replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && !faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        default:
            // ALL: no check
    }
}
 
Example 6
Source File: WSServiceDelegate.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private QName addPortEpr(WSEndpointReference wsepr) {
    if (wsepr == null)
        throw new WebServiceException(ProviderApiMessages.NULL_EPR());
    QName eprPortName = getPortNameFromEPR(wsepr, null);
    //add Port, if it does n't exist;
    // TODO: what if it has different epr address?
    {
        PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName,
                getPortModel(wsdlService, eprPortName).getBinding().getBindingId());
        if (!ports.containsKey(eprPortName)) {
            ports.put(eprPortName, portInfo);
        }
    }
    return eprPortName;
}
 
Example 7
Source File: W3CWsaServerTube.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void checkAnonymousSemantics(WSDLBoundOperation wbo, WSEndpointReference replyTo, WSEndpointReference faultTo) {
    String replyToValue = null;
    String faultToValue = null;

    if (replyTo != null)
        replyToValue = replyTo.getAddress();

    if (faultTo != null)
        faultToValue = faultTo.getAddress();
    WSDLBoundOperation.ANONYMOUS responseRequirement = getResponseRequirement(wbo);

    switch (responseRequirement) {
        case prohibited:
            if (replyToValue != null && replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        case required:
            if (replyToValue != null && !replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && !faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        default:
            // ALL: no check
    }
}
 
Example 8
Source File: WSServiceDelegate.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private QName addPortEpr(WSEndpointReference wsepr) {
    if (wsepr == null)
        throw new WebServiceException(ProviderApiMessages.NULL_EPR());
    QName eprPortName = getPortNameFromEPR(wsepr, null);
    //add Port, if it does n't exist;
    // TODO: what if it has different epr address?
    {
        PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName,
                getPortModel(wsdlService, eprPortName).getBinding().getBindingId());
        if (!ports.containsKey(eprPortName)) {
            ports.put(eprPortName, portInfo);
        }
    }
    return eprPortName;
}
 
Example 9
Source File: W3CWsaServerTube.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void checkAnonymousSemantics(WSDLBoundOperation wbo, WSEndpointReference replyTo, WSEndpointReference faultTo) {
    String replyToValue = null;
    String faultToValue = null;

    if (replyTo != null)
        replyToValue = replyTo.getAddress();

    if (faultTo != null)
        faultToValue = faultTo.getAddress();
    WSDLBoundOperation.ANONYMOUS responseRequirement = getResponseRequirement(wbo);

    switch (responseRequirement) {
        case prohibited:
            if (replyToValue != null && replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        case required:
            if (replyToValue != null && !replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && !faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        default:
            // ALL: no check
    }
}
 
Example 10
Source File: WSServiceDelegate.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private QName addPortEpr(WSEndpointReference wsepr) {
    if (wsepr == null)
        throw new WebServiceException(ProviderApiMessages.NULL_EPR());
    QName eprPortName = getPortNameFromEPR(wsepr, null);
    //add Port, if it does n't exist;
    // TODO: what if it has different epr address?
    {
        PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName,
                getPortModel(wsdlService, eprPortName).getBinding().getBindingId());
        if (!ports.containsKey(eprPortName)) {
            ports.put(eprPortName, portInfo);
        }
    }
    return eprPortName;
}
 
Example 11
Source File: W3CWsaServerTube.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void checkAnonymousSemantics(WSDLBoundOperation wbo, WSEndpointReference replyTo, WSEndpointReference faultTo) {
    String replyToValue = null;
    String faultToValue = null;

    if (replyTo != null)
        replyToValue = replyTo.getAddress();

    if (faultTo != null)
        faultToValue = faultTo.getAddress();
    WSDLBoundOperation.ANONYMOUS responseRequirement = getResponseRequirement(wbo);

    switch (responseRequirement) {
        case prohibited:
            if (replyToValue != null && replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        case required:
            if (replyToValue != null && !replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && !faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        default:
            // ALL: no check
    }
}
 
Example 12
Source File: WSServiceDelegate.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private QName addPortEpr(WSEndpointReference wsepr) {
    if (wsepr == null)
        throw new WebServiceException(ProviderApiMessages.NULL_EPR());
    QName eprPortName = getPortNameFromEPR(wsepr, null);
    //add Port, if it does n't exist;
    // TODO: what if it has different epr address?
    {
        PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName,
                getPortModel(wsdlService, eprPortName).getBinding().getBindingId());
        if (!ports.containsKey(eprPortName)) {
            ports.put(eprPortName, portInfo);
        }
    }
    return eprPortName;
}
 
Example 13
Source File: W3CWsaServerTube.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void checkAnonymousSemantics(WSDLBoundOperation wbo, WSEndpointReference replyTo, WSEndpointReference faultTo) {
    String replyToValue = null;
    String faultToValue = null;

    if (replyTo != null)
        replyToValue = replyTo.getAddress();

    if (faultTo != null)
        faultToValue = faultTo.getAddress();
    WSDLBoundOperation.ANONYMOUS responseRequirement = getResponseRequirement(wbo);

    switch (responseRequirement) {
        case prohibited:
            if (replyToValue != null && replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        case required:
            if (replyToValue != null && !replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && !faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        default:
            // ALL: no check
    }
}
 
Example 14
Source File: WSServiceDelegate.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private QName addPortEpr(WSEndpointReference wsepr) {
    if (wsepr == null)
        throw new WebServiceException(ProviderApiMessages.NULL_EPR());
    QName eprPortName = getPortNameFromEPR(wsepr, null);
    //add Port, if it does n't exist;
    // TODO: what if it has different epr address?
    {
        PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName,
                getPortModel(wsdlService, eprPortName).getBinding().getBindingId());
        if (!ports.containsKey(eprPortName)) {
            ports.put(eprPortName, portInfo);
        }
    }
    return eprPortName;
}
 
Example 15
Source File: W3CWsaServerTube.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void checkAnonymousSemantics(WSDLBoundOperation wbo, WSEndpointReference replyTo, WSEndpointReference faultTo) {
    String replyToValue = null;
    String faultToValue = null;

    if (replyTo != null)
        replyToValue = replyTo.getAddress();

    if (faultTo != null)
        faultToValue = faultTo.getAddress();
    WSDLBoundOperation.ANONYMOUS responseRequirement = getResponseRequirement(wbo);

    switch (responseRequirement) {
        case prohibited:
            if (replyToValue != null && replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        case required:
            if (replyToValue != null && !replyToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);

            if (faultToValue != null && !faultToValue.equals(addressingVersion.anonymousUri))
                throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);
            break;
        default:
            // ALL: no check
    }
}
 
Example 16
Source File: WSServiceDelegate.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private QName addPortEpr(WSEndpointReference wsepr) {
    if (wsepr == null)
        throw new WebServiceException(ProviderApiMessages.NULL_EPR());
    QName eprPortName = getPortNameFromEPR(wsepr, null);
    //add Port, if it does n't exist;
    // TODO: what if it has different epr address?
    {
        PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName,
                getPortModel(wsdlService, eprPortName).getBinding().getBindingId());
        if (!ports.containsKey(eprPortName)) {
            ports.put(eprPortName, portInfo);
        }
    }
    return eprPortName;
}