本文整理汇总了Java中com.sun.xml.internal.ws.api.server.SDDocumentSource.getSystemId方法的典型用法代码示例。如果您正苦于以下问题:Java SDDocumentSource.getSystemId方法的具体用法?Java SDDocumentSource.getSystemId怎么用?Java SDDocumentSource.getSystemId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.xml.internal.ws.api.server.SDDocumentSource
的用法示例。
在下文中一共展示了SDDocumentSource.getSystemId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: verifyPrimaryWSDL
import com.sun.xml.internal.ws.api.server.SDDocumentSource; //导入方法依赖的package包/类
/**
* 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?");
}
}
示例2: Parser
import com.sun.xml.internal.ws.api.server.SDDocumentSource; //导入方法依赖的package包/类
/**
* Creates a {@link Parser} that reads from {@link SDDocumentSource}.
*/
public Parser(SDDocumentSource doc) throws IOException, XMLStreamException {
this.systemId = doc.getSystemId();
this.parser = doc.read();
}