use of jakarta.xml.ws.soap.AddressingFeature in project metro-jax-ws by eclipse-ee4j.
the class W3CAddressingWSDLParserExtension method addressibleElement.
private boolean addressibleElement(XMLStreamReader reader, WSDLFeaturedObject binding) {
QName ua = reader.getName();
if (ua.equals(AddressingVersion.W3C.wsdlExtensionTag)) {
String required = reader.getAttributeValue(WSDLConstants.NS_WSDL, "required");
binding.addFeature(new AddressingFeature(true, Boolean.parseBoolean(required)));
XMLStreamReaderUtil.skipElement(reader);
// UsingAddressing is consumed
return true;
}
return false;
}
use of jakarta.xml.ws.soap.AddressingFeature in project metro-jax-ws by eclipse-ee4j.
the class W3CAddressingWSDLGeneratorExtension method start.
@Override
public void start(WSDLGenExtnContext ctxt) {
WSBinding binding = ctxt.getBinding();
TypedXmlWriter root = ctxt.getRoot();
enabled = binding.isFeatureEnabled(AddressingFeature.class);
if (!enabled)
return;
AddressingFeature ftr = binding.getFeature(AddressingFeature.class);
required = ftr.isRequired();
root._namespace(AddressingVersion.W3C.wsdlNsUri, AddressingVersion.W3C.getWsdlPrefix());
}
use of jakarta.xml.ws.soap.AddressingFeature in project metro-jax-ws by eclipse-ee4j.
the class FeatureListValidatorTest method testAddsAddressing.
public void testAddsAddressing() {
BindingImpl binding = BindingImpl.create(BindingID.SOAP11_HTTP, new WebServiceFeature[] { new AddsAddressingFeature() });
assertTrue("AddressingFeature must be enabled because AddsAddressingFeature was passed", binding.isFeatureEnabled(AddressingFeature.class));
}
use of jakarta.xml.ws.soap.AddressingFeature in project metro-jax-ws by eclipse-ee4j.
the class FeatureListValidatorTest method testAddsAddressingAlreadyPresent.
public void testAddsAddressingAlreadyPresent() {
BindingImpl binding = BindingImpl.create(BindingID.SOAP11_HTTP, new WebServiceFeature[] { new AddsAddressingFeature(), new AddressingFeature() });
assertTrue("AddressingFeature must be enabled because AddsAddressingFeature was passed", binding.isFeatureEnabled(AddressingFeature.class));
}
use of jakarta.xml.ws.soap.AddressingFeature in project metro-jax-ws by eclipse-ee4j.
the class WSServiceDelegate method createDispatch.
protected Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) {
WSEndpointReference wsepr = null;
boolean isAddressingEnabled = false;
AddressingFeature af = features.get(AddressingFeature.class);
if (af == null) {
af = this.features.get(AddressingFeature.class);
}
if (af != null && af.isEnabled())
isAddressingEnabled = true;
MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class);
if (msa == null) {
msa = this.features.get(MemberSubmissionAddressingFeature.class);
}
if (msa != null && msa.isEnabled())
isAddressingEnabled = true;
if (isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) {
wsepr = wsdlService.get(portName).getEPR();
}
return createDispatch(portName, wsepr, jaxbContext, mode, features);
}
Aggregations