本文整理汇总了Java中com.sun.xml.internal.ws.api.model.wsdl.WSDLPort.getName方法的典型用法代码示例。如果您正苦于以下问题:Java WSDLPort.getName方法的具体用法?Java WSDLPort.getName怎么用?Java WSDLPort.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.xml.internal.ws.api.model.wsdl.WSDLPort
的用法示例。
在下文中一共展示了WSDLPort.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPort
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入方法依赖的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);
}
示例2: PortInfo
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入方法依赖的package包/类
public PortInfo(@NotNull WSServiceDelegate owner, @NotNull WSDLPort port) {
this.owner = owner;
this.targetEndpoint = port.getAddress();
this.portName = port.getName();
this.bindingId = port.getBinding().getBindingId();
this.portModel = port;
this.policyMap = createPolicyMap();
}
示例3: Stub
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入方法依赖的package包/类
private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
try {
this.owner = owner;
this.portInfo = portInfo;
this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null);
this.portname = portname;
if (portname == null) {
if (portInfo != null) {
this.portname = portInfo.getPortName();
} else if (wsdlPort != null) {
this.portname = wsdlPort.getName();
}
}
this.binding = binding;
ComponentFeature cf = binding.getFeature(ComponentFeature.class);
if (cf != null && Target.STUB.equals(cf.getTarget())) {
components.add(cf.getComponent());
}
ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
if (csf != null) {
for (ComponentFeature cfi : csf.getComponentFeatures()) {
if (Target.STUB.equals(cfi.getTarget()))
components.add(cfi.getComponent());
}
}
// if there is an EPR, EPR's address should be used for invocation instead of default address
if (epr != null) {
this.requestContext.setEndPointAddressString(epr.getAddress());
} else {
this.requestContext.setEndpointAddress(defaultEndPointAddress);
}
this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor());
this.endpointReference = epr;
wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort);
this.cleanRequestContext = this.requestContext.copy();
// ManagedObjectManager MUST be created before the pipeline
// is constructed.
managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this);
if (master != null) {
this.tubes = new TubePool(master);
} else {
this.tubes = new TubePool(createPipeline(portInfo, binding));
}
addrVersion = binding.getAddressingVersion();
// This needs to happen after createPipeline.
// TBD: Check if it needs to happen outside the Stub constructor.
managedObjectManager.resumeJMXRegistration();
} finally {
ContainerResolver.getDefault().exitContainer(old);
}
}
示例4: getPortNameFromEPR
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入方法依赖的package包/类
/**
*
* @param wsepr EndpointReference from which portName will be extracted.
* If EndpointName ( port name) is null in EPR, then it will try to get if from WSDLModel using portType QName
* @param portTypeName
* should be null in dispatch case
* should be non null in SEI case
* @return
* port name from EPR after validating various metadat elements.
* Also if service instance does n't have wsdl,
* then it gets the WSDL metadata from EPR and builds wsdl model.
*/
private QName getPortNameFromEPR(@NotNull WSEndpointReference wsepr, @Nullable QName portTypeName) {
QName portName;
WSEndpointReference.Metadata metadata = wsepr.getMetaData();
QName eprServiceName = metadata.getServiceName();
QName eprPortName = metadata.getPortName();
if ((eprServiceName != null ) && !eprServiceName.equals(serviceName)) {
throw new WebServiceException("EndpointReference WSDL ServiceName differs from Service Instance WSDL Service QName.\n"
+ " The two Service QNames must match");
}
if (wsdlService == null) {
Source eprWsdlSource = metadata.getWsdlSource();
if (eprWsdlSource == null) {
throw new WebServiceException(ProviderApiMessages.NULL_WSDL());
}
try {
WSDLModel eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource, null);
wsdlService = eprWsdlMdl.getService(serviceName);
if (wsdlService == null)
throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME(serviceName,
buildNameList(eprWsdlMdl.getServices().keySet())));
} catch (MalformedURLException e) {
throw new WebServiceException(ClientMessages.INVALID_ADDRESS(wsepr.getAddress()));
}
}
portName = eprPortName;
if (portName == null && portTypeName != null) {
//get the first port corresponding to the SEI
WSDLPort port = wsdlService.getMatchingPort(portTypeName);
if (port == null)
throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
portName = port.getName();
}
if (portName == null)
throw new WebServiceException(ProviderApiMessages.NULL_PORTNAME());
if (wsdlService.get(portName) == null)
throw new WebServiceException(ClientMessages.INVALID_EPR_PORT_NAME(portName, buildWsdlPortNames()));
return portName;
}