• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SOAPStyle类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle的典型用法代码示例。如果您正苦于以下问题:Java SOAPStyle类的具体用法?Java SOAPStyle怎么用?Java SOAPStyle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SOAPStyle类属于com.sun.tools.internal.ws.wsdl.document.soap包,在下文中一共展示了SOAPStyle类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: popSoapBinding

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
protected SOAPBinding popSoapBinding() {
    if (pushedSoapBinding)
        soapBindingStack.pop();
    SOAPBinding soapBinding = null;
    if (!soapBindingStack.empty()) {
        soapBinding = soapBindingStack.peek();
        if (soapBinding.style().equals(SOAPBinding.Style.RPC)) {
            soapStyle = SOAPStyle.RPC;
            wrapped = true;
        } else {
            soapStyle = SOAPStyle.DOCUMENT;
            wrapped = soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED);
        }
    } else {
            pushedSoapBinding = false;
    }
    return soapBinding;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:WebServiceVisitor.java


示例2: popSOAPBinding

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
protected SOAPBinding popSOAPBinding() {
    if (pushedSOAPBinding)
        soapBindingStack.pop();
    SOAPBinding soapBinding = null;
    if (!soapBindingStack.empty()) {
        soapBinding = soapBindingStack.peek();
        if (soapBinding.style().equals(SOAPBinding.Style.RPC)) {
            soapStyle = SOAPStyle.RPC;
            wrapped = true;
        } else {
            soapStyle = SOAPStyle.DOCUMENT;
            wrapped = soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED);
        }
    }
    return soapBinding;
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:17,代码来源:WebServiceVisitor.java


示例3: writeSOAPBinding

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
private void writeSOAPBinding(Port port, JDefinedClass cls) {
    JAnnotationUse soapBindingAnn = null;
    isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT);
    if(!isDocStyle){
        soapBindingAnn = cls.annotate(SOAPBinding.class);
        soapBindingAnn.param("style", SOAPBinding.Style.RPC);
        port.setWrapped(true);
    }
    if(isDocStyle){
        boolean first = true;
        boolean isWrapper = true;
        for(Operation operation:port.getOperations()){
            if(first){
                isWrapper = operation.isWrapped();
                first = false;
                continue;
            }
            sameParamStyle = (isWrapper == operation.isWrapped());
            if (!sameParamStyle) {
                break;
            }
        }
        if (sameParamStyle) {
            port.setWrapped(isWrapper);
        }
    }
    if(sameParamStyle && !port.isWrapped()){
        if (soapBindingAnn == null) {
            soapBindingAnn = cls.annotate(SOAPBinding.class);
        }
        soapBindingAnn.param("parameterStyle", SOAPBinding.ParameterStyle.BARE);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:34,代码来源:SeiGenerator.java


示例4: isValidOneWayMethod

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
protected boolean isValidOneWayMethod(ExecutableElement method, TypeElement typeElement) {
    boolean valid = true;
    if (!(method.getReturnType().accept(NO_TYPE_VISITOR, null))) {
        // this is an error, cannot be OneWay and have a return type
        builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(typeElement.getQualifiedName(), method.toString()), method);
        valid = false;
    }
    VariableElement outParam = getOutParameter(method);
    if (outParam != null) {
        builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_OUT(typeElement.getQualifiedName(), method.toString()), outParam);
        valid = false;
    }
    if (!isDocLitWrapped() && soapStyle.equals(SOAPStyle.DOCUMENT)) {
        int inCnt = getModeParameterCount(method, WebParam.Mode.IN);
        if (inCnt != 1) {
            builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(typeElement.getQualifiedName(), method.toString()), method);
            valid = false;
        }
    }
    for (TypeMirror thrownType : method.getThrownTypes()) {
        TypeElement thrownElement = (TypeElement) ((DeclaredType) thrownType).asElement();
        if (builder.isServiceException(thrownType)) {
            builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(
                    typeElement.getQualifiedName(), method.toString(), thrownElement.getQualifiedName()), method);
            valid = false;
        }
    }
    return valid;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:WebServiceVisitor.java


示例5: processMethod

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
@Override
protected void processMethod(ExecutableElement method, WebMethod webMethod) {
    builder.log("WrapperGen - method: "+method);
    builder.log("method.getDeclaringType(): " + method.asType());
    if (wrapped && soapStyle.equals(SOAPStyle.DOCUMENT)) {
        generateWrappers(method, webMethod);
    }
    generateExceptionBeans(method);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:WebServiceWrapperGenerator.java


示例6: writeSOAPBinding

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
private void writeSOAPBinding(Port port, JDefinedClass cls) {
    JAnnotationUse soapBindingAnn = null;
    isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT);
    if(!isDocStyle){
        soapBindingAnn = cls.annotate(SOAPBinding.class);
        soapBindingAnn.param("style", SOAPBinding.Style.RPC);
        port.setWrapped(true);
    }
    if(isDocStyle){
        boolean first = true;
        boolean isWrapper = true;
        for(Operation operation:port.getOperations()){
            if(first){
                isWrapper = operation.isWrapped();
                first = false;
                continue;
            }
            sameParamStyle = (isWrapper == operation.isWrapped());
            if(!sameParamStyle)
                break;
        }
        if(sameParamStyle)
            port.setWrapped(isWrapper);
    }
    if(sameParamStyle && !port.isWrapped()){
        if(soapBindingAnn == null)
            soapBindingAnn = cls.annotate(SOAPBinding.class);
        soapBindingAnn.param("parameterStyle", SOAPBinding.ParameterStyle.BARE);
    }
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:31,代码来源:SeiGenerator.java


示例7: sameStyle

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
public static boolean sameStyle(SOAPBinding.Style style, SOAPStyle soapStyle) {
    if (style.equals(SOAPBinding.Style.DOCUMENT) &&
            soapStyle.equals(SOAPStyle.DOCUMENT))
        return true;
    if (style.equals(SOAPBinding.Style.RPC) &&
            soapStyle.equals(SOAPStyle.RPC))
        return true;
    return false;
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:10,代码来源:WebServiceVisitor.java


示例8: isValidOnewayMethod

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
protected boolean isValidOnewayMethod(MethodDeclaration method, TypeDeclaration typeDecl) {
    boolean valid = true;
    if (!(method.getReturnType() instanceof VoidType)) {
        // this is an error, cannot be Oneway and have a return type
        builder.onError(method.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(typeDecl.getQualifiedName(), method.toString()));
        valid = false;
    }
    ParameterDeclaration outParam = getOutParameter(method);
    if (outParam != null) {
        builder.onError(outParam.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_ONEWAY_AND_OUT(typeDecl.getQualifiedName(), method.toString()));
        valid = false;
    }
    if (!isDocLitWrapped() && soapStyle.equals(SOAPStyle.DOCUMENT)) {
        int inCnt = getModeParameterCount(method, WebParam.Mode.IN);
        if (inCnt != 1) {
            builder.onError(method.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(typeDecl.getQualifiedName(), method.toString()));
            valid = false;
        }
    }
    ClassDeclaration exDecl;
    for (ReferenceType thrownType : method.getThrownTypes()) {
        exDecl = ((ClassType)thrownType).getDeclaration();
        if (builder.isServiceException(exDecl)) {
            builder.onError(method.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(typeDecl.getQualifiedName(), method.toString(), exDecl.getQualifiedName()));
            valid = false;
        }
    }
    return valid;
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:30,代码来源:WebServiceVisitor.java


示例9: processMethod

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
protected void processMethod(MethodDeclaration method, WebMethod webMethod) {
    builder.log("WrapperGen - method: "+method);
    builder.log("method.getDeclaringType(): "+method.getDeclaringType());
    boolean generatedWrapper = false;
    if (wrapped && soapStyle.equals(SOAPStyle.DOCUMENT)) {
        generatedWrapper = generateWrappers(method, webMethod);
    }
    generatedWrapper = generateExceptionBeans(method) || generatedWrapper;
    if (generatedWrapper) {
        // Theres not going to be a second round
        builder.setWrapperGenerated(generatedWrapper);
    }
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:14,代码来源:WebServiceWrapperGenerator.java


示例10: getStyle

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
public SOAPStyle getStyle() {
    return _style;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:Port.java


示例11: setStyle

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
public void setStyle(SOAPStyle s) {
    _style = s;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:Port.java


示例12: sameStyle

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
public static boolean sameStyle(SOAPBinding.Style style, SOAPStyle soapStyle) {
    return style.equals(SOAPBinding.Style.DOCUMENT)
            && soapStyle.equals(SOAPStyle.DOCUMENT)
            || style.equals(SOAPBinding.Style.RPC)
            && soapStyle.equals(SOAPStyle.RPC);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:WebServiceVisitor.java


示例13: isLegalMethod

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
protected boolean isLegalMethod(ExecutableElement method, TypeElement typeElement) {
    WebMethod webMethod = method.getAnnotation(WebMethod.class);
    //SEI cannot have methods with @WebMethod(exclude=true)
    if (typeElement.getKind().equals(ElementKind.INTERFACE) && webMethod != null && webMethod.exclude())
        builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE("exclude=true", typeElement.getQualifiedName(), method.toString()), method);
    // With https://jax-ws.dev.java.net/issues/show_bug.cgi?id=577, hasWebMethods has no effect
    if (hasWebMethods && webMethod == null) // backwards compatibility (for legacyWebMethod computation)
        return true;

    if ((webMethod != null) && webMethod.exclude()) {
        return true;
    }
    /*
    This check is not needed as Impl class is already checked that it is not abstract.
    if (typeElement instanceof TypeElement && method.getModifiers().contains(Modifier.ABSTRACT)) {  // use Kind.equals instead of instanceOf
        builder.processError(method.getPosition(), WebserviceapMessages.WEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(typeElement.getQualifiedName(), method.getSimpleName()));
        return false;
    }
    */
    TypeMirror returnType = method.getReturnType();
    if (!isLegalType(returnType)) {
        builder.processError(WebserviceapMessages.WEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(typeElement.getQualifiedName(),
                method.getSimpleName(),
                returnType), method);
    }
    boolean isOneWay = method.getAnnotation(Oneway.class) != null;
    if (isOneWay && !isValidOneWayMethod(method, typeElement))
        return false;

    SOAPBinding soapBinding = method.getAnnotation(SOAPBinding.class);
    if (soapBinding != null) {
        if (soapBinding.style().equals(SOAPBinding.Style.RPC)) {
            builder.processError(WebserviceapMessages.WEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(typeElement.getQualifiedName(), method.toString()), method);
        }
    }

    int paramIndex = 0;
    for (VariableElement parameter : method.getParameters()) {
        if (!isLegalParameter(parameter, method, typeElement, paramIndex++))
            return false;
    }

    if (!isDocLitWrapped() && soapStyle.equals(SOAPStyle.DOCUMENT)) {
        VariableElement outParam = getOutParameter(method);
        int inParams = getModeParameterCount(method, WebParam.Mode.IN);
        int outParams = getModeParameterCount(method, WebParam.Mode.OUT);
        if (inParams != 1) {
            builder.processError(WebserviceapMessages.WEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(typeElement.getQualifiedName(), method.toString()), method);
        }
        if (returnType.accept(NO_TYPE_VISITOR, null)) {
            if (outParam == null && !isOneWay) {
                builder.processError(WebserviceapMessages.WEBSERVICEAP_DOC_BARE_NO_OUT(typeElement.getQualifiedName(), method.toString()), method);
            }
            if (outParams != 1) {
                if (!isOneWay && outParams != 0)
                    builder.processError(WebserviceapMessages.WEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(typeElement.getQualifiedName(), method.toString()), method);
            }
        } else {
            if (outParams > 0) {
                builder.processError(WebserviceapMessages.WEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(typeElement.getQualifiedName(), method.toString()), outParam);
            }
        }
    }
    return true;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:66,代码来源:WebServiceVisitor.java


示例14: isDocLitWrapped

import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; //导入依赖的package包/类
protected boolean isDocLitWrapped() {
    return soapStyle.equals(SOAPStyle.DOCUMENT) && wrapped;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:WebServiceVisitor.java



注:本文中的com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java FileExistResponse类代码示例发布时间:2022-05-23
下一篇:
Java ProjectJdkImpl类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap