|
Axis 2 example source code file (RWRound2InteropTest.java)
The Axis 2 RWRound2InteropTest.java source code/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package test.interop.whitemesa.round2; import org.apache.axis2.AxisFault; import org.apache.axiom.soap.SOAPEnvelope; import test.interop.whitemesa.SunClient; import test.interop.whitemesa.SunClientUtil; import test.interop.whitemesa.WhiteMesaConstants; import test.interop.whitemesa.WhiteMesaIneterop; import test.interop.whitemesa.round2.util.GroupbEcho2DStringArrayUtil; import test.interop.whitemesa.round2.util.GroupbEchoNestedArrayUtil; import test.interop.whitemesa.round2.util.GroupbEchoNestedStructUtil; import test.interop.whitemesa.round2.util.GroupbEchoSimpleTypesAsStructUtil; import test.interop.whitemesa.round2.util.GroupbEchoStructAsSimpleTypesUtil; import test.interop.whitemesa.round2.util.GroupcBase64Util; import test.interop.whitemesa.round2.util.GroupcBooleanUtil; import test.interop.whitemesa.round2.util.GroupcEchoStringUtil; import test.interop.whitemesa.round2.util.GroupcFloatArrayUtil; import test.interop.whitemesa.round2.util.GroupcFloatUtil; import test.interop.whitemesa.round2.util.GroupcHexBinaryUtil; import test.interop.whitemesa.round2.util.GroupcIntegerArrayUtil; import test.interop.whitemesa.round2.util.GroupcIntergerUtil; import test.interop.whitemesa.round2.util.GroupcStringArrayUtil; import test.interop.whitemesa.round2.util.GroupcStructArrayUtil; import test.interop.whitemesa.round2.util.GroupcStructUtil; import test.interop.whitemesa.round2.util.GroupcVoidUtil; import test.interop.whitemesa.round2.util.Round2EchoBase64ClientUtil; import test.interop.whitemesa.round2.util.Round2EchoBooleanClientUtil; import test.interop.whitemesa.round2.util.Round2EchoDateClientUtil; import test.interop.whitemesa.round2.util.Round2EchoDecimalClientUtil; import test.interop.whitemesa.round2.util.Round2EchoFloatArrayClientUtil; import test.interop.whitemesa.round2.util.Round2EchoFloatClientUtil; import test.interop.whitemesa.round2.util.Round2EchoHexBinaryClientUtil; import test.interop.whitemesa.round2.util.Round2EchoIntegerArrayclientUtil; import test.interop.whitemesa.round2.util.Round2EchoIntegerClientUtil; import test.interop.whitemesa.round2.util.Round2EchoStringArrayClientUtil; import test.interop.whitemesa.round2.util.Round2EchoStringclientUtil; import test.interop.whitemesa.round2.util.Round2EchoStructArrayClientUtil; import test.interop.whitemesa.round2.util.Round2EchoStructClientUtil; import test.interop.whitemesa.round2.util.Round2EchoVoidClientUtil; import java.io.File; /** * class RWRound2InteropTest * To test Interoperability Axis2 clients vs Rogue Wave Server, Round2 * WSDLs:- * "base" http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest * "Group B" http://soapinterop.roguewave.com:8013/interop2testB/InteropRound2TestB * "Group C" http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC * <p/> * Todo - Group C tests fail. Check the request. */ /** * Following test cases are failing with the Fault: Couldn't find end tag * testR2BaseEchoStringArray, testR2BaseEchoIntegerArray, testR2BaseEchoFloatArray , * testR2GBEcho2DStringArray * */ /** * Test cases that work on float values may fail since the response value is in a different * format. E.g: * request :12.45 * response:1.245000e+01 */ public class RWRound2InteropTest extends WhiteMesaIneterop { SOAPEnvelope retEnv = null; File file = null; String url = ""; String soapAction = ""; String resFilePath = "interop/whitemesa/round2/"; String tempPath = ""; SunClientUtil util; SunClient client = new SunClient(); /** * Round2 * Group Base * operation echoString */ public void testR2BaseEchoString() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoStringclientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseStringRes.xml"; compareXML(retEnv, tempPath); } /** * Round2 * Group Base * operation echoStringArray */ public void testR2BaseEchoStringArray() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoStringArrayClientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseStringArrayRes.xml"; assertR2DefaultEchoStringArrayResult(retEnv); } /** * Round2 * Group Base * operation echoInteger */ public void testR2BaseEchoInteger() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoIntegerClientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseIntegerRes.xml"; assertR2DefaultEchoIntegerResult(retEnv); } /** * Round2 * Group Base * operation echoIntegerArray */ public void testR2BaseEchoIntegerArray() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoIntegerArrayclientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseIntegerArrayRes.xml"; assertR2DefaultEchoIntegerArrayResult(retEnv); } /** * Round2 * Group Base * operation echoFloat */ public void testR2BaseEchoFloat() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoFloatClientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseFloatRes.xml"; assertR2DefaultEchoFloatResult(retEnv); } /** * Round2 * Group Base * operation echoFloatArray */ public void testR2BaseEchoFloatArray() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoFloatArrayClientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseFloatArrayRes.xml"; assertR2DefaultEchoFloatArrayResult(retEnv); } /** * Round2 * Group Base * operation echoStruct */ public void testRBaseEchoStruct() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoStructClientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseStructRes.xml"; assertValueIsInThePayload(retEnv,WhiteMesaConstants.ECHO_STRUCT_INT); assertValueIsInThePayload(retEnv,WhiteMesaConstants.ECHO_STRUCT_FLOAT); assertValueIsInThePayload(retEnv,WhiteMesaConstants.ECHO_STRUCT_STRING); } /** * Round2 * Group Base * operation echoStructArray */ public void testR2BaseEchoStructArray() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoStructArrayClientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseStructArrayRes.xml"; assertR2DefaultEchoStructArrayResult(retEnv); } /** * Round2 * Group Base * operation echoVoid */ public void testR2BaseEchoVoid() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoVoidClientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseVoidRes.xml"; assertR2DefaultEchoVoidResult(retEnv); } /** * Round2 * Group Base * operation echoBase64 */ public void testR2BaseEchoBase64() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoBase64ClientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseBase64Res.xml"; assertR2DefaultEchoBase64Result(retEnv); } /** * Round2 * Group Base * operation echoBase64 */ public void testR2BaseEchoDate() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoDateClientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseDateRes.xml"; assertR2DefaultEchoDateResult(retEnv); } /** * Round2 * Group Base * operation echoHexBinary */ public void testR2BaseEchoHexBinary() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoHexBinaryClientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseHexBinaryRes.xml"; assertR2DefaultEchoHexBinaryResult(retEnv); } /** * Round2 * Group Base * operation echoDecimal */ public void testR2BaseEchoDecimal() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoDecimalClientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseDecimalRes.xml"; assertR2DefaultEchoDecimalResult(retEnv); } /** * Round2 * Group Base * operation echoBoolean */ public void testR2BaseEchoBoolean() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2base/InteropRound2BaseTest"; soapAction = "http://soapinterop.org/"; util = new Round2EchoBooleanClientUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWBaseBooleanRes.xml"; assertR2DefaultEchoBooleanResult(retEnv); } /** * Round2 * Group B * operation echoStructAsSimpleTypes */ public void testR2GBEchoStructAsSimpleTypes() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testB/InteropRound2TestB"; soapAction = "http://soapinterop.org/"; util = new GroupbEchoStructAsSimpleTypesUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupbStructAsSimpleTypesRes.xml"; compareXML(retEnv, tempPath); } /** * Round2 * Group B * operation echoSimpleTypesAsStruct */ public void testR2GBEchoSimpleTypesAsStruct() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testB/InteropRound2TestB"; soapAction = "http://soapinterop.org/"; util = new GroupbEchoSimpleTypesAsStructUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupbSimpletypesAsStructRes.xml"; compareXML(retEnv, tempPath); } /** * Round2 * Group B * operation echo2DStringArray */ public void testR2GBEcho2DStringArray() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testB/InteropRound2TestB"; soapAction = "http://soapinterop.org/"; util = new GroupbEcho2DStringArrayUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupb2DStringArrayRes.xml"; compareXML(retEnv, tempPath); } /** * Round2 * Group B * operation echoNestedStruct */ public void testR2GBEchoNestedStruct() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testB/InteropRound2TestB"; soapAction = "http://soapinterop.org/"; util = new GroupbEchoNestedStructUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupbNestedStructRes.xml"; compareXML(retEnv, tempPath); } /** * Round2 * Group B * operation echoNestedArray */ public void testR2GBEchoNestedArray() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testB/InteropRound2TestB"; soapAction = "http://soapinterop.org/"; util = new GroupbEchoNestedArrayUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupbNestedArrayRes.xml"; compareXML(retEnv, tempPath); } /** * Round2 * Group C * operation echoString */ //Todo - Group C tests fail public void testR2GCEchoString() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC"; soapAction = "http://soapinterop.org/"; util = new GroupcEchoStringUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupcEchoStringRes.xml"; assertR2DefaultEchoStringResult(retEnv); } /** * Round2 * Group C * operation echoInterger */ public void testR2GCEchoInterger() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC"; soapAction = "http://soapinterop.org/"; util = new GroupcIntergerUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupcIntergerRes.xml"; assertR2DefaultEchoIntegerResult(retEnv); } /** * Round2 * Group C * operation echoStringArray */ public void testR2GCEchoStringArray() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC"; soapAction = "http://soapinterop.org/"; util = new GroupcStringArrayUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupcStringArrayRes.xml"; assertR2DefaultEchoStringArrayResult(retEnv); } /** * Round2 * Group C * operation echoIntergerArray */ public void testR2GCEchoIntergerArray() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC"; soapAction = "http://soapinterop.org/"; util = new GroupcIntegerArrayUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupcIntegerArrayRes.xml"; assertR2DefaultEchoIntegerArrayResult(retEnv); } /** * Round2 * Group C * operation echoFloat */ public void testR2GCEchoFloat() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC"; soapAction = "http://soapinterop.org/"; util = new GroupcFloatUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupcFloatRes.xml"; assertR2DefaultEchoFloatResult(retEnv); } /** * Round2 * Group C * operation echoFloatArray */ public void testR2GCEchoFloatArray() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC"; soapAction = "http://soapinterop.org/"; util = new GroupcFloatArrayUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupcFloatArrayRes.xml"; assertR2DefaultEchoFloatArrayResult(retEnv); } /** * Round2 * Group C * operation echoStruct */ public void testR2GCEchoStruct() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC"; soapAction = "http://soapinterop.org/"; util = new GroupcStructUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupcStructRes.xml"; assertR2DefaultEchoStructResult(retEnv); } /** * Round2 * Group C * operation echoStructArray */ public void testR2GCEchoStructArray() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC"; soapAction = "http://soapinterop.org/"; util = new GroupcStructArrayUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupcStructArrayRes.xml"; assertR2DefaultEchoStructArrayResult(retEnv); } /** * Round2 * Group C * operation echoVoid */ public void testR2GCEchoVoid() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC"; soapAction = "http://soapinterop.org/"; util = new GroupcVoidUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupcVoidRes.xml"; assertR2DefaultEchoVoidResult(retEnv); } /** * Round2 * Group C * operation echoBase64 */ public void testR2GCEchoBase64() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC"; soapAction = "http://soapinterop.org/"; util = new GroupcBase64Util(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupcBase64Res.xml"; assertR2DefaultEchoBase64Result(retEnv); } /** * Round2 * Group C * operation echoHexBinary */ public void testR2GCEchoHexBinary() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC"; soapAction = "http://soapinterop.org/"; util = new GroupcHexBinaryUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupcHexBinaryRes.xml"; assertR2DefaultEchoHexBinaryResult(retEnv); } /** * Round2 * Group C * operation echoBoolean */ public void testR2GCEchoBoolean() throws AxisFault { url = "http://soapinterop.roguewave.com:8013/interop2testC/InteropRound2TestC"; soapAction = "http://soapinterop.org/"; util = new GroupcBooleanUtil(); retEnv = client.sendMsg(util, url, soapAction); tempPath = resFilePath + "RWGroupcBooleanRes.xml"; assertR2DefaultEchoBooleanResult(retEnv); } } Other Axis 2 examples (source code examples)Here is a short list of links related to this Axis 2 RWRound2InteropTest.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.