use of jakarta.xml.ws.wsaddressing.W3CEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class HelloLiteralTest method testDispatchGetW3CEPRFromClass.
public void testDispatchGetW3CEPRFromClass() {
EndpointReference epr = ((BindingProvider) getDispatchSOAPMessage()).getEndpointReference(W3CEndpointReference.class);
assertTrue(epr != null);
assertTrue(epr instanceof W3CEndpointReference);
}
use of jakarta.xml.ws.wsaddressing.W3CEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class HelloLiteralTest method testGetEPRMethodNoArg.
public void testGetEPRMethodNoArg() {
EndpointReference epr = ((BindingProvider) stub).getEndpointReference();
assertTrue(epr != null);
assertTrue(epr instanceof W3CEndpointReference);
}
use of jakarta.xml.ws.wsaddressing.W3CEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class HelloLiteralTest method testDispatchGetEPRMethodNoArg.
// functionality above needs to be clarified
public void testDispatchGetEPRMethodNoArg() {
EndpointReference epr = ((BindingProvider) getDispatchJAXB()).getEndpointReference();
assertTrue(epr != null);
assertTrue(epr instanceof W3CEndpointReference);
}
use of jakarta.xml.ws.wsaddressing.W3CEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class ClientEprTest method msEprGettertest.
private void msEprGettertest(BindingProvider bp, boolean hasWSDL) throws Exception {
Service service = Service.create(serviceName);
service.addPort(portName, jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
Dispatch dispatch = service.createDispatch(portName, Source.class, Service.Mode.PAYLOAD);
// validate ms epr
MemberSubmissionEndpointReference msEpr = bp.getEndpointReference(MemberSubmissionEndpointReference.class);
// printEPR(msEpr);
assertTrue(EprUtil.validateEPR(msEpr, endpointAddress, serviceName, portName, portTypeName, hasWSDL));
W3CEndpointReference w3cEpr = bp.getEndpointReference(W3CEndpointReference.class);
// printEPR(w3cEpr);
// assertTrue(EprUtil.validateEPR(w3cEpr,endpointAddress, serviceName, portName, portTypeName, hasWSDL));
assertTrue(EprUtil.validateEPR(w3cEpr, endpointAddress, null, null, null, false));
}
use of jakarta.xml.ws.wsaddressing.W3CEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class EprMarshalUnmarshalTest method testW3CEprMarshalling.
public void testW3CEprMarshalling() throws Exception {
JAXBContext ctx = JAXBContext.newInstance(W3CEndpointReference.class);
JAXBResult res = new JAXBResult(ctx);
W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
builder.address("http://example.com");
W3CEndpointReference epr = builder.build();
// You will get the NPE
epr.writeTo(res);
}
Aggregations