assertTrue(endpointReference instanceof W3CEndpointReference);
}
@Test
public void testProviderCreateW3CEndpointReference() throws Exception {
ProviderImpl provider = new ProviderImpl();
InputStream is = getClass().getResourceAsStream("resources/hello_world_soap_http_infoset.xml");
Document doc = XMLUtils.parse(is);
Element referenceParameter = XMLUtils.fetchElementByNameAttribute(doc.getDocumentElement(),
"wsa:ReferenceParameters",
"");
List<Element> referenceParameters = new ArrayList<Element>();
if (referenceParameter != null) {
referenceParameters.add(referenceParameter);
}
Element metadata = XMLUtils.fetchElementByNameAttribute(doc.getDocumentElement(), "wsa:metadata", "");
List<Element> metadataList = new ArrayList<Element>();
if (metadata != null) {
metadataList.add(metadata);
}
W3CEndpointReference endpointReference = provider
.createW3CEndpointReference("http://localhost:8080/test", serviceName, portName, metadataList,
"wsdlDocumentLocation", referenceParameters);
assertNotNull(endpointReference);
}