use of com.evolveum.prism.xml.ns._public.query_3.ObjectFactory in project cxf by apache.
the class AbstractTypeTestClient2 method testChoiceWithSubstitutionGroupAbstract.
@Test
public void testChoiceWithSubstitutionGroupAbstract() throws Exception {
if (!shouldRunTest("ChoiceWithSubstitutionGroupAbstract")) {
return;
}
SgDerivedTypeB derivedB = new SgDerivedTypeB();
derivedB.setVarInt(new BigInteger("32"));
derivedB.setVarString("foo");
SgDerivedTypeC derivedC = new SgDerivedTypeC();
derivedC.setVarInt(new BigInteger("32"));
derivedC.setVarFloat(3.14f);
ObjectFactory objectFactory = new ObjectFactory();
JAXBElement<? extends SgBaseTypeA> elementB = objectFactory.createSg03DerivedElementB(derivedB);
JAXBElement<? extends SgBaseTypeA> elementC = objectFactory.createSg03DerivedElementC(derivedC);
ChoiceWithSubstitutionGroupAbstract x = new ChoiceWithSubstitutionGroupAbstract();
x.setSg03AbstractBaseElementA(elementC);
ChoiceWithSubstitutionGroupAbstract yOrig = new ChoiceWithSubstitutionGroupAbstract();
yOrig.setSg03AbstractBaseElementA(elementB);
Holder<ChoiceWithSubstitutionGroupAbstract> y = new Holder<ChoiceWithSubstitutionGroupAbstract>(yOrig);
Holder<ChoiceWithSubstitutionGroupAbstract> z = new Holder<ChoiceWithSubstitutionGroupAbstract>();
ChoiceWithSubstitutionGroupAbstract ret;
if (testDocLiteral) {
ret = docClient.testChoiceWithSubstitutionGroupAbstract(x, y, z);
} else if (testXMLBinding) {
ret = xmlClient.testChoiceWithSubstitutionGroupAbstract(x, y, z);
} else {
ret = rpcClient.testChoiceWithSubstitutionGroupAbstract(x, y, z);
}
if (!perfTestOnly) {
assertTrue("testChoiceWithSubstitutionGroupAbstract(): Incorrect value for inout param", equals(x, y.value));
assertTrue("testChoiceWithSubstitutionGroupAbstract(): Incorrect value for out param", equals(yOrig, z.value));
assertTrue("testChoiceWithSubstitutionGroupAbstract(): Incorrect return value", equals(x, ret));
}
}
use of com.evolveum.prism.xml.ns._public.query_3.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());
}
use of com.evolveum.prism.xml.ns._public.query_3.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");
assertTrue(!AbstractSequence.identifierEquals(id1, id2));
id2 = factory.createIdentifier();
id2.setValue("seq2");
assertTrue(!AbstractSequence.identifierEquals(id1, id2));
id2.setValue("seq1");
assertTrue(AbstractSequence.identifierEquals(id1, id2));
}
use of com.evolveum.prism.xml.ns._public.query_3.ObjectFactory in project Payara by payara.
the class Jaxb1MarshallingTestServlet method service.
@Override
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
resp.setContentType("text/html;charset=UTF-8");
PrintWriter out = resp.getWriter();
out.println("jaxb1 marshalling test: ");
try {
JAXBContext jc = JAXBContext.newInstance("jaxb1");
Marshaller m = jc.createMarshaller();
ObjectFactory of = new ObjectFactory();
Catalog c = of.createCatalog();
c.setSection("jaxb1 section");
StringWriter sw = new StringWriter();
m.marshal(c, sw);
String s = sw.toString();
if (s.contains("<catalog section=\"jaxb1 section\"/>"))
out.println("marshalled OK");
else {
out.println("jaxb1 marshalling failed");
System.err.println("Error in Jaxb1MarshallingTestServlet. Marshalling result: " + s);
}
} catch (JAXBException e) {
out.println("jaxb1 marshalling failed: " + e.getMessage());
e.printStackTrace();
}
}
Aggregations