Search in sources :

Example 1 with StructWithSubstitutionGroupAbstract

use of org.apache.type_test.types3.StructWithSubstitutionGroupAbstract in project cxf by apache.

the class AbstractTypeTestClient2 method equals.

// org.apache.type_test.types3.StructWithSubstitutionGroupAbstract
protected boolean equals(StructWithSubstitutionGroupAbstract x, StructWithSubstitutionGroupAbstract y) {
    if (x.getSg03AbstractBaseElementA() != null && y.getSg03AbstractBaseElementA() != null) {
        SgBaseTypeA xTypeA = x.getSg03AbstractBaseElementA().getValue();
        SgBaseTypeA yTypeA = y.getSg03AbstractBaseElementA().getValue();
        return equals(xTypeA, yTypeA);
    }
    return false;
}
Also used : SgBaseTypeA(org.apache.type_test.types3.SgBaseTypeA)

Example 2 with StructWithSubstitutionGroupAbstract

use of org.apache.type_test.types3.StructWithSubstitutionGroupAbstract in project cxf by apache.

the class AbstractTypeTestClient2 method testStructWithSubstitutionGroupAbstract.

@Test
public void testStructWithSubstitutionGroupAbstract() throws Exception {
    if (!shouldRunTest("StructWithSubstitutionGroupAbstract")) {
        return;
    }
    SgDerivedTypeB derivedB = new SgDerivedTypeB();
    derivedB.setVarInt(new BigInteger("32"));
    derivedB.setVarString("foo");
    ObjectFactory objectFactory = new ObjectFactory();
    JAXBElement<SgDerivedTypeB> elementB = objectFactory.createSg03DerivedElementB(derivedB);
    SgDerivedTypeC derivedC = new SgDerivedTypeC();
    derivedC.setVarInt(new BigInteger("32"));
    derivedC.setVarFloat(3.14f);
    JAXBElement<SgDerivedTypeC> elementC = objectFactory.createSg03DerivedElementC(derivedC);
    StructWithSubstitutionGroupAbstract x = new StructWithSubstitutionGroupAbstract();
    x.setSg03AbstractBaseElementA(elementC);
    StructWithSubstitutionGroupAbstract yOrig = new StructWithSubstitutionGroupAbstract();
    yOrig.setSg03AbstractBaseElementA(elementB);
    Holder<StructWithSubstitutionGroupAbstract> y = new Holder<StructWithSubstitutionGroupAbstract>(yOrig);
    Holder<StructWithSubstitutionGroupAbstract> z = new Holder<StructWithSubstitutionGroupAbstract>();
    StructWithSubstitutionGroupAbstract ret;
    if (testDocLiteral) {
        ret = docClient.testStructWithSubstitutionGroupAbstract(x, y, z);
    } else if (testXMLBinding) {
        ret = xmlClient.testStructWithSubstitutionGroupAbstract(x, y, z);
    } else {
        ret = rpcClient.testStructWithSubstitutionGroupAbstract(x, y, z);
    }
    if (!perfTestOnly) {
        assertTrue("testStructWithSubstitutionGroupAbstract(): Incorrect value for inout param", equals(x, y.value));
        assertTrue("testStructWithSubstitutionGroupAbstract(): Incorrect value for out param", equals(yOrig, z.value));
        assertTrue("testStructWithSubstitutionGroupAbstract(): Incorrect return value", equals(x, ret));
    }
}
Also used : SgDerivedTypeB(org.apache.type_test.types3.SgDerivedTypeB) ObjectFactory(org.apache.type_test.types3.ObjectFactory) Holder(javax.xml.ws.Holder) BigInteger(java.math.BigInteger) StructWithSubstitutionGroupAbstract(org.apache.type_test.types3.StructWithSubstitutionGroupAbstract) SgDerivedTypeC(org.apache.type_test.types3.SgDerivedTypeC) Test(org.junit.Test)

Aggregations

BigInteger (java.math.BigInteger)1 Holder (javax.xml.ws.Holder)1 ObjectFactory (org.apache.type_test.types3.ObjectFactory)1 SgBaseTypeA (org.apache.type_test.types3.SgBaseTypeA)1 SgDerivedTypeB (org.apache.type_test.types3.SgDerivedTypeB)1 SgDerivedTypeC (org.apache.type_test.types3.SgDerivedTypeC)1 StructWithSubstitutionGroupAbstract (org.apache.type_test.types3.StructWithSubstitutionGroupAbstract)1 Test (org.junit.Test)1