コード例 #1
0
  public void test13Soap12TestRpcPortEchoDate() throws Exception {
    test.wsdl.soap12.assertion.Soap12TestRpcBindingStub binding;
    try {
      binding =
          (test.wsdl.soap12.assertion.Soap12TestRpcBindingStub)
              new test.wsdl.soap12.assertion.WhiteMesaSoap12TestSvcLocator().getSoap12TestRpcPort();
    } catch (javax.xml.rpc.ServiceException jre) {
      if (jre.getLinkedCause() != null) jre.getLinkedCause().printStackTrace();
      throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
    }
    assertNotNull("binding is null", binding);

    // Time out after a minute
    binding.setTimeout(60000);

    java.util.Calendar input = java.util.Calendar.getInstance();
    input.setTimeZone(TimeZone.getTimeZone("GMT"));
    input.set(Calendar.MILLISECOND, 0);

    java.util.Calendar output = null;
    output = binding.echoDate(input);
    output.setTimeZone(TimeZone.getTimeZone("GMT"));
    assertEquals(input, output);
  }