/** * Print the created XML to verify. Usage: return printLogAndReturn(new JAXBElement(rootElementName, StoreOperationInput.class, input)); * * @return JAXBElement - same object which came as input. */ private static JAXBElement printLogAndReturn(JAXBElement jaxbElement) { try { // Create a String writer object which will be // used to write jaxbElment XML to string StringWriter writer = new StringWriter(); // create JAXBContext which will be used to update writer JAXBContext context = JAXBContext.newInstance(StoreOperationInput.class); // marshall or convert jaxbElement containing student to xml format context.createMarshaller().marshal(jaxbElement, writer); // print XML string representation of Student object System.out.println(writer.toString()); } catch (JAXBException e) { e.printStackTrace(); } return jaxbElement; }
protected void puraText(POCDMT000040Section section, List<String> nayttomuoto) { StrucDocText text = section.getText(); if ( text != null && text.getContent() != null && !text.getContent().isEmpty() ) { List<Serializable> content = text.getContent(); for (int i = 0; i < content.size(); i++) { if ( !(content.get(i) instanceof JAXBElement) ) { continue; } JAXBElement<?> elem = (JAXBElement<?>) content.get(i); if ( elem.getValue() instanceof StrucDocParagraph ) { StrucDocParagraph paragraph = (StrucDocParagraph) elem.getValue(); puraDocParagraph(paragraph, nayttomuoto); } } } }
private String generateRedirectURL(JAXBElement<AuthnRequestType> authRequest, String url){ if (authSettings.getIssuer() == null) { return null; } URL redirectURL; RedirectSamlURLBuilder<AuthnRequestType> redirectSamlURLBuilder = new RedirectSamlURLBuilder<>(); try { redirectURL = redirectSamlURLBuilder .addRelayState(getRelayState()) .addSamlRequest(authRequest) .addRedirectEndpoint( new URL(url)) .getURL(); } catch (Exception e) { getLogger().logError(Log4jLogger.SYSTEM_LOG, e, LogMessageIdentifier.ERROR_AUTH_REQUEST_GENERATION_FAILED); return null; } return redirectURL.toString(); }
public static <T> T unmarshal(final JAXBContext context, final Class<T> clazz, final String data, final XmlAdapter<?, ?>... adapters) { if (data != null) { final String trimmed = data.trim(); if (trimmed.length() > 0) { try { final Unmarshaller unmarshaller = context.createUnmarshaller(); if (adapters != null) { for (final XmlAdapter<?, ?> adapter : adapters) { unmarshaller.setAdapter(adapter); } } final JAXBElement<T> jaxbElement = unmarshaller.unmarshal( new StreamSource(new ByteArrayInputStream(trimmed.getBytes(StandardCharsets.UTF_8))), clazz); return jaxbElement.getValue(); } catch (final JAXBException e) { throw new RuntimeException("Invalid XML " + trimmed, e); } } } return null; }
@XmlElementDecl( namespace = "http://ws.update.deployment.rapid_i.com/", name = "getLicenseTextHtmlResponse" ) public JAXBElement<GetLicenseTextHtmlResponse> createGetLicenseTextHtmlResponse(GetLicenseTextHtmlResponse value) { return new JAXBElement(_GetLicenseTextHtmlResponse_QNAME, GetLicenseTextHtmlResponse.class, (Class)null, value); }
/** * Create an instance of {@link JAXBElement }{@code <} * {@link StatusResponseType }{@code >} * */ @XmlElementDecl(namespace = "urn:oasis:names:tc:SAML:2.0:protocol", name = "LogoutResponse") public JAXBElement<StatusResponseType> createLogoutResponse( StatusResponseType value) { return new JAXBElement<StatusResponseType>(_LogoutResponse_QNAME, StatusResponseType.class, null, value); }
@XmlElementDecl( namespace = "http://ws.update.deployment.rapid_i.com/", name = "getMirrors" ) public JAXBElement<GetMirrors> createGetMirrors(GetMirrors value) { return new JAXBElement(_GetMirrors_QNAME, GetMirrors.class, (Class)null, value); }
/** * Exports a given {@link ConstraintSpecification} as a XML {@link Node}. * * @param source The specification that should be exported * @return The XML Node representing the specification * @throws ExportException Exception during marshalling */ @Override public Node exportToXmlNode(ConstraintSpecification source) throws ExportException { SpecificationTable specTable = objectFactory.createSpecificationTable(); specTable.setVariables(makeVariables(source)); specTable.setRows(makeRows(source)); specTable.setComment(source.getComment()); specTable.setIsConcrete(false); specTable.setName(source.getName()); JAXBElement<SpecificationTable> element = objectFactory.createSpecification(specTable); return marshalToNode(element, OF_STVS); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link KeyValueType } * {@code >} * */ @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyValue") public JAXBElement<KeyValueType> createKeyValue(KeyValueType value) { return new JAXBElement<KeyValueType>(_KeyValue_QNAME, KeyValueType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link ProgramasResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://queries.service.siaf.hacienda.gov.py/", name = "programasResponse") public JAXBElement<ProgramasResponse> createProgramasResponse(ProgramasResponse value) { return new JAXBElement<ProgramasResponse>(_ProgramasResponse_QNAME, ProgramasResponse.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link StatusCodeType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", name = "StatusCode") public JAXBElement<StatusCodeType> createStatusCode(StatusCodeType value) { return new JAXBElement<StatusCodeType>(_StatusCode_QNAME, StatusCodeType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link MiddleNameType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", name = "MiddleName") public JAXBElement<MiddleNameType> createMiddleName(MiddleNameType value) { return new JAXBElement<MiddleNameType>(_MiddleName_QNAME, MiddleNameType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link CommitmentTypeIndicationType }{@code >}} * */ @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.3.2#", name = "CommitmentTypeIndication") public JAXBElement<CommitmentTypeIndicationType> createCommitmentTypeIndication(CommitmentTypeIndicationType value) { return new JAXBElement<CommitmentTypeIndicationType>(_CommitmentTypeIndication_QNAME, CommitmentTypeIndicationType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link AddressType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2", name = "DespatchAddress") public JAXBElement<AddressType> createDespatchAddress(AddressType value) { return new JAXBElement<AddressType>(_DespatchAddress_QNAME, AddressType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link DealCard }{@code >}} * */ @XmlElementDecl(namespace = "http://blackjack.deitel.com/", name = "dealCard") public JAXBElement<DealCard> createDealCard(DealCard value) { return new JAXBElement<DealCard>(_DealCard_QNAME, DealCard.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link RejectActionCodeType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", name = "RejectActionCode") public JAXBElement<RejectActionCodeType> createRejectActionCode(RejectActionCodeType value) { return new JAXBElement<RejectActionCodeType>(_RejectActionCode_QNAME, RejectActionCodeType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link CityNameType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", name = "CityName") public JAXBElement<CityNameType> createCityName(CityNameType value) { return new JAXBElement<CityNameType>(_CityName_QNAME, CityNameType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link RelativeTimeIntervalType }{@code >}} * */ @XmlElementDecl(namespace = "urn:iso:15118:2:2013:MsgDataTypes", name = "RelativeTimeInterval", substitutionHeadNamespace = "urn:iso:15118:2:2013:MsgDataTypes", substitutionHeadName = "TimeInterval") public JAXBElement<RelativeTimeIntervalType> createRelativeTimeInterval(RelativeTimeIntervalType value) { return new JAXBElement<RelativeTimeIntervalType>(_RelativeTimeInterval_QNAME, RelativeTimeIntervalType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} * */ @XmlElementDecl(namespace = "http://www.esa.int/safe/sentinel-1.0", name = "startTime") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) public JAXBElement<String> createStartTime(String value) { return new JAXBElement<String>(_StartTime_QNAME, String.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link TGranelManifestacao }{@code >}} * */ @XmlElementDecl(namespace = "http://www.pucomex.serpro.gov.br/cct", name = "granel", scope = TDocumentoCargaManifestacao.class) public JAXBElement<TGranelManifestacao> createTDocumentoCargaManifestacaoGranel(TGranelManifestacao value) { return new JAXBElement<TGranelManifestacao>(_TDocumentoCargaManifestacaoGranel_QNAME, TGranelManifestacao.class, TDocumentoCargaManifestacao.class, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link TransportEventType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2", name = "RequestedPickupTransportEvent") public JAXBElement<TransportEventType> createRequestedPickupTransportEvent(TransportEventType value) { return new JAXBElement<TransportEventType>(_RequestedPickupTransportEvent_QNAME, TransportEventType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link SASchedulesType }{@code >}} * */ @XmlElementDecl(namespace = "urn:iso:15118:2:2013:MsgDataTypes", name = "SASchedules") public JAXBElement<SASchedulesType> createSASchedules(SASchedulesType value) { return new JAXBElement<SASchedulesType>(_SASchedules_QNAME, SASchedulesType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link RevocationValuesType }{@code >}} * */ @XmlElementDecl(namespace = "http://uri.etsi.org/01903/v1.3.2#", name = "RevocationValues") public JAXBElement<RevocationValuesType> createRevocationValues(RevocationValuesType value) { return new JAXBElement<RevocationValuesType>(_RevocationValues_QNAME, RevocationValuesType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link Boolean }{@code >}} * */ @XmlElementDecl(namespace = "", name = "iBiasSignificanceFlag") public JAXBElement<Boolean> createIBiasSignificanceFlag(Boolean value) { return new JAXBElement<Boolean>(_IBiasSignificanceFlag_QNAME, Boolean.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link DrawBlock }{@code >}} * */ @XmlElementDecl(namespace = "http://ProjectMalmo.microsoft.com", name = "DrawBlock", substitutionHeadNamespace = "http://ProjectMalmo.microsoft.com", substitutionHeadName = "DrawObjectType") public JAXBElement<DrawBlock> createDrawBlock(DrawBlock value) { return new JAXBElement<DrawBlock>(_DrawBlock_QNAME, DrawBlock.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link ReferencedConsignmentIDType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", name = "ReferencedConsignmentID") public JAXBElement<ReferencedConsignmentIDType> createReferencedConsignmentID(ReferencedConsignmentIDType value) { return new JAXBElement<ReferencedConsignmentIDType>(_ReferencedConsignmentID_QNAME, ReferencedConsignmentIDType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link InsertarProyectoPlanEstrategico }{@code >}} * */ @XmlElementDecl(namespace = "http://inserts.service.siaf.hacienda.gov.py/", name = "insertarProyectoPlanEstrategico") public JAXBElement<InsertarProyectoPlanEstrategico> createInsertarProyectoPlanEstrategico(InsertarProyectoPlanEstrategico value) { return new JAXBElement<InsertarProyectoPlanEstrategico>(_InsertarProyectoPlanEstrategico_QNAME, InsertarProyectoPlanEstrategico.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link PaymentType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2", name = "CollectedPayment") public JAXBElement<PaymentType> createCollectedPayment(PaymentType value) { return new JAXBElement<PaymentType>(_CollectedPayment_QNAME, PaymentType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link ConsumersEnergyLevelCodeType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", name = "ConsumersEnergyLevelCode") public JAXBElement<ConsumersEnergyLevelCodeType> createConsumersEnergyLevelCode(ConsumersEnergyLevelCodeType value) { return new JAXBElement<ConsumersEnergyLevelCodeType>(_ConsumersEnergyLevelCode_QNAME, ConsumersEnergyLevelCodeType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link StatusType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2", name = "Status") public JAXBElement<StatusType> createStatus(StatusType value) { return new JAXBElement<StatusType>(_Status_QNAME, StatusType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link DebitedQuantityType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", name = "DebitedQuantity") public JAXBElement<DebitedQuantityType> createDebitedQuantity(DebitedQuantityType value) { return new JAXBElement<DebitedQuantityType>(_DebitedQuantity_QNAME, DebitedQuantityType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link DragEntrantResult }{@code >}} * */ @XmlElementDecl(namespace = "", name = "DragEntrantResult") public JAXBElement<DragEntrantResult> createDragEntrantResult(DragEntrantResult value) { return new JAXBElement<DragEntrantResult>(_DragEntrantResult_QNAME, DragEntrantResult.class, null, value); }
public <T> JAXBElement<T> unmarshal(XMLEventReader reader, Class<T> expectedType) throws JAXBException { throw new UnsupportedOperationException(); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link Boolean }{@code >}} * */ @XmlElementDecl(namespace = "", name = "rollErrorFlag") public JAXBElement<Boolean> createRollErrorFlag(Boolean value) { return new JAXBElement<Boolean>(_RollErrorFlag_QNAME, Boolean.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link RateType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", name = "Rate") public JAXBElement<RateType> createRate(RateType value) { return new JAXBElement<RateType>(_Rate_QNAME, RateType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link ResponseTimeType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", name = "ResponseTime") public JAXBElement<ResponseTimeType> createResponseTime(ResponseTimeType value) { return new JAXBElement<ResponseTimeType>(_ResponseTime_QNAME, ResponseTimeType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link DebitNoteLineType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2", name = "DebitNoteLine") public JAXBElement<DebitNoteLineType> createDebitNoteLine(DebitNoteLineType value) { return new JAXBElement<DebitNoteLineType>(_DebitNoteLine_QNAME, DebitNoteLineType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link TotalInvoiceAmountType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", name = "TotalInvoiceAmount") public JAXBElement<TotalInvoiceAmountType> createTotalInvoiceAmount(TotalInvoiceAmountType value) { return new JAXBElement<TotalInvoiceAmountType>(_TotalInvoiceAmount_QNAME, TotalInvoiceAmountType.class, null, value); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} * */ @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509SKI", scope = X509DataType.class) public JAXBElement<byte[]> createX509DataTypeX509SKI(byte[] value) { return new JAXBElement<byte[]>(_X509DataTypeX509SKI_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link DocumentResponseType }{@code >}} * */ @XmlElementDecl(namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2", name = "DocumentResponse") public JAXBElement<DocumentResponseType> createDocumentResponse(DocumentResponseType value) { return new JAXBElement<DocumentResponseType>(_DocumentResponse_QNAME, DocumentResponseType.class, null, value); }