use of javax.xml.ws.wsaddressing.W3CEndpointReference in project cxf by apache.
the class BankImpl method createEprAccount.
public W3CEndpointReference createEprAccount(String accountName) {
System.out.println("[Bank] Called createEprAccount( " + accountName + " )...");
System.out.println();
W3CEndpointReference ref = createAccountReference(accountName);
if (ref != null) {
accountList.put(accountName, ref);
}
return ref;
}
use of javax.xml.ws.wsaddressing.W3CEndpointReference in project cxf by apache.
the class BankImpl method createAccount.
public W3CEndpointReference createAccount(String accountName) {
System.out.println("[Bank] Called createAccount( " + accountName + " )...");
System.out.println();
W3CEndpointReference ref = null;
ref = createAccountReference(accountName);
if (ref != null) {
accountList.put(accountName, ref);
}
return ref;
}
use of javax.xml.ws.wsaddressing.W3CEndpointReference in project cxf by apache.
the class ProviderImplTest method testCreateW3CEprNoMetadata.
@org.junit.Test
public void testCreateW3CEprNoMetadata() throws Exception {
ProviderImpl impl = new ProviderImpl();
W3CEndpointReference w3Epr = impl.createW3CEndpointReference("http://myaddress", null, null, null, null, null, null, null, null);
java.io.StringWriter sw = new java.io.StringWriter();
StreamResult result = new StreamResult(sw);
w3Epr.writeTo(result);
assertTrue("Address is expected", sw.toString().contains("Address"));
assertFalse("empty Metadata element should be dropped", sw.toString().contains("Metadata"));
}
use of javax.xml.ws.wsaddressing.W3CEndpointReference in project cxf by apache.
the class ProviderImplTest method testCreateW3CEprNoMetadataEmptyCustomMetadata.
@org.junit.Test
public void testCreateW3CEprNoMetadataEmptyCustomMetadata() throws Exception {
ProviderImpl impl = new ProviderImpl();
W3CEndpointReference w3Epr = impl.createW3CEndpointReference("http://myaddress", null, null, new ArrayList<>(), null, null);
java.io.StringWriter sw = new java.io.StringWriter();
StreamResult result = new StreamResult(sw);
w3Epr.writeTo(result);
assertTrue("Address is expected", sw.toString().contains("Address"));
assertFalse("empty Metadata element should be dropped", sw.toString().contains("Metadata"));
}
use of javax.xml.ws.wsaddressing.W3CEndpointReference in project cxf by apache.
the class ProviderImplTest method testCreateW3CEpr.
@org.junit.Test
public void testCreateW3CEpr() throws Exception {
QName serviceName = new QName("http://cxf.apache.org", "ServiceName");
QName portName = new QName("http://cxf.apache.org", "PortName");
ProviderImpl impl = new ProviderImpl();
W3CEndpointReference w3Epr = impl.createW3CEndpointReference("http://myaddress", serviceName, portName, null, "wsdlLoc", null);
java.io.StringWriter sw = new java.io.StringWriter();
StreamResult result = new StreamResult(sw);
w3Epr.writeTo(result);
String expected = "<wsdl:definitions";
assertTrue("Embeded wsdl element is not generated", sw.toString().indexOf(expected) > -1);
assertTrue("wsdlLocation attribute has the wrong value", sw.toString().contains(":wsdlLocation=\"http://cxf.apache.org wsdlLoc\""));
}
Aggregations