use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class WSEndpointReferenceTest method testCreateViaBuffer.
public void testCreateViaBuffer() throws Exception {
WSEndpointReference epr = createEPR();
System.out.println(epr.toString());
}
use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class WseprTest method testMetadataWithNullParams.
/**
* Empty Metadata element should not exsit in EndpointReference element.
* @throws Exception
*/
public void testMetadataWithNullParams() throws Exception {
WSEndpointReference wSEndpointReference = new WSEndpointReference(AddressingVersion.W3C, address, null, null, null, null, null, referenceParameters);
Node md = string2Doc(wSEndpointReference.toString(), "wsa:Metadata");
validateEndpointReference(wSEndpointReference.toString());
assertNull("EndpointReference element should not contain empty Metadata element.", md);
}
use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class WseprTest method testReferenceParameters.
/**
* Empty ReferenceParameters element should not exist in EndpointReference element.
* @throws Exception
*/
public void testReferenceParameters() throws Exception {
WSEndpointReference wSEndpointReference = new WSEndpointReference(AddressingVersion.W3C, address, serviceName, portName, portTypeName, null, null, referenceParameters);
Node epr = string2Doc(wSEndpointReference.toString(), "wsa:ReferenceParameters");
validateEndpointReference(wSEndpointReference.toString());
assertNull("EndpointReference element should not contain empty ReferenceParameters element.", epr);
}
use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class EprExtensionsContributorTest method testEprInPublishedWSDL.
/**
* Tests the published wsdl for EPR extensions
* @throws Exception
*/
public void testEprInPublishedWSDL() throws Exception {
HelloService service = new HelloService();
Hello hello = service.getHelloPort();
WSDLPort wsdlModel = ((WSBindingProvider) hello).getPortInfo().getPort();
WSEndpointReference wsdlepr = wsdlModel.getExtension(WSEndpointReference.class);
assertTrue(wsdlepr.getEPRExtensions().size() == 2);
WSEndpointReference.EPRExtension idExtn = wsdlepr.getEPRExtension(new QName("http://example.com/addressingidentity", "Identity"));
assertTrue(idExtn != null && idExtn.getQName().equals(new QName("http://example.com/addressingidentity", "Identity")));
}
use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class EPRWriteNReadTest method test1.
public void test1() throws Exception {
URL fileurl = getResource("hello_literal_identity1.wsdl");
WSDLModel doc = RuntimeWSDLParser.parse(fileurl, new StreamSource(fileurl.toExternalForm()), getResolver(), true, null);
WSDLService service = doc.getService(new QName("urn:test", "Hello"));
WSDLPort port = service.getFirstPort();
WSEndpointReference wsepr = port.getExtension(WSEndpointReference.class);
verifyEPR(wsepr);
}
Aggregations