Search in sources :

Example 1 with HeaderTester

use of org.apache.headers.HeaderTester in project cxf by apache.

the class ClientServerXMLTest method testXMLBindingOfSoapHeaderWSDL.

@Test
public void testXMLBindingOfSoapHeaderWSDL() throws Exception {
    XMLHeaderService service = new XMLHeaderService();
    HeaderTester port = service.getXMLPort9000();
    updateAddressPort(port, REG_PORT);
    try {
        verifyInHeader(port);
        verifyInOutHeader(port);
        verifyOutHeader(port);
    } catch (UndeclaredThrowableException ex) {
        throw (Exception) ex.getCause();
    }
}
Also used : XMLHeaderService(org.apache.headers.XMLHeaderService) HeaderTester(org.apache.headers.HeaderTester) UndeclaredThrowableException(java.lang.reflect.UndeclaredThrowableException) Test(org.junit.Test)

Example 2 with HeaderTester

use of org.apache.headers.HeaderTester in project cxf by apache.

the class Client method main.

public static void main(String[] args) throws Exception {
    if (args.length == 0) {
        System.out.println("please specify wsdl");
        System.exit(1);
    }
    URL wsdlURL;
    File wsdlFile = new File(args[0]);
    if (wsdlFile.exists()) {
        wsdlURL = wsdlFile.toURI().toURL();
    } else {
        wsdlURL = new URL(args[0]);
    }
    HeaderService hs = new HeaderService(wsdlURL, SERVICE_NAME);
    HeaderTester proxy = hs.getSoapPort();
    invokeInHeader(proxy);
    invokeOutHeader(proxy);
    invokeInOutHeader(proxy);
}
Also used : HeaderService(org.apache.headers.HeaderService) HeaderTester(org.apache.headers.HeaderTester) File(java.io.File) URL(java.net.URL)

Aggregations

HeaderTester (org.apache.headers.HeaderTester)2 File (java.io.File)1 UndeclaredThrowableException (java.lang.reflect.UndeclaredThrowableException)1 URL (java.net.URL)1 HeaderService (org.apache.headers.HeaderService)1 XMLHeaderService (org.apache.headers.XMLHeaderService)1 Test (org.junit.Test)1