本文整理汇总了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);
}
}
}
示例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?");
}
}
示例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;
}
示例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);
}
}
}
示例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;
}