Java Code Examples for com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation#ANONYMOUS

The following examples show how to use com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation#ANONYMOUS . 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
private WSDLBoundOperation.ANONYMOUS getResponseRequirement(@Nullable WSDLBoundOperation wbo) {
    try {
        if (af.getResponses() == AddressingFeature.Responses.ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.required;
        } else if (af.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.prohibited;
        }
    } catch (NoSuchMethodError e) {
        //Ignore error, defaut to optional
    }
    //wsaw wsdl binding case will have some value set on wbo
    return wbo != null ? wbo.getAnonymous() : WSDLBoundOperation.ANONYMOUS.optional;
}
 
Example 2
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 3
Source File: W3CWsaServerTube.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private WSDLBoundOperation.ANONYMOUS getResponseRequirement(@Nullable WSDLBoundOperation wbo) {
    try {
        if (af.getResponses() == AddressingFeature.Responses.ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.required;
        } else if (af.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.prohibited;
        }
    } catch (NoSuchMethodError e) {
        //Ignore error, defaut to optional
    }
    //wsaw wsdl binding case will have some value set on wbo
    return wbo != null ? wbo.getAnonymous() : WSDLBoundOperation.ANONYMOUS.optional;
}
 
Example 4
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 5
Source File: W3CWsaServerTube.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private WSDLBoundOperation.ANONYMOUS getResponseRequirement(@Nullable WSDLBoundOperation wbo) {
    try {
        if (af.getResponses() == AddressingFeature.Responses.ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.required;
        } else if (af.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.prohibited;
        }
    } catch (NoSuchMethodError e) {
        //Ignore error, defaut to optional
    }
    //wsaw wsdl binding case will have some value set on wbo
    return wbo != null ? wbo.getAnonymous() : WSDLBoundOperation.ANONYMOUS.optional;
}
 
Example 6
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 7
Source File: W3CWsaServerTube.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private WSDLBoundOperation.ANONYMOUS getResponseRequirement(@Nullable WSDLBoundOperation wbo) {
    try {
        if (af.getResponses() == AddressingFeature.Responses.ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.required;
        } else if (af.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.prohibited;
        }
    } catch (NoSuchMethodError e) {
        //Ignore error, defaut to optional
    }
    //wsaw wsdl binding case will have some value set on wbo
    return wbo != null ? wbo.getAnonymous() : WSDLBoundOperation.ANONYMOUS.optional;
}
 
Example 8
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 9
Source File: W3CWsaServerTube.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private WSDLBoundOperation.ANONYMOUS getResponseRequirement(@Nullable WSDLBoundOperation wbo) {
    try {
        if (af.getResponses() == AddressingFeature.Responses.ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.required;
        } else if (af.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.prohibited;
        }
    } catch (NoSuchMethodError e) {
        //Ignore error, defaut to optional
    }
    //wsaw wsdl binding case will have some value set on wbo
    return wbo != null ? wbo.getAnonymous() : WSDLBoundOperation.ANONYMOUS.optional;
}
 
Example 10
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 11
Source File: W3CWsaServerTube.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private WSDLBoundOperation.ANONYMOUS getResponseRequirement(@Nullable WSDLBoundOperation wbo) {
    try {
        if (af.getResponses() == AddressingFeature.Responses.ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.required;
        } else if (af.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.prohibited;
        }
    } catch (NoSuchMethodError e) {
        //Ignore error, defaut to optional
    }
    //wsaw wsdl binding case will have some value set on wbo
    return wbo != null ? wbo.getAnonymous() : WSDLBoundOperation.ANONYMOUS.optional;
}
 
Example 12
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 13
Source File: W3CWsaServerTube.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private WSDLBoundOperation.ANONYMOUS getResponseRequirement(@Nullable WSDLBoundOperation wbo) {
    try {
        if (af.getResponses() == AddressingFeature.Responses.ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.required;
        } else if (af.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.prohibited;
        }
    } catch (NoSuchMethodError e) {
        //Ignore error, defaut to optional
    }
    //wsaw wsdl binding case will have some value set on wbo
    return wbo != null ? wbo.getAnonymous() : WSDLBoundOperation.ANONYMOUS.optional;
}
 
Example 14
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 15
Source File: W3CWsaServerTube.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private WSDLBoundOperation.ANONYMOUS getResponseRequirement(@Nullable WSDLBoundOperation wbo) {
    try {
        if (af.getResponses() == AddressingFeature.Responses.ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.required;
        } else if (af.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS) {
            return WSDLBoundOperation.ANONYMOUS.prohibited;
        }
    } catch (NoSuchMethodError e) {
        //Ignore error, defaut to optional
    }
    //wsaw wsdl binding case will have some value set on wbo
    return wbo != null ? wbo.getAnonymous() : WSDLBoundOperation.ANONYMOUS.optional;
}
 
Example 16
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
    }
}