Search in sources :

Example 1 with XercesUsageWebService

use of org.jboss.as.test.integration.xerces.ws.XercesUsageWebService in project wildfly by wildfly.

the class XercesUsageInWebServiceTestCase method testXercesUsageInWebService.

/**
     * Test that the webservice invocation works fine
     *
     * @throws Exception
     */
@OperateOnDeployment("webservice-app-with-xerces")
@Test
public void testXercesUsageInWebService() throws Exception {
    final QName serviceName = new QName("org.jboss.as.test.integration.xerces.ws", "XercesUsageWebService");
    final URL wsdlURL = new URL(url.toExternalForm() + "XercesUsageWebService?wsdl");
    final Service service = Service.create(wsdlURL, serviceName);
    final XercesUsageWSEndpoint port = service.getPort(XercesUsageWSEndpoint.class);
    final String xml = "dummy.xml";
    final String result = port.parseUsingXerces(xml);
    Assert.assertEquals("Unexpected return message from webservice", XercesUsageWebService.SUCCESS_MESSAGE, result);
}
Also used : QName(javax.xml.namespace.QName) XercesUsageWebService(org.jboss.as.test.integration.xerces.ws.XercesUsageWebService) Service(javax.xml.ws.Service) XercesUsageWSEndpoint(org.jboss.as.test.integration.xerces.ws.XercesUsageWSEndpoint) URL(java.net.URL) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Test(org.junit.Test)

Aggregations

URL (java.net.URL)1 QName (javax.xml.namespace.QName)1 Service (javax.xml.ws.Service)1 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)1 XercesUsageWSEndpoint (org.jboss.as.test.integration.xerces.ws.XercesUsageWSEndpoint)1 XercesUsageWebService (org.jboss.as.test.integration.xerces.ws.XercesUsageWebService)1 Test (org.junit.Test)1