当前位置: 首页>>代码示例>>Java>>正文


Java SDDocument.WSDL属性代码示例

本文整理汇总了Java中com.sun.xml.internal.ws.api.server.SDDocument.WSDL属性的典型用法代码示例。如果您正苦于以下问题:Java SDDocument.WSDL属性的具体用法?Java SDDocument.WSDL怎么用?Java SDDocument.WSDL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.sun.xml.internal.ws.api.server.SDDocument的用法示例。


在下文中一共展示了SDDocument.WSDL属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: WSDLGenResolver

public WSDLGenResolver(@NotNull List<SDDocumentImpl> docs,QName serviceName,QName portTypeName) {
    this.docs = docs;
    this.serviceName = serviceName;
    this.portTypeName = portTypeName;

    for (SDDocumentImpl doc : docs) {
        if(doc.isWSDL()) {
            SDDocument.WSDL wsdl = (SDDocument.WSDL) doc;
            if(wsdl.hasPortType())
                abstractWsdl = doc;
        }
        if(doc.isSchema()) {
            SDDocument.Schema schema = (SDDocument.Schema) doc;
            List<SDDocumentImpl> sysIds = nsMapping.get(schema.getTargetNamespace());
            if (sysIds == null) {
                sysIds = new ArrayList<SDDocumentImpl>();
                nsMapping.put(schema.getTargetNamespace(), sysIds);
            }
            sysIds.add(doc);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:WSDLGenResolver.java

示例2: verifyPrimaryWSDL

/**
 * Verifies whether the given primaryWsdl contains the given serviceName.
 * If the WSDL doesn't have the service, it throws an WebServiceException.
 */
private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) {
    SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null);
    if (!(primaryDoc instanceof SDDocument.WSDL)) {
        throw new WebServiceException(primaryWsdl.getSystemId()+
                " is not a WSDL. But it is passed as a primary WSDL");
    }
    SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc;
    if (!wsdlDoc.hasService()) {
        if(wsdlDoc.getAllServices().isEmpty())
            throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+
                    " since it doesn't have Service "+serviceName);
        else
            throw new WebServiceException("WSDL "+primaryDoc.getSystemId()
                    +" has the following services "+wsdlDoc.getAllServices()
                    +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?");
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:EndpointFactory.java

示例3: findPrimary

/**
 * Finds the primary WSDL document from the list of metadata documents. If
 * there are two metadata documents that qualify for primary, it throws an
 * exception. If there are two metadata documents that qualify for porttype,
 * it throws an exception.
 *
 * @return primay wsdl document, null if is not there in the docList
 *
 */
private static @Nullable SDDocumentImpl findPrimary(@NotNull List<SDDocumentImpl> docList) {
    SDDocumentImpl primaryDoc = null;
    boolean foundConcrete = false;
    boolean foundAbstract = false;
    for(SDDocumentImpl doc : docList) {
        if (doc instanceof SDDocument.WSDL) {
            SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)doc;
            if (wsdlDoc.hasService()) {
                primaryDoc = doc;
                if (foundConcrete) {
                    throw new ServerRtException("duplicate.primary.wsdl", doc.getSystemId() );
                }
                foundConcrete = true;
            }
            if (wsdlDoc.hasPortType()) {
                if (foundAbstract) {
                    throw new ServerRtException("duplicate.abstract.wsdl", doc.getSystemId());
                }
                foundAbstract = true;
            }
        }
    }
    return primaryDoc;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:EndpointFactory.java

示例4: WSDLGenResolver

public WSDLGenResolver(@NotNull Collection<SDDocumentImpl> docs,QName serviceName,QName portTypeName) {
    this.docs = docs;
    this.serviceName = serviceName;
    this.portTypeName = portTypeName;

    for (SDDocumentImpl doc : docs) {
        if(doc.isWSDL()) {
            SDDocument.WSDL wsdl = (SDDocument.WSDL) doc;
            if(wsdl.hasPortType())
                abstractWsdl = doc;
        }
        if(doc.isSchema()) {
            SDDocument.Schema schema = (SDDocument.Schema) doc;
            List<SDDocumentImpl> sysIds = nsMapping.get(schema.getTargetNamespace());
            if (sysIds == null) {
                sysIds = new ArrayList<SDDocumentImpl>();
                nsMapping.put(schema.getTargetNamespace(), sysIds);
            }
            sysIds.add(doc);
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:WSDLGenResolver.java

示例5: findPrimary

/**
 * Finds the primary WSDL document from the list of metadata documents. If
 * there are two metadata documents that qualify for primary, it throws an
 * exception. If there are two metadata documents that qualify for porttype,
 * it throws an exception.
 *
 * @return primay wsdl document, null if is not there in the docList
 *
 */
private static @Nullable SDDocumentImpl findPrimary(@NotNull Collection<SDDocumentImpl> docList) {
    SDDocumentImpl primaryDoc = null;
    boolean foundConcrete = false;
    boolean foundAbstract = false;
    for(SDDocumentImpl doc : docList) {
        if (doc instanceof SDDocument.WSDL) {
            SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)doc;
            if (wsdlDoc.hasService()) {
                primaryDoc = doc;
                if (foundConcrete) {
                    throw new ServerRtException("duplicate.primary.wsdl", doc.getSystemId() );
                }
                foundConcrete = true;
            }
            if (wsdlDoc.hasPortType()) {
                if (foundAbstract) {
                    throw new ServerRtException("duplicate.abstract.wsdl", doc.getSystemId());
                }
                foundAbstract = true;
            }
        }
    }
    return primaryDoc;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:33,代码来源:EndpointFactory.java


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