本文整理汇总了Java中com.sun.xml.internal.ws.api.model.wsdl.WSDLPort类的典型用法代码示例。如果您正苦于以下问题:Java WSDLPort类的具体用法?Java WSDLPort怎么用?Java WSDLPort使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WSDLPort类属于com.sun.xml.internal.ws.api.model.wsdl包,在下文中一共展示了WSDLPort类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createServiceResponseForException
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
@Override
public Packet createServiceResponseForException(final ThrowableContainerPropertySet tc,
final Packet responsePacket,
final SOAPVersion soapVersion,
final WSDLPort wsdlPort,
final SEIModel seiModel,
final WSBinding binding)
{
// This will happen in addressing if it is enabled.
if (tc.isFaultCreated()) return responsePacket;
final Message faultMessage = SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, tc.getThrowable());
final Packet result = responsePacket.createServerResponse(faultMessage, wsdlPort, seiModel, binding);
// Pass info to upper layers
tc.setFaultMessage(faultMessage);
tc.setResponsePacket(responsePacket);
tc.setFaultCreated(true);
return result;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:WSEndpointImpl.java
示例2: populateAddressingHeaders
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
private void populateAddressingHeaders(WSBinding binding, Packet responsePacket, WSDLPort wsdlPort, SEIModel seiModel) {
AddressingVersion addressingVersion = binding.getAddressingVersion();
if (addressingVersion == null) {
return;
}
WsaTubeHelper wsaHelper = addressingVersion.getWsaHelper(wsdlPort, seiModel, binding);
String action = responsePacket.getMessage().isFault() ?
wsaHelper.getFaultAction(this, responsePacket) :
wsaHelper.getOutputAction(this);
if (action == null) {
LOGGER.info("WSA headers are not added as value for wsa:Action cannot be resolved for this message");
return;
}
populateAddressingHeaders(responsePacket, addressingVersion, binding.getSOAPVersion(), action, AddressingVersion.isRequired(binding));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:Packet.java
示例3: getPort
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) {
if (portName == null || portInterface == null)
throw new IllegalArgumentException();
WSDLService tWsdlService = this.wsdlService;
if (tWsdlService == 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
tWsdlService = getWSDLModelfromSEI(portInterface);
//still null? throw error need wsdl metadata to create a proxy
if (tWsdlService == null) {
throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName()));
}
}
WSDLPort portModel = getPortModel(tWsdlService, portName);
return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features));
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:WSServiceDelegate.java
示例4: getResponse
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
@Override
protected Packet getResponse(Packet request, @Nullable SOAPMessage returnValue, WSDLPort port, WSBinding binding) {
Packet response = super.getResponse(request, returnValue, port, binding);
// Populate SOAPMessage's transport headers
if (returnValue != null && response.supports(Packet.OUTBOUND_TRANSPORT_HEADERS)) {
MimeHeaders hdrs = returnValue.getMimeHeaders();
Map<String, List<String>> headers = new HashMap<String, List<String>>();
Iterator i = hdrs.getAllHeaders();
while(i.hasNext()) {
MimeHeader header = (MimeHeader)i.next();
if(header.getName().equalsIgnoreCase("SOAPAction"))
// SAAJ sets this header automatically, but it interferes with the correct operation of JAX-WS.
// so ignore this header.
continue;
List<String> list = headers.get(header.getName());
if (list == null) {
list = new ArrayList<String>();
headers.put(header.getName(), list);
}
list.add(header.getValue());
}
response.put(Packet.OUTBOUND_TRANSPORT_HEADERS, headers);
}
return response;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:SOAPProviderArgumentBuilder.java
示例5: buildRuntimeModel
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
public SEIModel buildRuntimeModel(QName serviceName, QName portName, Class portInterface, WSDLPort wsdlPort, WebServiceFeatureList features) {
DatabindingFactory fac = DatabindingFactory.newInstance();
DatabindingConfig config = new DatabindingConfig();
config.setContractClass(portInterface);
config.getMappingInfo().setServiceName(serviceName);
config.setWsdlPort(wsdlPort);
config.setFeatures(features);
config.setClassLoader(portInterface.getClassLoader());
config.getMappingInfo().setPortName(portName);
config.setWsdlURL(wsdlURL);
// if ExternalMetadataFeature present, ExternalMetadataReader will be created ...
config.setMetadataReader(getMetadadaReader(features, portInterface.getClassLoader()));
com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);
return rt.getModel();
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:WSServiceDelegate.java
示例6: relateServerResponse
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
public Packet relateServerResponse(@Nullable Packet r, @Nullable WSDLPort wsdlPort, @Nullable SEIModel seiModel, @NotNull WSBinding binding) {
relatePackets(r, false);
r.setState(State.ServerResponse);
AddressingVersion av = binding.getAddressingVersion();
// populate WS-A headers only if WS-A is enabled
if (av == null) {
return r;
}
if (getMessage() == null) {
return r;
}
//populate WS-A headers only if the request has addressing headers
String inputAction = AddressingUtils.getAction(getMessage().getHeaders(), av, binding.getSOAPVersion());
if (inputAction == null) {
return r;
}
// if one-way, then dont populate any WS-A headers
if (r.getMessage() == null || (wsdlPort != null && getMessage().isOneWay(wsdlPort))) {
return r;
}
// otherwise populate WS-Addressing headers
populateAddressingHeaders(binding, r, wsdlPort, seiModel);
return r;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:Packet.java
示例7: addPortExtension
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
@Override
public void addPortExtension(final TypedXmlWriter port) {
LOGGER.entering();
final String portName = (null == seiModel) ? null : seiModel.getPortName().getLocalPart();
selectAndProcessSubject(port, WSDLPort.class, ScopeType.ENDPOINT, portName);
LOGGER.exiting();
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:PolicyWSDLGeneratorExtension.java
示例8: ClientSchemaValidationTube
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
public ClientSchemaValidationTube(WSBinding binding, WSDLPort port, Tube next) {
super(binding, next);
this.port = port;
if (port != null) {
String primaryWsdl = port.getOwner().getParent().getLocation().getSystemId();
MetadataResolverImpl mdresolver = new MetadataResolverImpl();
Map<String, SDDocument> docs = MetadataUtil.getMetadataClosure(primaryWsdl, mdresolver, true);
mdresolver = new MetadataResolverImpl(docs.values());
Source[] sources = getSchemaSources(docs.values(), mdresolver);
for(Source source : sources) {
LOGGER.fine("Constructing client validation schema from = "+source.getSystemId());
//printDOM((DOMSource)source);
}
if (sources.length != 0) {
noValidation = false;
sf.setResourceResolver(mdresolver);
try {
schema = sf.newSchema(sources);
} catch(SAXException e) {
throw new WebServiceException(e);
}
validator = schema.newValidator();
return;
}
}
noValidation = true;
schema = null;
validator = null;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:30,代码来源:ClientSchemaValidationTube.java
示例9: getResponse
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
/**
* Creates {@link Packet} from method invocation's return value
*/
protected Packet getResponse(Packet request, @Nullable T returnValue, WSDLPort port, WSBinding binding) {
Message message = null;
if (returnValue != null) {
message = getResponseMessage(returnValue);
}
Packet response = request.createServerResponse(message,port,null,binding);
return response;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:ProviderArgumentsBuilder.java
示例10: ServerTubeAssemblerContext
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
public ServerTubeAssemblerContext(@Nullable SEIModel seiModel,
@Nullable WSDLPort wsdlModel, @NotNull WSEndpoint endpoint,
@NotNull Tube terminal, boolean isSynchronous) {
this.seiModel = seiModel;
this.wsdlModel = wsdlModel;
this.endpoint = endpoint;
this.terminal = terminal;
// WSBinding is actually BindingImpl
this.binding = (BindingImpl)endpoint.getBinding();
this.isSynchronous = isSynchronous;
this.codec = this.binding.createCodec();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:ServerTubeAssemblerContext.java
示例11: ClientSOAPHandlerTube
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
/**
* Creates a new instance of SOAPHandlerTube
*/
public ClientSOAPHandlerTube(WSBinding binding, WSDLPort port, Tube next) {
super(next, port, binding);
if (binding.getSOAPVersion() != null) {
// SOAPHandlerTube should n't be used for bindings other than SOAP.
// TODO: throw Exception
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:11,代码来源:ClientSOAPHandlerTube.java
示例12: ClientTubeAssemblerContext
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
/**
* This constructor should be used only by JAX-WS Runtime and is not meant for external consumption.
*
* @since JAX-WS 2.2
*/
public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel,
@NotNull WSBindingProvider bindingProvider, @NotNull WSBinding binding,
@NotNull Container container, Codec codec, SEIModel seiModel, Class sei) {
this(address, wsdlModel, (bindingProvider==null? null: bindingProvider.getPortInfo().getOwner()), bindingProvider, binding, container, codec, seiModel, sei);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:ClientTubeAssemblerContext.java
示例13: createServiceResponseForException
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
/**
* This is used by WsaServerTube and WSEndpointImpl to create a Packet with SOAPFault message from a Java exception.
*/
public abstract Packet createServiceResponseForException(final ThrowableContainerPropertySet tc,
final Packet responsePacket,
final SOAPVersion soapVersion,
final WSDLPort wsdlPort,
final SEIModel seiModel,
final WSBinding binding);
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:WSEndpoint.java
示例14: WsaTube
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
public WsaTube(WSDLPort wsdlPort, WSBinding binding, Tube next) {
super(next);
this.wsdlPort = wsdlPort;
this.binding = binding;
addKnownHeadersToBinding(binding);
addressingVersion = binding.getAddressingVersion();
soapVersion = binding.getSOAPVersion();
helper = getTubeHelper();
addressingRequired = AddressingVersion.isRequired(binding);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:WsaTube.java
示例15: WsaTubeHelper
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
public WsaTubeHelper(WSBinding binding, SEIModel seiModel, WSDLPort wsdlPort) {
this.binding = binding;
this.wsdlPort = wsdlPort;
this.seiModel = seiModel;
this.soapVer = binding.getSOAPVersion();
this.addVer = binding.getAddressingVersion();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:WsaTubeHelper.java
示例16: configureModel
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
/**
* Iterates through the ports in the WSDL model, for each policy in the policy
* map that is attached at endpoint scope computes a list of corresponding
* WebServiceFeatures and sets them on the port.
*
* @param model The WSDL model
* @param policyMap The policy map
* @throws PolicyException If the list of WebServiceFeatures could not be computed
*/
public static void configureModel(final WSDLModel model, PolicyMap policyMap) throws PolicyException {
LOGGER.entering(model, policyMap);
for (WSDLService service : model.getServices().values()) {
for (WSDLPort port : service.getPorts()) {
final Collection<WebServiceFeature> features = getPortScopedFeatures(policyMap, service.getName(), port.getName());
for (WebServiceFeature feature : features) {
port.addFeature(feature);
port.getBinding().addFeature(feature);
}
}
}
LOGGER.exiting();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:PolicyUtil.java
示例17: 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();
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:PortInfo.java
示例18: ServerSOAPHandlerTube
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
/**
* Creates a new instance of SOAPHandlerTube
*/
public ServerSOAPHandlerTube(WSBinding binding, WSDLPort port, Tube next) {
super(next, port, binding);
if (binding.getSOAPVersion() != null) {
// SOAPHandlerTube should n't be used for bindings other than SOAP.
// TODO: throw Exception
}
setUpHandlersOnce();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:ServerSOAPHandlerTube.java
示例19: OperationDispatcher
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
public OperationDispatcher(@NotNull WSDLPort wsdlModel, @NotNull WSBinding binding, @Nullable SEIModel seiModel) {
this.binding = binding;
opFinders = new ArrayList<WSDLOperationFinder>();
if (binding.getAddressingVersion() != null) {
opFinders.add(new ActionBasedOperationFinder(wsdlModel, binding, seiModel));
}
opFinders.add(new PayloadQNameBasedOperationFinder(wsdlModel, binding, seiModel));
opFinders.add(new SOAPActionBasedOperationFinder(wsdlModel, binding, seiModel));
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:11,代码来源:OperationDispatcher.java
示例20: buildWsdlPortNames
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; //导入依赖的package包/类
/**
* Lists up the port names in WSDL. For error diagnostics.
*/
private StringBuilder buildWsdlPortNames() {
Set<QName> wsdlPortNames = new HashSet<QName>();
for (WSDLPort port : wsdlService.getPorts()) {
wsdlPortNames.add(port.getName());
}
return buildNameList(wsdlPortNames);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:11,代码来源:WSServiceDelegate.java
注:本文中的com.sun.xml.internal.ws.api.model.wsdl.WSDLPort类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论