Search in sources :

Example 66 with ObjectFactory

use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_02.ObjectFactory in project ddf by codice.

the class WfsSource method logMessage.

private void logMessage(GetFeatureType getFeature) {
    if (LOGGER.isDebugEnabled()) {
        try {
            StringWriter writer = new StringWriter();
            JAXBContext contextObj = JAXBContext.newInstance(GetFeatureType.class);
            Marshaller marshallerObj = contextObj.createMarshaller();
            marshallerObj.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
            marshallerObj.marshal(new ObjectFactory().createGetFeature(getFeature), writer);
            LOGGER.debug("WfsSource {}: {}", getId(), writer.toString());
        } catch (JAXBException e) {
            LOGGER.debug("An error occurred debugging the GetFeature request", e);
        }
    }
}
Also used : Marshaller(javax.xml.bind.Marshaller) StringWriter(java.io.StringWriter) ObjectFactory(ogc.schema.opengis.wfs.v_1_0_0.ObjectFactory) JAXBException(javax.xml.bind.JAXBException) JAXBContext(javax.xml.bind.JAXBContext)

Example 67 with ObjectFactory

use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_02.ObjectFactory in project cxf by apache.

the class SourceSequenceTest method setUp.

@Before
public void setUp() {
    factory = new ObjectFactory();
    id = factory.createIdentifier();
    id.setValue("seq");
    control = EasyMock.createNiceControl();
}
Also used : ObjectFactory(org.apache.cxf.ws.rm.v200702.ObjectFactory) Before(org.junit.Before)

Example 68 with ObjectFactory

use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_02.ObjectFactory in project cxf by apache.

the class DestinationSequenceTest method setUp.

@Before
public void setUp() {
    control = EasyMock.createNiceControl();
    control.makeThreadSafe(true);
    factory = new ObjectFactory();
    ref = control.createMock(EndpointReferenceType.class);
    id = factory.createIdentifier();
    id.setValue("seq");
}
Also used : EndpointReferenceType(org.apache.cxf.ws.addressing.EndpointReferenceType) ObjectFactory(org.apache.cxf.ws.rm.v200702.ObjectFactory) Before(org.junit.Before)

Example 69 with ObjectFactory

use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_02.ObjectFactory in project cxf by apache.

the class AbstractTypeTestClient2 method testStructWithMultipleSubstitutionGroups.

@Test
public void testStructWithMultipleSubstitutionGroups() throws Exception {
    if (!shouldRunTest("StructWithMultipleSubstitutionGroups")) {
        return;
    }
    SgBaseTypeA baseA = new SgBaseTypeA();
    baseA.setVarInt(BigInteger.ONE);
    SgDerivedTypeB derivedB = new SgDerivedTypeB();
    derivedB.setVarInt(new BigInteger("32"));
    derivedB.setVarString("y-SgDerivedTypeB");
    SgDerivedTypeC derivedC = new SgDerivedTypeC();
    derivedC.setVarInt(BigInteger.ONE);
    derivedC.setVarFloat(3.14f);
    ObjectFactory objectFactory = new ObjectFactory();
    JAXBElement<? extends SgBaseTypeA> x1 = objectFactory.createSg01DerivedElementB(derivedB);
    JAXBElement<? extends SgBaseTypeA> x2 = objectFactory.createSg02BaseElementA(baseA);
    JAXBElement<? extends SgBaseTypeA> y1 = objectFactory.createSg01DerivedElementB(derivedB);
    JAXBElement<? extends SgBaseTypeA> y2 = objectFactory.createSg02DerivedElementC(derivedC);
    StructWithMultipleSubstitutionGroups x = new StructWithMultipleSubstitutionGroups();
    x.setVarFloat(111.1f);
    x.setVarInt(new BigInteger("100"));
    x.setVarString("x-varString");
    x.setSg01BaseElementA(x1);
    x.setSg02BaseElementA(x2);
    StructWithMultipleSubstitutionGroups yOrig = new StructWithMultipleSubstitutionGroups();
    yOrig.setVarFloat(1.1f);
    yOrig.setVarInt(BigInteger.TEN);
    yOrig.setVarString("y-varString");
    yOrig.setSg01BaseElementA(y1);
    yOrig.setSg02BaseElementA(y2);
    Holder<StructWithMultipleSubstitutionGroups> y = new Holder<>(yOrig);
    Holder<StructWithMultipleSubstitutionGroups> z = new Holder<>();
    StructWithMultipleSubstitutionGroups ret;
    if (testDocLiteral) {
        ret = docClient.testStructWithMultipleSubstitutionGroups(x, y, z);
    } else if (testXMLBinding) {
        ret = xmlClient.testStructWithMultipleSubstitutionGroups(x, y, z);
    } else {
        ret = rpcClient.testStructWithMultipleSubstitutionGroups(x, y, z);
    }
    if (!perfTestOnly) {
        assertTrue("testStructWithMultipleSubstitutionGroups(): Incorrect value for inout param", equals(x, y.value));
        assertTrue("testStructWithMultipleSubstitutionGroups(): Incorrect value for out param", equals(yOrig, z.value));
        assertTrue("testStructWithMultipleSubstitutionGroups(): Incorrect return value", equals(x, ret));
    }
}
Also used : SgDerivedTypeB(org.apache.type_test.types3.SgDerivedTypeB) ObjectFactory(org.apache.type_test.types3.ObjectFactory) SgBaseTypeA(org.apache.type_test.types3.SgBaseTypeA) StructWithMultipleSubstitutionGroups(org.apache.type_test.types3.StructWithMultipleSubstitutionGroups) Holder(javax.xml.ws.Holder) BigInteger(java.math.BigInteger) SgDerivedTypeC(org.apache.type_test.types3.SgDerivedTypeC) Test(org.junit.Test)

Example 70 with ObjectFactory

use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_02.ObjectFactory in project cxf by apache.

the class AbstractTypeTestClient2 method testChoiceWithSubstitutionGroupNil.

@Test
public void testChoiceWithSubstitutionGroupNil() throws Exception {
    if (!shouldRunTest("ChoiceWithSubstitutionGroupNil")) {
        return;
    }
    ObjectFactory objectFactory = new ObjectFactory();
    ChoiceWithSubstitutionGroupNil x = new ChoiceWithSubstitutionGroupNil();
    JAXBElement<BigInteger> varInt = objectFactory.createChoiceWithSubstitutionGroupNilVarInt(null);
    x.setVarInt(varInt);
    ChoiceWithSubstitutionGroupNil yOrig = new ChoiceWithSubstitutionGroupNil();
    JAXBElement<? extends SgBaseTypeA> elementA = objectFactory.createSg04NillableBaseElementA(null);
    yOrig.setSg04NillableBaseElementA(elementA);
    Holder<ChoiceWithSubstitutionGroupNil> y = new Holder<>(yOrig);
    Holder<ChoiceWithSubstitutionGroupNil> z = new Holder<>();
    ChoiceWithSubstitutionGroupNil ret;
    if (testDocLiteral) {
        ret = docClient.testChoiceWithSubstitutionGroupNil(x, y, z);
    } else if (testXMLBinding) {
        ret = xmlClient.testChoiceWithSubstitutionGroupNil(x, y, z);
    } else {
        ret = rpcClient.testChoiceWithSubstitutionGroupNil(x, y, z);
    }
    if (!perfTestOnly) {
        assertTrue("testChoiceWithSubstitutionGroupNil(): Incorrect value for inout param", equals(x, y.value));
        assertTrue("testChoiceWithSubstitutionGroupNil(): Incorrect value for out param", equals(yOrig, z.value));
        assertTrue("testChoiceWithSubstitutionGroupNil(): Incorrect return value", equals(x, ret));
    }
}
Also used : ObjectFactory(org.apache.type_test.types3.ObjectFactory) Holder(javax.xml.ws.Holder) BigInteger(java.math.BigInteger) ChoiceWithSubstitutionGroupNil(org.apache.type_test.types3.ChoiceWithSubstitutionGroupNil) Test(org.junit.Test)

Aggregations

JAXBElement (javax.xml.bind.JAXBElement)35 Test (org.junit.Test)29 ArrayList (java.util.ArrayList)26 Marshaller (javax.xml.bind.Marshaller)24 ObjectFactory (net.opengis.cat.csw.v_2_0_2.ObjectFactory)20 StringWriter (java.io.StringWriter)19 JAXBContext (javax.xml.bind.JAXBContext)19 QueryType (net.opengis.cat.csw.v_2_0_2.QueryType)18 GetRecordsType (net.opengis.cat.csw.v_2_0_2.GetRecordsType)17 ObjectFactory (no.seres.xsd.nav.inntektsmelding_m._20181211.ObjectFactory)16 QName (javax.xml.namespace.QName)15 BigInteger (java.math.BigInteger)13 CswRecordCollection (org.codice.ddf.spatial.ogc.csw.catalog.common.CswRecordCollection)13 XStream (com.thoughtworks.xstream.XStream)12 ByteArrayInputStream (java.io.ByteArrayInputStream)12 GetRecordsResponseType (net.opengis.cat.csw.v_2_0_2.GetRecordsResponseType)12 SearchResultsType (net.opengis.cat.csw.v_2_0_2.SearchResultsType)12 ObjectFactory (slash.navigation.kml.binding22.ObjectFactory)12 ObjectFactory (com.opensymphony.xwork2.ObjectFactory)11 ElementSetNameType (net.opengis.cat.csw.v_2_0_2.ElementSetNameType)11