本文整理汇总了Java中com.sun.xml.internal.ws.api.model.SEIModel类的典型用法代码示例。如果您正苦于以下问题:Java SEIModel类的具体用法?Java SEIModel怎么用?Java SEIModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SEIModel类属于com.sun.xml.internal.ws.api.model包,在下文中一共展示了SEIModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createServiceResponseForException
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的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;
}
示例2: populateAddressingHeaders
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的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));
}
示例3: update
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的package包/类
/**
* Puts an addressing policy into the PolicyMap if the addressing feature was set.
*/
public Collection<PolicySubject> update(final PolicyMap policyMap, final SEIModel model, final WSBinding wsBinding)
throws PolicyException {
LOGGER.entering(policyMap, model, wsBinding);
Collection<PolicySubject> subjects = new ArrayList<PolicySubject>();
if (policyMap != null) {
final AddressingFeature addressingFeature = wsBinding.getFeature(AddressingFeature.class);
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest("addressingFeature = " + addressingFeature);
}
if ((addressingFeature != null) && addressingFeature.isEnabled()) {
//add wsam:Addrressing assertion if not exists.
addWsamAddressing(subjects, policyMap, model, addressingFeature);
}
} // endif policy map not null
LOGGER.exiting(subjects);
return subjects;
}
示例4: createPipeline
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的package包/类
/**
* Creates a new pipeline for the given port name.
*/
private Tube createPipeline(WSPortInfo portInfo, WSBinding binding) {
//Check all required WSDL extensions are understood
checkAllWSDLExtensionsUnderstood(portInfo, binding);
SEIModel seiModel = null;
Class sei = null;
if (portInfo instanceof SEIPortInfo) {
SEIPortInfo sp = (SEIPortInfo) portInfo;
seiModel = sp.model;
sei = sp.sei;
}
BindingID bindingId = portInfo.getBindingId();
TubelineAssembler assembler = TubelineAssemblerFactory.create(
Thread.currentThread().getContextClassLoader(), bindingId, owner.getContainer());
if (assembler == null) {
throw new WebServiceException("Unable to process bindingID=" + bindingId); // TODO: i18n
}
return assembler.createClient(
new ClientTubeAssemblerContext(
portInfo.getEndpointAddress(),
portInfo.getPort(),
this, binding, owner.getContainer(), ((BindingImpl) binding).createCodec(), seiModel, sei));
}
示例5: buildRuntimeModel
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的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();
}
示例6: update
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的package包/类
/**
* Generates an MTOM policy if MTOM is enabled.
*
* <ol>
* <li>If MTOM is enabled
* <ol>
* <li>If MTOM policy does not already exist, generate
* <li>Otherwise do nothing
* </ol>
* <li>Otherwise, do nothing (that implies that we do not remove any MTOM policies if MTOM is disabled)
* </ol>
*
*/
public Collection<PolicySubject> update(PolicyMap policyMap, SEIModel model, WSBinding wsBinding) throws PolicyException {
LOGGER.entering(policyMap, model, wsBinding);
Collection<PolicySubject> subjects = new ArrayList<PolicySubject>();
if (policyMap != null) {
final MTOMFeature mtomFeature = wsBinding.getFeature(MTOMFeature.class);
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest("mtomFeature = " + mtomFeature);
}
if ((mtomFeature != null) && mtomFeature.isEnabled()) {
final QName bindingName = model.getBoundPortTypeName();
final WsdlBindingSubject wsdlSubject = WsdlBindingSubject.createBindingSubject(bindingName);
final Policy mtomPolicy = createMtomPolicy(bindingName);
final PolicySubject mtomPolicySubject = new PolicySubject(wsdlSubject, mtomPolicy);
subjects.add(mtomPolicySubject);
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.fine("Added MTOM policy with ID \"" + mtomPolicy.getIdOrName() + "\" to binding element \"" + bindingName + "\"");
}
}
} // endif policy map not null
LOGGER.exiting(subjects);
return subjects;
}
示例7: relateServerResponse
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的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;
}
示例8: ServerTubeAssemblerContext
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的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();
}
示例9: createServiceResponseForException
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的package包/类
@Override
public Packet createServiceResponseForException(final ThrowableContainerPropertySet tc,
final Packet responsePacket,
final SOAPVersion soapVersion,
final WSDLPort wsdlPort,
final SEIModel seiModel,
final WSBinding binding)
{
return wsEndpoint.createServiceResponseForException(tc, responsePacket, soapVersion,
wsdlPort, seiModel, binding);
}
示例10: createServiceResponseForException
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的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);
示例11: WSEndpointImpl
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的package包/类
protected WSEndpointImpl(@NotNull QName serviceName, @NotNull QName portName, WSBinding binding, Container container,
SEIModel seiModel, WSDLPort port,
Tube masterTubeline) {
this.serviceName = serviceName;
this.portName = portName;
this.binding = binding;
this.soapVersion = binding.getSOAPVersion();
this.container = container;
this.endpointPolicy = null;
this.port = port;
this.seiModel = seiModel;
this.serviceDef = null;
this.implementationClass = null;
this.masterTubeline = masterTubeline;
this.masterCodec = ((BindingImpl) this.binding).createCodec();
LazyMOMProvider.INSTANCE.registerEndpoint(this);
initManagedObjectManager();
this.operationDispatcher = (port == null) ? null : new OperationDispatcher(port, binding, seiModel);
this.context = new ServerPipeAssemblerContext(
seiModel, port, this, null /* not known */, false);
tubePool = new TubePool(masterTubeline);
engine = new Engine(toString(), container);
wsdlProperties = (port == null) ? new WSDLDirectProperties(serviceName, portName, seiModel) : new WSDLPortProperties(port, seiModel);
}
示例12: addWsamAddressing
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的package包/类
private void addWsamAddressing(Collection<PolicySubject> subjects, PolicyMap policyMap, SEIModel model, AddressingFeature addressingFeature)
throws PolicyException {
final QName bindingName = model.getBoundPortTypeName();
final WsdlBindingSubject wsdlSubject = WsdlBindingSubject.createBindingSubject(bindingName);
final Policy addressingPolicy = createWsamAddressingPolicy(bindingName, addressingFeature);
final PolicySubject addressingPolicySubject = new PolicySubject(wsdlSubject, addressingPolicy);
subjects.add(addressingPolicySubject);
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.fine("Added addressing policy with ID \"" + addressingPolicy.getIdOrName() + "\" to binding element \"" + bindingName + "\"");
}
}
示例13: MessageHandlerContextImpl
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的package包/类
public MessageHandlerContextImpl(@Nullable SEIModel seiModel, WSBinding binding, @Nullable WSDLPort wsdlModel, Packet packet, Set<String> roles) {
super(packet);
this.seiModel = seiModel;
this.binding = binding;
this.wsdlModel = wsdlModel;
this.roles = roles;
}
示例14: ServerSchemaValidationTube
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的package包/类
public ServerSchemaValidationTube(WSEndpoint endpoint, WSBinding binding,
SEIModel seiModel, WSDLPort wsdlPort, Tube next) {
super(binding, next);
this.seiModel = seiModel;
this.wsdlPort = wsdlPort;
if (endpoint.getServiceDefinition() != null) {
MetadataResolverImpl mdresolver = new MetadataResolverImpl(endpoint.getServiceDefinition());
Source[] sources = getSchemaSources(endpoint.getServiceDefinition(), mdresolver);
for(Source source : sources) {
LOGGER.fine("Constructing service 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;
}
示例15: UsesJAXBContextFeature
import com.sun.xml.internal.ws.api.model.SEIModel; //导入依赖的package包/类
/**
* Creates {@link UsesJAXBContextFeature}.
* This version allows you to create {@link JAXBRIContext} upfront and uses it.
*/
public UsesJAXBContextFeature(@Nullable final JAXBRIContext context) {
this.factory = new JAXBContextFactory() {
@NotNull
public JAXBRIContext createJAXBContext(@NotNull SEIModel sei, @NotNull List<Class> classesToBind, @NotNull List<TypeReference> typeReferences) throws JAXBException {
return context;
}
};
}