use of com.sun.xml.ws.api.addressing.AddressingVersion in project metro-jax-ws by eclipse-ee4j.
the class DispatchImpl method dumpParam.
private void dumpParam(T param, String method) {
if (param instanceof Packet) {
Packet message = (Packet) param;
String action;
String msgId;
if (LOGGER.isLoggable(Level.FINE)) {
AddressingVersion av = DispatchImpl.this.getBinding().getAddressingVersion();
SOAPVersion sv = DispatchImpl.this.getBinding().getSOAPVersion();
action = av != null && message.getMessage() != null ? AddressingUtils.getAction(message.getMessage().getHeaders(), av, sv) : null;
msgId = av != null && message.getMessage() != null ? AddressingUtils.getMessageID(message.getMessage().getHeaders(), av, sv) : null;
LOGGER.fine("In DispatchImpl." + method + " for message with action: " + action + " and msg ID: " + msgId + " msg: " + message.getMessage());
if (message.getMessage() == null) {
LOGGER.fine("Dispatching null message for action: " + action + " and msg ID: " + msgId);
}
}
}
}
use of com.sun.xml.ws.api.addressing.AddressingVersion in project metro-jax-ws by eclipse-ee4j.
the class BindingImpl method getAddressingVersion.
public AddressingVersion getAddressingVersion() {
AddressingVersion addressingVersion;
if (features.isEnabled(AddressingFeature.class))
addressingVersion = AddressingVersion.W3C;
else if (features.isEnabled(MemberSubmissionAddressingFeature.class))
addressingVersion = AddressingVersion.MEMBER;
else
addressingVersion = null;
return addressingVersion;
}
use of com.sun.xml.ws.api.addressing.AddressingVersion in project metro-jax-ws by eclipse-ee4j.
the class WsaTube method addKnownHeadersToBinding.
private void addKnownHeadersToBinding(WSBinding binding) {
for (AddressingVersion addrVersion : AddressingVersion.values()) {
binding.addKnownHeader(addrVersion.actionTag);
binding.addKnownHeader(addrVersion.faultDetailTag);
binding.addKnownHeader(addrVersion.faultToTag);
binding.addKnownHeader(addrVersion.fromTag);
binding.addKnownHeader(addrVersion.messageIDTag);
binding.addKnownHeader(addrVersion.relatesToTag);
binding.addKnownHeader(addrVersion.replyToTag);
binding.addKnownHeader(addrVersion.toTag);
}
}
use of com.sun.xml.ws.api.addressing.AddressingVersion in project metro-jax-ws by eclipse-ee4j.
the class AddNumbersClient method testMissingActionWithWSDL.
public void testMissingActionWithWSDL() throws Exception {
try {
WebServiceFeature[] features = new WebServiceFeature[] { new AddressingFeature(false) };
Dispatch dispatch = createDispatchWithWSDL(features);
BindingImpl binding = (BindingImpl) dispatch.getBinding();
AddressingVersion addressingVersion = AddressingVersion.fromBinding(binding);
System.out.println("Addressing version is " + addressingVersion);
assertFalse(AddressingVersion.isEnabled(binding));
WsaUtils.invoke(dispatch, WsaUtils.MISSING_ACTION_MESSAGE, WsaUtils.S11_NS, WsaUtils.W3C_WSA_NS, getAddress(), W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS);
fail("SOAPFaultException must be thrown");
} catch (SOAPFaultException sfe) {
assertFault(sfe, W3CAddressingConstants.MAP_REQUIRED_QNAME);
}
}
use of com.sun.xml.ws.api.addressing.AddressingVersion in project metro-jax-ws by eclipse-ee4j.
the class WSEndpointImpl method getEndpointReference.
@Override
public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, String address, String wsdlAddress, List<Element> metadata, List<Element> referenceParameters) {
QName portType = null;
if (port != null) {
portType = port.getBinding().getPortTypeName();
}
AddressingVersion av = AddressingVersion.fromSpecClass(clazz);
return new WSEndpointReference(av, address, serviceName, portName, portType, metadata, wsdlAddress, referenceParameters, endpointReferenceExtensions.values(), null).toSpec(clazz);
}
Aggregations