Exemplo n.º 1
0
  @Test(
      groups = {"wso2.esb"},
      description =
          "Do transformation with a Payload Format that has arguments - Argument Type : Value")
  public void transformPayloadByArgsValue() throws AxisFault {
    OMElement response;

    response =
        axis2Client.sendSimpleStockQuoteRequest(
            getMainSequenceURL(), "http://localhost:9000/services/SimpleStockQuoteService", "IBM");
    assertTrue(response.toString().contains("WSO2"), "Symbol WSO2 not found in response message");
  }
Exemplo n.º 2
0
  @Test(
      priority = 1,
      groups = {"wso2.esb"},
      description = "Append text to port",
      dataProvider = "addressingUrl")
  public void appendPort(String addUrl) throws AxisFault {
    OMElement response;

    response =
        axis2Client.sendSimpleStockQuoteRequest(
            getProxyServiceURL("urlRewriteProxy", false), addUrl, "IBM");
    assertTrue(response.toString().contains("IBM"));
  }
Exemplo n.º 3
0
 @Test(
     groups = {"wso2.esb"},
     description = "Creating SOAP1.1 fault messages as Response false")
 public void testSOAP11FaultAttributeResponseFalse() throws AxisFault {
   OMElement response;
   try {
     response = axis2Client.sendSimpleStockQuoteRequest(getMainSequenceURL(), null, "WSO2");
     fail("This query must throw an exception.");
   } catch (AxisFault expected) {
     log.info("Test passed with Fault Message : " + expected.getMessage());
     assertEquals(expected.getMessage(), "Read timed out", "Message mismatched");
   }
 }
Exemplo n.º 4
0
 @Test(
     groups = {"wso2.esb"},
     description = "Creating SOAP1.2 fault node")
 public void testSOAP12FaultNode() throws AxisFault {
   OMElement response;
   try {
     response =
         axis2Client.sendSimpleStockQuoteRequest(
             getMainSequenceURL(), "http://localhost:9010/services/NonExistingService", "WSO2");
     fail("This query must throw an exception.");
   } catch (AxisFault expected) {
     log.info("Test passed with Fault Message : " + expected.getMessage());
     assertTrue(expected.getReason().contains("Connection refused"), "ERROR Message mismatched");
     assertEquals(
         expected.getFaultCode().getLocalPart(), "VersionMismatch", "Fault code value mismatched");
     assertEquals(
         expected.getFaultCode().getPrefix(), "soap12Env", "Fault code prefix mismatched");
     assertEquals(
         expected.getFaultNodeElement().getNodeValue(),
         "automation-node",
         "Fault node mismatched");
   }
 }
Exemplo n.º 5
0
 @Override
 protected void cleanup() {
   super.cleanup();
   axis2Client.destroy();
 }