use of net.opengis.cat.csw.v_2_0_2.ObjectFactory 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<>(yOrig);
Holder<StructWithSubstitutionGroupAbstract> z = new Holder<>();
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));
}
}
use of net.opengis.cat.csw.v_2_0_2.ObjectFactory in project cxf by apache.
the class AbstractTypeTestClient2 method testStructWithSubstitutionGroupNil.
@Test
public void testStructWithSubstitutionGroupNil() throws Exception {
if (!shouldRunTest("StructWithSubstitutionGroupNil")) {
return;
}
StructWithSubstitutionGroupNil x = new StructWithSubstitutionGroupNil();
ObjectFactory objectFactory = new ObjectFactory();
JAXBElement<? extends SgBaseTypeA> element = objectFactory.createSg04NillableBaseElementA(null);
x.setSg04NillableBaseElementA(element);
StructWithSubstitutionGroupNil yOrig = new StructWithSubstitutionGroupNil();
element = objectFactory.createSg04NillableBaseElementA(null);
yOrig.setSg04NillableBaseElementA(element);
Holder<StructWithSubstitutionGroupNil> y = new Holder<>(yOrig);
Holder<StructWithSubstitutionGroupNil> z = new Holder<>();
StructWithSubstitutionGroupNil ret;
if (testDocLiteral) {
ret = docClient.testStructWithSubstitutionGroupNil(x, y, z);
} else if (testXMLBinding) {
ret = xmlClient.testStructWithSubstitutionGroupNil(x, y, z);
} else {
ret = rpcClient.testStructWithSubstitutionGroupNil(x, y, z);
}
if (!perfTestOnly) {
assertTrue("testStructWithSubstitutionGroupNil(): Incorrect value for inout param", equals(x, y.value));
assertTrue("testStructWithSubstitutionGroupNil(): Incorrect value for out param", equals(yOrig, z.value));
assertTrue("testStructWithSubstitutionGroupNil(): Incorrect return value", equals(x, ret));
}
}
use of net.opengis.cat.csw.v_2_0_2.ObjectFactory in project cxf by apache.
the class AbstractSequenceTest method testIdentifierEquals.
@Test
public void testIdentifierEquals() {
Identifier id1 = null;
Identifier id2 = null;
assertTrue(AbstractSequence.identifierEquals(id1, id2));
ObjectFactory factory = new ObjectFactory();
id1 = factory.createIdentifier();
id1.setValue("seq1");
assertFalse(AbstractSequence.identifierEquals(id1, id2));
id2 = factory.createIdentifier();
id2.setValue("seq2");
assertFalse(AbstractSequence.identifierEquals(id1, id2));
id2.setValue("seq1");
assertTrue(AbstractSequence.identifierEquals(id1, id2));
}
use of net.opengis.cat.csw.v_2_0_2.ObjectFactory in project cxf by apache.
the class RMSoapOutInterceptorTest method setUpOutbound.
private void setUpOutbound() {
ObjectFactory factory = new ObjectFactory();
s1 = factory.createSequenceType();
Identifier sid = factory.createIdentifier();
sid.setValue("sequence1");
s1.setIdentifier(sid);
s1.setMessageNumber(ONE);
s2 = factory.createSequenceType();
sid = factory.createIdentifier();
sid.setValue("sequence2");
s2.setIdentifier(sid);
s2.setMessageNumber(TEN);
ack1 = factory.createSequenceAcknowledgement();
SequenceAcknowledgement.AcknowledgementRange r = factory.createSequenceAcknowledgementAcknowledgementRange();
r.setLower(ONE);
r.setUpper(ONE);
ack1.getAcknowledgementRange().add(r);
ack1.setIdentifier(s1.getIdentifier());
ack2 = factory.createSequenceAcknowledgement();
r = factory.createSequenceAcknowledgementAcknowledgementRange();
r.setLower(ONE);
r.setUpper(TEN);
ack2.getAcknowledgementRange().add(r);
ack2.setIdentifier(s2.getIdentifier());
ar1 = factory.createAckRequestedType();
ar1.setIdentifier(s1.getIdentifier());
ar2 = factory.createAckRequestedType();
ar2.setIdentifier(s2.getIdentifier());
}
Aggregations