javax.jws.soap.SOAPBinding.Use Java Examples

The following examples show how to use javax.jws.soap.SOAPBinding.Use. 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: JaxWsSoapBindingConfiguration.java    From cxf with Apache License 2.0 5 votes vote down vote up
@Override
public String getUse() {
    SOAPBinding sb = getServiceClass().getAnnotation(SOAPBinding.class);
    if (sb != null) {
        if (sb.use().equals(Use.LITERAL)) {
            return "literal";
        } else if (sb.use().equals(Use.ENCODED)) {
            return "encoded";
        }
    }
    return super.getUse();
}
 
Example #2
Source File: BindingHelper.java    From syndesis with Apache License 2.0 5 votes vote down vote up
BindingHelper(BindingMessageInfo bindingMessageInfo) throws ParserException, ParserConfigurationException {

        this.bindingMessageInfo = bindingMessageInfo;
        this.bindingOperation = bindingMessageInfo.getBindingOperation();
        this.schemaCollection = bindingMessageInfo.getBindingOperation().getBinding().getService().getXmlSchemaCollection();

        SoapOperationInfo soapOperationInfo = bindingOperation.getExtensor(SoapOperationInfo.class);
        SoapBindingInfo soapBindingInfo = (SoapBindingInfo) bindingOperation.getBinding();

        soapVersion = soapBindingInfo.getSoapVersion();

        // get binding style
        if (soapOperationInfo.getStyle() != null) {
            style = Style.valueOf(soapOperationInfo.getStyle().toUpperCase(Locale.US));
        } else if (soapBindingInfo.getStyle() != null) {
            style = Style.valueOf(soapBindingInfo.getStyle().toUpperCase(Locale.US));
        } else {
            style = Style.DOCUMENT;
        }

        // get body binding
        SoapBodyInfo soapBodyInfo = bindingMessageInfo.getExtensor(SoapBodyInfo.class);
        List<SoapHeaderInfo> soapHeaders = bindingMessageInfo.getExtensors(SoapHeaderInfo.class);
        bodyParts = soapBodyInfo.getParts();

        // get any headers as MessagePartInfos
        hasHeaders = soapHeaders != null && !soapHeaders.isEmpty();
        headerParts = hasHeaders ?
            soapHeaders.stream().map(SoapHeaderInfo::getPart).collect(Collectors.toList()) : null;

        // get required body use
        Use use = Use.valueOf(soapBodyInfo.getUse().toUpperCase(Locale.US));
        if (ENCODED.equals(use)) {
            // TODO could we add support for RPC/encoded messages by setting schema type to any??
            throw new ParserException("Messages with use='encoded' are not supported");
        }

        // Document builder for create schemaset
        this.documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    }
 
Example #3
Source File: SOAPBinding.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get {@link Use} such as <code>literal</code> or <code>encoded</code>.
 */
public Use getUse() {
    return use;
}
 
Example #4
Source File: HelloWrongAnnotation.java    From cxf with Apache License 2.0 4 votes vote down vote up
@SOAPBinding(style = Style.RPC, use = Use.LITERAL)
@WebMethod(operationName = "sayHi", exclude = false)
String sayHi();
 
Example #5
Source File: SOAPBinding.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if this is a rpc/literal binding
 */
public boolean isRpcLit() {
    return style == Style.RPC && use == Use.LITERAL;
}
 
Example #6
Source File: SOAPBinding.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if its document/literal
 */
public boolean isDocLit() {
    return style == Style.DOCUMENT && use == Use.LITERAL;
}
 
Example #7
Source File: SOAPBinding.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get {@link Use} such as <code>literal</code> or <code>encoded</code>.
 */
public Use getUse() {
    return use;
}
 
Example #8
Source File: SOAPBinding.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if this is a rpc/literal binding
 */
public boolean isRpcLit() {
    return style == Style.RPC && use == Use.LITERAL;
}
 
Example #9
Source File: SOAPBinding.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if its document/literal
 */
public boolean isDocLit() {
    return style == Style.DOCUMENT && use == Use.LITERAL;
}
 
Example #10
Source File: SOAPBinding.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get {@link Use} such as <code>literal</code> or <code>encoded</code>.
 */
public Use getUse() {
    return use;
}
 
Example #11
Source File: SOAPBinding.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if this is a rpc/literal binding
 */
public boolean isRpcLit() {
    return style == Style.RPC && use == Use.LITERAL;
}
 
Example #12
Source File: SOAPBinding.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if its document/literal
 */
public boolean isDocLit() {
    return style == Style.DOCUMENT && use == Use.LITERAL;
}
 
Example #13
Source File: SOAPBinding.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get {@link Use} such as <code>literal</code> or <code>encoded</code>.
 */
public Use getUse() {
    return use;
}
 
Example #14
Source File: SOAPBinding.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if this is a rpc/literal binding
 */
public boolean isRpcLit() {
    return style == Style.RPC && use == Use.LITERAL;
}
 
Example #15
Source File: SOAPBinding.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if its document/literal
 */
public boolean isDocLit() {
    return style == Style.DOCUMENT && use == Use.LITERAL;
}
 
Example #16
Source File: SOAPBinding.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get {@link Use} such as <code>literal</code> or <code>encoded</code>.
 */
public Use getUse() {
    return use;
}
 
Example #17
Source File: SOAPBinding.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if this is a rpc/literal binding
 */
public boolean isRpcLit() {
    return style == Style.RPC && use == Use.LITERAL;
}
 
Example #18
Source File: SOAPBinding.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if its document/literal
 */
public boolean isDocLit() {
    return style == Style.DOCUMENT && use == Use.LITERAL;
}
 
Example #19
Source File: SOAPBinding.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get {@link Use} such as <code>literal</code> or <code>encoded</code>.
 */
public Use getUse() {
    return use;
}
 
Example #20
Source File: SOAPBinding.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if this is a rpc/literal binding
 */
public boolean isRpcLit() {
    return style == Style.RPC && use == Use.LITERAL;
}
 
Example #21
Source File: SOAPBinding.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if its document/literal
 */
public boolean isDocLit() {
    return style == Style.DOCUMENT && use == Use.LITERAL;
}
 
Example #22
Source File: SOAPBinding.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get {@link Use} such as <code>literal</code> or <code>encoded</code>.
 */
public Use getUse() {
    return use;
}
 
Example #23
Source File: SOAPBinding.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if this is a rpc/literal binding
 */
public boolean isRpcLit() {
    return style == Style.RPC && use == Use.LITERAL;
}
 
Example #24
Source File: SOAPBinding.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if its document/literal
 */
public boolean isDocLit() {
    return style == Style.DOCUMENT && use == Use.LITERAL;
}
 
Example #25
Source File: SOAPBinding.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get {@link Use} such as <code>literal</code> or <code>encoded</code>.
 */
public Use getUse() {
    return use;
}
 
Example #26
Source File: SOAPBinding.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if this is a rpc/literal binding
 */
public boolean isRpcLit() {
    return style == Style.RPC && use == Use.LITERAL;
}
 
Example #27
Source File: SOAPBinding.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if its document/literal
 */
public boolean isDocLit() {
    return style == Style.DOCUMENT && use == Use.LITERAL;
}