本文整理汇总了Java中com.sun.xml.internal.ws.api.model.wsdl.WSDLService.getMatchingPort方法的典型用法代码示例。如果您正苦于以下问题:Java WSDLService.getMatchingPort方法的具体用法?Java WSDLService.getMatchingPort怎么用?Java WSDLService.getMatchingPort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.xml.internal.ws.api.model.wsdl.WSDLService
的用法示例。
在下文中一共展示了WSDLService.getMatchingPort方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPort
import com.sun.xml.internal.ws.api.model.wsdl.WSDLService; //导入方法依赖的package包/类
@Override
public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) {
//get the portType from SEI
QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader()));
WSDLService tmpWsdlService = this.wsdlService;
if (tmpWsdlService == null) {
// assigning it to local variable and not setting it back to this.wsdlService intentionally
// as we don't want to include the service instance with information gathered from sei
tmpWsdlService = getWSDLModelfromSEI(portInterface);
//still null? throw error need wsdl metadata to create a proxy
if(tmpWsdlService == null) {
throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName()));
}
}
//get the first port corresponding to the SEI
WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName);
if (port == null) {
throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
}
QName portName = port.getName();
return getPort(portName, portInterface,features);
}