Search in sources :

Example 1 with LocatorService_Service

use of org.apache.locator.LocatorService_Service in project cxf by apache.

the class LocatorClientServerTest method testLookupEndpointAndVerifyWsdlLocationOnly.

@Test
public void testLookupEndpointAndVerifyWsdlLocationOnly() throws Exception {
    URL wsdl = getClass().getResource("/wsdl/locator.wsdl");
    assertNotNull(wsdl);
    LocatorService_Service ss = new LocatorService_Service(wsdl, serviceName);
    LocatorService port = ss.getLocatorServicePort();
    updateAddressPort(port, PORT);
    W3CEndpointReference epr = port.lookupEndpoint(new QName("http://service/2", "Number"));
    String eprString = epr.toString();
    assertTrue(eprString.contains("Metadata"));
    assertTrue(eprString.contains("wsdlLocation=\"wsdlLoc\""));
}
Also used : LocatorService_Service(org.apache.locator.LocatorService_Service) W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) QName(javax.xml.namespace.QName) LocatorService(org.apache.locator.LocatorService) URL(java.net.URL) Test(org.junit.Test)

Example 2 with LocatorService_Service

use of org.apache.locator.LocatorService_Service in project cxf by apache.

the class LocatorClientServerTest method testLookupEndpointAndVerifyWsdlLocationAndNamespace.

@Test
public void testLookupEndpointAndVerifyWsdlLocationAndNamespace() throws Exception {
    URL wsdl = getClass().getResource("/wsdl/locator.wsdl");
    assertNotNull(wsdl);
    LocatorService_Service ss = new LocatorService_Service(wsdl, serviceName);
    LocatorService port = ss.getLocatorServicePort();
    updateAddressPort(port, PORT);
    W3CEndpointReference epr = port.lookupEndpoint(new QName("http://service/1", "Number"));
    String eprString = epr.toString();
    assertTrue(eprString.contains("Metadata"));
    assertTrue(eprString.contains("wsdlLocation=\"http://service/1 wsdlLoc\""));
}
Also used : LocatorService_Service(org.apache.locator.LocatorService_Service) W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) QName(javax.xml.namespace.QName) LocatorService(org.apache.locator.LocatorService) URL(java.net.URL) Test(org.junit.Test)

Aggregations

URL (java.net.URL)2 QName (javax.xml.namespace.QName)2 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)2 LocatorService (org.apache.locator.LocatorService)2 LocatorService_Service (org.apache.locator.LocatorService_Service)2 Test (org.junit.Test)2