use of javax.xml.ws.EndpointReference in project cxf by apache.
the class EndpointReferenceTest method testEndpointGetEndpointReferenceW3C.
@Test
public void testEndpointGetEndpointReferenceW3C() throws Exception {
GreeterImpl greeter = new GreeterImpl();
try (EndpointImpl endpoint = new EndpointImpl(getBus(), greeter, (String) null)) {
endpoint.publish("http://localhost:8080/test");
InputStream is = getClass().getResourceAsStream("resources/hello_world_soap_http_infoset.xml");
Document doc = StaxUtils.read(is);
Element referenceParameters = fetchElementByNameAttribute(doc.getDocumentElement(), "wsa:ReferenceParameters", "");
EndpointReference endpointReference = endpoint.getEndpointReference(W3CEndpointReference.class, referenceParameters);
assertNotNull(endpointReference);
assertTrue(endpointReference instanceof W3CEndpointReference);
// A returned W3CEndpointReferenceMUST also contain the specified referenceParameters.
// W3CEndpointReference wer = (W3CEndpointReference)endpointReference;
endpoint.stop();
}
}
Aggregations