#include #ifndef DEF_novaglobalapi_ns0_actionStatus_H #define DEF_novaglobalapi_ns0_actionStatus_H /** * @author Edward P. Legaspi @since Oct 3, 2013 */ struct novaglobalapi_ns0_actionStatus { /** * (no documentation provided) */ enum novaglobalapi_ns0_actionStatusEnum *status; /** * (no documentation provided) */ int errorCode; /** * (no documentation provided) */ xmlChar *message; }; /** * Reads a ActionStatus element from XML. The element to be read is "actionStatus", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The ActionStatus, or NULL in case of error. */ struct novaglobalapi_ns0_actionStatus *xml_read_novaglobalapi_ns0_actionStatus(xmlTextReaderPtr reader); /** * Writes a ActionStatus to XML under element name "actionStatus". * * @param writer The XML writer. * @param _actionStatus The ActionStatus to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_actionStatus(xmlTextWriterPtr writer, struct novaglobalapi_ns0_actionStatus *_actionStatus); /** * Frees a ActionStatus. * * @param _actionStatus The ActionStatus to free. */ void free_novaglobalapi_ns0_actionStatus(struct novaglobalapi_ns0_actionStatus *_actionStatus); /** * Reads a ActionStatus element from XML. The element to be read is "actionStatus", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The ActionStatus, or NULL in case of error. */ struct novaglobalapi_ns0_actionStatus *xmlTextReaderReadNs0ActionStatusElement(xmlTextReaderPtr reader); /** * Writes a ActionStatus to XML under element name "actionStatus". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _actionStatus The ActionStatus to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ActionStatusElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_actionStatus *_actionStatus); /** * Writes a ActionStatus to XML under element name "actionStatus". * * @param writer The XML writer. * @param _actionStatus The ActionStatus to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ActionStatusElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_actionStatus *_actionStatus, int writeNamespaces); /** * Frees the children of a ActionStatus. * * @param _actionStatus The ActionStatus whose children are to be free. */ static void freeNs0ActionStatusElement(struct novaglobalapi_ns0_actionStatus *_actionStatus); /** * Reads a ActionStatus from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The ActionStatus, or NULL in case of error. */ static struct novaglobalapi_ns0_actionStatus *xmlTextReaderReadNs0ActionStatusType(xmlTextReaderPtr reader); /** * Writes a ActionStatus to XML. * * @param writer The XML writer. * @param _actionStatus The ActionStatus to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ActionStatusType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_actionStatus *_actionStatus); /** * Frees the elements of a ActionStatus. * * @param _actionStatus The ActionStatus to free. */ static void freeNs0ActionStatusType(struct novaglobalapi_ns0_actionStatus *_actionStatus); #endif /* DEF_novaglobalapi_ns0_actionStatus_H */ #ifndef DEF_novaglobalapi_ns0_actionStatusEnum_H #define DEF_novaglobalapi_ns0_actionStatusEnum_H /** * @author Edward P. Legaspi @since Oct 3, 2013 */ enum novaglobalapi_ns0_actionStatusEnum { /** * (no documentation provided) */ NOVAGLOBALAPI_NS0_ACTIONSTATUSENUM_SUCCESS, /** * (no documentation provided) */ NOVAGLOBALAPI_NS0_ACTIONSTATUSENUM_FAIL }; /** * Reads a ActionStatusEnum from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The ActionStatusEnum, or NULL if unable to be read. */ static enum novaglobalapi_ns0_actionStatusEnum *xmlTextReaderReadNs0ActionStatusEnumType(xmlTextReaderPtr reader); /** * Writes a ActionStatusEnum to XML. * * @param writer The XML writer. * @param _actionStatusEnum The ActionStatusEnum to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ActionStatusEnumType(xmlTextWriterPtr writer, enum novaglobalapi_ns0_actionStatusEnum *_actionStatusEnum); /** * Frees a ActionStatusEnum. * * @param _actionStatusEnum The ActionStatusEnum to free. */ static void freeNs0ActionStatusEnumType(enum novaglobalapi_ns0_actionStatusEnum *_actionStatusEnum); #endif #ifndef DEF_novaglobalapi_ns0_accountOperationDto_H #define DEF_novaglobalapi_ns0_accountOperationDto_H /** * (no documentation provided) */ struct novaglobalapi_ns0_accountOperationDto { /** * (no documentation provided) */ struct tm *dueDate; /** * (no documentation provided) */ xmlChar *type; /** * (no documentation provided) */ struct tm *transactionDate; /** * (no documentation provided) */ xmlChar *transactionCategory; /** * (no documentation provided) */ xmlChar *reference; /** * (no documentation provided) */ xmlChar *accountCode; /** * (no documentation provided) */ xmlChar *accountCodeClientSide; /** * (no documentation provided) */ xmlChar *amount; /** * (no documentation provided) */ xmlChar *matchingAmount; /** * (no documentation provided) */ xmlChar *unMatchingAmount; /** * (no documentation provided) */ xmlChar *matchingStatus; /** * (no documentation provided) */ struct novaglobalapi_ns0_matchingAmountDto *matchingAmounts; /** * Size of the matchingAmounts array. */ int _sizeof_matchingAmounts; /** * (no documentation provided) */ xmlChar *occCode; /** * (no documentation provided) */ xmlChar *occDescription; }; /** * Reads a AccountOperationDto element from XML. The element to be read is "accountOperation", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The AccountOperationDto, or NULL in case of error. */ struct novaglobalapi_ns0_accountOperationDto *xml_read_novaglobalapi_ns0_accountOperationDto(xmlTextReaderPtr reader); /** * Writes a AccountOperationDto to XML under element name "accountOperation". * * @param writer The XML writer. * @param _accountOperationDto The AccountOperationDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_accountOperationDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto); /** * Frees a AccountOperationDto. * * @param _accountOperationDto The AccountOperationDto to free. */ void free_novaglobalapi_ns0_accountOperationDto(struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto); /** * Reads a AccountOperationDto element from XML. The element to be read is "accountOperation", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The AccountOperationDto, or NULL in case of error. */ struct novaglobalapi_ns0_accountOperationDto *xmlTextReaderReadNs0AccountOperationElement(xmlTextReaderPtr reader); /** * Writes a AccountOperationDto to XML under element name "accountOperation". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _accountOperationDto The AccountOperationDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0AccountOperationElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto); /** * Writes a AccountOperationDto to XML under element name "accountOperation". * * @param writer The XML writer. * @param _accountOperationDto The AccountOperationDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0AccountOperationElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto, int writeNamespaces); /** * Frees the children of a AccountOperationDto. * * @param _accountOperationDto The AccountOperationDto whose children are to be free. */ static void freeNs0AccountOperationElement(struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto); /** * Reads a AccountOperationDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The AccountOperationDto, or NULL in case of error. */ static struct novaglobalapi_ns0_accountOperationDto *xmlTextReaderReadNs0AccountOperationDtoType(xmlTextReaderPtr reader); /** * Writes a AccountOperationDto to XML. * * @param writer The XML writer. * @param _accountOperationDto The AccountOperationDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0AccountOperationDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto); /** * Frees the elements of a AccountOperationDto. * * @param _accountOperationDto The AccountOperationDto to free. */ static void freeNs0AccountOperationDtoType(struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto); #endif /* DEF_novaglobalapi_ns0_accountOperationDto_H */ #ifndef DEF_novaglobalapi_ns0_countryDto_H #define DEF_novaglobalapi_ns0_countryDto_H /** * @author Edward P. Legaspi @since Oct 4, 2013 */ struct novaglobalapi_ns0_countryDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *countryCode; /** * (no documentation provided) */ xmlChar *name; /** * (no documentation provided) */ xmlChar *currencyCode; /** * (no documentation provided) */ xmlChar *languageCode; }; /** * Reads a CountryDto element from XML. The element to be read is "country", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CountryDto, or NULL in case of error. */ struct novaglobalapi_ns0_countryDto *xml_read_novaglobalapi_ns0_countryDto(xmlTextReaderPtr reader); /** * Writes a CountryDto to XML under element name "country". * * @param writer The XML writer. * @param _countryDto The CountryDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_countryDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryDto *_countryDto); /** * Frees a CountryDto. * * @param _countryDto The CountryDto to free. */ void free_novaglobalapi_ns0_countryDto(struct novaglobalapi_ns0_countryDto *_countryDto); /** * Reads a CountryDto element from XML. The element to be read is "country", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The CountryDto, or NULL in case of error. */ struct novaglobalapi_ns0_countryDto *xmlTextReaderReadNs0CountryElement(xmlTextReaderPtr reader); /** * Writes a CountryDto to XML under element name "country". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _countryDto The CountryDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CountryElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryDto *_countryDto); /** * Writes a CountryDto to XML under element name "country". * * @param writer The XML writer. * @param _countryDto The CountryDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CountryElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryDto *_countryDto, int writeNamespaces); /** * Frees the children of a CountryDto. * * @param _countryDto The CountryDto whose children are to be free. */ static void freeNs0CountryElement(struct novaglobalapi_ns0_countryDto *_countryDto); /** * Reads a CountryDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The CountryDto, or NULL in case of error. */ static struct novaglobalapi_ns0_countryDto *xmlTextReaderReadNs0CountryDtoType(xmlTextReaderPtr reader); /** * Writes a CountryDto to XML. * * @param writer The XML writer. * @param _countryDto The CountryDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CountryDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryDto *_countryDto); /** * Frees the elements of a CountryDto. * * @param _countryDto The CountryDto to free. */ static void freeNs0CountryDtoType(struct novaglobalapi_ns0_countryDto *_countryDto); #endif /* DEF_novaglobalapi_ns0_countryDto_H */ #ifndef DEF_novaglobalapi_ns0_countryTaxDto_H #define DEF_novaglobalapi_ns0_countryTaxDto_H /** * @author Edward P. Legaspi @since Oct 11, 2013 */ struct novaglobalapi_ns0_countryTaxDto { /** * (no documentation provided) */ xmlChar *countryCode; /** * (no documentation provided) */ xmlChar *taxValue; }; /** * Reads a CountryTaxDto element from XML. The element to be read is "countryTax", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CountryTaxDto, or NULL in case of error. */ struct novaglobalapi_ns0_countryTaxDto *xml_read_novaglobalapi_ns0_countryTaxDto(xmlTextReaderPtr reader); /** * Writes a CountryTaxDto to XML under element name "countryTax". * * @param writer The XML writer. * @param _countryTaxDto The CountryTaxDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_countryTaxDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto); /** * Frees a CountryTaxDto. * * @param _countryTaxDto The CountryTaxDto to free. */ void free_novaglobalapi_ns0_countryTaxDto(struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto); /** * Reads a CountryTaxDto element from XML. The element to be read is "countryTax", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The CountryTaxDto, or NULL in case of error. */ struct novaglobalapi_ns0_countryTaxDto *xmlTextReaderReadNs0CountryTaxElement(xmlTextReaderPtr reader); /** * Writes a CountryTaxDto to XML under element name "countryTax". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _countryTaxDto The CountryTaxDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CountryTaxElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto); /** * Writes a CountryTaxDto to XML under element name "countryTax". * * @param writer The XML writer. * @param _countryTaxDto The CountryTaxDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CountryTaxElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto, int writeNamespaces); /** * Frees the children of a CountryTaxDto. * * @param _countryTaxDto The CountryTaxDto whose children are to be free. */ static void freeNs0CountryTaxElement(struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto); /** * Reads a CountryTaxDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The CountryTaxDto, or NULL in case of error. */ static struct novaglobalapi_ns0_countryTaxDto *xmlTextReaderReadNs0CountryTaxDtoType(xmlTextReaderPtr reader); /** * Writes a CountryTaxDto to XML. * * @param writer The XML writer. * @param _countryTaxDto The CountryTaxDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CountryTaxDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto); /** * Frees the elements of a CountryTaxDto. * * @param _countryTaxDto The CountryTaxDto to free. */ static void freeNs0CountryTaxDtoType(struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto); #endif /* DEF_novaglobalapi_ns0_countryTaxDto_H */ #ifndef DEF_novaglobalapi_ns0_creditLimitDto_H #define DEF_novaglobalapi_ns0_creditLimitDto_H /** * @author Edward P. Legaspi @since Nov 13, 2013 */ struct novaglobalapi_ns0_creditLimitDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *organizationId; /** * (no documentation provided) */ xmlChar *creditLimit; }; /** * Reads a CreditLimitDto element from XML. The element to be read is "creditLimit", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CreditLimitDto, or NULL in case of error. */ struct novaglobalapi_ns0_creditLimitDto *xml_read_novaglobalapi_ns0_creditLimitDto(xmlTextReaderPtr reader); /** * Writes a CreditLimitDto to XML under element name "creditLimit". * * @param writer The XML writer. * @param _creditLimitDto The CreditLimitDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_creditLimitDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto); /** * Frees a CreditLimitDto. * * @param _creditLimitDto The CreditLimitDto to free. */ void free_novaglobalapi_ns0_creditLimitDto(struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto); /** * Reads a CreditLimitDto element from XML. The element to be read is "creditLimit", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The CreditLimitDto, or NULL in case of error. */ struct novaglobalapi_ns0_creditLimitDto *xmlTextReaderReadNs0CreditLimitElement(xmlTextReaderPtr reader); /** * Writes a CreditLimitDto to XML under element name "creditLimit". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _creditLimitDto The CreditLimitDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CreditLimitElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto); /** * Writes a CreditLimitDto to XML under element name "creditLimit". * * @param writer The XML writer. * @param _creditLimitDto The CreditLimitDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CreditLimitElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto, int writeNamespaces); /** * Frees the children of a CreditLimitDto. * * @param _creditLimitDto The CreditLimitDto whose children are to be free. */ static void freeNs0CreditLimitElement(struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto); /** * Reads a CreditLimitDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The CreditLimitDto, or NULL in case of error. */ static struct novaglobalapi_ns0_creditLimitDto *xmlTextReaderReadNs0CreditLimitDtoType(xmlTextReaderPtr reader); /** * Writes a CreditLimitDto to XML. * * @param writer The XML writer. * @param _creditLimitDto The CreditLimitDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CreditLimitDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto); /** * Frees the elements of a CreditLimitDto. * * @param _creditLimitDto The CreditLimitDto to free. */ static void freeNs0CreditLimitDtoType(struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto); #endif /* DEF_novaglobalapi_ns0_creditLimitDto_H */ #ifndef DEF_novaglobalapi_ns0_customerAccountDto_H #define DEF_novaglobalapi_ns0_customerAccountDto_H /** * (no documentation provided) */ struct novaglobalapi_ns0_customerAccountDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *status; /** * (no documentation provided) */ xmlChar *paymentMethod; /** * (no documentation provided) */ xmlChar *creditCategory; /** * (no documentation provided) */ struct novaglobalapi_ns0_accountOperationDto *accountOperations; /** * Size of the accountOperations array. */ int _sizeof_accountOperations; /** * (no documentation provided) */ struct tm *dateStatus; /** * (no documentation provided) */ struct tm *dateDunningLevel; /** * (no documentation provided) */ xmlChar *email; /** * (no documentation provided) */ xmlChar *phone; /** * (no documentation provided) */ xmlChar *mobile; /** * (no documentation provided) */ xmlChar *fax; /** * (no documentation provided) */ xmlChar *customerCode; /** * (no documentation provided) */ xmlChar *dunningLevel; /** * (no documentation provided) */ xmlChar *mandateIdentification; /** * (no documentation provided) */ struct tm *mandateDate; /** * (no documentation provided) */ xmlChar *balance; }; /** * Reads a CustomerAccountDto element from XML. The element to be read is "customerAccount", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CustomerAccountDto, or NULL in case of error. */ struct novaglobalapi_ns0_customerAccountDto *xml_read_novaglobalapi_ns0_customerAccountDto(xmlTextReaderPtr reader); /** * Writes a CustomerAccountDto to XML under element name "customerAccount". * * @param writer The XML writer. * @param _customerAccountDto The CustomerAccountDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_customerAccountDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto); /** * Frees a CustomerAccountDto. * * @param _customerAccountDto The CustomerAccountDto to free. */ void free_novaglobalapi_ns0_customerAccountDto(struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto); /** * Reads a CustomerAccountDto element from XML. The element to be read is "customerAccount", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The CustomerAccountDto, or NULL in case of error. */ struct novaglobalapi_ns0_customerAccountDto *xmlTextReaderReadNs0CustomerAccountElement(xmlTextReaderPtr reader); /** * Writes a CustomerAccountDto to XML under element name "customerAccount". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _customerAccountDto The CustomerAccountDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CustomerAccountElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto); /** * Writes a CustomerAccountDto to XML under element name "customerAccount". * * @param writer The XML writer. * @param _customerAccountDto The CustomerAccountDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CustomerAccountElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto, int writeNamespaces); /** * Frees the children of a CustomerAccountDto. * * @param _customerAccountDto The CustomerAccountDto whose children are to be free. */ static void freeNs0CustomerAccountElement(struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto); /** * Reads a CustomerAccountDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The CustomerAccountDto, or NULL in case of error. */ static struct novaglobalapi_ns0_customerAccountDto *xmlTextReaderReadNs0CustomerAccountDtoType(xmlTextReaderPtr reader); /** * Writes a CustomerAccountDto to XML. * * @param writer The XML writer. * @param _customerAccountDto The CustomerAccountDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CustomerAccountDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto); /** * Frees the elements of a CustomerAccountDto. * * @param _customerAccountDto The CustomerAccountDto to free. */ static void freeNs0CustomerAccountDtoType(struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto); #endif /* DEF_novaglobalapi_ns0_customerAccountDto_H */ #ifndef DEF_novaglobalapi_ns0_customerInvoiceDto_H #define DEF_novaglobalapi_ns0_customerInvoiceDto_H /** * (no documentation provided) */ struct novaglobalapi_ns0_customerInvoiceDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *billingAccount; /** * (no documentation provided) */ struct tm *invoiceDate; /** * (no documentation provided) */ struct tm *dueDate; /** * (no documentation provided) */ xmlChar *amount; /** * (no documentation provided) */ xmlChar *discount; /** * (no documentation provided) */ xmlChar *amountWithoutTax; /** * (no documentation provided) */ xmlChar *amountTax; /** * (no documentation provided) */ xmlChar *amountWithTax; /** * (no documentation provided) */ xmlChar *invoiceNumber; /** * (no documentation provided) */ struct tm *productDate; /** * (no documentation provided) */ xmlChar *netToPay; /** * (no documentation provided) */ xmlChar *paymentMethod; /** * (no documentation provided) */ xmlChar *iban; /** * (no documentation provided) */ xmlChar *alias; /** * (no documentation provided) */ unsigned char *pdf; /** * Size of the pdf data. */ int _sizeof_pdf; /** * (no documentation provided) */ xmlChar *invoiceType; /** * (no documentation provided) */ struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *subCategoryInvoiceAgregates; /** * Size of the subCategoryInvoiceAgregates array. */ int _sizeof_subCategoryInvoiceAgregates; }; /** * Reads a CustomerInvoiceDto element from XML. The element to be read is "customerInvoice", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CustomerInvoiceDto, or NULL in case of error. */ struct novaglobalapi_ns0_customerInvoiceDto *xml_read_novaglobalapi_ns0_customerInvoiceDto(xmlTextReaderPtr reader); /** * Writes a CustomerInvoiceDto to XML under element name "customerInvoice". * * @param writer The XML writer. * @param _customerInvoiceDto The CustomerInvoiceDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_customerInvoiceDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto); /** * Frees a CustomerInvoiceDto. * * @param _customerInvoiceDto The CustomerInvoiceDto to free. */ void free_novaglobalapi_ns0_customerInvoiceDto(struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto); /** * Reads a CustomerInvoiceDto element from XML. The element to be read is "customerInvoice", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The CustomerInvoiceDto, or NULL in case of error. */ struct novaglobalapi_ns0_customerInvoiceDto *xmlTextReaderReadNs0CustomerInvoiceElement(xmlTextReaderPtr reader); /** * Writes a CustomerInvoiceDto to XML under element name "customerInvoice". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _customerInvoiceDto The CustomerInvoiceDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CustomerInvoiceElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto); /** * Writes a CustomerInvoiceDto to XML under element name "customerInvoice". * * @param writer The XML writer. * @param _customerInvoiceDto The CustomerInvoiceDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CustomerInvoiceElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto, int writeNamespaces); /** * Frees the children of a CustomerInvoiceDto. * * @param _customerInvoiceDto The CustomerInvoiceDto whose children are to be free. */ static void freeNs0CustomerInvoiceElement(struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto); /** * Reads a CustomerInvoiceDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The CustomerInvoiceDto, or NULL in case of error. */ static struct novaglobalapi_ns0_customerInvoiceDto *xmlTextReaderReadNs0CustomerInvoiceDtoType(xmlTextReaderPtr reader); /** * Writes a CustomerInvoiceDto to XML. * * @param writer The XML writer. * @param _customerInvoiceDto The CustomerInvoiceDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CustomerInvoiceDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto); /** * Frees the elements of a CustomerInvoiceDto. * * @param _customerInvoiceDto The CustomerInvoiceDto to free. */ static void freeNs0CustomerInvoiceDtoType(struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto); #endif /* DEF_novaglobalapi_ns0_customerInvoiceDto_H */ #ifndef DEF_novaglobalapi_ns0_descriptionDto_H #define DEF_novaglobalapi_ns0_descriptionDto_H /** * @author Edward P. Legaspi @since Oct 16, 2013 */ struct novaglobalapi_ns0_descriptionDto { /** * (no documentation provided) */ xmlChar *languageCode; /** * (no documentation provided) */ xmlChar *description; }; /** * Reads a DescriptionDto element from XML. The element to be read is "description", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The DescriptionDto, or NULL in case of error. */ struct novaglobalapi_ns0_descriptionDto *xml_read_novaglobalapi_ns0_descriptionDto(xmlTextReaderPtr reader); /** * Writes a DescriptionDto to XML under element name "description". * * @param writer The XML writer. * @param _descriptionDto The DescriptionDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_descriptionDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_descriptionDto *_descriptionDto); /** * Frees a DescriptionDto. * * @param _descriptionDto The DescriptionDto to free. */ void free_novaglobalapi_ns0_descriptionDto(struct novaglobalapi_ns0_descriptionDto *_descriptionDto); /** * Reads a DescriptionDto element from XML. The element to be read is "description", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The DescriptionDto, or NULL in case of error. */ struct novaglobalapi_ns0_descriptionDto *xmlTextReaderReadNs0DescriptionElement(xmlTextReaderPtr reader); /** * Writes a DescriptionDto to XML under element name "description". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _descriptionDto The DescriptionDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0DescriptionElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_descriptionDto *_descriptionDto); /** * Writes a DescriptionDto to XML under element name "description". * * @param writer The XML writer. * @param _descriptionDto The DescriptionDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0DescriptionElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_descriptionDto *_descriptionDto, int writeNamespaces); /** * Frees the children of a DescriptionDto. * * @param _descriptionDto The DescriptionDto whose children are to be free. */ static void freeNs0DescriptionElement(struct novaglobalapi_ns0_descriptionDto *_descriptionDto); /** * Reads a DescriptionDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The DescriptionDto, or NULL in case of error. */ static struct novaglobalapi_ns0_descriptionDto *xmlTextReaderReadNs0DescriptionDtoType(xmlTextReaderPtr reader); /** * Writes a DescriptionDto to XML. * * @param writer The XML writer. * @param _descriptionDto The DescriptionDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0DescriptionDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_descriptionDto *_descriptionDto); /** * Frees the elements of a DescriptionDto. * * @param _descriptionDto The DescriptionDto to free. */ static void freeNs0DescriptionDtoType(struct novaglobalapi_ns0_descriptionDto *_descriptionDto); #endif /* DEF_novaglobalapi_ns0_descriptionDto_H */ #ifndef DEF_novaglobalapi_ns0_invoiceDto_H #define DEF_novaglobalapi_ns0_invoiceDto_H /** * @author R.AITYAAZZA */ struct novaglobalapi_ns0_invoiceDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *billingAccountCode; /** * (no documentation provided) */ struct tm *invoiceDate; /** * (no documentation provided) */ struct tm *dueDate; /** * (no documentation provided) */ xmlChar *amount; /** * (no documentation provided) */ xmlChar *discount; /** * (no documentation provided) */ xmlChar *amountWithoutTax; /** * (no documentation provided) */ xmlChar *amountTax; /** * (no documentation provided) */ xmlChar *amountWithTax; /** * (no documentation provided) */ xmlChar *comment; /** * (no documentation provided) */ struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *subCategoryInvoiceAgregates; /** * Size of the subCategoryInvoiceAgregates array. */ int _sizeof_subCategoryInvoiceAgregates; }; /** * Reads a InvoiceDto element from XML. The element to be read is "invoice", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The InvoiceDto, or NULL in case of error. */ struct novaglobalapi_ns0_invoiceDto *xml_read_novaglobalapi_ns0_invoiceDto(xmlTextReaderPtr reader); /** * Writes a InvoiceDto to XML under element name "invoice". * * @param writer The XML writer. * @param _invoiceDto The InvoiceDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_invoiceDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_invoiceDto *_invoiceDto); /** * Frees a InvoiceDto. * * @param _invoiceDto The InvoiceDto to free. */ void free_novaglobalapi_ns0_invoiceDto(struct novaglobalapi_ns0_invoiceDto *_invoiceDto); /** * Reads a InvoiceDto element from XML. The element to be read is "invoice", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The InvoiceDto, or NULL in case of error. */ struct novaglobalapi_ns0_invoiceDto *xmlTextReaderReadNs0InvoiceElement(xmlTextReaderPtr reader); /** * Writes a InvoiceDto to XML under element name "invoice". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _invoiceDto The InvoiceDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0InvoiceElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_invoiceDto *_invoiceDto); /** * Writes a InvoiceDto to XML under element name "invoice". * * @param writer The XML writer. * @param _invoiceDto The InvoiceDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0InvoiceElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_invoiceDto *_invoiceDto, int writeNamespaces); /** * Frees the children of a InvoiceDto. * * @param _invoiceDto The InvoiceDto whose children are to be free. */ static void freeNs0InvoiceElement(struct novaglobalapi_ns0_invoiceDto *_invoiceDto); /** * Reads a InvoiceDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The InvoiceDto, or NULL in case of error. */ static struct novaglobalapi_ns0_invoiceDto *xmlTextReaderReadNs0InvoiceDtoType(xmlTextReaderPtr reader); /** * Writes a InvoiceDto to XML. * * @param writer The XML writer. * @param _invoiceDto The InvoiceDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0InvoiceDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_invoiceDto *_invoiceDto); /** * Frees the elements of a InvoiceDto. * * @param _invoiceDto The InvoiceDto to free. */ static void freeNs0InvoiceDtoType(struct novaglobalapi_ns0_invoiceDto *_invoiceDto); #endif /* DEF_novaglobalapi_ns0_invoiceDto_H */ #ifndef DEF_novaglobalapi_ns0_matchingAmountDto_H #define DEF_novaglobalapi_ns0_matchingAmountDto_H /** * (no documentation provided) */ struct novaglobalapi_ns0_matchingAmountDto { /** * (no documentation provided) */ xmlChar *matchingCode; /** * (no documentation provided) */ xmlChar *matchingAmount; }; /** * Reads a MatchingAmountDto element from XML. The element to be read is "matchingAmount", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The MatchingAmountDto, or NULL in case of error. */ struct novaglobalapi_ns0_matchingAmountDto *xml_read_novaglobalapi_ns0_matchingAmountDto(xmlTextReaderPtr reader); /** * Writes a MatchingAmountDto to XML under element name "matchingAmount". * * @param writer The XML writer. * @param _matchingAmountDto The MatchingAmountDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_matchingAmountDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto); /** * Frees a MatchingAmountDto. * * @param _matchingAmountDto The MatchingAmountDto to free. */ void free_novaglobalapi_ns0_matchingAmountDto(struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto); /** * Reads a MatchingAmountDto element from XML. The element to be read is "matchingAmount", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The MatchingAmountDto, or NULL in case of error. */ struct novaglobalapi_ns0_matchingAmountDto *xmlTextReaderReadNs0MatchingAmountElement(xmlTextReaderPtr reader); /** * Writes a MatchingAmountDto to XML under element name "matchingAmount". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _matchingAmountDto The MatchingAmountDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0MatchingAmountElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto); /** * Writes a MatchingAmountDto to XML under element name "matchingAmount". * * @param writer The XML writer. * @param _matchingAmountDto The MatchingAmountDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0MatchingAmountElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto, int writeNamespaces); /** * Frees the children of a MatchingAmountDto. * * @param _matchingAmountDto The MatchingAmountDto whose children are to be free. */ static void freeNs0MatchingAmountElement(struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto); /** * Reads a MatchingAmountDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The MatchingAmountDto, or NULL in case of error. */ static struct novaglobalapi_ns0_matchingAmountDto *xmlTextReaderReadNs0MatchingAmountDtoType(xmlTextReaderPtr reader); /** * Writes a MatchingAmountDto to XML. * * @param writer The XML writer. * @param _matchingAmountDto The MatchingAmountDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0MatchingAmountDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto); /** * Frees the elements of a MatchingAmountDto. * * @param _matchingAmountDto The MatchingAmountDto to free. */ static void freeNs0MatchingAmountDtoType(struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto); #endif /* DEF_novaglobalapi_ns0_matchingAmountDto_H */ #ifndef DEF_novaglobalapi_ns0_offerDto_H #define DEF_novaglobalapi_ns0_offerDto_H /** * @author Edward P. Legaspi @since Oct 11, 2013 */ struct novaglobalapi_ns0_offerDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *offerId; /** * (no documentation provided) */ struct novaglobalapi_ns0_descriptionDto *descriptions; /** * Size of the descriptions array. */ int _sizeof_descriptions; /** * (no documentation provided) */ xmlChar *services; /** * Size of the services array. */ int _sizeof_services; }; /** * Reads a OfferDto element from XML. The element to be read is "offer", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The OfferDto, or NULL in case of error. */ struct novaglobalapi_ns0_offerDto *xml_read_novaglobalapi_ns0_offerDto(xmlTextReaderPtr reader); /** * Writes a OfferDto to XML under element name "offer". * * @param writer The XML writer. * @param _offerDto The OfferDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_offerDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerDto *_offerDto); /** * Frees a OfferDto. * * @param _offerDto The OfferDto to free. */ void free_novaglobalapi_ns0_offerDto(struct novaglobalapi_ns0_offerDto *_offerDto); /** * Reads a OfferDto element from XML. The element to be read is "offer", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The OfferDto, or NULL in case of error. */ struct novaglobalapi_ns0_offerDto *xmlTextReaderReadNs0OfferElement(xmlTextReaderPtr reader); /** * Writes a OfferDto to XML under element name "offer". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _offerDto The OfferDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OfferElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerDto *_offerDto); /** * Writes a OfferDto to XML under element name "offer". * * @param writer The XML writer. * @param _offerDto The OfferDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OfferElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerDto *_offerDto, int writeNamespaces); /** * Frees the children of a OfferDto. * * @param _offerDto The OfferDto whose children are to be free. */ static void freeNs0OfferElement(struct novaglobalapi_ns0_offerDto *_offerDto); /** * Reads a OfferDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The OfferDto, or NULL in case of error. */ static struct novaglobalapi_ns0_offerDto *xmlTextReaderReadNs0OfferDtoType(xmlTextReaderPtr reader); /** * Writes a OfferDto to XML. * * @param writer The XML writer. * @param _offerDto The OfferDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OfferDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerDto *_offerDto); /** * Frees the elements of a OfferDto. * * @param _offerDto The OfferDto to free. */ static void freeNs0OfferDtoType(struct novaglobalapi_ns0_offerDto *_offerDto); #endif /* DEF_novaglobalapi_ns0_offerDto_H */ #ifndef DEF_novaglobalapi_ns0_offerPricePlanDto_H #define DEF_novaglobalapi_ns0_offerPricePlanDto_H /** * @author Edward P. Legaspi @since Oct 11, 2013 */ struct novaglobalapi_ns0_offerPricePlanDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *offerId; /** * (no documentation provided) */ xmlChar *organizationId; /** * (no documentation provided) */ xmlChar *taxId; /** * (no documentation provided) */ int *subscriptionProrata; /** * (no documentation provided) */ int *terminationProrata; /** * (no documentation provided) */ int *applyInAdvance; /** * (no documentation provided) */ xmlChar *param1; /** * (no documentation provided) */ xmlChar *param2; /** * (no documentation provided) */ xmlChar *param3; /** * (no documentation provided) */ xmlChar *billingPeriod; /** * (no documentation provided) */ struct novaglobalapi_ns0_recurringChargeDto *recurringCharges; /** * Size of the recurringCharges array. */ int _sizeof_recurringCharges; /** * (no documentation provided) */ xmlChar *usageUnit; /** * (no documentation provided) */ struct novaglobalapi_ns0_usageChargeDto *usageCharges; /** * Size of the usageCharges array. */ int _sizeof_usageCharges; /** * (no documentation provided) */ struct novaglobalapi_ns0_subscriptionFeeDto *subscriptionFees; /** * Size of the subscriptionFees array. */ int _sizeof_subscriptionFees; /** * (no documentation provided) */ struct novaglobalapi_ns0_terminationFeeDto *terminationFees; /** * Size of the terminationFees array. */ int _sizeof_terminationFees; }; /** * Reads a OfferPricePlanDto element from XML. The element to be read is "offerPricePlan", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The OfferPricePlanDto, or NULL in case of error. */ struct novaglobalapi_ns0_offerPricePlanDto *xml_read_novaglobalapi_ns0_offerPricePlanDto(xmlTextReaderPtr reader); /** * Writes a OfferPricePlanDto to XML under element name "offerPricePlan". * * @param writer The XML writer. * @param _offerPricePlanDto The OfferPricePlanDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_offerPricePlanDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto); /** * Frees a OfferPricePlanDto. * * @param _offerPricePlanDto The OfferPricePlanDto to free. */ void free_novaglobalapi_ns0_offerPricePlanDto(struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto); /** * Reads a OfferPricePlanDto element from XML. The element to be read is "offerPricePlan", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The OfferPricePlanDto, or NULL in case of error. */ struct novaglobalapi_ns0_offerPricePlanDto *xmlTextReaderReadNs0OfferPricePlanElement(xmlTextReaderPtr reader); /** * Writes a OfferPricePlanDto to XML under element name "offerPricePlan". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _offerPricePlanDto The OfferPricePlanDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OfferPricePlanElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto); /** * Writes a OfferPricePlanDto to XML under element name "offerPricePlan". * * @param writer The XML writer. * @param _offerPricePlanDto The OfferPricePlanDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OfferPricePlanElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto, int writeNamespaces); /** * Frees the children of a OfferPricePlanDto. * * @param _offerPricePlanDto The OfferPricePlanDto whose children are to be free. */ static void freeNs0OfferPricePlanElement(struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto); /** * Reads a OfferPricePlanDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The OfferPricePlanDto, or NULL in case of error. */ static struct novaglobalapi_ns0_offerPricePlanDto *xmlTextReaderReadNs0OfferPricePlanDtoType(xmlTextReaderPtr reader); /** * Writes a OfferPricePlanDto to XML. * * @param writer The XML writer. * @param _offerPricePlanDto The OfferPricePlanDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OfferPricePlanDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto); /** * Frees the elements of a OfferPricePlanDto. * * @param _offerPricePlanDto The OfferPricePlanDto to free. */ static void freeNs0OfferPricePlanDtoType(struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto); #endif /* DEF_novaglobalapi_ns0_offerPricePlanDto_H */ #ifndef DEF_novaglobalapi_ns0_oneShotChargeTemplateDto_H #define DEF_novaglobalapi_ns0_oneShotChargeTemplateDto_H /** * @author Edward P. Legaspi */ struct novaglobalapi_ns0_oneShotChargeTemplateDto { /** * (no documentation provided) */ xmlChar *chargeCode; /** * (no documentation provided) */ xmlChar *description; /** * (no documentation provided) */ double *unitPriceWithoutTax; /** * (no documentation provided) */ double *taxPercent; /** * (no documentation provided) */ xmlChar *taxCode; /** * (no documentation provided) */ xmlChar *taxDescription; }; /** * Reads a OneShotChargeTemplateDto element from XML. The element to be read is "oneShotChargeTemplate", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The OneShotChargeTemplateDto, or NULL in case of error. */ struct novaglobalapi_ns0_oneShotChargeTemplateDto *xml_read_novaglobalapi_ns0_oneShotChargeTemplateDto(xmlTextReaderPtr reader); /** * Writes a OneShotChargeTemplateDto to XML under element name "oneShotChargeTemplate". * * @param writer The XML writer. * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_oneShotChargeTemplateDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto); /** * Frees a OneShotChargeTemplateDto. * * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to free. */ void free_novaglobalapi_ns0_oneShotChargeTemplateDto(struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto); /** * Reads a OneShotChargeTemplateDto element from XML. The element to be read is "oneShotChargeTemplate", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The OneShotChargeTemplateDto, or NULL in case of error. */ struct novaglobalapi_ns0_oneShotChargeTemplateDto *xmlTextReaderReadNs0OneShotChargeTemplateElement(xmlTextReaderPtr reader); /** * Writes a OneShotChargeTemplateDto to XML under element name "oneShotChargeTemplate". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OneShotChargeTemplateElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto); /** * Writes a OneShotChargeTemplateDto to XML under element name "oneShotChargeTemplate". * * @param writer The XML writer. * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OneShotChargeTemplateElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto, int writeNamespaces); /** * Frees the children of a OneShotChargeTemplateDto. * * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto whose children are to be free. */ static void freeNs0OneShotChargeTemplateElement(struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto); /** * Reads a OneShotChargeTemplateDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The OneShotChargeTemplateDto, or NULL in case of error. */ static struct novaglobalapi_ns0_oneShotChargeTemplateDto *xmlTextReaderReadNs0OneShotChargeTemplateDtoType(xmlTextReaderPtr reader); /** * Writes a OneShotChargeTemplateDto to XML. * * @param writer The XML writer. * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OneShotChargeTemplateDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto); /** * Frees the elements of a OneShotChargeTemplateDto. * * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to free. */ static void freeNs0OneShotChargeTemplateDtoType(struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto); #endif /* DEF_novaglobalapi_ns0_oneShotChargeTemplateDto_H */ #ifndef DEF_novaglobalapi_ns0_oneShotChargeTemplateListDto_H #define DEF_novaglobalapi_ns0_oneShotChargeTemplateListDto_H /** * @author Edward P. Legaspi */ struct novaglobalapi_ns0_oneShotChargeTemplateListDto { /** * (no documentation provided) */ struct novaglobalapi_ns0_oneShotChargeTemplateDto *oneShotChargeTemplateDtos; /** * Size of the oneShotChargeTemplateDtos array. */ int _sizeof_oneShotChargeTemplateDtos; }; /** * Reads a OneShotChargeTemplateListDto element from XML. The element to be read is "oneShotChargeTemplateList", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The OneShotChargeTemplateListDto, or NULL in case of error. */ struct novaglobalapi_ns0_oneShotChargeTemplateListDto *xml_read_novaglobalapi_ns0_oneShotChargeTemplateListDto(xmlTextReaderPtr reader); /** * Writes a OneShotChargeTemplateListDto to XML under element name "oneShotChargeTemplateList". * * @param writer The XML writer. * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_oneShotChargeTemplateListDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto); /** * Frees a OneShotChargeTemplateListDto. * * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to free. */ void free_novaglobalapi_ns0_oneShotChargeTemplateListDto(struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto); /** * Reads a OneShotChargeTemplateListDto element from XML. The element to be read is "oneShotChargeTemplateList", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The OneShotChargeTemplateListDto, or NULL in case of error. */ struct novaglobalapi_ns0_oneShotChargeTemplateListDto *xmlTextReaderReadNs0OneShotChargeTemplateListElement(xmlTextReaderPtr reader); /** * Writes a OneShotChargeTemplateListDto to XML under element name "oneShotChargeTemplateList". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OneShotChargeTemplateListElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto); /** * Writes a OneShotChargeTemplateListDto to XML under element name "oneShotChargeTemplateList". * * @param writer The XML writer. * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OneShotChargeTemplateListElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto, int writeNamespaces); /** * Frees the children of a OneShotChargeTemplateListDto. * * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto whose children are to be free. */ static void freeNs0OneShotChargeTemplateListElement(struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto); /** * Reads a OneShotChargeTemplateListDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The OneShotChargeTemplateListDto, or NULL in case of error. */ static struct novaglobalapi_ns0_oneShotChargeTemplateListDto *xmlTextReaderReadNs0OneShotChargeTemplateListDtoType(xmlTextReaderPtr reader); /** * Writes a OneShotChargeTemplateListDto to XML. * * @param writer The XML writer. * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OneShotChargeTemplateListDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto); /** * Frees the elements of a OneShotChargeTemplateListDto. * * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to free. */ static void freeNs0OneShotChargeTemplateListDtoType(struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto); #endif /* DEF_novaglobalapi_ns0_oneShotChargeTemplateListDto_H */ #ifndef DEF_novaglobalapi_ns0_organizationDto_H #define DEF_novaglobalapi_ns0_organizationDto_H /** * @author Edward P. Legaspi @since Oct 11, 2013 */ struct novaglobalapi_ns0_organizationDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *organizationId; /** * (no documentation provided) */ xmlChar *name; /** * (no documentation provided) */ xmlChar *parentId; /** * (no documentation provided) */ xmlChar *countryCode; /** * (no documentation provided) */ xmlChar *defaultCurrencyCode; /** * (no documentation provided) */ xmlChar *languageCode; }; /** * Reads a OrganizationDto element from XML. The element to be read is "organization", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The OrganizationDto, or NULL in case of error. */ struct novaglobalapi_ns0_organizationDto *xml_read_novaglobalapi_ns0_organizationDto(xmlTextReaderPtr reader); /** * Writes a OrganizationDto to XML under element name "organization". * * @param writer The XML writer. * @param _organizationDto The OrganizationDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_organizationDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_organizationDto *_organizationDto); /** * Frees a OrganizationDto. * * @param _organizationDto The OrganizationDto to free. */ void free_novaglobalapi_ns0_organizationDto(struct novaglobalapi_ns0_organizationDto *_organizationDto); /** * Reads a OrganizationDto element from XML. The element to be read is "organization", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The OrganizationDto, or NULL in case of error. */ struct novaglobalapi_ns0_organizationDto *xmlTextReaderReadNs0OrganizationElement(xmlTextReaderPtr reader); /** * Writes a OrganizationDto to XML under element name "organization". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _organizationDto The OrganizationDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OrganizationElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_organizationDto *_organizationDto); /** * Writes a OrganizationDto to XML under element name "organization". * * @param writer The XML writer. * @param _organizationDto The OrganizationDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OrganizationElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_organizationDto *_organizationDto, int writeNamespaces); /** * Frees the children of a OrganizationDto. * * @param _organizationDto The OrganizationDto whose children are to be free. */ static void freeNs0OrganizationElement(struct novaglobalapi_ns0_organizationDto *_organizationDto); /** * Reads a OrganizationDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The OrganizationDto, or NULL in case of error. */ static struct novaglobalapi_ns0_organizationDto *xmlTextReaderReadNs0OrganizationDtoType(xmlTextReaderPtr reader); /** * Writes a OrganizationDto to XML. * * @param writer The XML writer. * @param _organizationDto The OrganizationDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0OrganizationDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_organizationDto *_organizationDto); /** * Frees the elements of a OrganizationDto. * * @param _organizationDto The OrganizationDto to free. */ static void freeNs0OrganizationDtoType(struct novaglobalapi_ns0_organizationDto *_organizationDto); #endif /* DEF_novaglobalapi_ns0_organizationDto_H */ #ifndef DEF_novaglobalapi_ns0_ratedTransactionDTO_H #define DEF_novaglobalapi_ns0_ratedTransactionDTO_H /** * @author R.AITYAAZZA */ struct novaglobalapi_ns0_ratedTransactionDTO { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ struct tm *usageDate; /** * (no documentation provided) */ xmlChar *unitAmountWithoutTax; /** * (no documentation provided) */ xmlChar *unitAmountWithTax; /** * (no documentation provided) */ xmlChar *unitAmountTax; /** * (no documentation provided) */ xmlChar *quantity; /** * (no documentation provided) */ xmlChar *amountWithoutTax; /** * (no documentation provided) */ xmlChar *amountWithTax; /** * (no documentation provided) */ xmlChar *amountTax; /** * (no documentation provided) */ xmlChar *code; /** * (no documentation provided) */ xmlChar *description; /** * (no documentation provided) */ int doNotTriggerInvoicing; }; /** * Reads a RatedTransactionDTO element from XML. The element to be read is "ratedTransaction", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The RatedTransactionDTO, or NULL in case of error. */ struct novaglobalapi_ns0_ratedTransactionDTO *xml_read_novaglobalapi_ns0_ratedTransactionDTO(xmlTextReaderPtr reader); /** * Writes a RatedTransactionDTO to XML under element name "ratedTransaction". * * @param writer The XML writer. * @param _ratedTransactionDTO The RatedTransactionDTO to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_ratedTransactionDTO(xmlTextWriterPtr writer, struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO); /** * Frees a RatedTransactionDTO. * * @param _ratedTransactionDTO The RatedTransactionDTO to free. */ void free_novaglobalapi_ns0_ratedTransactionDTO(struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO); /** * Reads a RatedTransactionDTO element from XML. The element to be read is "ratedTransaction", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The RatedTransactionDTO, or NULL in case of error. */ struct novaglobalapi_ns0_ratedTransactionDTO *xmlTextReaderReadNs0RatedTransactionElement(xmlTextReaderPtr reader); /** * Writes a RatedTransactionDTO to XML under element name "ratedTransaction". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _ratedTransactionDTO The RatedTransactionDTO to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0RatedTransactionElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO); /** * Writes a RatedTransactionDTO to XML under element name "ratedTransaction". * * @param writer The XML writer. * @param _ratedTransactionDTO The RatedTransactionDTO to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0RatedTransactionElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO, int writeNamespaces); /** * Frees the children of a RatedTransactionDTO. * * @param _ratedTransactionDTO The RatedTransactionDTO whose children are to be free. */ static void freeNs0RatedTransactionElement(struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO); /** * Reads a RatedTransactionDTO from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The RatedTransactionDTO, or NULL in case of error. */ static struct novaglobalapi_ns0_ratedTransactionDTO *xmlTextReaderReadNs0RatedTransactionDTOType(xmlTextReaderPtr reader); /** * Writes a RatedTransactionDTO to XML. * * @param writer The XML writer. * @param _ratedTransactionDTO The RatedTransactionDTO to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0RatedTransactionDTOType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO); /** * Frees the elements of a RatedTransactionDTO. * * @param _ratedTransactionDTO The RatedTransactionDTO to free. */ static void freeNs0RatedTransactionDTOType(struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO); #endif /* DEF_novaglobalapi_ns0_ratedTransactionDTO_H */ #ifndef DEF_novaglobalapi_ns0_recurringChargeDto_H #define DEF_novaglobalapi_ns0_recurringChargeDto_H /** * @author Edward P. Legaspi @since Nov 4, 2013 */ struct novaglobalapi_ns0_recurringChargeDto { /** * (no documentation provided) */ xmlChar *currencyCode; /** * (no documentation provided) */ struct tm *startDate; /** * (no documentation provided) */ struct tm *endDate; /** * (no documentation provided) */ int *minAge; /** * (no documentation provided) */ int *maxAge; /** * (no documentation provided) */ xmlChar *price; /** * (no documentation provided) */ xmlChar *recommendedPrice; }; /** * Reads a RecurringChargeDto element from XML. The element to be read is "recurringCharge", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The RecurringChargeDto, or NULL in case of error. */ struct novaglobalapi_ns0_recurringChargeDto *xml_read_novaglobalapi_ns0_recurringChargeDto(xmlTextReaderPtr reader); /** * Writes a RecurringChargeDto to XML under element name "recurringCharge". * * @param writer The XML writer. * @param _recurringChargeDto The RecurringChargeDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_recurringChargeDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto); /** * Frees a RecurringChargeDto. * * @param _recurringChargeDto The RecurringChargeDto to free. */ void free_novaglobalapi_ns0_recurringChargeDto(struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto); /** * Reads a RecurringChargeDto element from XML. The element to be read is "recurringCharge", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The RecurringChargeDto, or NULL in case of error. */ struct novaglobalapi_ns0_recurringChargeDto *xmlTextReaderReadNs0RecurringChargeElement(xmlTextReaderPtr reader); /** * Writes a RecurringChargeDto to XML under element name "recurringCharge". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _recurringChargeDto The RecurringChargeDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0RecurringChargeElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto); /** * Writes a RecurringChargeDto to XML under element name "recurringCharge". * * @param writer The XML writer. * @param _recurringChargeDto The RecurringChargeDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0RecurringChargeElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto, int writeNamespaces); /** * Frees the children of a RecurringChargeDto. * * @param _recurringChargeDto The RecurringChargeDto whose children are to be free. */ static void freeNs0RecurringChargeElement(struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto); /** * Reads a RecurringChargeDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The RecurringChargeDto, or NULL in case of error. */ static struct novaglobalapi_ns0_recurringChargeDto *xmlTextReaderReadNs0RecurringChargeDtoType(xmlTextReaderPtr reader); /** * Writes a RecurringChargeDto to XML. * * @param writer The XML writer. * @param _recurringChargeDto The RecurringChargeDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0RecurringChargeDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto); /** * Frees the elements of a RecurringChargeDto. * * @param _recurringChargeDto The RecurringChargeDto to free. */ static void freeNs0RecurringChargeDtoType(struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto); #endif /* DEF_novaglobalapi_ns0_recurringChargeDto_H */ #ifndef DEF_novaglobalapi_ns0_serviceDto_H #define DEF_novaglobalapi_ns0_serviceDto_H /** * @author Edward P. Legaspi @since Oct 11, 2013 */ struct novaglobalapi_ns0_serviceDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *serviceId; /** * (no documentation provided) */ struct novaglobalapi_ns0_descriptionDto *descriptions; /** * Size of the descriptions array. */ int _sizeof_descriptions; }; /** * Reads a ServiceDto element from XML. The element to be read is "service", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The ServiceDto, or NULL in case of error. */ struct novaglobalapi_ns0_serviceDto *xml_read_novaglobalapi_ns0_serviceDto(xmlTextReaderPtr reader); /** * Writes a ServiceDto to XML under element name "service". * * @param writer The XML writer. * @param _serviceDto The ServiceDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_serviceDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceDto *_serviceDto); /** * Frees a ServiceDto. * * @param _serviceDto The ServiceDto to free. */ void free_novaglobalapi_ns0_serviceDto(struct novaglobalapi_ns0_serviceDto *_serviceDto); /** * Reads a ServiceDto element from XML. The element to be read is "service", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The ServiceDto, or NULL in case of error. */ struct novaglobalapi_ns0_serviceDto *xmlTextReaderReadNs0ServiceElement(xmlTextReaderPtr reader); /** * Writes a ServiceDto to XML under element name "service". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _serviceDto The ServiceDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ServiceElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceDto *_serviceDto); /** * Writes a ServiceDto to XML under element name "service". * * @param writer The XML writer. * @param _serviceDto The ServiceDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ServiceElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceDto *_serviceDto, int writeNamespaces); /** * Frees the children of a ServiceDto. * * @param _serviceDto The ServiceDto whose children are to be free. */ static void freeNs0ServiceElement(struct novaglobalapi_ns0_serviceDto *_serviceDto); /** * Reads a ServiceDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The ServiceDto, or NULL in case of error. */ static struct novaglobalapi_ns0_serviceDto *xmlTextReaderReadNs0ServiceDtoType(xmlTextReaderPtr reader); /** * Writes a ServiceDto to XML. * * @param writer The XML writer. * @param _serviceDto The ServiceDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ServiceDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceDto *_serviceDto); /** * Frees the elements of a ServiceDto. * * @param _serviceDto The ServiceDto to free. */ static void freeNs0ServiceDtoType(struct novaglobalapi_ns0_serviceDto *_serviceDto); #endif /* DEF_novaglobalapi_ns0_serviceDto_H */ #ifndef DEF_novaglobalapi_ns0_servicePricePlanDto_H #define DEF_novaglobalapi_ns0_servicePricePlanDto_H /** * @author Edward P. Legaspi @since Oct 11, 2013 */ struct novaglobalapi_ns0_servicePricePlanDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *serviceId; /** * (no documentation provided) */ xmlChar *organizationId; /** * (no documentation provided) */ xmlChar *taxId; /** * (no documentation provided) */ int *subscriptionProrata; /** * (no documentation provided) */ int *terminationProrata; /** * (no documentation provided) */ int *applyInAdvance; /** * (no documentation provided) */ xmlChar *param1; /** * (no documentation provided) */ xmlChar *param2; /** * (no documentation provided) */ xmlChar *param3; /** * (no documentation provided) */ xmlChar *billingPeriod; /** * (no documentation provided) */ struct novaglobalapi_ns0_recurringChargeDto *recurringCharges; /** * Size of the recurringCharges array. */ int _sizeof_recurringCharges; /** * (no documentation provided) */ xmlChar *usageUnit; /** * (no documentation provided) */ struct novaglobalapi_ns0_usageChargeDto *usageCharges; /** * Size of the usageCharges array. */ int _sizeof_usageCharges; /** * (no documentation provided) */ struct novaglobalapi_ns0_subscriptionFeeDto *subscriptionFees; /** * Size of the subscriptionFees array. */ int _sizeof_subscriptionFees; /** * (no documentation provided) */ struct novaglobalapi_ns0_terminationFeeDto *terminationFees; /** * Size of the terminationFees array. */ int _sizeof_terminationFees; }; /** * Reads a ServicePricePlanDto element from XML. The element to be read is "servicePlan", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The ServicePricePlanDto, or NULL in case of error. */ struct novaglobalapi_ns0_servicePricePlanDto *xml_read_novaglobalapi_ns0_servicePricePlanDto(xmlTextReaderPtr reader); /** * Writes a ServicePricePlanDto to XML under element name "servicePlan". * * @param writer The XML writer. * @param _servicePricePlanDto The ServicePricePlanDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_servicePricePlanDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto); /** * Frees a ServicePricePlanDto. * * @param _servicePricePlanDto The ServicePricePlanDto to free. */ void free_novaglobalapi_ns0_servicePricePlanDto(struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto); /** * Reads a ServicePricePlanDto element from XML. The element to be read is "servicePlan", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The ServicePricePlanDto, or NULL in case of error. */ struct novaglobalapi_ns0_servicePricePlanDto *xmlTextReaderReadNs0ServicePlanElement(xmlTextReaderPtr reader); /** * Writes a ServicePricePlanDto to XML under element name "servicePlan". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _servicePricePlanDto The ServicePricePlanDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ServicePlanElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto); /** * Writes a ServicePricePlanDto to XML under element name "servicePlan". * * @param writer The XML writer. * @param _servicePricePlanDto The ServicePricePlanDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ServicePlanElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto, int writeNamespaces); /** * Frees the children of a ServicePricePlanDto. * * @param _servicePricePlanDto The ServicePricePlanDto whose children are to be free. */ static void freeNs0ServicePlanElement(struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto); /** * Reads a ServicePricePlanDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The ServicePricePlanDto, or NULL in case of error. */ static struct novaglobalapi_ns0_servicePricePlanDto *xmlTextReaderReadNs0ServicePricePlanDtoType(xmlTextReaderPtr reader); /** * Writes a ServicePricePlanDto to XML. * * @param writer The XML writer. * @param _servicePricePlanDto The ServicePricePlanDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ServicePricePlanDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto); /** * Frees the elements of a ServicePricePlanDto. * * @param _servicePricePlanDto The ServicePricePlanDto to free. */ static void freeNs0ServicePricePlanDtoType(struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto); #endif /* DEF_novaglobalapi_ns0_servicePricePlanDto_H */ #ifndef DEF_novaglobalapi_ns0_serviceToAddDto_H #define DEF_novaglobalapi_ns0_serviceToAddDto_H /** * @author Edward P. Legaspi @since Nov 13, 2013 */ struct novaglobalapi_ns0_serviceToAddDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *serviceId; /** * (no documentation provided) */ struct tm *subscriptionDate; /** * (no documentation provided) */ xmlChar *param1; /** * (no documentation provided) */ xmlChar *param2; /** * (no documentation provided) */ xmlChar *param3; }; /** * Reads a ServiceToAddDto element from XML. The element to be read is "serviceToAdd", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The ServiceToAddDto, or NULL in case of error. */ struct novaglobalapi_ns0_serviceToAddDto *xml_read_novaglobalapi_ns0_serviceToAddDto(xmlTextReaderPtr reader); /** * Writes a ServiceToAddDto to XML under element name "serviceToAdd". * * @param writer The XML writer. * @param _serviceToAddDto The ServiceToAddDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_serviceToAddDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto); /** * Frees a ServiceToAddDto. * * @param _serviceToAddDto The ServiceToAddDto to free. */ void free_novaglobalapi_ns0_serviceToAddDto(struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto); /** * Reads a ServiceToAddDto element from XML. The element to be read is "serviceToAdd", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The ServiceToAddDto, or NULL in case of error. */ struct novaglobalapi_ns0_serviceToAddDto *xmlTextReaderReadNs0ServiceToAddElement(xmlTextReaderPtr reader); /** * Writes a ServiceToAddDto to XML under element name "serviceToAdd". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _serviceToAddDto The ServiceToAddDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ServiceToAddElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto); /** * Writes a ServiceToAddDto to XML under element name "serviceToAdd". * * @param writer The XML writer. * @param _serviceToAddDto The ServiceToAddDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ServiceToAddElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto, int writeNamespaces); /** * Frees the children of a ServiceToAddDto. * * @param _serviceToAddDto The ServiceToAddDto whose children are to be free. */ static void freeNs0ServiceToAddElement(struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto); /** * Reads a ServiceToAddDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The ServiceToAddDto, or NULL in case of error. */ static struct novaglobalapi_ns0_serviceToAddDto *xmlTextReaderReadNs0ServiceToAddDtoType(xmlTextReaderPtr reader); /** * Writes a ServiceToAddDto to XML. * * @param writer The XML writer. * @param _serviceToAddDto The ServiceToAddDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ServiceToAddDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto); /** * Frees the elements of a ServiceToAddDto. * * @param _serviceToAddDto The ServiceToAddDto to free. */ static void freeNs0ServiceToAddDtoType(struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto); #endif /* DEF_novaglobalapi_ns0_serviceToAddDto_H */ #ifndef DEF_novaglobalapi_ns0_serviceToTerminateDto_H #define DEF_novaglobalapi_ns0_serviceToTerminateDto_H /** * @author Edward P. Legaspi @since Nov 13, 2013 */ struct novaglobalapi_ns0_serviceToTerminateDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *serviceId; /** * (no documentation provided) */ struct tm *terminationDate; }; /** * Reads a ServiceToTerminateDto element from XML. The element to be read is "serviceToTerminate", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The ServiceToTerminateDto, or NULL in case of error. */ struct novaglobalapi_ns0_serviceToTerminateDto *xml_read_novaglobalapi_ns0_serviceToTerminateDto(xmlTextReaderPtr reader); /** * Writes a ServiceToTerminateDto to XML under element name "serviceToTerminate". * * @param writer The XML writer. * @param _serviceToTerminateDto The ServiceToTerminateDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_serviceToTerminateDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto); /** * Frees a ServiceToTerminateDto. * * @param _serviceToTerminateDto The ServiceToTerminateDto to free. */ void free_novaglobalapi_ns0_serviceToTerminateDto(struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto); /** * Reads a ServiceToTerminateDto element from XML. The element to be read is "serviceToTerminate", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The ServiceToTerminateDto, or NULL in case of error. */ struct novaglobalapi_ns0_serviceToTerminateDto *xmlTextReaderReadNs0ServiceToTerminateElement(xmlTextReaderPtr reader); /** * Writes a ServiceToTerminateDto to XML under element name "serviceToTerminate". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _serviceToTerminateDto The ServiceToTerminateDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ServiceToTerminateElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto); /** * Writes a ServiceToTerminateDto to XML under element name "serviceToTerminate". * * @param writer The XML writer. * @param _serviceToTerminateDto The ServiceToTerminateDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ServiceToTerminateElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto, int writeNamespaces); /** * Frees the children of a ServiceToTerminateDto. * * @param _serviceToTerminateDto The ServiceToTerminateDto whose children are to be free. */ static void freeNs0ServiceToTerminateElement(struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto); /** * Reads a ServiceToTerminateDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The ServiceToTerminateDto, or NULL in case of error. */ static struct novaglobalapi_ns0_serviceToTerminateDto *xmlTextReaderReadNs0ServiceToTerminateDtoType(xmlTextReaderPtr reader); /** * Writes a ServiceToTerminateDto to XML. * * @param writer The XML writer. * @param _serviceToTerminateDto The ServiceToTerminateDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ServiceToTerminateDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto); /** * Frees the elements of a ServiceToTerminateDto. * * @param _serviceToTerminateDto The ServiceToTerminateDto to free. */ static void freeNs0ServiceToTerminateDtoType(struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto); #endif /* DEF_novaglobalapi_ns0_serviceToTerminateDto_H */ #ifndef DEF_novaglobalapi_ns0_subCategoryInvoiceAgregateDto_H #define DEF_novaglobalapi_ns0_subCategoryInvoiceAgregateDto_H /** * @author R.AITYAAZZA */ struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto { /** * (no documentation provided) */ int *itemNumber; /** * (no documentation provided) */ xmlChar *accountingCode; /** * (no documentation provided) */ xmlChar *description; /** * (no documentation provided) */ xmlChar *taxPercent; /** * (no documentation provided) */ xmlChar *quantity; /** * (no documentation provided) */ xmlChar *discount; /** * (no documentation provided) */ xmlChar *amountWithoutTax; /** * (no documentation provided) */ xmlChar *amountTax; /** * (no documentation provided) */ xmlChar *amountWithTax; /** * (no documentation provided) */ struct novaglobalapi_ns0_ratedTransactionDTO *ratedTransactions; /** * Size of the ratedTransactions array. */ int _sizeof_ratedTransactions; }; /** * Reads a SubCategoryInvoiceAgregateDto element from XML. The element to be read is "subCategoryInvoiceAgregate", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The SubCategoryInvoiceAgregateDto, or NULL in case of error. */ struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *xml_read_novaglobalapi_ns0_subCategoryInvoiceAgregateDto(xmlTextReaderPtr reader); /** * Writes a SubCategoryInvoiceAgregateDto to XML under element name "subCategoryInvoiceAgregate". * * @param writer The XML writer. * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_subCategoryInvoiceAgregateDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto); /** * Frees a SubCategoryInvoiceAgregateDto. * * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to free. */ void free_novaglobalapi_ns0_subCategoryInvoiceAgregateDto(struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto); /** * Reads a SubCategoryInvoiceAgregateDto element from XML. The element to be read is "subCategoryInvoiceAgregate", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The SubCategoryInvoiceAgregateDto, or NULL in case of error. */ struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *xmlTextReaderReadNs0SubCategoryInvoiceAgregateElement(xmlTextReaderPtr reader); /** * Writes a SubCategoryInvoiceAgregateDto to XML under element name "subCategoryInvoiceAgregate". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubCategoryInvoiceAgregateElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto); /** * Writes a SubCategoryInvoiceAgregateDto to XML under element name "subCategoryInvoiceAgregate". * * @param writer The XML writer. * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubCategoryInvoiceAgregateElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto, int writeNamespaces); /** * Frees the children of a SubCategoryInvoiceAgregateDto. * * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto whose children are to be free. */ static void freeNs0SubCategoryInvoiceAgregateElement(struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto); /** * Reads a SubCategoryInvoiceAgregateDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The SubCategoryInvoiceAgregateDto, or NULL in case of error. */ static struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *xmlTextReaderReadNs0SubCategoryInvoiceAgregateDtoType(xmlTextReaderPtr reader); /** * Writes a SubCategoryInvoiceAgregateDto to XML. * * @param writer The XML writer. * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubCategoryInvoiceAgregateDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto); /** * Frees the elements of a SubCategoryInvoiceAgregateDto. * * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to free. */ static void freeNs0SubCategoryInvoiceAgregateDtoType(struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto); #endif /* DEF_novaglobalapi_ns0_subCategoryInvoiceAgregateDto_H */ #ifndef DEF_novaglobalapi_ns0_subscriptionFeeDto_H #define DEF_novaglobalapi_ns0_subscriptionFeeDto_H /** * @author Edward P. Legaspi @since Nov 4, 2013 */ struct novaglobalapi_ns0_subscriptionFeeDto { /** * (no documentation provided) */ xmlChar *currencyCode; /** * (no documentation provided) */ struct tm *startDate; /** * (no documentation provided) */ struct tm *endDate; /** * (no documentation provided) */ xmlChar *price; /** * (no documentation provided) */ xmlChar *recommendedPrice; }; /** * Reads a SubscriptionFeeDto element from XML. The element to be read is "subscriptionFee", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The SubscriptionFeeDto, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionFeeDto *xml_read_novaglobalapi_ns0_subscriptionFeeDto(xmlTextReaderPtr reader); /** * Writes a SubscriptionFeeDto to XML under element name "subscriptionFee". * * @param writer The XML writer. * @param _subscriptionFeeDto The SubscriptionFeeDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_subscriptionFeeDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto); /** * Frees a SubscriptionFeeDto. * * @param _subscriptionFeeDto The SubscriptionFeeDto to free. */ void free_novaglobalapi_ns0_subscriptionFeeDto(struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto); /** * Reads a SubscriptionFeeDto element from XML. The element to be read is "subscriptionFee", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The SubscriptionFeeDto, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionFeeDto *xmlTextReaderReadNs0SubscriptionFeeElement(xmlTextReaderPtr reader); /** * Writes a SubscriptionFeeDto to XML under element name "subscriptionFee". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _subscriptionFeeDto The SubscriptionFeeDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubscriptionFeeElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto); /** * Writes a SubscriptionFeeDto to XML under element name "subscriptionFee". * * @param writer The XML writer. * @param _subscriptionFeeDto The SubscriptionFeeDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubscriptionFeeElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto, int writeNamespaces); /** * Frees the children of a SubscriptionFeeDto. * * @param _subscriptionFeeDto The SubscriptionFeeDto whose children are to be free. */ static void freeNs0SubscriptionFeeElement(struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto); /** * Reads a SubscriptionFeeDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The SubscriptionFeeDto, or NULL in case of error. */ static struct novaglobalapi_ns0_subscriptionFeeDto *xmlTextReaderReadNs0SubscriptionFeeDtoType(xmlTextReaderPtr reader); /** * Writes a SubscriptionFeeDto to XML. * * @param writer The XML writer. * @param _subscriptionFeeDto The SubscriptionFeeDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubscriptionFeeDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto); /** * Frees the elements of a SubscriptionFeeDto. * * @param _subscriptionFeeDto The SubscriptionFeeDto to free. */ static void freeNs0SubscriptionFeeDtoType(struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto); #endif /* DEF_novaglobalapi_ns0_subscriptionFeeDto_H */ #ifndef DEF_novaglobalapi_ns0_subscriptionWithCreditLimitDto_H #define DEF_novaglobalapi_ns0_subscriptionWithCreditLimitDto_H /** * @author Edward P. Legaspi @since Nov 13, 2013 */ struct novaglobalapi_ns0_subscriptionWithCreditLimitDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *userId; /** * (no documentation provided) */ xmlChar *organizationId; /** * (no documentation provided) */ xmlChar *offerId; /** * (no documentation provided) */ struct novaglobalapi_ns0_serviceToAddDto *servicesToAdd; /** * Size of the servicesToAdd array. */ int _sizeof_servicesToAdd; /** * (no documentation provided) */ struct novaglobalapi_ns0_creditLimitDto *creditLimits; /** * Size of the creditLimits array. */ int _sizeof_creditLimits; /** * (no documentation provided) */ struct tm *subscriptionDate; }; /** * Reads a SubscriptionWithCreditLimitDto element from XML. The element to be read is "subscriptionWithCreditLimit", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitDto, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *xml_read_novaglobalapi_ns0_subscriptionWithCreditLimitDto(xmlTextReaderPtr reader); /** * Writes a SubscriptionWithCreditLimitDto to XML under element name "subscriptionWithCreditLimit". * * @param writer The XML writer. * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_subscriptionWithCreditLimitDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto); /** * Frees a SubscriptionWithCreditLimitDto. * * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to free. */ void free_novaglobalapi_ns0_subscriptionWithCreditLimitDto(struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto); /** * Reads a SubscriptionWithCreditLimitDto element from XML. The element to be read is "subscriptionWithCreditLimit", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitDto, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *xmlTextReaderReadNs0SubscriptionWithCreditLimitElement(xmlTextReaderPtr reader); /** * Writes a SubscriptionWithCreditLimitDto to XML under element name "subscriptionWithCreditLimit". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto); /** * Writes a SubscriptionWithCreditLimitDto to XML under element name "subscriptionWithCreditLimit". * * @param writer The XML writer. * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto, int writeNamespaces); /** * Frees the children of a SubscriptionWithCreditLimitDto. * * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto whose children are to be free. */ static void freeNs0SubscriptionWithCreditLimitElement(struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto); /** * Reads a SubscriptionWithCreditLimitDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitDto, or NULL in case of error. */ static struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *xmlTextReaderReadNs0SubscriptionWithCreditLimitDtoType(xmlTextReaderPtr reader); /** * Writes a SubscriptionWithCreditLimitDto to XML. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto); /** * Frees the elements of a SubscriptionWithCreditLimitDto. * * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to free. */ static void freeNs0SubscriptionWithCreditLimitDtoType(struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto); #endif /* DEF_novaglobalapi_ns0_subscriptionWithCreditLimitDto_H */ #ifndef DEF_novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto_H #define DEF_novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto_H /** * @author Edward P. Legaspi @since Nov 13, 2013 */ struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *userId; /** * (no documentation provided) */ xmlChar *organizationId; /** * (no documentation provided) */ xmlChar *offerId; /** * (no documentation provided) */ struct novaglobalapi_ns0_serviceToAddDto *servicesToAdd; /** * Size of the servicesToAdd array. */ int _sizeof_servicesToAdd; /** * (no documentation provided) */ struct novaglobalapi_ns0_creditLimitDto *creditLimits; /** * Size of the creditLimits array. */ int _sizeof_creditLimits; /** * (no documentation provided) */ struct tm *subscriptionDate; /** * (no documentation provided) */ struct novaglobalapi_ns0_serviceToTerminateDto *servicesToTerminate; /** * Size of the servicesToTerminate array. */ int _sizeof_servicesToTerminate; }; /** * Reads a SubscriptionWithCreditLimitUpdateDto element from XML. The element to be read is "subscriptionWithCreditLimitUpdate", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitUpdateDto, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *xml_read_novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto(xmlTextReaderPtr reader); /** * Writes a SubscriptionWithCreditLimitUpdateDto to XML under element name "subscriptionWithCreditLimitUpdate". * * @param writer The XML writer. * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto); /** * Frees a SubscriptionWithCreditLimitUpdateDto. * * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to free. */ void free_novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto(struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto); /** * Reads a SubscriptionWithCreditLimitUpdateDto element from XML. The element to be read is "subscriptionWithCreditLimitUpdate", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitUpdateDto, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *xmlTextReaderReadNs0SubscriptionWithCreditLimitUpdateElement(xmlTextReaderPtr reader); /** * Writes a SubscriptionWithCreditLimitUpdateDto to XML under element name "subscriptionWithCreditLimitUpdate". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitUpdateElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto); /** * Writes a SubscriptionWithCreditLimitUpdateDto to XML under element name "subscriptionWithCreditLimitUpdate". * * @param writer The XML writer. * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitUpdateElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto, int writeNamespaces); /** * Frees the children of a SubscriptionWithCreditLimitUpdateDto. * * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto whose children are to be free. */ static void freeNs0SubscriptionWithCreditLimitUpdateElement(struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto); /** * Reads a SubscriptionWithCreditLimitUpdateDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitUpdateDto, or NULL in case of error. */ static struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *xmlTextReaderReadNs0SubscriptionWithCreditLimitUpdateDtoType(xmlTextReaderPtr reader); /** * Writes a SubscriptionWithCreditLimitUpdateDto to XML. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitUpdateDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto); /** * Frees the elements of a SubscriptionWithCreditLimitUpdateDto. * * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to free. */ static void freeNs0SubscriptionWithCreditLimitUpdateDtoType(struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto); #endif /* DEF_novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto_H */ #ifndef DEF_novaglobalapi_ns0_taxDto_H #define DEF_novaglobalapi_ns0_taxDto_H /** * @author Edward P. Legaspi @since Oct 11, 2013 */ struct novaglobalapi_ns0_taxDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *taxId; /** * (no documentation provided) */ xmlChar *name; /** * (no documentation provided) */ struct novaglobalapi_ns0_countryTaxDto *countryTaxes; /** * Size of the countryTaxes array. */ int _sizeof_countryTaxes; }; /** * Reads a TaxDto element from XML. The element to be read is "tax", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The TaxDto, or NULL in case of error. */ struct novaglobalapi_ns0_taxDto *xml_read_novaglobalapi_ns0_taxDto(xmlTextReaderPtr reader); /** * Writes a TaxDto to XML under element name "tax". * * @param writer The XML writer. * @param _taxDto The TaxDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_taxDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_taxDto *_taxDto); /** * Frees a TaxDto. * * @param _taxDto The TaxDto to free. */ void free_novaglobalapi_ns0_taxDto(struct novaglobalapi_ns0_taxDto *_taxDto); /** * Reads a TaxDto element from XML. The element to be read is "tax", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The TaxDto, or NULL in case of error. */ struct novaglobalapi_ns0_taxDto *xmlTextReaderReadNs0TaxElement(xmlTextReaderPtr reader); /** * Writes a TaxDto to XML under element name "tax". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _taxDto The TaxDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0TaxElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_taxDto *_taxDto); /** * Writes a TaxDto to XML under element name "tax". * * @param writer The XML writer. * @param _taxDto The TaxDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0TaxElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_taxDto *_taxDto, int writeNamespaces); /** * Frees the children of a TaxDto. * * @param _taxDto The TaxDto whose children are to be free. */ static void freeNs0TaxElement(struct novaglobalapi_ns0_taxDto *_taxDto); /** * Reads a TaxDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The TaxDto, or NULL in case of error. */ static struct novaglobalapi_ns0_taxDto *xmlTextReaderReadNs0TaxDtoType(xmlTextReaderPtr reader); /** * Writes a TaxDto to XML. * * @param writer The XML writer. * @param _taxDto The TaxDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0TaxDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_taxDto *_taxDto); /** * Frees the elements of a TaxDto. * * @param _taxDto The TaxDto to free. */ static void freeNs0TaxDtoType(struct novaglobalapi_ns0_taxDto *_taxDto); #endif /* DEF_novaglobalapi_ns0_taxDto_H */ #ifndef DEF_novaglobalapi_ns0_terminateCustomerSubscriptionDto_H #define DEF_novaglobalapi_ns0_terminateCustomerSubscriptionDto_H /** * @author Edward P. Legaspi */ struct novaglobalapi_ns0_terminateCustomerSubscriptionDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *userId; /** * (no documentation provided) */ xmlChar *organizationId; /** * (no documentation provided) */ xmlChar *subscriptionId; /** * (no documentation provided) */ struct tm *terminationDate; }; /** * Reads a TerminateCustomerSubscriptionDto element from XML. The element to be read is "terminateSubscription", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The TerminateCustomerSubscriptionDto, or NULL in case of error. */ struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *xml_read_novaglobalapi_ns0_terminateCustomerSubscriptionDto(xmlTextReaderPtr reader); /** * Writes a TerminateCustomerSubscriptionDto to XML under element name "terminateSubscription". * * @param writer The XML writer. * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_terminateCustomerSubscriptionDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto); /** * Frees a TerminateCustomerSubscriptionDto. * * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to free. */ void free_novaglobalapi_ns0_terminateCustomerSubscriptionDto(struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto); /** * Reads a TerminateCustomerSubscriptionDto element from XML. The element to be read is "terminateSubscription", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The TerminateCustomerSubscriptionDto, or NULL in case of error. */ struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *xmlTextReaderReadNs0TerminateSubscriptionElement(xmlTextReaderPtr reader); /** * Writes a TerminateCustomerSubscriptionDto to XML under element name "terminateSubscription". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0TerminateSubscriptionElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto); /** * Writes a TerminateCustomerSubscriptionDto to XML under element name "terminateSubscription". * * @param writer The XML writer. * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0TerminateSubscriptionElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto, int writeNamespaces); /** * Frees the children of a TerminateCustomerSubscriptionDto. * * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto whose children are to be free. */ static void freeNs0TerminateSubscriptionElement(struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto); /** * Reads a TerminateCustomerSubscriptionDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The TerminateCustomerSubscriptionDto, or NULL in case of error. */ static struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *xmlTextReaderReadNs0TerminateCustomerSubscriptionDtoType(xmlTextReaderPtr reader); /** * Writes a TerminateCustomerSubscriptionDto to XML. * * @param writer The XML writer. * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0TerminateCustomerSubscriptionDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto); /** * Frees the elements of a TerminateCustomerSubscriptionDto. * * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to free. */ static void freeNs0TerminateCustomerSubscriptionDtoType(struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto); #endif /* DEF_novaglobalapi_ns0_terminateCustomerSubscriptionDto_H */ #ifndef DEF_novaglobalapi_ns0_terminationFeeDto_H #define DEF_novaglobalapi_ns0_terminationFeeDto_H /** * @author Edward P. Legaspi @since Nov 4, 2013 */ struct novaglobalapi_ns0_terminationFeeDto { /** * (no documentation provided) */ xmlChar *currencyCode; /** * (no documentation provided) */ struct tm *startDate; /** * (no documentation provided) */ struct tm *endDate; /** * (no documentation provided) */ xmlChar *price; /** * (no documentation provided) */ xmlChar *recommendedPrice; }; /** * Reads a TerminationFeeDto element from XML. The element to be read is "terminationFee", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The TerminationFeeDto, or NULL in case of error. */ struct novaglobalapi_ns0_terminationFeeDto *xml_read_novaglobalapi_ns0_terminationFeeDto(xmlTextReaderPtr reader); /** * Writes a TerminationFeeDto to XML under element name "terminationFee". * * @param writer The XML writer. * @param _terminationFeeDto The TerminationFeeDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_terminationFeeDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto); /** * Frees a TerminationFeeDto. * * @param _terminationFeeDto The TerminationFeeDto to free. */ void free_novaglobalapi_ns0_terminationFeeDto(struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto); /** * Reads a TerminationFeeDto element from XML. The element to be read is "terminationFee", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The TerminationFeeDto, or NULL in case of error. */ struct novaglobalapi_ns0_terminationFeeDto *xmlTextReaderReadNs0TerminationFeeElement(xmlTextReaderPtr reader); /** * Writes a TerminationFeeDto to XML under element name "terminationFee". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _terminationFeeDto The TerminationFeeDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0TerminationFeeElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto); /** * Writes a TerminationFeeDto to XML under element name "terminationFee". * * @param writer The XML writer. * @param _terminationFeeDto The TerminationFeeDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0TerminationFeeElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto, int writeNamespaces); /** * Frees the children of a TerminationFeeDto. * * @param _terminationFeeDto The TerminationFeeDto whose children are to be free. */ static void freeNs0TerminationFeeElement(struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto); /** * Reads a TerminationFeeDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The TerminationFeeDto, or NULL in case of error. */ static struct novaglobalapi_ns0_terminationFeeDto *xmlTextReaderReadNs0TerminationFeeDtoType(xmlTextReaderPtr reader); /** * Writes a TerminationFeeDto to XML. * * @param writer The XML writer. * @param _terminationFeeDto The TerminationFeeDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0TerminationFeeDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto); /** * Frees the elements of a TerminationFeeDto. * * @param _terminationFeeDto The TerminationFeeDto to free. */ static void freeNs0TerminationFeeDtoType(struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto); #endif /* DEF_novaglobalapi_ns0_terminationFeeDto_H */ #ifndef DEF_novaglobalapi_ns0_usageChargeDto_H #define DEF_novaglobalapi_ns0_usageChargeDto_H /** * @author Edward P. Legaspi @since Nov 4, 2013 */ struct novaglobalapi_ns0_usageChargeDto { /** * (no documentation provided) */ int *min; /** * (no documentation provided) */ int *max; /** * (no documentation provided) */ xmlChar *currencyCode; /** * (no documentation provided) */ struct tm *startDate; /** * (no documentation provided) */ struct tm *endDate; /** * (no documentation provided) */ xmlChar *price; /** * (no documentation provided) */ xmlChar *recommendedPrice; }; /** * Reads a UsageChargeDto element from XML. The element to be read is "usageCharge", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The UsageChargeDto, or NULL in case of error. */ struct novaglobalapi_ns0_usageChargeDto *xml_read_novaglobalapi_ns0_usageChargeDto(xmlTextReaderPtr reader); /** * Writes a UsageChargeDto to XML under element name "usageCharge". * * @param writer The XML writer. * @param _usageChargeDto The UsageChargeDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_usageChargeDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto); /** * Frees a UsageChargeDto. * * @param _usageChargeDto The UsageChargeDto to free. */ void free_novaglobalapi_ns0_usageChargeDto(struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto); /** * Reads a UsageChargeDto element from XML. The element to be read is "usageCharge", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The UsageChargeDto, or NULL in case of error. */ struct novaglobalapi_ns0_usageChargeDto *xmlTextReaderReadNs0UsageChargeElement(xmlTextReaderPtr reader); /** * Writes a UsageChargeDto to XML under element name "usageCharge". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _usageChargeDto The UsageChargeDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0UsageChargeElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto); /** * Writes a UsageChargeDto to XML under element name "usageCharge". * * @param writer The XML writer. * @param _usageChargeDto The UsageChargeDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0UsageChargeElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto, int writeNamespaces); /** * Frees the children of a UsageChargeDto. * * @param _usageChargeDto The UsageChargeDto whose children are to be free. */ static void freeNs0UsageChargeElement(struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto); /** * Reads a UsageChargeDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The UsageChargeDto, or NULL in case of error. */ static struct novaglobalapi_ns0_usageChargeDto *xmlTextReaderReadNs0UsageChargeDtoType(xmlTextReaderPtr reader); /** * Writes a UsageChargeDto to XML. * * @param writer The XML writer. * @param _usageChargeDto The UsageChargeDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0UsageChargeDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto); /** * Frees the elements of a UsageChargeDto. * * @param _usageChargeDto The UsageChargeDto to free. */ static void freeNs0UsageChargeDtoType(struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto); #endif /* DEF_novaglobalapi_ns0_usageChargeDto_H */ #ifndef DEF_novaglobalapi_ns0_userDto_H #define DEF_novaglobalapi_ns0_userDto_H /** * @author Edward P. Legaspi @since Oct 11, 2013 */ struct novaglobalapi_ns0_userDto { /** * (no documentation provided) */ long long *providerId; /** * (no documentation provided) */ long long *currentUserId; /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ xmlChar *userId; /** * (no documentation provided) */ xmlChar *name; /** * (no documentation provided) */ xmlChar *organizationId; }; /** * Reads a UserDto element from XML. The element to be read is "user", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The UserDto, or NULL in case of error. */ struct novaglobalapi_ns0_userDto *xml_read_novaglobalapi_ns0_userDto(xmlTextReaderPtr reader); /** * Writes a UserDto to XML under element name "user". * * @param writer The XML writer. * @param _userDto The UserDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_userDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_userDto *_userDto); /** * Frees a UserDto. * * @param _userDto The UserDto to free. */ void free_novaglobalapi_ns0_userDto(struct novaglobalapi_ns0_userDto *_userDto); /** * Reads a UserDto element from XML. The element to be read is "user", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The UserDto, or NULL in case of error. */ struct novaglobalapi_ns0_userDto *xmlTextReaderReadNs0UserElement(xmlTextReaderPtr reader); /** * Writes a UserDto to XML under element name "user". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _userDto The UserDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0UserElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_userDto *_userDto); /** * Writes a UserDto to XML under element name "user". * * @param writer The XML writer. * @param _userDto The UserDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0UserElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_userDto *_userDto, int writeNamespaces); /** * Frees the children of a UserDto. * * @param _userDto The UserDto whose children are to be free. */ static void freeNs0UserElement(struct novaglobalapi_ns0_userDto *_userDto); /** * Reads a UserDto from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The UserDto, or NULL in case of error. */ static struct novaglobalapi_ns0_userDto *xmlTextReaderReadNs0UserDtoType(xmlTextReaderPtr reader); /** * Writes a UserDto to XML. * * @param writer The XML writer. * @param _userDto The UserDto to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0UserDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_userDto *_userDto); /** * Frees the elements of a UserDto. * * @param _userDto The UserDto to free. */ static void freeNs0UserDtoType(struct novaglobalapi_ns0_userDto *_userDto); #endif /* DEF_novaglobalapi_ns0_userDto_H */ #ifndef DEF_novaglobalapi_ns0_countryResponse_H #define DEF_novaglobalapi_ns0_countryResponse_H /** * @author Edward P. Legaspi @since Oct 7, 2013 */ struct novaglobalapi_ns0_countryResponse { /** * (no documentation provided) */ struct novaglobalapi_ns0_actionStatus *actionStatus; /** * (no documentation provided) */ struct novaglobalapi_ns0_countryDto *countryDto; }; /** * Reads a CountryResponse element from XML. The element to be read is "countryResponse", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CountryResponse, or NULL in case of error. */ struct novaglobalapi_ns0_countryResponse *xml_read_novaglobalapi_ns0_countryResponse(xmlTextReaderPtr reader); /** * Writes a CountryResponse to XML under element name "countryResponse". * * @param writer The XML writer. * @param _countryResponse The CountryResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_countryResponse(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryResponse *_countryResponse); /** * Frees a CountryResponse. * * @param _countryResponse The CountryResponse to free. */ void free_novaglobalapi_ns0_countryResponse(struct novaglobalapi_ns0_countryResponse *_countryResponse); /** * Reads a CountryResponse element from XML. The element to be read is "countryResponse", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The CountryResponse, or NULL in case of error. */ struct novaglobalapi_ns0_countryResponse *xmlTextReaderReadNs0CountryResponseElement(xmlTextReaderPtr reader); /** * Writes a CountryResponse to XML under element name "countryResponse". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _countryResponse The CountryResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CountryResponseElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryResponse *_countryResponse); /** * Writes a CountryResponse to XML under element name "countryResponse". * * @param writer The XML writer. * @param _countryResponse The CountryResponse to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CountryResponseElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryResponse *_countryResponse, int writeNamespaces); /** * Frees the children of a CountryResponse. * * @param _countryResponse The CountryResponse whose children are to be free. */ static void freeNs0CountryResponseElement(struct novaglobalapi_ns0_countryResponse *_countryResponse); /** * Reads a CountryResponse from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The CountryResponse, or NULL in case of error. */ static struct novaglobalapi_ns0_countryResponse *xmlTextReaderReadNs0CountryResponseType(xmlTextReaderPtr reader); /** * Writes a CountryResponse to XML. * * @param writer The XML writer. * @param _countryResponse The CountryResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CountryResponseType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryResponse *_countryResponse); /** * Frees the elements of a CountryResponse. * * @param _countryResponse The CountryResponse to free. */ static void freeNs0CountryResponseType(struct novaglobalapi_ns0_countryResponse *_countryResponse); #endif /* DEF_novaglobalapi_ns0_countryResponse_H */ #ifndef DEF_novaglobalapi_ns0_customerAccountResponse_H #define DEF_novaglobalapi_ns0_customerAccountResponse_H /** * @author R.AITYAAZZA */ struct novaglobalapi_ns0_customerAccountResponse { /** * (no documentation provided) */ struct novaglobalapi_ns0_actionStatus *actionStatus; /** * (no documentation provided) */ struct novaglobalapi_ns0_customerAccountDto *customerAccountDto; }; /** * Reads a CustomerAccountResponse element from XML. The element to be read is "customerAccountResponse", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CustomerAccountResponse, or NULL in case of error. */ struct novaglobalapi_ns0_customerAccountResponse *xml_read_novaglobalapi_ns0_customerAccountResponse(xmlTextReaderPtr reader); /** * Writes a CustomerAccountResponse to XML under element name "customerAccountResponse". * * @param writer The XML writer. * @param _customerAccountResponse The CustomerAccountResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_customerAccountResponse(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse); /** * Frees a CustomerAccountResponse. * * @param _customerAccountResponse The CustomerAccountResponse to free. */ void free_novaglobalapi_ns0_customerAccountResponse(struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse); /** * Reads a CustomerAccountResponse element from XML. The element to be read is "customerAccountResponse", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The CustomerAccountResponse, or NULL in case of error. */ struct novaglobalapi_ns0_customerAccountResponse *xmlTextReaderReadNs0CustomerAccountResponseElement(xmlTextReaderPtr reader); /** * Writes a CustomerAccountResponse to XML under element name "customerAccountResponse". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _customerAccountResponse The CustomerAccountResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CustomerAccountResponseElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse); /** * Writes a CustomerAccountResponse to XML under element name "customerAccountResponse". * * @param writer The XML writer. * @param _customerAccountResponse The CustomerAccountResponse to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CustomerAccountResponseElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse, int writeNamespaces); /** * Frees the children of a CustomerAccountResponse. * * @param _customerAccountResponse The CustomerAccountResponse whose children are to be free. */ static void freeNs0CustomerAccountResponseElement(struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse); /** * Reads a CustomerAccountResponse from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The CustomerAccountResponse, or NULL in case of error. */ static struct novaglobalapi_ns0_customerAccountResponse *xmlTextReaderReadNs0CustomerAccountResponseType(xmlTextReaderPtr reader); /** * Writes a CustomerAccountResponse to XML. * * @param writer The XML writer. * @param _customerAccountResponse The CustomerAccountResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CustomerAccountResponseType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse); /** * Frees the elements of a CustomerAccountResponse. * * @param _customerAccountResponse The CustomerAccountResponse to free. */ static void freeNs0CustomerAccountResponseType(struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse); #endif /* DEF_novaglobalapi_ns0_customerAccountResponse_H */ #ifndef DEF_novaglobalapi_ns0_customerInvoicesResponse_H #define DEF_novaglobalapi_ns0_customerInvoicesResponse_H /** * @author R.AITYAAZZA */ struct novaglobalapi_ns0_customerInvoicesResponse { /** * (no documentation provided) */ struct novaglobalapi_ns0_actionStatus *actionStatus; /** * (no documentation provided) */ struct novaglobalapi_ns0_customerInvoiceDto *CustomerInvoiceDtoList; /** * Size of the CustomerInvoiceDtoList array. */ int _sizeof_CustomerInvoiceDtoList; }; /** * Reads a CustomerInvoicesResponse element from XML. The element to be read is "customerInvoicesResponse", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CustomerInvoicesResponse, or NULL in case of error. */ struct novaglobalapi_ns0_customerInvoicesResponse *xml_read_novaglobalapi_ns0_customerInvoicesResponse(xmlTextReaderPtr reader); /** * Writes a CustomerInvoicesResponse to XML under element name "customerInvoicesResponse". * * @param writer The XML writer. * @param _customerInvoicesResponse The CustomerInvoicesResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_customerInvoicesResponse(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse); /** * Frees a CustomerInvoicesResponse. * * @param _customerInvoicesResponse The CustomerInvoicesResponse to free. */ void free_novaglobalapi_ns0_customerInvoicesResponse(struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse); /** * Reads a CustomerInvoicesResponse element from XML. The element to be read is "customerInvoicesResponse", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The CustomerInvoicesResponse, or NULL in case of error. */ struct novaglobalapi_ns0_customerInvoicesResponse *xmlTextReaderReadNs0CustomerInvoicesResponseElement(xmlTextReaderPtr reader); /** * Writes a CustomerInvoicesResponse to XML under element name "customerInvoicesResponse". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _customerInvoicesResponse The CustomerInvoicesResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CustomerInvoicesResponseElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse); /** * Writes a CustomerInvoicesResponse to XML under element name "customerInvoicesResponse". * * @param writer The XML writer. * @param _customerInvoicesResponse The CustomerInvoicesResponse to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CustomerInvoicesResponseElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse, int writeNamespaces); /** * Frees the children of a CustomerInvoicesResponse. * * @param _customerInvoicesResponse The CustomerInvoicesResponse whose children are to be free. */ static void freeNs0CustomerInvoicesResponseElement(struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse); /** * Reads a CustomerInvoicesResponse from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The CustomerInvoicesResponse, or NULL in case of error. */ static struct novaglobalapi_ns0_customerInvoicesResponse *xmlTextReaderReadNs0CustomerInvoicesResponseType(xmlTextReaderPtr reader); /** * Writes a CustomerInvoicesResponse to XML. * * @param writer The XML writer. * @param _customerInvoicesResponse The CustomerInvoicesResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0CustomerInvoicesResponseType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse); /** * Frees the elements of a CustomerInvoicesResponse. * * @param _customerInvoicesResponse The CustomerInvoicesResponse to free. */ static void freeNs0CustomerInvoicesResponseType(struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse); #endif /* DEF_novaglobalapi_ns0_customerInvoicesResponse_H */ #ifndef DEF_novaglobalapi_ns0_pdfInvoiceResponse_H #define DEF_novaglobalapi_ns0_pdfInvoiceResponse_H /** * @author R.AITYAAZZA */ struct novaglobalapi_ns0_pdfInvoiceResponse { /** * (no documentation provided) */ struct novaglobalapi_ns0_actionStatus *actionStatus; /** * (no documentation provided) */ unsigned char *pdfInvoice; /** * Size of the pdfInvoice data. */ int _sizeof_pdfInvoice; }; /** * Reads a PdfInvoiceResponse element from XML. The element to be read is "pdfInvoiceResponse", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The PdfInvoiceResponse, or NULL in case of error. */ struct novaglobalapi_ns0_pdfInvoiceResponse *xml_read_novaglobalapi_ns0_pdfInvoiceResponse(xmlTextReaderPtr reader); /** * Writes a PdfInvoiceResponse to XML under element name "pdfInvoiceResponse". * * @param writer The XML writer. * @param _pdfInvoiceResponse The PdfInvoiceResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_pdfInvoiceResponse(xmlTextWriterPtr writer, struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse); /** * Frees a PdfInvoiceResponse. * * @param _pdfInvoiceResponse The PdfInvoiceResponse to free. */ void free_novaglobalapi_ns0_pdfInvoiceResponse(struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse); /** * Reads a PdfInvoiceResponse element from XML. The element to be read is "pdfInvoiceResponse", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The PdfInvoiceResponse, or NULL in case of error. */ struct novaglobalapi_ns0_pdfInvoiceResponse *xmlTextReaderReadNs0PdfInvoiceResponseElement(xmlTextReaderPtr reader); /** * Writes a PdfInvoiceResponse to XML under element name "pdfInvoiceResponse". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _pdfInvoiceResponse The PdfInvoiceResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0PdfInvoiceResponseElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse); /** * Writes a PdfInvoiceResponse to XML under element name "pdfInvoiceResponse". * * @param writer The XML writer. * @param _pdfInvoiceResponse The PdfInvoiceResponse to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0PdfInvoiceResponseElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse, int writeNamespaces); /** * Frees the children of a PdfInvoiceResponse. * * @param _pdfInvoiceResponse The PdfInvoiceResponse whose children are to be free. */ static void freeNs0PdfInvoiceResponseElement(struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse); /** * Reads a PdfInvoiceResponse from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The PdfInvoiceResponse, or NULL in case of error. */ static struct novaglobalapi_ns0_pdfInvoiceResponse *xmlTextReaderReadNs0PdfInvoiceResponseType(xmlTextReaderPtr reader); /** * Writes a PdfInvoiceResponse to XML. * * @param writer The XML writer. * @param _pdfInvoiceResponse The PdfInvoiceResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0PdfInvoiceResponseType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse); /** * Frees the elements of a PdfInvoiceResponse. * * @param _pdfInvoiceResponse The PdfInvoiceResponse to free. */ static void freeNs0PdfInvoiceResponseType(struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse); #endif /* DEF_novaglobalapi_ns0_pdfInvoiceResponse_H */ #ifndef DEF_novaglobalapi_ns0_subscriptionWithCreditLimitResponse_H #define DEF_novaglobalapi_ns0_subscriptionWithCreditLimitResponse_H /** * @author Edward P. Legaspi @since Nov 13, 2013 */ struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse { /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ int *accepted; /** * (no documentation provided) */ xmlChar *subscriptionId; /** * (no documentation provided) */ xmlChar *status; }; /** * Reads a SubscriptionWithCreditLimitResponse element from XML. The element to be read is "subscriptionWithCreditLimitResponse", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitResponse, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *xml_read_novaglobalapi_ns0_subscriptionWithCreditLimitResponse(xmlTextReaderPtr reader); /** * Writes a SubscriptionWithCreditLimitResponse to XML under element name "subscriptionWithCreditLimitResponse". * * @param writer The XML writer. * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_subscriptionWithCreditLimitResponse(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse); /** * Frees a SubscriptionWithCreditLimitResponse. * * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to free. */ void free_novaglobalapi_ns0_subscriptionWithCreditLimitResponse(struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse); /** * Reads a SubscriptionWithCreditLimitResponse element from XML. The element to be read is "subscriptionWithCreditLimitResponse", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitResponse, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *xmlTextReaderReadNs0SubscriptionWithCreditLimitResponseElement(xmlTextReaderPtr reader); /** * Writes a SubscriptionWithCreditLimitResponse to XML under element name "subscriptionWithCreditLimitResponse". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitResponseElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse); /** * Writes a SubscriptionWithCreditLimitResponse to XML under element name "subscriptionWithCreditLimitResponse". * * @param writer The XML writer. * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitResponseElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse, int writeNamespaces); /** * Frees the children of a SubscriptionWithCreditLimitResponse. * * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse whose children are to be free. */ static void freeNs0SubscriptionWithCreditLimitResponseElement(struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse); /** * Reads a SubscriptionWithCreditLimitResponse from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitResponse, or NULL in case of error. */ static struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *xmlTextReaderReadNs0SubscriptionWithCreditLimitResponseType(xmlTextReaderPtr reader); /** * Writes a SubscriptionWithCreditLimitResponse to XML. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitResponseType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse); /** * Frees the elements of a SubscriptionWithCreditLimitResponse. * * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to free. */ static void freeNs0SubscriptionWithCreditLimitResponseType(struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse); #endif /* DEF_novaglobalapi_ns0_subscriptionWithCreditLimitResponse_H */ #ifndef DEF_novaglobalapi_ns0_terminateCustomerSubscriptionResponse_H #define DEF_novaglobalapi_ns0_terminateCustomerSubscriptionResponse_H /** * @author Edward P. Legaspi @since Nov 13, 2013 */ struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse { /** * (no documentation provided) */ xmlChar *requestId; /** * (no documentation provided) */ int *accepted; /** * (no documentation provided) */ xmlChar *subscriptionId; /** * (no documentation provided) */ xmlChar *status; }; /** * Reads a TerminateCustomerSubscriptionResponse element from XML. The element to be read is "terminateCustomerSubscriptionResponse", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The TerminateCustomerSubscriptionResponse, or NULL in case of error. */ struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *xml_read_novaglobalapi_ns0_terminateCustomerSubscriptionResponse(xmlTextReaderPtr reader); /** * Writes a TerminateCustomerSubscriptionResponse to XML under element name "terminateCustomerSubscriptionResponse". * * @param writer The XML writer. * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ int xml_write_novaglobalapi_ns0_terminateCustomerSubscriptionResponse(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse); /** * Frees a TerminateCustomerSubscriptionResponse. * * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to free. */ void free_novaglobalapi_ns0_terminateCustomerSubscriptionResponse(struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse); /** * Reads a TerminateCustomerSubscriptionResponse element from XML. The element to be read is "terminateCustomerSubscriptionResponse", and * it is assumed that the reader is already pointing to the element. * * @param reader The XML reader. * @return The TerminateCustomerSubscriptionResponse, or NULL in case of error. */ struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *xmlTextReaderReadNs0TerminateCustomerSubscriptionResponseElement(xmlTextReaderPtr reader); /** * Writes a TerminateCustomerSubscriptionResponse to XML under element name "terminateCustomerSubscriptionResponse". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0TerminateCustomerSubscriptionResponseElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse); /** * Writes a TerminateCustomerSubscriptionResponse to XML under element name "terminateCustomerSubscriptionResponse". * * @param writer The XML writer. * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0TerminateCustomerSubscriptionResponseElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse, int writeNamespaces); /** * Frees the children of a TerminateCustomerSubscriptionResponse. * * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse whose children are to be free. */ static void freeNs0TerminateCustomerSubscriptionResponseElement(struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse); /** * Reads a TerminateCustomerSubscriptionResponse from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The TerminateCustomerSubscriptionResponse, or NULL in case of error. */ static struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *xmlTextReaderReadNs0TerminateCustomerSubscriptionResponseType(xmlTextReaderPtr reader); /** * Writes a TerminateCustomerSubscriptionResponse to XML. * * @param writer The XML writer. * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0TerminateCustomerSubscriptionResponseType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse); /** * Frees the elements of a TerminateCustomerSubscriptionResponse. * * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to free. */ static void freeNs0TerminateCustomerSubscriptionResponseType(struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse); #endif /* DEF_novaglobalapi_ns0_terminateCustomerSubscriptionResponse_H */ #ifndef DEF_novaglobalapi_ns0_actionStatus_M #define DEF_novaglobalapi_ns0_actionStatus_M /** * Reads a ActionStatus element from XML. The element to be read is "actionStatus", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The ActionStatus, or NULL in case of error. */ struct novaglobalapi_ns0_actionStatus *xml_read_novaglobalapi_ns0_actionStatus(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0ActionStatusElement(reader); } /** * Writes a ActionStatus to XML under element name "actionStatus". * * @param writer The XML writer. * @param _actionStatus The ActionStatus to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_actionStatus(xmlTextWriterPtr writer, struct novaglobalapi_ns0_actionStatus *_actionStatus) { return xmlTextWriterWriteNs0ActionStatusElementNS(writer, _actionStatus, 1); } /** * Frees a ActionStatus. * * @param _actionStatus The ActionStatus to free. */ void free_novaglobalapi_ns0_actionStatus(struct novaglobalapi_ns0_actionStatus *_actionStatus) { freeNs0ActionStatusType(_actionStatus); free(_actionStatus); } /** * Reads a ActionStatus element from XML. The element to be read is "actionStatus", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The ActionStatus, or NULL in case of error. */ struct novaglobalapi_ns0_actionStatus *xmlTextReaderReadNs0ActionStatusElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_actionStatus *_actionStatus = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "actionStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}actionStatus.\n"); #endif _actionStatus = xmlTextReaderReadNs0ActionStatusType(reader); } #if DEBUG_ENUNCIATE if (_actionStatus == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}actionStatus failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}actionStatus failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _actionStatus; } /** * Writes a ActionStatus to XML under element name "actionStatus". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _actionStatus The ActionStatus to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0ActionStatusElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_actionStatus *_actionStatus) { return xmlTextWriterWriteNs0ActionStatusElementNS(writer, _actionStatus, 0); } /** * Writes a ActionStatus to XML under element name "actionStatus". * * @param writer The XML writer. * @param _actionStatus The ActionStatus to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0ActionStatusElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_actionStatus *_actionStatus, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "actionStatus", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}actionStatus for root element {}actionStatus...\n"); #endif status = xmlTextWriterWriteNs0ActionStatusType(writer, _actionStatus); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a ActionStatus. * * @param _actionStatus The ActionStatus whose children are to be free. */ static void freeNs0ActionStatusElement(struct novaglobalapi_ns0_actionStatus *_actionStatus) { freeNs0ActionStatusType(_actionStatus); } /** * Reads a ActionStatus from XML. The reader is assumed to be at the start element. * * @return the ActionStatus, or NULL in case of error. */ static struct novaglobalapi_ns0_actionStatus *xmlTextReaderReadNs0ActionStatusType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_actionStatus *_actionStatus = calloc(1, sizeof(struct novaglobalapi_ns0_actionStatus)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0ActionStatusType(_actionStatus); free(_actionStatus); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}status of type {}actionStatusEnum.\n"); #endif _child_accessor = xmlTextReaderReadNs0ActionStatusEnumType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}status of type {}actionStatusEnum.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ActionStatusType(_actionStatus); free(_actionStatus); return NULL; } _actionStatus->status = ((enum novaglobalapi_ns0_actionStatusEnum*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "errorCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}errorCode of type {http://www.w3.org/2001/XMLSchema}int.\n"); #endif _child_accessor = xmlTextReaderReadXsIntType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}errorCode of type {http://www.w3.org/2001/XMLSchema}int.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ActionStatusType(_actionStatus); free(_actionStatus); return NULL; } _actionStatus->errorCode = *((int*)_child_accessor); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "message", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ActionStatusType(_actionStatus); free(_actionStatus); return NULL; } _actionStatus->message = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}actionStatus. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}actionStatus. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _actionStatus; } /** * Writes a ActionStatus to XML. * * @param writer The XML writer. * @param _actionStatus The ActionStatus to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0ActionStatusType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_actionStatus *_actionStatus) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_actionStatus->status != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}status. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}actionStatusEnum for element {}status...\n"); #endif status = xmlTextWriterWriteNs0ActionStatusEnumType(writer, (_actionStatus->status)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}actionStatusEnum for element {}status. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}status. status: %i\n", status); #endif return status; } totalBytes += status; } if (1) { //always write the primitive element. status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "errorCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}errorCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}errorCode...\n"); #endif status = xmlTextWriterWriteXsIntType(writer, &(_actionStatus->errorCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}errorCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}errorCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_actionStatus->message != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "message", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}message. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}message...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_actionStatus->message)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}message. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}message. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a ActionStatus. * * @param _actionStatus The ActionStatus to free. */ static void freeNs0ActionStatusType(struct novaglobalapi_ns0_actionStatus *_actionStatus) { int i; if (_actionStatus->status != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor status of type novaglobalapi_ns0_actionStatus...\n"); #endif freeNs0ActionStatusEnumType(_actionStatus->status); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor status of type novaglobalapi_ns0_actionStatus...\n"); #endif free(_actionStatus->status); } if (_actionStatus->message != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor message of type novaglobalapi_ns0_actionStatus...\n"); #endif freeXsStringType(_actionStatus->message); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor message of type novaglobalapi_ns0_actionStatus...\n"); #endif free(_actionStatus->message); } } #endif /* DEF_novaglobalapi_ns0_actionStatus_M */ #ifndef DEF_novaglobalapi_ns0_actionStatusEnum_M #define DEF_novaglobalapi_ns0_actionStatusEnum_M /** * Reads a ActionStatusEnum from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The ActionStatusEnum, or NULL if unable to be read. */ static enum novaglobalapi_ns0_actionStatusEnum *xmlTextReaderReadNs0ActionStatusEnumType(xmlTextReaderPtr reader) { xmlChar *enumValue = xmlTextReaderReadEntireNodeValue(reader); enum novaglobalapi_ns0_actionStatusEnum *value = calloc(1, sizeof(enum novaglobalapi_ns0_actionStatusEnum)); if (enumValue != NULL) { if (xmlStrcmp(enumValue, BAD_CAST "SUCCESS") == 0) { *value = NOVAGLOBALAPI_NS0_ACTIONSTATUSENUM_SUCCESS; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "FAIL") == 0) { *value = NOVAGLOBALAPI_NS0_ACTIONSTATUSENUM_FAIL; free(enumValue); return value; } #if DEBUG_ENUNCIATE printf("Attempt to read enum value failed: %s doesn't match an enum value.\n", enumValue); #endif } #if DEBUG_ENUNCIATE else { printf("Attempt to read enum value failed: NULL value.\n"); } #endif return NULL; } /** * Writes a ActionStatusEnum to XML. * * @param writer The XML writer. * @param _actionStatusEnum The ActionStatusEnum to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteNs0ActionStatusEnumType(xmlTextWriterPtr writer, enum novaglobalapi_ns0_actionStatusEnum *_actionStatusEnum) { switch (*_actionStatusEnum) { case NOVAGLOBALAPI_NS0_ACTIONSTATUSENUM_SUCCESS: return xmlTextWriterWriteString(writer, BAD_CAST "SUCCESS"); case NOVAGLOBALAPI_NS0_ACTIONSTATUSENUM_FAIL: return xmlTextWriterWriteString(writer, BAD_CAST "FAIL"); } #if DEBUG_ENUNCIATE printf("Unable to write enum value (no valid value found).\n"); #endif return -1; } /** * Frees a ActionStatusEnum. * * @param _actionStatusEnum The ActionStatusEnum to free. */ static void freeNs0ActionStatusEnumType(enum novaglobalapi_ns0_actionStatusEnum *_actionStatusEnum) { //no-op } #endif /* DEF_novaglobalapi_ns0_actionStatusEnum_M */ #ifndef DEF_novaglobalapi_ns0_accountOperationDto_M #define DEF_novaglobalapi_ns0_accountOperationDto_M /** * Reads a AccountOperationDto element from XML. The element to be read is "accountOperation", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The AccountOperationDto, or NULL in case of error. */ struct novaglobalapi_ns0_accountOperationDto *xml_read_novaglobalapi_ns0_accountOperationDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0AccountOperationElement(reader); } /** * Writes a AccountOperationDto to XML under element name "accountOperation". * * @param writer The XML writer. * @param _accountOperationDto The AccountOperationDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_accountOperationDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto) { return xmlTextWriterWriteNs0AccountOperationElementNS(writer, _accountOperationDto, 1); } /** * Frees a AccountOperationDto. * * @param _accountOperationDto The AccountOperationDto to free. */ void free_novaglobalapi_ns0_accountOperationDto(struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto) { freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); } /** * Reads a AccountOperationDto element from XML. The element to be read is "accountOperation", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The AccountOperationDto, or NULL in case of error. */ struct novaglobalapi_ns0_accountOperationDto *xmlTextReaderReadNs0AccountOperationElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accountOperation", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}accountOperation.\n"); #endif _accountOperationDto = xmlTextReaderReadNs0AccountOperationDtoType(reader); } #if DEBUG_ENUNCIATE if (_accountOperationDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}accountOperation failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}accountOperation failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _accountOperationDto; } /** * Writes a AccountOperationDto to XML under element name "accountOperation". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _accountOperationDto The AccountOperationDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0AccountOperationElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto) { return xmlTextWriterWriteNs0AccountOperationElementNS(writer, _accountOperationDto, 0); } /** * Writes a AccountOperationDto to XML under element name "accountOperation". * * @param writer The XML writer. * @param _accountOperationDto The AccountOperationDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0AccountOperationElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accountOperation", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}accountOperation. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}accountOperationDto for root element {}accountOperation...\n"); #endif status = xmlTextWriterWriteNs0AccountOperationDtoType(writer, _accountOperationDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}accountOperation. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}accountOperation. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a AccountOperationDto. * * @param _accountOperationDto The AccountOperationDto whose children are to be free. */ static void freeNs0AccountOperationElement(struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto) { freeNs0AccountOperationDtoType(_accountOperationDto); } /** * Reads a AccountOperationDto from XML. The reader is assumed to be at the start element. * * @return the AccountOperationDto, or NULL in case of error. */ static struct novaglobalapi_ns0_accountOperationDto *xmlTextReaderReadNs0AccountOperationDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto = calloc(1, sizeof(struct novaglobalapi_ns0_accountOperationDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "dueDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}dueDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}dueDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->dueDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "type", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}type of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}type of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->type = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "transactionDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}transactionDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}transactionDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->transactionDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "transactionCategory", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}transactionCategory of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}transactionCategory of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->transactionCategory = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "reference", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}reference of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}reference of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->reference = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accountCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}accountCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}accountCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->accountCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accountCodeClientSide", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}accountCodeClientSide of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}accountCodeClientSide of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->accountCodeClientSide = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->amount = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "matchingAmount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}matchingAmount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}matchingAmount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->matchingAmount = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "unMatchingAmount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}unMatchingAmount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}unMatchingAmount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->unMatchingAmount = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "matchingStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}matchingStatus of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}matchingStatus of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->matchingStatus = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "matchingAmounts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}matchingAmounts of type {}matchingAmountDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0MatchingAmountDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}matchingAmounts of type {}matchingAmountDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->matchingAmounts = realloc(_accountOperationDto->matchingAmounts, (_accountOperationDto->_sizeof_matchingAmounts + 1) * sizeof(struct novaglobalapi_ns0_matchingAmountDto)); memcpy(&(_accountOperationDto->matchingAmounts[_accountOperationDto->_sizeof_matchingAmounts++]), _child_accessor, sizeof(struct novaglobalapi_ns0_matchingAmountDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "occCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}occCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}occCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->occCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "occDescription", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}occDescription of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}occDescription of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0AccountOperationDtoType(_accountOperationDto); free(_accountOperationDto); return NULL; } _accountOperationDto->occDescription = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}accountOperationDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}accountOperationDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _accountOperationDto; } /** * Writes a AccountOperationDto to XML. * * @param writer The XML writer. * @param _accountOperationDto The AccountOperationDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0AccountOperationDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_accountOperationDto->dueDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dueDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}dueDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}dueDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_accountOperationDto->dueDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}dueDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}dueDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_accountOperationDto->type != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "type", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}type. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}type...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_accountOperationDto->type)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}type. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}type. status: %i\n", status); #endif return status; } totalBytes += status; } if (_accountOperationDto->transactionDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "transactionDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}transactionDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}transactionDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_accountOperationDto->transactionDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}transactionDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}transactionDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_accountOperationDto->transactionCategory != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "transactionCategory", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}transactionCategory. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}transactionCategory...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_accountOperationDto->transactionCategory)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}transactionCategory. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}transactionCategory. status: %i\n", status); #endif return status; } totalBytes += status; } if (_accountOperationDto->reference != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "reference", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}reference. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}reference...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_accountOperationDto->reference)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}reference. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}reference. status: %i\n", status); #endif return status; } totalBytes += status; } if (_accountOperationDto->accountCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accountCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}accountCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}accountCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_accountOperationDto->accountCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}accountCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}accountCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_accountOperationDto->accountCodeClientSide != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accountCodeClientSide", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}accountCodeClientSide. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}accountCodeClientSide...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_accountOperationDto->accountCodeClientSide)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}accountCodeClientSide. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}accountCodeClientSide. status: %i\n", status); #endif return status; } totalBytes += status; } if (_accountOperationDto->amount != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amount", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amount. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amount...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_accountOperationDto->amount)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amount. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amount. status: %i\n", status); #endif return status; } totalBytes += status; } if (_accountOperationDto->matchingAmount != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "matchingAmount", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}matchingAmount. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}matchingAmount...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_accountOperationDto->matchingAmount)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}matchingAmount. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}matchingAmount. status: %i\n", status); #endif return status; } totalBytes += status; } if (_accountOperationDto->unMatchingAmount != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "unMatchingAmount", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}unMatchingAmount. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}unMatchingAmount...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_accountOperationDto->unMatchingAmount)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}unMatchingAmount. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}unMatchingAmount. status: %i\n", status); #endif return status; } totalBytes += status; } if (_accountOperationDto->matchingStatus != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "matchingStatus", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}matchingStatus. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}matchingStatus...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_accountOperationDto->matchingStatus)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}matchingStatus. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}matchingStatus. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _accountOperationDto->_sizeof_matchingAmounts; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "matchingAmounts", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}matchingAmounts. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}matchingAmountDto for element {}matchingAmounts...\n"); #endif status = xmlTextWriterWriteNs0MatchingAmountDtoType(writer, &(_accountOperationDto->matchingAmounts[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}matchingAmountDto for element {}matchingAmounts. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}matchingAmounts. status: %i\n", status); #endif return status; } totalBytes += status; } if (_accountOperationDto->occCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "occCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}occCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}occCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_accountOperationDto->occCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}occCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}occCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_accountOperationDto->occDescription != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "occDescription", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}occDescription. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}occDescription...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_accountOperationDto->occDescription)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}occDescription. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}occDescription. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a AccountOperationDto. * * @param _accountOperationDto The AccountOperationDto to free. */ static void freeNs0AccountOperationDtoType(struct novaglobalapi_ns0_accountOperationDto *_accountOperationDto) { int i; if (_accountOperationDto->dueDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor dueDate of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsDateTimeType(_accountOperationDto->dueDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor dueDate of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->dueDate); } if (_accountOperationDto->type != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor type of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsStringType(_accountOperationDto->type); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor type of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->type); } if (_accountOperationDto->transactionDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor transactionDate of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsDateTimeType(_accountOperationDto->transactionDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor transactionDate of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->transactionDate); } if (_accountOperationDto->transactionCategory != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor transactionCategory of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsStringType(_accountOperationDto->transactionCategory); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor transactionCategory of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->transactionCategory); } if (_accountOperationDto->reference != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor reference of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsStringType(_accountOperationDto->reference); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor reference of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->reference); } if (_accountOperationDto->accountCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor accountCode of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsStringType(_accountOperationDto->accountCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor accountCode of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->accountCode); } if (_accountOperationDto->accountCodeClientSide != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor accountCodeClientSide of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsStringType(_accountOperationDto->accountCodeClientSide); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor accountCodeClientSide of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->accountCodeClientSide); } if (_accountOperationDto->amount != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amount of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsDecimalType(_accountOperationDto->amount); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amount of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->amount); } if (_accountOperationDto->matchingAmount != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor matchingAmount of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsDecimalType(_accountOperationDto->matchingAmount); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor matchingAmount of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->matchingAmount); } if (_accountOperationDto->unMatchingAmount != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor unMatchingAmount of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsDecimalType(_accountOperationDto->unMatchingAmount); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor unMatchingAmount of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->unMatchingAmount); } if (_accountOperationDto->matchingStatus != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor matchingStatus of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsStringType(_accountOperationDto->matchingStatus); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor matchingStatus of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->matchingStatus); } if (_accountOperationDto->matchingAmounts != NULL) { for (i = 0; i < _accountOperationDto->_sizeof_matchingAmounts; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor matchingAmounts[%i] of type novaglobalapi_ns0_accountOperationDto...\n", i); #endif freeNs0MatchingAmountDtoType(&(_accountOperationDto->matchingAmounts[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor matchingAmounts of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->matchingAmounts); } if (_accountOperationDto->occCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor occCode of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsStringType(_accountOperationDto->occCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor occCode of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->occCode); } if (_accountOperationDto->occDescription != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor occDescription of type novaglobalapi_ns0_accountOperationDto...\n"); #endif freeXsStringType(_accountOperationDto->occDescription); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor occDescription of type novaglobalapi_ns0_accountOperationDto...\n"); #endif free(_accountOperationDto->occDescription); } } #endif /* DEF_novaglobalapi_ns0_accountOperationDto_M */ #ifndef DEF_novaglobalapi_ns0_countryDto_M #define DEF_novaglobalapi_ns0_countryDto_M /** * Reads a CountryDto element from XML. The element to be read is "country", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CountryDto, or NULL in case of error. */ struct novaglobalapi_ns0_countryDto *xml_read_novaglobalapi_ns0_countryDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0CountryElement(reader); } /** * Writes a CountryDto to XML under element name "country". * * @param writer The XML writer. * @param _countryDto The CountryDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_countryDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryDto *_countryDto) { return xmlTextWriterWriteNs0CountryElementNS(writer, _countryDto, 1); } /** * Frees a CountryDto. * * @param _countryDto The CountryDto to free. */ void free_novaglobalapi_ns0_countryDto(struct novaglobalapi_ns0_countryDto *_countryDto) { freeNs0CountryDtoType(_countryDto); free(_countryDto); } /** * Reads a CountryDto element from XML. The element to be read is "country", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The CountryDto, or NULL in case of error. */ struct novaglobalapi_ns0_countryDto *xmlTextReaderReadNs0CountryElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_countryDto *_countryDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "country", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}country.\n"); #endif _countryDto = xmlTextReaderReadNs0CountryDtoType(reader); } #if DEBUG_ENUNCIATE if (_countryDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}country failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}country failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _countryDto; } /** * Writes a CountryDto to XML under element name "country". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _countryDto The CountryDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CountryElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryDto *_countryDto) { return xmlTextWriterWriteNs0CountryElementNS(writer, _countryDto, 0); } /** * Writes a CountryDto to XML under element name "country". * * @param writer The XML writer. * @param _countryDto The CountryDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CountryElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryDto *_countryDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "country", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}country. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}countryDto for root element {}country...\n"); #endif status = xmlTextWriterWriteNs0CountryDtoType(writer, _countryDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}country. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}country. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a CountryDto. * * @param _countryDto The CountryDto whose children are to be free. */ static void freeNs0CountryElement(struct novaglobalapi_ns0_countryDto *_countryDto) { freeNs0CountryDtoType(_countryDto); } /** * Reads a CountryDto from XML. The reader is assumed to be at the start element. * * @return the CountryDto, or NULL in case of error. */ static struct novaglobalapi_ns0_countryDto *xmlTextReaderReadNs0CountryDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_countryDto *_countryDto = calloc(1, sizeof(struct novaglobalapi_ns0_countryDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0CountryDtoType(_countryDto); free(_countryDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CountryDtoType(_countryDto); free(_countryDto); return NULL; } _countryDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CountryDtoType(_countryDto); free(_countryDto); return NULL; } _countryDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CountryDtoType(_countryDto); free(_countryDto); return NULL; } _countryDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countryCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CountryDtoType(_countryDto); free(_countryDto); return NULL; } _countryDto->countryCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CountryDtoType(_countryDto); free(_countryDto); return NULL; } _countryDto->name = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currencyCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CountryDtoType(_countryDto); free(_countryDto); return NULL; } _countryDto->currencyCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "languageCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CountryDtoType(_countryDto); free(_countryDto); return NULL; } _countryDto->languageCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}countryDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}countryDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _countryDto; } /** * Writes a CountryDto to XML. * * @param writer The XML writer. * @param _countryDto The CountryDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0CountryDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryDto *_countryDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_countryDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_countryDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_countryDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_countryDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_countryDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_countryDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_countryDto->countryCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}countryCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}countryCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_countryDto->countryCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}countryCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}countryCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_countryDto->name != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}name. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}name...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_countryDto->name)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}name. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}name. status: %i\n", status); #endif return status; } totalBytes += status; } if (_countryDto->currencyCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currencyCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}currencyCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_countryDto->currencyCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_countryDto->languageCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "languageCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}languageCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}languageCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_countryDto->languageCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}languageCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}languageCode. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a CountryDto. * * @param _countryDto The CountryDto to free. */ static void freeNs0CountryDtoType(struct novaglobalapi_ns0_countryDto *_countryDto) { int i; if (_countryDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_countryDto...\n"); #endif freeXsLongType(_countryDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_countryDto...\n"); #endif free(_countryDto->providerId); } if (_countryDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_countryDto...\n"); #endif freeXsLongType(_countryDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_countryDto...\n"); #endif free(_countryDto->currentUserId); } if (_countryDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_countryDto...\n"); #endif freeXsStringType(_countryDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_countryDto...\n"); #endif free(_countryDto->requestId); } if (_countryDto->countryCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor countryCode of type novaglobalapi_ns0_countryDto...\n"); #endif freeXsStringType(_countryDto->countryCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor countryCode of type novaglobalapi_ns0_countryDto...\n"); #endif free(_countryDto->countryCode); } if (_countryDto->name != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor name of type novaglobalapi_ns0_countryDto...\n"); #endif freeXsStringType(_countryDto->name); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor name of type novaglobalapi_ns0_countryDto...\n"); #endif free(_countryDto->name); } if (_countryDto->currencyCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currencyCode of type novaglobalapi_ns0_countryDto...\n"); #endif freeXsStringType(_countryDto->currencyCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currencyCode of type novaglobalapi_ns0_countryDto...\n"); #endif free(_countryDto->currencyCode); } if (_countryDto->languageCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor languageCode of type novaglobalapi_ns0_countryDto...\n"); #endif freeXsStringType(_countryDto->languageCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor languageCode of type novaglobalapi_ns0_countryDto...\n"); #endif free(_countryDto->languageCode); } } #endif /* DEF_novaglobalapi_ns0_countryDto_M */ #ifndef DEF_novaglobalapi_ns0_countryTaxDto_M #define DEF_novaglobalapi_ns0_countryTaxDto_M /** * Reads a CountryTaxDto element from XML. The element to be read is "countryTax", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CountryTaxDto, or NULL in case of error. */ struct novaglobalapi_ns0_countryTaxDto *xml_read_novaglobalapi_ns0_countryTaxDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0CountryTaxElement(reader); } /** * Writes a CountryTaxDto to XML under element name "countryTax". * * @param writer The XML writer. * @param _countryTaxDto The CountryTaxDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_countryTaxDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto) { return xmlTextWriterWriteNs0CountryTaxElementNS(writer, _countryTaxDto, 1); } /** * Frees a CountryTaxDto. * * @param _countryTaxDto The CountryTaxDto to free. */ void free_novaglobalapi_ns0_countryTaxDto(struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto) { freeNs0CountryTaxDtoType(_countryTaxDto); free(_countryTaxDto); } /** * Reads a CountryTaxDto element from XML. The element to be read is "countryTax", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The CountryTaxDto, or NULL in case of error. */ struct novaglobalapi_ns0_countryTaxDto *xmlTextReaderReadNs0CountryTaxElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countryTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}countryTax.\n"); #endif _countryTaxDto = xmlTextReaderReadNs0CountryTaxDtoType(reader); } #if DEBUG_ENUNCIATE if (_countryTaxDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}countryTax failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}countryTax failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _countryTaxDto; } /** * Writes a CountryTaxDto to XML under element name "countryTax". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _countryTaxDto The CountryTaxDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CountryTaxElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto) { return xmlTextWriterWriteNs0CountryTaxElementNS(writer, _countryTaxDto, 0); } /** * Writes a CountryTaxDto to XML under element name "countryTax". * * @param writer The XML writer. * @param _countryTaxDto The CountryTaxDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CountryTaxElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}countryTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}countryTaxDto for root element {}countryTax...\n"); #endif status = xmlTextWriterWriteNs0CountryTaxDtoType(writer, _countryTaxDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}countryTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}countryTax. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a CountryTaxDto. * * @param _countryTaxDto The CountryTaxDto whose children are to be free. */ static void freeNs0CountryTaxElement(struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto) { freeNs0CountryTaxDtoType(_countryTaxDto); } /** * Reads a CountryTaxDto from XML. The reader is assumed to be at the start element. * * @return the CountryTaxDto, or NULL in case of error. */ static struct novaglobalapi_ns0_countryTaxDto *xmlTextReaderReadNs0CountryTaxDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto = calloc(1, sizeof(struct novaglobalapi_ns0_countryTaxDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0CountryTaxDtoType(_countryTaxDto); free(_countryTaxDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countryCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CountryTaxDtoType(_countryTaxDto); free(_countryTaxDto); return NULL; } _countryTaxDto->countryCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxValue", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}taxValue of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}taxValue of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CountryTaxDtoType(_countryTaxDto); free(_countryTaxDto); return NULL; } _countryTaxDto->taxValue = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}countryTaxDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}countryTaxDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _countryTaxDto; } /** * Writes a CountryTaxDto to XML. * * @param writer The XML writer. * @param _countryTaxDto The CountryTaxDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0CountryTaxDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_countryTaxDto->countryCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}countryCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}countryCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_countryTaxDto->countryCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}countryCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}countryCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_countryTaxDto->taxValue != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxValue", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}taxValue. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}taxValue...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_countryTaxDto->taxValue)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}taxValue. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}taxValue. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a CountryTaxDto. * * @param _countryTaxDto The CountryTaxDto to free. */ static void freeNs0CountryTaxDtoType(struct novaglobalapi_ns0_countryTaxDto *_countryTaxDto) { int i; if (_countryTaxDto->countryCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor countryCode of type novaglobalapi_ns0_countryTaxDto...\n"); #endif freeXsStringType(_countryTaxDto->countryCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor countryCode of type novaglobalapi_ns0_countryTaxDto...\n"); #endif free(_countryTaxDto->countryCode); } if (_countryTaxDto->taxValue != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor taxValue of type novaglobalapi_ns0_countryTaxDto...\n"); #endif freeXsDecimalType(_countryTaxDto->taxValue); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor taxValue of type novaglobalapi_ns0_countryTaxDto...\n"); #endif free(_countryTaxDto->taxValue); } } #endif /* DEF_novaglobalapi_ns0_countryTaxDto_M */ #ifndef DEF_novaglobalapi_ns0_creditLimitDto_M #define DEF_novaglobalapi_ns0_creditLimitDto_M /** * Reads a CreditLimitDto element from XML. The element to be read is "creditLimit", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CreditLimitDto, or NULL in case of error. */ struct novaglobalapi_ns0_creditLimitDto *xml_read_novaglobalapi_ns0_creditLimitDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0CreditLimitElement(reader); } /** * Writes a CreditLimitDto to XML under element name "creditLimit". * * @param writer The XML writer. * @param _creditLimitDto The CreditLimitDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_creditLimitDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto) { return xmlTextWriterWriteNs0CreditLimitElementNS(writer, _creditLimitDto, 1); } /** * Frees a CreditLimitDto. * * @param _creditLimitDto The CreditLimitDto to free. */ void free_novaglobalapi_ns0_creditLimitDto(struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto) { freeNs0CreditLimitDtoType(_creditLimitDto); free(_creditLimitDto); } /** * Reads a CreditLimitDto element from XML. The element to be read is "creditLimit", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The CreditLimitDto, or NULL in case of error. */ struct novaglobalapi_ns0_creditLimitDto *xmlTextReaderReadNs0CreditLimitElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "creditLimit", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}creditLimit.\n"); #endif _creditLimitDto = xmlTextReaderReadNs0CreditLimitDtoType(reader); } #if DEBUG_ENUNCIATE if (_creditLimitDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}creditLimit failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}creditLimit failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _creditLimitDto; } /** * Writes a CreditLimitDto to XML under element name "creditLimit". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _creditLimitDto The CreditLimitDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CreditLimitElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto) { return xmlTextWriterWriteNs0CreditLimitElementNS(writer, _creditLimitDto, 0); } /** * Writes a CreditLimitDto to XML under element name "creditLimit". * * @param writer The XML writer. * @param _creditLimitDto The CreditLimitDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CreditLimitElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "creditLimit", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}creditLimit. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}creditLimitDto for root element {}creditLimit...\n"); #endif status = xmlTextWriterWriteNs0CreditLimitDtoType(writer, _creditLimitDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}creditLimit. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}creditLimit. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a CreditLimitDto. * * @param _creditLimitDto The CreditLimitDto whose children are to be free. */ static void freeNs0CreditLimitElement(struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto) { freeNs0CreditLimitDtoType(_creditLimitDto); } /** * Reads a CreditLimitDto from XML. The reader is assumed to be at the start element. * * @return the CreditLimitDto, or NULL in case of error. */ static struct novaglobalapi_ns0_creditLimitDto *xmlTextReaderReadNs0CreditLimitDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto = calloc(1, sizeof(struct novaglobalapi_ns0_creditLimitDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0CreditLimitDtoType(_creditLimitDto); free(_creditLimitDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CreditLimitDtoType(_creditLimitDto); free(_creditLimitDto); return NULL; } _creditLimitDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CreditLimitDtoType(_creditLimitDto); free(_creditLimitDto); return NULL; } _creditLimitDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CreditLimitDtoType(_creditLimitDto); free(_creditLimitDto); return NULL; } _creditLimitDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CreditLimitDtoType(_creditLimitDto); free(_creditLimitDto); return NULL; } _creditLimitDto->organizationId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "creditLimit", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}creditLimit of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}creditLimit of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CreditLimitDtoType(_creditLimitDto); free(_creditLimitDto); return NULL; } _creditLimitDto->creditLimit = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}creditLimitDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}creditLimitDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _creditLimitDto; } /** * Writes a CreditLimitDto to XML. * * @param writer The XML writer. * @param _creditLimitDto The CreditLimitDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0CreditLimitDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_creditLimitDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_creditLimitDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_creditLimitDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_creditLimitDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_creditLimitDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_creditLimitDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_creditLimitDto->organizationId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_creditLimitDto->organizationId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_creditLimitDto->creditLimit != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "creditLimit", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}creditLimit. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}creditLimit...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_creditLimitDto->creditLimit)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}creditLimit. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}creditLimit. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a CreditLimitDto. * * @param _creditLimitDto The CreditLimitDto to free. */ static void freeNs0CreditLimitDtoType(struct novaglobalapi_ns0_creditLimitDto *_creditLimitDto) { int i; if (_creditLimitDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_creditLimitDto...\n"); #endif freeXsLongType(_creditLimitDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_creditLimitDto...\n"); #endif free(_creditLimitDto->providerId); } if (_creditLimitDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_creditLimitDto...\n"); #endif freeXsLongType(_creditLimitDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_creditLimitDto...\n"); #endif free(_creditLimitDto->currentUserId); } if (_creditLimitDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_creditLimitDto...\n"); #endif freeXsStringType(_creditLimitDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_creditLimitDto...\n"); #endif free(_creditLimitDto->requestId); } if (_creditLimitDto->organizationId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor organizationId of type novaglobalapi_ns0_creditLimitDto...\n"); #endif freeXsStringType(_creditLimitDto->organizationId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor organizationId of type novaglobalapi_ns0_creditLimitDto...\n"); #endif free(_creditLimitDto->organizationId); } if (_creditLimitDto->creditLimit != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor creditLimit of type novaglobalapi_ns0_creditLimitDto...\n"); #endif freeXsDecimalType(_creditLimitDto->creditLimit); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor creditLimit of type novaglobalapi_ns0_creditLimitDto...\n"); #endif free(_creditLimitDto->creditLimit); } } #endif /* DEF_novaglobalapi_ns0_creditLimitDto_M */ #ifndef DEF_novaglobalapi_ns0_customerAccountDto_M #define DEF_novaglobalapi_ns0_customerAccountDto_M /** * Reads a CustomerAccountDto element from XML. The element to be read is "customerAccount", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CustomerAccountDto, or NULL in case of error. */ struct novaglobalapi_ns0_customerAccountDto *xml_read_novaglobalapi_ns0_customerAccountDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0CustomerAccountElement(reader); } /** * Writes a CustomerAccountDto to XML under element name "customerAccount". * * @param writer The XML writer. * @param _customerAccountDto The CustomerAccountDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_customerAccountDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto) { return xmlTextWriterWriteNs0CustomerAccountElementNS(writer, _customerAccountDto, 1); } /** * Frees a CustomerAccountDto. * * @param _customerAccountDto The CustomerAccountDto to free. */ void free_novaglobalapi_ns0_customerAccountDto(struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto) { freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); } /** * Reads a CustomerAccountDto element from XML. The element to be read is "customerAccount", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The CustomerAccountDto, or NULL in case of error. */ struct novaglobalapi_ns0_customerAccountDto *xmlTextReaderReadNs0CustomerAccountElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "customerAccount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}customerAccount.\n"); #endif _customerAccountDto = xmlTextReaderReadNs0CustomerAccountDtoType(reader); } #if DEBUG_ENUNCIATE if (_customerAccountDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}customerAccount failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}customerAccount failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _customerAccountDto; } /** * Writes a CustomerAccountDto to XML under element name "customerAccount". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _customerAccountDto The CustomerAccountDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CustomerAccountElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto) { return xmlTextWriterWriteNs0CustomerAccountElementNS(writer, _customerAccountDto, 0); } /** * Writes a CustomerAccountDto to XML under element name "customerAccount". * * @param writer The XML writer. * @param _customerAccountDto The CustomerAccountDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CustomerAccountElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "customerAccount", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}customerAccount. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}customerAccountDto for root element {}customerAccount...\n"); #endif status = xmlTextWriterWriteNs0CustomerAccountDtoType(writer, _customerAccountDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}customerAccount. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}customerAccount. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a CustomerAccountDto. * * @param _customerAccountDto The CustomerAccountDto whose children are to be free. */ static void freeNs0CustomerAccountElement(struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto) { freeNs0CustomerAccountDtoType(_customerAccountDto); } /** * Reads a CustomerAccountDto from XML. The reader is assumed to be at the start element. * * @return the CustomerAccountDto, or NULL in case of error. */ static struct novaglobalapi_ns0_customerAccountDto *xmlTextReaderReadNs0CustomerAccountDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto = calloc(1, sizeof(struct novaglobalapi_ns0_customerAccountDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}status of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}status of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->status = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "paymentMethod", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}paymentMethod of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}paymentMethod of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->paymentMethod = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "creditCategory", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}creditCategory of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}creditCategory of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->creditCategory = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accountOperations", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}accountOperations of type {}accountOperationDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0AccountOperationDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}accountOperations of type {}accountOperationDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->accountOperations = realloc(_customerAccountDto->accountOperations, (_customerAccountDto->_sizeof_accountOperations + 1) * sizeof(struct novaglobalapi_ns0_accountOperationDto)); memcpy(&(_customerAccountDto->accountOperations[_customerAccountDto->_sizeof_accountOperations++]), _child_accessor, sizeof(struct novaglobalapi_ns0_accountOperationDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "dateStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}dateStatus of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}dateStatus of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->dateStatus = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "dateDunningLevel", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}dateDunningLevel of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}dateDunningLevel of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->dateDunningLevel = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "email", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}email of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}email of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->email = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "phone", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}phone of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}phone of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->phone = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "mobile", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}mobile of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}mobile of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->mobile = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "fax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}fax of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}fax of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->fax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "customerCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}customerCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}customerCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->customerCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "dunningLevel", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}dunningLevel of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}dunningLevel of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->dunningLevel = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "mandateIdentification", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}mandateIdentification of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}mandateIdentification of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->mandateIdentification = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "mandateDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}mandateDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}mandateDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->mandateDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "balance", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}balance of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}balance of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountDtoType(_customerAccountDto); free(_customerAccountDto); return NULL; } _customerAccountDto->balance = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}customerAccountDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}customerAccountDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _customerAccountDto; } /** * Writes a CustomerAccountDto to XML. * * @param writer The XML writer. * @param _customerAccountDto The CustomerAccountDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0CustomerAccountDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_customerAccountDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_customerAccountDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_customerAccountDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerAccountDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->status != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}status. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}status...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerAccountDto->status)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}status. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}status. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->paymentMethod != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "paymentMethod", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}paymentMethod. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}paymentMethod...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerAccountDto->paymentMethod)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}paymentMethod. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}paymentMethod. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->creditCategory != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "creditCategory", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}creditCategory. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}creditCategory...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerAccountDto->creditCategory)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}creditCategory. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}creditCategory. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _customerAccountDto->_sizeof_accountOperations; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accountOperations", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}accountOperations. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}accountOperationDto for element {}accountOperations...\n"); #endif status = xmlTextWriterWriteNs0AccountOperationDtoType(writer, &(_customerAccountDto->accountOperations[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}accountOperationDto for element {}accountOperations. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}accountOperations. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->dateStatus != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateStatus", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}dateStatus. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}dateStatus...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_customerAccountDto->dateStatus)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}dateStatus. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}dateStatus. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->dateDunningLevel != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateDunningLevel", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}dateDunningLevel. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}dateDunningLevel...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_customerAccountDto->dateDunningLevel)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}dateDunningLevel. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}dateDunningLevel. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->email != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "email", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}email. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}email...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerAccountDto->email)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}email. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}email. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->phone != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "phone", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}phone. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}phone...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerAccountDto->phone)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}phone. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}phone. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->mobile != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "mobile", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}mobile. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}mobile...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerAccountDto->mobile)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}mobile. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}mobile. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->fax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "fax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}fax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}fax...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerAccountDto->fax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}fax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}fax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->customerCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "customerCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}customerCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}customerCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerAccountDto->customerCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}customerCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}customerCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->dunningLevel != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dunningLevel", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}dunningLevel. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}dunningLevel...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerAccountDto->dunningLevel)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}dunningLevel. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}dunningLevel. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->mandateIdentification != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "mandateIdentification", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}mandateIdentification. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}mandateIdentification...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerAccountDto->mandateIdentification)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}mandateIdentification. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}mandateIdentification. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->mandateDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "mandateDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}mandateDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}mandateDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_customerAccountDto->mandateDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}mandateDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}mandateDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountDto->balance != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "balance", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}balance. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}balance...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_customerAccountDto->balance)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}balance. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}balance. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a CustomerAccountDto. * * @param _customerAccountDto The CustomerAccountDto to free. */ static void freeNs0CustomerAccountDtoType(struct novaglobalapi_ns0_customerAccountDto *_customerAccountDto) { int i; if (_customerAccountDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsLongType(_customerAccountDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->providerId); } if (_customerAccountDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsLongType(_customerAccountDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->currentUserId); } if (_customerAccountDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsStringType(_customerAccountDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->requestId); } if (_customerAccountDto->status != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor status of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsStringType(_customerAccountDto->status); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor status of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->status); } if (_customerAccountDto->paymentMethod != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor paymentMethod of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsStringType(_customerAccountDto->paymentMethod); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor paymentMethod of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->paymentMethod); } if (_customerAccountDto->creditCategory != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor creditCategory of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsStringType(_customerAccountDto->creditCategory); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor creditCategory of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->creditCategory); } if (_customerAccountDto->accountOperations != NULL) { for (i = 0; i < _customerAccountDto->_sizeof_accountOperations; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor accountOperations[%i] of type novaglobalapi_ns0_customerAccountDto...\n", i); #endif freeNs0AccountOperationDtoType(&(_customerAccountDto->accountOperations[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor accountOperations of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->accountOperations); } if (_customerAccountDto->dateStatus != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor dateStatus of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsDateTimeType(_customerAccountDto->dateStatus); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor dateStatus of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->dateStatus); } if (_customerAccountDto->dateDunningLevel != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor dateDunningLevel of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsDateTimeType(_customerAccountDto->dateDunningLevel); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor dateDunningLevel of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->dateDunningLevel); } if (_customerAccountDto->email != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor email of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsStringType(_customerAccountDto->email); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor email of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->email); } if (_customerAccountDto->phone != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor phone of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsStringType(_customerAccountDto->phone); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor phone of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->phone); } if (_customerAccountDto->mobile != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor mobile of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsStringType(_customerAccountDto->mobile); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor mobile of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->mobile); } if (_customerAccountDto->fax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor fax of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsStringType(_customerAccountDto->fax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor fax of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->fax); } if (_customerAccountDto->customerCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor customerCode of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsStringType(_customerAccountDto->customerCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor customerCode of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->customerCode); } if (_customerAccountDto->dunningLevel != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor dunningLevel of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsStringType(_customerAccountDto->dunningLevel); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor dunningLevel of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->dunningLevel); } if (_customerAccountDto->mandateIdentification != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor mandateIdentification of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsStringType(_customerAccountDto->mandateIdentification); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor mandateIdentification of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->mandateIdentification); } if (_customerAccountDto->mandateDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor mandateDate of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsDateTimeType(_customerAccountDto->mandateDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor mandateDate of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->mandateDate); } if (_customerAccountDto->balance != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor balance of type novaglobalapi_ns0_customerAccountDto...\n"); #endif freeXsDecimalType(_customerAccountDto->balance); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor balance of type novaglobalapi_ns0_customerAccountDto...\n"); #endif free(_customerAccountDto->balance); } } #endif /* DEF_novaglobalapi_ns0_customerAccountDto_M */ #ifndef DEF_novaglobalapi_ns0_customerInvoiceDto_M #define DEF_novaglobalapi_ns0_customerInvoiceDto_M /** * Reads a CustomerInvoiceDto element from XML. The element to be read is "customerInvoice", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CustomerInvoiceDto, or NULL in case of error. */ struct novaglobalapi_ns0_customerInvoiceDto *xml_read_novaglobalapi_ns0_customerInvoiceDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0CustomerInvoiceElement(reader); } /** * Writes a CustomerInvoiceDto to XML under element name "customerInvoice". * * @param writer The XML writer. * @param _customerInvoiceDto The CustomerInvoiceDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_customerInvoiceDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto) { return xmlTextWriterWriteNs0CustomerInvoiceElementNS(writer, _customerInvoiceDto, 1); } /** * Frees a CustomerInvoiceDto. * * @param _customerInvoiceDto The CustomerInvoiceDto to free. */ void free_novaglobalapi_ns0_customerInvoiceDto(struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto) { freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); } /** * Reads a CustomerInvoiceDto element from XML. The element to be read is "customerInvoice", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The CustomerInvoiceDto, or NULL in case of error. */ struct novaglobalapi_ns0_customerInvoiceDto *xmlTextReaderReadNs0CustomerInvoiceElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "customerInvoice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}customerInvoice.\n"); #endif _customerInvoiceDto = xmlTextReaderReadNs0CustomerInvoiceDtoType(reader); } #if DEBUG_ENUNCIATE if (_customerInvoiceDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}customerInvoice failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}customerInvoice failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _customerInvoiceDto; } /** * Writes a CustomerInvoiceDto to XML under element name "customerInvoice". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _customerInvoiceDto The CustomerInvoiceDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CustomerInvoiceElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto) { return xmlTextWriterWriteNs0CustomerInvoiceElementNS(writer, _customerInvoiceDto, 0); } /** * Writes a CustomerInvoiceDto to XML under element name "customerInvoice". * * @param writer The XML writer. * @param _customerInvoiceDto The CustomerInvoiceDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CustomerInvoiceElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "customerInvoice", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}customerInvoice. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}customerInvoiceDto for root element {}customerInvoice...\n"); #endif status = xmlTextWriterWriteNs0CustomerInvoiceDtoType(writer, _customerInvoiceDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}customerInvoice. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}customerInvoice. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a CustomerInvoiceDto. * * @param _customerInvoiceDto The CustomerInvoiceDto whose children are to be free. */ static void freeNs0CustomerInvoiceElement(struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto) { freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); } /** * Reads a CustomerInvoiceDto from XML. The reader is assumed to be at the start element. * * @return the CustomerInvoiceDto, or NULL in case of error. */ static struct novaglobalapi_ns0_customerInvoiceDto *xmlTextReaderReadNs0CustomerInvoiceDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto = calloc(1, sizeof(struct novaglobalapi_ns0_customerInvoiceDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "billingAccount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}billingAccount of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}billingAccount of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->billingAccount = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "invoiceDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}invoiceDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}invoiceDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->invoiceDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "dueDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}dueDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}dueDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->dueDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->amount = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "discount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}discount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}discount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->discount = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithoutTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->amountWithoutTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->amountTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->amountWithTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "invoiceNumber", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}invoiceNumber of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}invoiceNumber of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->invoiceNumber = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "productDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}productDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}productDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->productDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "netToPay", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}netToPay of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}netToPay of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->netToPay = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "paymentMethod", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}paymentMethod of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}paymentMethod of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->paymentMethod = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "iban", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}iban of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}iban of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->iban = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "alias", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}alias of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}alias of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->alias = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "pdf", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read binary data of choice {}pdf.\n"); #endif _child_accessor = xmlTextReaderReadEntireNodeValue(reader); _customerInvoiceDto->pdf = _decode_base64((xmlChar *) _child_accessor, &(_customerInvoiceDto->_sizeof_pdf)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "invoiceType", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}invoiceType of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}invoiceType of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->invoiceType = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subCategoryInvoiceAgregates", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}subCategoryInvoiceAgregates of type {}subCategoryInvoiceAgregateDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0SubCategoryInvoiceAgregateDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}subCategoryInvoiceAgregates of type {}subCategoryInvoiceAgregateDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoiceDtoType(_customerInvoiceDto); free(_customerInvoiceDto); return NULL; } _customerInvoiceDto->subCategoryInvoiceAgregates = realloc(_customerInvoiceDto->subCategoryInvoiceAgregates, (_customerInvoiceDto->_sizeof_subCategoryInvoiceAgregates + 1) * sizeof(struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto)); memcpy(&(_customerInvoiceDto->subCategoryInvoiceAgregates[_customerInvoiceDto->_sizeof_subCategoryInvoiceAgregates++]), _child_accessor, sizeof(struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}customerInvoiceDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}customerInvoiceDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _customerInvoiceDto; } /** * Writes a CustomerInvoiceDto to XML. * * @param writer The XML writer. * @param _customerInvoiceDto The CustomerInvoiceDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0CustomerInvoiceDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_customerInvoiceDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_customerInvoiceDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_customerInvoiceDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerInvoiceDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->billingAccount != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "billingAccount", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}billingAccount. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}billingAccount...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerInvoiceDto->billingAccount)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}billingAccount. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}billingAccount. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->invoiceDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "invoiceDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}invoiceDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}invoiceDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_customerInvoiceDto->invoiceDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}invoiceDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}invoiceDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->dueDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dueDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}dueDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}dueDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_customerInvoiceDto->dueDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}dueDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}dueDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->amount != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amount", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amount. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amount...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_customerInvoiceDto->amount)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amount. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amount. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->discount != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "discount", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}discount. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}discount...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_customerInvoiceDto->discount)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}discount. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}discount. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->amountWithoutTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithoutTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithoutTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_customerInvoiceDto->amountWithoutTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->amountTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amountTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_customerInvoiceDto->amountTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amountTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->amountWithTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_customerInvoiceDto->amountWithTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->invoiceNumber != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "invoiceNumber", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}invoiceNumber. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}invoiceNumber...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerInvoiceDto->invoiceNumber)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}invoiceNumber. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}invoiceNumber. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->productDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "productDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}productDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}productDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_customerInvoiceDto->productDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}productDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}productDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->netToPay != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "netToPay", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}netToPay. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}netToPay...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_customerInvoiceDto->netToPay)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}netToPay. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}netToPay. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->paymentMethod != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "paymentMethod", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}paymentMethod. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}paymentMethod...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerInvoiceDto->paymentMethod)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}paymentMethod. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}paymentMethod. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->iban != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "iban", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}iban. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}iban...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerInvoiceDto->iban)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}iban. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}iban. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->alias != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "alias", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}alias. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}alias...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerInvoiceDto->alias)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}alias. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}alias. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->pdf != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pdf", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}pdf. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing binary data for element {}pdf...\n"); #endif binaryData = _encode_base64(_customerInvoiceDto->pdf, _customerInvoiceDto->_sizeof_pdf); status = xmlTextWriterWriteString(writer, binaryData); free(binaryData); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write binary data for element {}pdf. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}pdf. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerInvoiceDto->invoiceType != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "invoiceType", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}invoiceType. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}invoiceType...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_customerInvoiceDto->invoiceType)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}invoiceType. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}invoiceType. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _customerInvoiceDto->_sizeof_subCategoryInvoiceAgregates; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subCategoryInvoiceAgregates", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}subCategoryInvoiceAgregates. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}subCategoryInvoiceAgregateDto for element {}subCategoryInvoiceAgregates...\n"); #endif status = xmlTextWriterWriteNs0SubCategoryInvoiceAgregateDtoType(writer, &(_customerInvoiceDto->subCategoryInvoiceAgregates[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}subCategoryInvoiceAgregateDto for element {}subCategoryInvoiceAgregates. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}subCategoryInvoiceAgregates. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a CustomerInvoiceDto. * * @param _customerInvoiceDto The CustomerInvoiceDto to free. */ static void freeNs0CustomerInvoiceDtoType(struct novaglobalapi_ns0_customerInvoiceDto *_customerInvoiceDto) { int i; if (_customerInvoiceDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsLongType(_customerInvoiceDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->providerId); } if (_customerInvoiceDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsLongType(_customerInvoiceDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->currentUserId); } if (_customerInvoiceDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsStringType(_customerInvoiceDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->requestId); } if (_customerInvoiceDto->billingAccount != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor billingAccount of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsStringType(_customerInvoiceDto->billingAccount); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor billingAccount of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->billingAccount); } if (_customerInvoiceDto->invoiceDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor invoiceDate of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsDateTimeType(_customerInvoiceDto->invoiceDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor invoiceDate of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->invoiceDate); } if (_customerInvoiceDto->dueDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor dueDate of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsDateTimeType(_customerInvoiceDto->dueDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor dueDate of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->dueDate); } if (_customerInvoiceDto->amount != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amount of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsDecimalType(_customerInvoiceDto->amount); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amount of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->amount); } if (_customerInvoiceDto->discount != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor discount of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsDecimalType(_customerInvoiceDto->discount); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor discount of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->discount); } if (_customerInvoiceDto->amountWithoutTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amountWithoutTax of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsDecimalType(_customerInvoiceDto->amountWithoutTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amountWithoutTax of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->amountWithoutTax); } if (_customerInvoiceDto->amountTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amountTax of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsDecimalType(_customerInvoiceDto->amountTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amountTax of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->amountTax); } if (_customerInvoiceDto->amountWithTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amountWithTax of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsDecimalType(_customerInvoiceDto->amountWithTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amountWithTax of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->amountWithTax); } if (_customerInvoiceDto->invoiceNumber != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor invoiceNumber of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsStringType(_customerInvoiceDto->invoiceNumber); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor invoiceNumber of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->invoiceNumber); } if (_customerInvoiceDto->productDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor productDate of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsDateTimeType(_customerInvoiceDto->productDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor productDate of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->productDate); } if (_customerInvoiceDto->netToPay != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor netToPay of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsDecimalType(_customerInvoiceDto->netToPay); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor netToPay of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->netToPay); } if (_customerInvoiceDto->paymentMethod != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor paymentMethod of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsStringType(_customerInvoiceDto->paymentMethod); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor paymentMethod of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->paymentMethod); } if (_customerInvoiceDto->iban != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor iban of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsStringType(_customerInvoiceDto->iban); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor iban of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->iban); } if (_customerInvoiceDto->alias != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor alias of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsStringType(_customerInvoiceDto->alias); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor alias of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->alias); } if (_customerInvoiceDto->pdf != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor pdf of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->pdf); } if (_customerInvoiceDto->invoiceType != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor invoiceType of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif freeXsStringType(_customerInvoiceDto->invoiceType); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor invoiceType of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->invoiceType); } if (_customerInvoiceDto->subCategoryInvoiceAgregates != NULL) { for (i = 0; i < _customerInvoiceDto->_sizeof_subCategoryInvoiceAgregates; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subCategoryInvoiceAgregates[%i] of type novaglobalapi_ns0_customerInvoiceDto...\n", i); #endif freeNs0SubCategoryInvoiceAgregateDtoType(&(_customerInvoiceDto->subCategoryInvoiceAgregates[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subCategoryInvoiceAgregates of type novaglobalapi_ns0_customerInvoiceDto...\n"); #endif free(_customerInvoiceDto->subCategoryInvoiceAgregates); } } #endif /* DEF_novaglobalapi_ns0_customerInvoiceDto_M */ #ifndef DEF_novaglobalapi_ns0_descriptionDto_M #define DEF_novaglobalapi_ns0_descriptionDto_M /** * Reads a DescriptionDto element from XML. The element to be read is "description", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The DescriptionDto, or NULL in case of error. */ struct novaglobalapi_ns0_descriptionDto *xml_read_novaglobalapi_ns0_descriptionDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0DescriptionElement(reader); } /** * Writes a DescriptionDto to XML under element name "description". * * @param writer The XML writer. * @param _descriptionDto The DescriptionDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_descriptionDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_descriptionDto *_descriptionDto) { return xmlTextWriterWriteNs0DescriptionElementNS(writer, _descriptionDto, 1); } /** * Frees a DescriptionDto. * * @param _descriptionDto The DescriptionDto to free. */ void free_novaglobalapi_ns0_descriptionDto(struct novaglobalapi_ns0_descriptionDto *_descriptionDto) { freeNs0DescriptionDtoType(_descriptionDto); free(_descriptionDto); } /** * Reads a DescriptionDto element from XML. The element to be read is "description", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The DescriptionDto, or NULL in case of error. */ struct novaglobalapi_ns0_descriptionDto *xmlTextReaderReadNs0DescriptionElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_descriptionDto *_descriptionDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "description", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}description.\n"); #endif _descriptionDto = xmlTextReaderReadNs0DescriptionDtoType(reader); } #if DEBUG_ENUNCIATE if (_descriptionDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}description failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}description failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _descriptionDto; } /** * Writes a DescriptionDto to XML under element name "description". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _descriptionDto The DescriptionDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0DescriptionElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_descriptionDto *_descriptionDto) { return xmlTextWriterWriteNs0DescriptionElementNS(writer, _descriptionDto, 0); } /** * Writes a DescriptionDto to XML under element name "description". * * @param writer The XML writer. * @param _descriptionDto The DescriptionDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0DescriptionElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_descriptionDto *_descriptionDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}description. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}descriptionDto for root element {}description...\n"); #endif status = xmlTextWriterWriteNs0DescriptionDtoType(writer, _descriptionDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}description. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}description. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a DescriptionDto. * * @param _descriptionDto The DescriptionDto whose children are to be free. */ static void freeNs0DescriptionElement(struct novaglobalapi_ns0_descriptionDto *_descriptionDto) { freeNs0DescriptionDtoType(_descriptionDto); } /** * Reads a DescriptionDto from XML. The reader is assumed to be at the start element. * * @return the DescriptionDto, or NULL in case of error. */ static struct novaglobalapi_ns0_descriptionDto *xmlTextReaderReadNs0DescriptionDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_descriptionDto *_descriptionDto = calloc(1, sizeof(struct novaglobalapi_ns0_descriptionDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0DescriptionDtoType(_descriptionDto); free(_descriptionDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "languageCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0DescriptionDtoType(_descriptionDto); free(_descriptionDto); return NULL; } _descriptionDto->languageCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "description", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0DescriptionDtoType(_descriptionDto); free(_descriptionDto); return NULL; } _descriptionDto->description = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}descriptionDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}descriptionDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _descriptionDto; } /** * Writes a DescriptionDto to XML. * * @param writer The XML writer. * @param _descriptionDto The DescriptionDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0DescriptionDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_descriptionDto *_descriptionDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_descriptionDto->languageCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "languageCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}languageCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}languageCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_descriptionDto->languageCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}languageCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}languageCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_descriptionDto->description != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}description. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}description...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_descriptionDto->description)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}description. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}description. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a DescriptionDto. * * @param _descriptionDto The DescriptionDto to free. */ static void freeNs0DescriptionDtoType(struct novaglobalapi_ns0_descriptionDto *_descriptionDto) { int i; if (_descriptionDto->languageCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor languageCode of type novaglobalapi_ns0_descriptionDto...\n"); #endif freeXsStringType(_descriptionDto->languageCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor languageCode of type novaglobalapi_ns0_descriptionDto...\n"); #endif free(_descriptionDto->languageCode); } if (_descriptionDto->description != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor description of type novaglobalapi_ns0_descriptionDto...\n"); #endif freeXsStringType(_descriptionDto->description); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor description of type novaglobalapi_ns0_descriptionDto...\n"); #endif free(_descriptionDto->description); } } #endif /* DEF_novaglobalapi_ns0_descriptionDto_M */ #ifndef DEF_novaglobalapi_ns0_invoiceDto_M #define DEF_novaglobalapi_ns0_invoiceDto_M /** * Reads a InvoiceDto element from XML. The element to be read is "invoice", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The InvoiceDto, or NULL in case of error. */ struct novaglobalapi_ns0_invoiceDto *xml_read_novaglobalapi_ns0_invoiceDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0InvoiceElement(reader); } /** * Writes a InvoiceDto to XML under element name "invoice". * * @param writer The XML writer. * @param _invoiceDto The InvoiceDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_invoiceDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_invoiceDto *_invoiceDto) { return xmlTextWriterWriteNs0InvoiceElementNS(writer, _invoiceDto, 1); } /** * Frees a InvoiceDto. * * @param _invoiceDto The InvoiceDto to free. */ void free_novaglobalapi_ns0_invoiceDto(struct novaglobalapi_ns0_invoiceDto *_invoiceDto) { freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); } /** * Reads a InvoiceDto element from XML. The element to be read is "invoice", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The InvoiceDto, or NULL in case of error. */ struct novaglobalapi_ns0_invoiceDto *xmlTextReaderReadNs0InvoiceElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_invoiceDto *_invoiceDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "invoice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}invoice.\n"); #endif _invoiceDto = xmlTextReaderReadNs0InvoiceDtoType(reader); } #if DEBUG_ENUNCIATE if (_invoiceDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}invoice failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}invoice failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _invoiceDto; } /** * Writes a InvoiceDto to XML under element name "invoice". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _invoiceDto The InvoiceDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0InvoiceElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_invoiceDto *_invoiceDto) { return xmlTextWriterWriteNs0InvoiceElementNS(writer, _invoiceDto, 0); } /** * Writes a InvoiceDto to XML under element name "invoice". * * @param writer The XML writer. * @param _invoiceDto The InvoiceDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0InvoiceElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_invoiceDto *_invoiceDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "invoice", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}invoice. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}invoiceDto for root element {}invoice...\n"); #endif status = xmlTextWriterWriteNs0InvoiceDtoType(writer, _invoiceDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}invoice. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}invoice. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a InvoiceDto. * * @param _invoiceDto The InvoiceDto whose children are to be free. */ static void freeNs0InvoiceElement(struct novaglobalapi_ns0_invoiceDto *_invoiceDto) { freeNs0InvoiceDtoType(_invoiceDto); } /** * Reads a InvoiceDto from XML. The reader is assumed to be at the start element. * * @return the InvoiceDto, or NULL in case of error. */ static struct novaglobalapi_ns0_invoiceDto *xmlTextReaderReadNs0InvoiceDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_invoiceDto *_invoiceDto = calloc(1, sizeof(struct novaglobalapi_ns0_invoiceDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "billingAccountCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}billingAccountCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}billingAccountCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->billingAccountCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "invoiceDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}invoiceDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}invoiceDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->invoiceDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "dueDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}dueDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}dueDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->dueDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->amount = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "discount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}discount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}discount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->discount = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithoutTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->amountWithoutTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->amountTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->amountWithTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "comment", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}comment of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}comment of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->comment = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subCategoryInvoiceAgregates", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}subCategoryInvoiceAgregates of type {}subCategoryInvoiceAgregateDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0SubCategoryInvoiceAgregateDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}subCategoryInvoiceAgregates of type {}subCategoryInvoiceAgregateDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0InvoiceDtoType(_invoiceDto); free(_invoiceDto); return NULL; } _invoiceDto->subCategoryInvoiceAgregates = realloc(_invoiceDto->subCategoryInvoiceAgregates, (_invoiceDto->_sizeof_subCategoryInvoiceAgregates + 1) * sizeof(struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto)); memcpy(&(_invoiceDto->subCategoryInvoiceAgregates[_invoiceDto->_sizeof_subCategoryInvoiceAgregates++]), _child_accessor, sizeof(struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}invoiceDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}invoiceDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _invoiceDto; } /** * Writes a InvoiceDto to XML. * * @param writer The XML writer. * @param _invoiceDto The InvoiceDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0InvoiceDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_invoiceDto *_invoiceDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_invoiceDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_invoiceDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_invoiceDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_invoiceDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_invoiceDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_invoiceDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_invoiceDto->billingAccountCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "billingAccountCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}billingAccountCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}billingAccountCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_invoiceDto->billingAccountCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}billingAccountCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}billingAccountCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_invoiceDto->invoiceDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "invoiceDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}invoiceDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}invoiceDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_invoiceDto->invoiceDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}invoiceDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}invoiceDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_invoiceDto->dueDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dueDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}dueDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}dueDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_invoiceDto->dueDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}dueDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}dueDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_invoiceDto->amount != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amount", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amount. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amount...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_invoiceDto->amount)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amount. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amount. status: %i\n", status); #endif return status; } totalBytes += status; } if (_invoiceDto->discount != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "discount", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}discount. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}discount...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_invoiceDto->discount)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}discount. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}discount. status: %i\n", status); #endif return status; } totalBytes += status; } if (_invoiceDto->amountWithoutTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithoutTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithoutTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_invoiceDto->amountWithoutTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_invoiceDto->amountTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amountTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_invoiceDto->amountTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amountTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_invoiceDto->amountWithTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_invoiceDto->amountWithTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_invoiceDto->comment != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "comment", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}comment. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}comment...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_invoiceDto->comment)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}comment. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}comment. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _invoiceDto->_sizeof_subCategoryInvoiceAgregates; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subCategoryInvoiceAgregates", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}subCategoryInvoiceAgregates. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}subCategoryInvoiceAgregateDto for element {}subCategoryInvoiceAgregates...\n"); #endif status = xmlTextWriterWriteNs0SubCategoryInvoiceAgregateDtoType(writer, &(_invoiceDto->subCategoryInvoiceAgregates[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}subCategoryInvoiceAgregateDto for element {}subCategoryInvoiceAgregates. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}subCategoryInvoiceAgregates. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a InvoiceDto. * * @param _invoiceDto The InvoiceDto to free. */ static void freeNs0InvoiceDtoType(struct novaglobalapi_ns0_invoiceDto *_invoiceDto) { int i; if (_invoiceDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_invoiceDto...\n"); #endif freeXsLongType(_invoiceDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->providerId); } if (_invoiceDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_invoiceDto...\n"); #endif freeXsLongType(_invoiceDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->currentUserId); } if (_invoiceDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_invoiceDto...\n"); #endif freeXsStringType(_invoiceDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->requestId); } if (_invoiceDto->billingAccountCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor billingAccountCode of type novaglobalapi_ns0_invoiceDto...\n"); #endif freeXsStringType(_invoiceDto->billingAccountCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor billingAccountCode of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->billingAccountCode); } if (_invoiceDto->invoiceDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor invoiceDate of type novaglobalapi_ns0_invoiceDto...\n"); #endif freeXsDateTimeType(_invoiceDto->invoiceDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor invoiceDate of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->invoiceDate); } if (_invoiceDto->dueDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor dueDate of type novaglobalapi_ns0_invoiceDto...\n"); #endif freeXsDateTimeType(_invoiceDto->dueDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor dueDate of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->dueDate); } if (_invoiceDto->amount != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amount of type novaglobalapi_ns0_invoiceDto...\n"); #endif freeXsDecimalType(_invoiceDto->amount); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amount of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->amount); } if (_invoiceDto->discount != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor discount of type novaglobalapi_ns0_invoiceDto...\n"); #endif freeXsDecimalType(_invoiceDto->discount); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor discount of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->discount); } if (_invoiceDto->amountWithoutTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amountWithoutTax of type novaglobalapi_ns0_invoiceDto...\n"); #endif freeXsDecimalType(_invoiceDto->amountWithoutTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amountWithoutTax of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->amountWithoutTax); } if (_invoiceDto->amountTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amountTax of type novaglobalapi_ns0_invoiceDto...\n"); #endif freeXsDecimalType(_invoiceDto->amountTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amountTax of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->amountTax); } if (_invoiceDto->amountWithTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amountWithTax of type novaglobalapi_ns0_invoiceDto...\n"); #endif freeXsDecimalType(_invoiceDto->amountWithTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amountWithTax of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->amountWithTax); } if (_invoiceDto->comment != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor comment of type novaglobalapi_ns0_invoiceDto...\n"); #endif freeXsStringType(_invoiceDto->comment); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor comment of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->comment); } if (_invoiceDto->subCategoryInvoiceAgregates != NULL) { for (i = 0; i < _invoiceDto->_sizeof_subCategoryInvoiceAgregates; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subCategoryInvoiceAgregates[%i] of type novaglobalapi_ns0_invoiceDto...\n", i); #endif freeNs0SubCategoryInvoiceAgregateDtoType(&(_invoiceDto->subCategoryInvoiceAgregates[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subCategoryInvoiceAgregates of type novaglobalapi_ns0_invoiceDto...\n"); #endif free(_invoiceDto->subCategoryInvoiceAgregates); } } #endif /* DEF_novaglobalapi_ns0_invoiceDto_M */ #ifndef DEF_novaglobalapi_ns0_matchingAmountDto_M #define DEF_novaglobalapi_ns0_matchingAmountDto_M /** * Reads a MatchingAmountDto element from XML. The element to be read is "matchingAmount", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The MatchingAmountDto, or NULL in case of error. */ struct novaglobalapi_ns0_matchingAmountDto *xml_read_novaglobalapi_ns0_matchingAmountDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0MatchingAmountElement(reader); } /** * Writes a MatchingAmountDto to XML under element name "matchingAmount". * * @param writer The XML writer. * @param _matchingAmountDto The MatchingAmountDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_matchingAmountDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto) { return xmlTextWriterWriteNs0MatchingAmountElementNS(writer, _matchingAmountDto, 1); } /** * Frees a MatchingAmountDto. * * @param _matchingAmountDto The MatchingAmountDto to free. */ void free_novaglobalapi_ns0_matchingAmountDto(struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto) { freeNs0MatchingAmountDtoType(_matchingAmountDto); free(_matchingAmountDto); } /** * Reads a MatchingAmountDto element from XML. The element to be read is "matchingAmount", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The MatchingAmountDto, or NULL in case of error. */ struct novaglobalapi_ns0_matchingAmountDto *xmlTextReaderReadNs0MatchingAmountElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "matchingAmount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}matchingAmount.\n"); #endif _matchingAmountDto = xmlTextReaderReadNs0MatchingAmountDtoType(reader); } #if DEBUG_ENUNCIATE if (_matchingAmountDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}matchingAmount failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}matchingAmount failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _matchingAmountDto; } /** * Writes a MatchingAmountDto to XML under element name "matchingAmount". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _matchingAmountDto The MatchingAmountDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0MatchingAmountElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto) { return xmlTextWriterWriteNs0MatchingAmountElementNS(writer, _matchingAmountDto, 0); } /** * Writes a MatchingAmountDto to XML under element name "matchingAmount". * * @param writer The XML writer. * @param _matchingAmountDto The MatchingAmountDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0MatchingAmountElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "matchingAmount", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}matchingAmount. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}matchingAmountDto for root element {}matchingAmount...\n"); #endif status = xmlTextWriterWriteNs0MatchingAmountDtoType(writer, _matchingAmountDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}matchingAmount. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}matchingAmount. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a MatchingAmountDto. * * @param _matchingAmountDto The MatchingAmountDto whose children are to be free. */ static void freeNs0MatchingAmountElement(struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto) { freeNs0MatchingAmountDtoType(_matchingAmountDto); } /** * Reads a MatchingAmountDto from XML. The reader is assumed to be at the start element. * * @return the MatchingAmountDto, or NULL in case of error. */ static struct novaglobalapi_ns0_matchingAmountDto *xmlTextReaderReadNs0MatchingAmountDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto = calloc(1, sizeof(struct novaglobalapi_ns0_matchingAmountDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0MatchingAmountDtoType(_matchingAmountDto); free(_matchingAmountDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "matchingCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}matchingCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}matchingCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0MatchingAmountDtoType(_matchingAmountDto); free(_matchingAmountDto); return NULL; } _matchingAmountDto->matchingCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "matchingAmount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}matchingAmount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}matchingAmount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0MatchingAmountDtoType(_matchingAmountDto); free(_matchingAmountDto); return NULL; } _matchingAmountDto->matchingAmount = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}matchingAmountDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}matchingAmountDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _matchingAmountDto; } /** * Writes a MatchingAmountDto to XML. * * @param writer The XML writer. * @param _matchingAmountDto The MatchingAmountDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0MatchingAmountDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_matchingAmountDto->matchingCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "matchingCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}matchingCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}matchingCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_matchingAmountDto->matchingCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}matchingCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}matchingCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_matchingAmountDto->matchingAmount != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "matchingAmount", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}matchingAmount. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}matchingAmount...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_matchingAmountDto->matchingAmount)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}matchingAmount. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}matchingAmount. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a MatchingAmountDto. * * @param _matchingAmountDto The MatchingAmountDto to free. */ static void freeNs0MatchingAmountDtoType(struct novaglobalapi_ns0_matchingAmountDto *_matchingAmountDto) { int i; if (_matchingAmountDto->matchingCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor matchingCode of type novaglobalapi_ns0_matchingAmountDto...\n"); #endif freeXsStringType(_matchingAmountDto->matchingCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor matchingCode of type novaglobalapi_ns0_matchingAmountDto...\n"); #endif free(_matchingAmountDto->matchingCode); } if (_matchingAmountDto->matchingAmount != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor matchingAmount of type novaglobalapi_ns0_matchingAmountDto...\n"); #endif freeXsDecimalType(_matchingAmountDto->matchingAmount); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor matchingAmount of type novaglobalapi_ns0_matchingAmountDto...\n"); #endif free(_matchingAmountDto->matchingAmount); } } #endif /* DEF_novaglobalapi_ns0_matchingAmountDto_M */ #ifndef DEF_novaglobalapi_ns0_offerDto_M #define DEF_novaglobalapi_ns0_offerDto_M /** * Reads a OfferDto element from XML. The element to be read is "offer", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The OfferDto, or NULL in case of error. */ struct novaglobalapi_ns0_offerDto *xml_read_novaglobalapi_ns0_offerDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0OfferElement(reader); } /** * Writes a OfferDto to XML under element name "offer". * * @param writer The XML writer. * @param _offerDto The OfferDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_offerDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerDto *_offerDto) { return xmlTextWriterWriteNs0OfferElementNS(writer, _offerDto, 1); } /** * Frees a OfferDto. * * @param _offerDto The OfferDto to free. */ void free_novaglobalapi_ns0_offerDto(struct novaglobalapi_ns0_offerDto *_offerDto) { freeNs0OfferDtoType(_offerDto); free(_offerDto); } /** * Reads a OfferDto element from XML. The element to be read is "offer", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The OfferDto, or NULL in case of error. */ struct novaglobalapi_ns0_offerDto *xmlTextReaderReadNs0OfferElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_offerDto *_offerDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "offer", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}offer.\n"); #endif _offerDto = xmlTextReaderReadNs0OfferDtoType(reader); } #if DEBUG_ENUNCIATE if (_offerDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}offer failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}offer failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _offerDto; } /** * Writes a OfferDto to XML under element name "offer". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _offerDto The OfferDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0OfferElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerDto *_offerDto) { return xmlTextWriterWriteNs0OfferElementNS(writer, _offerDto, 0); } /** * Writes a OfferDto to XML under element name "offer". * * @param writer The XML writer. * @param _offerDto The OfferDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0OfferElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerDto *_offerDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offer", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}offer. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}offerDto for root element {}offer...\n"); #endif status = xmlTextWriterWriteNs0OfferDtoType(writer, _offerDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}offer. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}offer. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a OfferDto. * * @param _offerDto The OfferDto whose children are to be free. */ static void freeNs0OfferElement(struct novaglobalapi_ns0_offerDto *_offerDto) { freeNs0OfferDtoType(_offerDto); } /** * Reads a OfferDto from XML. The reader is assumed to be at the start element. * * @return the OfferDto, or NULL in case of error. */ static struct novaglobalapi_ns0_offerDto *xmlTextReaderReadNs0OfferDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_offerDto *_offerDto = calloc(1, sizeof(struct novaglobalapi_ns0_offerDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0OfferDtoType(_offerDto); free(_offerDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferDtoType(_offerDto); free(_offerDto); return NULL; } _offerDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferDtoType(_offerDto); free(_offerDto); return NULL; } _offerDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferDtoType(_offerDto); free(_offerDto); return NULL; } _offerDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "offerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferDtoType(_offerDto); free(_offerDto); return NULL; } _offerDto->offerId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "descriptions", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}descriptions of type {}descriptionDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0DescriptionDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}descriptions of type {}descriptionDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferDtoType(_offerDto); free(_offerDto); return NULL; } _offerDto->descriptions = realloc(_offerDto->descriptions, (_offerDto->_sizeof_descriptions + 1) * sizeof(struct novaglobalapi_ns0_descriptionDto)); memcpy(&(_offerDto->descriptions[_offerDto->_sizeof_descriptions++]), _child_accessor, sizeof(struct novaglobalapi_ns0_descriptionDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "services", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}services of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}services of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferDtoType(_offerDto); free(_offerDto); return NULL; } _offerDto->services = realloc(_offerDto->services, (_offerDto->_sizeof_services + 1) * sizeof(xmlChar)); memcpy(&(_offerDto->services[_offerDto->_sizeof_services++]), _child_accessor, sizeof(xmlChar)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}offerDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}offerDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _offerDto; } /** * Writes a OfferDto to XML. * * @param writer The XML writer. * @param _offerDto The OfferDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0OfferDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerDto *_offerDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_offerDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_offerDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_offerDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_offerDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerDto->offerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}offerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}offerId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_offerDto->offerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}offerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}offerId. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _offerDto->_sizeof_descriptions; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "descriptions", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}descriptions. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}descriptionDto for element {}descriptions...\n"); #endif status = xmlTextWriterWriteNs0DescriptionDtoType(writer, &(_offerDto->descriptions[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}descriptionDto for element {}descriptions. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}descriptions. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _offerDto->_sizeof_services; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "services", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}services. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}services...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, &(_offerDto->services[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}services. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}services. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a OfferDto. * * @param _offerDto The OfferDto to free. */ static void freeNs0OfferDtoType(struct novaglobalapi_ns0_offerDto *_offerDto) { int i; if (_offerDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_offerDto...\n"); #endif freeXsLongType(_offerDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_offerDto...\n"); #endif free(_offerDto->providerId); } if (_offerDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_offerDto...\n"); #endif freeXsLongType(_offerDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_offerDto...\n"); #endif free(_offerDto->currentUserId); } if (_offerDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_offerDto...\n"); #endif freeXsStringType(_offerDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_offerDto...\n"); #endif free(_offerDto->requestId); } if (_offerDto->offerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor offerId of type novaglobalapi_ns0_offerDto...\n"); #endif freeXsStringType(_offerDto->offerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor offerId of type novaglobalapi_ns0_offerDto...\n"); #endif free(_offerDto->offerId); } if (_offerDto->descriptions != NULL) { for (i = 0; i < _offerDto->_sizeof_descriptions; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor descriptions[%i] of type novaglobalapi_ns0_offerDto...\n", i); #endif freeNs0DescriptionDtoType(&(_offerDto->descriptions[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor descriptions of type novaglobalapi_ns0_offerDto...\n"); #endif free(_offerDto->descriptions); } if (_offerDto->services != NULL) { for (i = 0; i < _offerDto->_sizeof_services; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor services[%i] of type novaglobalapi_ns0_offerDto...\n", i); #endif freeXsStringType(&(_offerDto->services[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor services of type novaglobalapi_ns0_offerDto...\n"); #endif free(_offerDto->services); } } #endif /* DEF_novaglobalapi_ns0_offerDto_M */ #ifndef DEF_novaglobalapi_ns0_offerPricePlanDto_M #define DEF_novaglobalapi_ns0_offerPricePlanDto_M /** * Reads a OfferPricePlanDto element from XML. The element to be read is "offerPricePlan", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The OfferPricePlanDto, or NULL in case of error. */ struct novaglobalapi_ns0_offerPricePlanDto *xml_read_novaglobalapi_ns0_offerPricePlanDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0OfferPricePlanElement(reader); } /** * Writes a OfferPricePlanDto to XML under element name "offerPricePlan". * * @param writer The XML writer. * @param _offerPricePlanDto The OfferPricePlanDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_offerPricePlanDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto) { return xmlTextWriterWriteNs0OfferPricePlanElementNS(writer, _offerPricePlanDto, 1); } /** * Frees a OfferPricePlanDto. * * @param _offerPricePlanDto The OfferPricePlanDto to free. */ void free_novaglobalapi_ns0_offerPricePlanDto(struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto) { freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); } /** * Reads a OfferPricePlanDto element from XML. The element to be read is "offerPricePlan", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The OfferPricePlanDto, or NULL in case of error. */ struct novaglobalapi_ns0_offerPricePlanDto *xmlTextReaderReadNs0OfferPricePlanElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "offerPricePlan", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}offerPricePlan.\n"); #endif _offerPricePlanDto = xmlTextReaderReadNs0OfferPricePlanDtoType(reader); } #if DEBUG_ENUNCIATE if (_offerPricePlanDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}offerPricePlan failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}offerPricePlan failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _offerPricePlanDto; } /** * Writes a OfferPricePlanDto to XML under element name "offerPricePlan". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _offerPricePlanDto The OfferPricePlanDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0OfferPricePlanElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto) { return xmlTextWriterWriteNs0OfferPricePlanElementNS(writer, _offerPricePlanDto, 0); } /** * Writes a OfferPricePlanDto to XML under element name "offerPricePlan". * * @param writer The XML writer. * @param _offerPricePlanDto The OfferPricePlanDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0OfferPricePlanElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offerPricePlan", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}offerPricePlan. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}offerPricePlanDto for root element {}offerPricePlan...\n"); #endif status = xmlTextWriterWriteNs0OfferPricePlanDtoType(writer, _offerPricePlanDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}offerPricePlan. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}offerPricePlan. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a OfferPricePlanDto. * * @param _offerPricePlanDto The OfferPricePlanDto whose children are to be free. */ static void freeNs0OfferPricePlanElement(struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto) { freeNs0OfferPricePlanDtoType(_offerPricePlanDto); } /** * Reads a OfferPricePlanDto from XML. The reader is assumed to be at the start element. * * @return the OfferPricePlanDto, or NULL in case of error. */ static struct novaglobalapi_ns0_offerPricePlanDto *xmlTextReaderReadNs0OfferPricePlanDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto = calloc(1, sizeof(struct novaglobalapi_ns0_offerPricePlanDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "offerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->offerId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->organizationId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}taxId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}taxId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->taxId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionProrata", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}subscriptionProrata of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif _child_accessor = xmlTextReaderReadXsBooleanType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}subscriptionProrata of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->subscriptionProrata = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationProrata", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}terminationProrata of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif _child_accessor = xmlTextReaderReadXsBooleanType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}terminationProrata of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->terminationProrata = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "applyInAdvance", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}applyInAdvance of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif _child_accessor = xmlTextReaderReadXsBooleanType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}applyInAdvance of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->applyInAdvance = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param1", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}param1 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}param1 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->param1 = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param2", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}param2 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}param2 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->param2 = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param3", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}param3 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}param3 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->param3 = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "billingPeriod", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}billingPeriod of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}billingPeriod of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->billingPeriod = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recurringCharges", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}recurringCharges of type {}recurringChargeDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0RecurringChargeDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}recurringCharges of type {}recurringChargeDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->recurringCharges = realloc(_offerPricePlanDto->recurringCharges, (_offerPricePlanDto->_sizeof_recurringCharges + 1) * sizeof(struct novaglobalapi_ns0_recurringChargeDto)); memcpy(&(_offerPricePlanDto->recurringCharges[_offerPricePlanDto->_sizeof_recurringCharges++]), _child_accessor, sizeof(struct novaglobalapi_ns0_recurringChargeDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "usageUnit", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}usageUnit of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}usageUnit of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->usageUnit = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "usageCharges", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}usageCharges of type {}usageChargeDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0UsageChargeDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}usageCharges of type {}usageChargeDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->usageCharges = realloc(_offerPricePlanDto->usageCharges, (_offerPricePlanDto->_sizeof_usageCharges + 1) * sizeof(struct novaglobalapi_ns0_usageChargeDto)); memcpy(&(_offerPricePlanDto->usageCharges[_offerPricePlanDto->_sizeof_usageCharges++]), _child_accessor, sizeof(struct novaglobalapi_ns0_usageChargeDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionFees", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}subscriptionFees of type {}subscriptionFeeDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0SubscriptionFeeDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}subscriptionFees of type {}subscriptionFeeDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->subscriptionFees = realloc(_offerPricePlanDto->subscriptionFees, (_offerPricePlanDto->_sizeof_subscriptionFees + 1) * sizeof(struct novaglobalapi_ns0_subscriptionFeeDto)); memcpy(&(_offerPricePlanDto->subscriptionFees[_offerPricePlanDto->_sizeof_subscriptionFees++]), _child_accessor, sizeof(struct novaglobalapi_ns0_subscriptionFeeDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationFees", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}terminationFees of type {}terminationFeeDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0TerminationFeeDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}terminationFees of type {}terminationFeeDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OfferPricePlanDtoType(_offerPricePlanDto); free(_offerPricePlanDto); return NULL; } _offerPricePlanDto->terminationFees = realloc(_offerPricePlanDto->terminationFees, (_offerPricePlanDto->_sizeof_terminationFees + 1) * sizeof(struct novaglobalapi_ns0_terminationFeeDto)); memcpy(&(_offerPricePlanDto->terminationFees[_offerPricePlanDto->_sizeof_terminationFees++]), _child_accessor, sizeof(struct novaglobalapi_ns0_terminationFeeDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}offerPricePlanDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}offerPricePlanDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _offerPricePlanDto; } /** * Writes a OfferPricePlanDto to XML. * * @param writer The XML writer. * @param _offerPricePlanDto The OfferPricePlanDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0OfferPricePlanDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_offerPricePlanDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_offerPricePlanDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_offerPricePlanDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_offerPricePlanDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->offerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}offerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}offerId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_offerPricePlanDto->offerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}offerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}offerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->organizationId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_offerPricePlanDto->organizationId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->taxId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}taxId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}taxId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_offerPricePlanDto->taxId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}taxId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}taxId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->subscriptionProrata != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionProrata", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}subscriptionProrata. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}subscriptionProrata...\n"); #endif status = xmlTextWriterWriteXsBooleanType(writer, (_offerPricePlanDto->subscriptionProrata)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}subscriptionProrata. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}subscriptionProrata. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->terminationProrata != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationProrata", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}terminationProrata. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}terminationProrata...\n"); #endif status = xmlTextWriterWriteXsBooleanType(writer, (_offerPricePlanDto->terminationProrata)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}terminationProrata. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}terminationProrata. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->applyInAdvance != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "applyInAdvance", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}applyInAdvance. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}applyInAdvance...\n"); #endif status = xmlTextWriterWriteXsBooleanType(writer, (_offerPricePlanDto->applyInAdvance)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}applyInAdvance. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}applyInAdvance. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->param1 != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param1", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}param1. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}param1...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_offerPricePlanDto->param1)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}param1. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}param1. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->param2 != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param2", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}param2. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}param2...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_offerPricePlanDto->param2)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}param2. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}param2. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->param3 != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param3", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}param3. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}param3...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_offerPricePlanDto->param3)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}param3. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}param3. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->billingPeriod != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "billingPeriod", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}billingPeriod. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}billingPeriod...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_offerPricePlanDto->billingPeriod)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}billingPeriod. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}billingPeriod. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _offerPricePlanDto->_sizeof_recurringCharges; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recurringCharges", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}recurringCharges. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}recurringChargeDto for element {}recurringCharges...\n"); #endif status = xmlTextWriterWriteNs0RecurringChargeDtoType(writer, &(_offerPricePlanDto->recurringCharges[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}recurringChargeDto for element {}recurringCharges. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}recurringCharges. status: %i\n", status); #endif return status; } totalBytes += status; } if (_offerPricePlanDto->usageUnit != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "usageUnit", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}usageUnit. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}usageUnit...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_offerPricePlanDto->usageUnit)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}usageUnit. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}usageUnit. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _offerPricePlanDto->_sizeof_usageCharges; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "usageCharges", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}usageCharges. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}usageChargeDto for element {}usageCharges...\n"); #endif status = xmlTextWriterWriteNs0UsageChargeDtoType(writer, &(_offerPricePlanDto->usageCharges[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}usageChargeDto for element {}usageCharges. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}usageCharges. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _offerPricePlanDto->_sizeof_subscriptionFees; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionFees", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}subscriptionFees. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}subscriptionFeeDto for element {}subscriptionFees...\n"); #endif status = xmlTextWriterWriteNs0SubscriptionFeeDtoType(writer, &(_offerPricePlanDto->subscriptionFees[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}subscriptionFeeDto for element {}subscriptionFees. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}subscriptionFees. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _offerPricePlanDto->_sizeof_terminationFees; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationFees", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}terminationFees. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}terminationFeeDto for element {}terminationFees...\n"); #endif status = xmlTextWriterWriteNs0TerminationFeeDtoType(writer, &(_offerPricePlanDto->terminationFees[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}terminationFeeDto for element {}terminationFees. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}terminationFees. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a OfferPricePlanDto. * * @param _offerPricePlanDto The OfferPricePlanDto to free. */ static void freeNs0OfferPricePlanDtoType(struct novaglobalapi_ns0_offerPricePlanDto *_offerPricePlanDto) { int i; if (_offerPricePlanDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsLongType(_offerPricePlanDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->providerId); } if (_offerPricePlanDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsLongType(_offerPricePlanDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->currentUserId); } if (_offerPricePlanDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsStringType(_offerPricePlanDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->requestId); } if (_offerPricePlanDto->offerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor offerId of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsStringType(_offerPricePlanDto->offerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor offerId of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->offerId); } if (_offerPricePlanDto->organizationId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor organizationId of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsStringType(_offerPricePlanDto->organizationId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor organizationId of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->organizationId); } if (_offerPricePlanDto->taxId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor taxId of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsStringType(_offerPricePlanDto->taxId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor taxId of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->taxId); } if (_offerPricePlanDto->subscriptionProrata != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor subscriptionProrata of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsBooleanType(_offerPricePlanDto->subscriptionProrata); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subscriptionProrata of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->subscriptionProrata); } if (_offerPricePlanDto->terminationProrata != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor terminationProrata of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsBooleanType(_offerPricePlanDto->terminationProrata); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor terminationProrata of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->terminationProrata); } if (_offerPricePlanDto->applyInAdvance != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor applyInAdvance of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsBooleanType(_offerPricePlanDto->applyInAdvance); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor applyInAdvance of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->applyInAdvance); } if (_offerPricePlanDto->param1 != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor param1 of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsStringType(_offerPricePlanDto->param1); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor param1 of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->param1); } if (_offerPricePlanDto->param2 != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor param2 of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsStringType(_offerPricePlanDto->param2); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor param2 of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->param2); } if (_offerPricePlanDto->param3 != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor param3 of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsStringType(_offerPricePlanDto->param3); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor param3 of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->param3); } if (_offerPricePlanDto->billingPeriod != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor billingPeriod of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsStringType(_offerPricePlanDto->billingPeriod); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor billingPeriod of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->billingPeriod); } if (_offerPricePlanDto->recurringCharges != NULL) { for (i = 0; i < _offerPricePlanDto->_sizeof_recurringCharges; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor recurringCharges[%i] of type novaglobalapi_ns0_offerPricePlanDto...\n", i); #endif freeNs0RecurringChargeDtoType(&(_offerPricePlanDto->recurringCharges[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor recurringCharges of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->recurringCharges); } if (_offerPricePlanDto->usageUnit != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor usageUnit of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif freeXsStringType(_offerPricePlanDto->usageUnit); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor usageUnit of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->usageUnit); } if (_offerPricePlanDto->usageCharges != NULL) { for (i = 0; i < _offerPricePlanDto->_sizeof_usageCharges; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor usageCharges[%i] of type novaglobalapi_ns0_offerPricePlanDto...\n", i); #endif freeNs0UsageChargeDtoType(&(_offerPricePlanDto->usageCharges[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor usageCharges of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->usageCharges); } if (_offerPricePlanDto->subscriptionFees != NULL) { for (i = 0; i < _offerPricePlanDto->_sizeof_subscriptionFees; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subscriptionFees[%i] of type novaglobalapi_ns0_offerPricePlanDto...\n", i); #endif freeNs0SubscriptionFeeDtoType(&(_offerPricePlanDto->subscriptionFees[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subscriptionFees of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->subscriptionFees); } if (_offerPricePlanDto->terminationFees != NULL) { for (i = 0; i < _offerPricePlanDto->_sizeof_terminationFees; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor terminationFees[%i] of type novaglobalapi_ns0_offerPricePlanDto...\n", i); #endif freeNs0TerminationFeeDtoType(&(_offerPricePlanDto->terminationFees[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor terminationFees of type novaglobalapi_ns0_offerPricePlanDto...\n"); #endif free(_offerPricePlanDto->terminationFees); } } #endif /* DEF_novaglobalapi_ns0_offerPricePlanDto_M */ #ifndef DEF_novaglobalapi_ns0_oneShotChargeTemplateDto_M #define DEF_novaglobalapi_ns0_oneShotChargeTemplateDto_M /** * Reads a OneShotChargeTemplateDto element from XML. The element to be read is "oneShotChargeTemplate", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The OneShotChargeTemplateDto, or NULL in case of error. */ struct novaglobalapi_ns0_oneShotChargeTemplateDto *xml_read_novaglobalapi_ns0_oneShotChargeTemplateDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0OneShotChargeTemplateElement(reader); } /** * Writes a OneShotChargeTemplateDto to XML under element name "oneShotChargeTemplate". * * @param writer The XML writer. * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_oneShotChargeTemplateDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto) { return xmlTextWriterWriteNs0OneShotChargeTemplateElementNS(writer, _oneShotChargeTemplateDto, 1); } /** * Frees a OneShotChargeTemplateDto. * * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to free. */ void free_novaglobalapi_ns0_oneShotChargeTemplateDto(struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto) { freeNs0OneShotChargeTemplateDtoType(_oneShotChargeTemplateDto); free(_oneShotChargeTemplateDto); } /** * Reads a OneShotChargeTemplateDto element from XML. The element to be read is "oneShotChargeTemplate", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The OneShotChargeTemplateDto, or NULL in case of error. */ struct novaglobalapi_ns0_oneShotChargeTemplateDto *xmlTextReaderReadNs0OneShotChargeTemplateElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "oneShotChargeTemplate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}oneShotChargeTemplate.\n"); #endif _oneShotChargeTemplateDto = xmlTextReaderReadNs0OneShotChargeTemplateDtoType(reader); } #if DEBUG_ENUNCIATE if (_oneShotChargeTemplateDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}oneShotChargeTemplate failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}oneShotChargeTemplate failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _oneShotChargeTemplateDto; } /** * Writes a OneShotChargeTemplateDto to XML under element name "oneShotChargeTemplate". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0OneShotChargeTemplateElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto) { return xmlTextWriterWriteNs0OneShotChargeTemplateElementNS(writer, _oneShotChargeTemplateDto, 0); } /** * Writes a OneShotChargeTemplateDto to XML under element name "oneShotChargeTemplate". * * @param writer The XML writer. * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0OneShotChargeTemplateElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oneShotChargeTemplate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}oneShotChargeTemplate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}oneShotChargeTemplateDto for root element {}oneShotChargeTemplate...\n"); #endif status = xmlTextWriterWriteNs0OneShotChargeTemplateDtoType(writer, _oneShotChargeTemplateDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}oneShotChargeTemplate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}oneShotChargeTemplate. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a OneShotChargeTemplateDto. * * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto whose children are to be free. */ static void freeNs0OneShotChargeTemplateElement(struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto) { freeNs0OneShotChargeTemplateDtoType(_oneShotChargeTemplateDto); } /** * Reads a OneShotChargeTemplateDto from XML. The reader is assumed to be at the start element. * * @return the OneShotChargeTemplateDto, or NULL in case of error. */ static struct novaglobalapi_ns0_oneShotChargeTemplateDto *xmlTextReaderReadNs0OneShotChargeTemplateDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto = calloc(1, sizeof(struct novaglobalapi_ns0_oneShotChargeTemplateDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0OneShotChargeTemplateDtoType(_oneShotChargeTemplateDto); free(_oneShotChargeTemplateDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "chargeCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}chargeCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}chargeCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OneShotChargeTemplateDtoType(_oneShotChargeTemplateDto); free(_oneShotChargeTemplateDto); return NULL; } _oneShotChargeTemplateDto->chargeCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "description", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OneShotChargeTemplateDtoType(_oneShotChargeTemplateDto); free(_oneShotChargeTemplateDto); return NULL; } _oneShotChargeTemplateDto->description = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "unitPriceWithoutTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}unitPriceWithoutTax of type {http://www.w3.org/2001/XMLSchema}double.\n"); #endif _child_accessor = xmlTextReaderReadXsDoubleType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}unitPriceWithoutTax of type {http://www.w3.org/2001/XMLSchema}double.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OneShotChargeTemplateDtoType(_oneShotChargeTemplateDto); free(_oneShotChargeTemplateDto); return NULL; } _oneShotChargeTemplateDto->unitPriceWithoutTax = ((double*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxPercent", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}taxPercent of type {http://www.w3.org/2001/XMLSchema}double.\n"); #endif _child_accessor = xmlTextReaderReadXsDoubleType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}taxPercent of type {http://www.w3.org/2001/XMLSchema}double.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OneShotChargeTemplateDtoType(_oneShotChargeTemplateDto); free(_oneShotChargeTemplateDto); return NULL; } _oneShotChargeTemplateDto->taxPercent = ((double*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}taxCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}taxCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OneShotChargeTemplateDtoType(_oneShotChargeTemplateDto); free(_oneShotChargeTemplateDto); return NULL; } _oneShotChargeTemplateDto->taxCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxDescription", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}taxDescription of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}taxDescription of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OneShotChargeTemplateDtoType(_oneShotChargeTemplateDto); free(_oneShotChargeTemplateDto); return NULL; } _oneShotChargeTemplateDto->taxDescription = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}oneShotChargeTemplateDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}oneShotChargeTemplateDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _oneShotChargeTemplateDto; } /** * Writes a OneShotChargeTemplateDto to XML. * * @param writer The XML writer. * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0OneShotChargeTemplateDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_oneShotChargeTemplateDto->chargeCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "chargeCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}chargeCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}chargeCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_oneShotChargeTemplateDto->chargeCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}chargeCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}chargeCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_oneShotChargeTemplateDto->description != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}description. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}description...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_oneShotChargeTemplateDto->description)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}description. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}description. status: %i\n", status); #endif return status; } totalBytes += status; } if (_oneShotChargeTemplateDto->unitPriceWithoutTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "unitPriceWithoutTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}unitPriceWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}double for element {}unitPriceWithoutTax...\n"); #endif status = xmlTextWriterWriteXsDoubleType(writer, (_oneShotChargeTemplateDto->unitPriceWithoutTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}double for element {}unitPriceWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}unitPriceWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_oneShotChargeTemplateDto->taxPercent != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxPercent", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}taxPercent. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}double for element {}taxPercent...\n"); #endif status = xmlTextWriterWriteXsDoubleType(writer, (_oneShotChargeTemplateDto->taxPercent)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}double for element {}taxPercent. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}taxPercent. status: %i\n", status); #endif return status; } totalBytes += status; } if (_oneShotChargeTemplateDto->taxCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}taxCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}taxCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_oneShotChargeTemplateDto->taxCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}taxCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}taxCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_oneShotChargeTemplateDto->taxDescription != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxDescription", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}taxDescription. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}taxDescription...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_oneShotChargeTemplateDto->taxDescription)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}taxDescription. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}taxDescription. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a OneShotChargeTemplateDto. * * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to free. */ static void freeNs0OneShotChargeTemplateDtoType(struct novaglobalapi_ns0_oneShotChargeTemplateDto *_oneShotChargeTemplateDto) { int i; if (_oneShotChargeTemplateDto->chargeCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor chargeCode of type novaglobalapi_ns0_oneShotChargeTemplateDto...\n"); #endif freeXsStringType(_oneShotChargeTemplateDto->chargeCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor chargeCode of type novaglobalapi_ns0_oneShotChargeTemplateDto...\n"); #endif free(_oneShotChargeTemplateDto->chargeCode); } if (_oneShotChargeTemplateDto->description != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor description of type novaglobalapi_ns0_oneShotChargeTemplateDto...\n"); #endif freeXsStringType(_oneShotChargeTemplateDto->description); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor description of type novaglobalapi_ns0_oneShotChargeTemplateDto...\n"); #endif free(_oneShotChargeTemplateDto->description); } if (_oneShotChargeTemplateDto->unitPriceWithoutTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor unitPriceWithoutTax of type novaglobalapi_ns0_oneShotChargeTemplateDto...\n"); #endif freeXsDoubleType(_oneShotChargeTemplateDto->unitPriceWithoutTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor unitPriceWithoutTax of type novaglobalapi_ns0_oneShotChargeTemplateDto...\n"); #endif free(_oneShotChargeTemplateDto->unitPriceWithoutTax); } if (_oneShotChargeTemplateDto->taxPercent != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor taxPercent of type novaglobalapi_ns0_oneShotChargeTemplateDto...\n"); #endif freeXsDoubleType(_oneShotChargeTemplateDto->taxPercent); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor taxPercent of type novaglobalapi_ns0_oneShotChargeTemplateDto...\n"); #endif free(_oneShotChargeTemplateDto->taxPercent); } if (_oneShotChargeTemplateDto->taxCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor taxCode of type novaglobalapi_ns0_oneShotChargeTemplateDto...\n"); #endif freeXsStringType(_oneShotChargeTemplateDto->taxCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor taxCode of type novaglobalapi_ns0_oneShotChargeTemplateDto...\n"); #endif free(_oneShotChargeTemplateDto->taxCode); } if (_oneShotChargeTemplateDto->taxDescription != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor taxDescription of type novaglobalapi_ns0_oneShotChargeTemplateDto...\n"); #endif freeXsStringType(_oneShotChargeTemplateDto->taxDescription); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor taxDescription of type novaglobalapi_ns0_oneShotChargeTemplateDto...\n"); #endif free(_oneShotChargeTemplateDto->taxDescription); } } #endif /* DEF_novaglobalapi_ns0_oneShotChargeTemplateDto_M */ #ifndef DEF_novaglobalapi_ns0_oneShotChargeTemplateListDto_M #define DEF_novaglobalapi_ns0_oneShotChargeTemplateListDto_M /** * Reads a OneShotChargeTemplateListDto element from XML. The element to be read is "oneShotChargeTemplateList", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The OneShotChargeTemplateListDto, or NULL in case of error. */ struct novaglobalapi_ns0_oneShotChargeTemplateListDto *xml_read_novaglobalapi_ns0_oneShotChargeTemplateListDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0OneShotChargeTemplateListElement(reader); } /** * Writes a OneShotChargeTemplateListDto to XML under element name "oneShotChargeTemplateList". * * @param writer The XML writer. * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_oneShotChargeTemplateListDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto) { return xmlTextWriterWriteNs0OneShotChargeTemplateListElementNS(writer, _oneShotChargeTemplateListDto, 1); } /** * Frees a OneShotChargeTemplateListDto. * * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to free. */ void free_novaglobalapi_ns0_oneShotChargeTemplateListDto(struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto) { freeNs0OneShotChargeTemplateListDtoType(_oneShotChargeTemplateListDto); free(_oneShotChargeTemplateListDto); } /** * Reads a OneShotChargeTemplateListDto element from XML. The element to be read is "oneShotChargeTemplateList", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The OneShotChargeTemplateListDto, or NULL in case of error. */ struct novaglobalapi_ns0_oneShotChargeTemplateListDto *xmlTextReaderReadNs0OneShotChargeTemplateListElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "oneShotChargeTemplateList", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}oneShotChargeTemplateList.\n"); #endif _oneShotChargeTemplateListDto = xmlTextReaderReadNs0OneShotChargeTemplateListDtoType(reader); } #if DEBUG_ENUNCIATE if (_oneShotChargeTemplateListDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}oneShotChargeTemplateList failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}oneShotChargeTemplateList failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _oneShotChargeTemplateListDto; } /** * Writes a OneShotChargeTemplateListDto to XML under element name "oneShotChargeTemplateList". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0OneShotChargeTemplateListElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto) { return xmlTextWriterWriteNs0OneShotChargeTemplateListElementNS(writer, _oneShotChargeTemplateListDto, 0); } /** * Writes a OneShotChargeTemplateListDto to XML under element name "oneShotChargeTemplateList". * * @param writer The XML writer. * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0OneShotChargeTemplateListElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oneShotChargeTemplateList", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}oneShotChargeTemplateList. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}oneShotChargeTemplateListDto for root element {}oneShotChargeTemplateList...\n"); #endif status = xmlTextWriterWriteNs0OneShotChargeTemplateListDtoType(writer, _oneShotChargeTemplateListDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}oneShotChargeTemplateList. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}oneShotChargeTemplateList. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a OneShotChargeTemplateListDto. * * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto whose children are to be free. */ static void freeNs0OneShotChargeTemplateListElement(struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto) { freeNs0OneShotChargeTemplateListDtoType(_oneShotChargeTemplateListDto); } /** * Reads a OneShotChargeTemplateListDto from XML. The reader is assumed to be at the start element. * * @return the OneShotChargeTemplateListDto, or NULL in case of error. */ static struct novaglobalapi_ns0_oneShotChargeTemplateListDto *xmlTextReaderReadNs0OneShotChargeTemplateListDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto = calloc(1, sizeof(struct novaglobalapi_ns0_oneShotChargeTemplateListDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0OneShotChargeTemplateListDtoType(_oneShotChargeTemplateListDto); free(_oneShotChargeTemplateListDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "oneShotChargeTemplateDtos", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}oneShotChargeTemplateDtos of type {}oneShotChargeTemplateDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0OneShotChargeTemplateDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}oneShotChargeTemplateDtos of type {}oneShotChargeTemplateDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OneShotChargeTemplateListDtoType(_oneShotChargeTemplateListDto); free(_oneShotChargeTemplateListDto); return NULL; } _oneShotChargeTemplateListDto->oneShotChargeTemplateDtos = realloc(_oneShotChargeTemplateListDto->oneShotChargeTemplateDtos, (_oneShotChargeTemplateListDto->_sizeof_oneShotChargeTemplateDtos + 1) * sizeof(struct novaglobalapi_ns0_oneShotChargeTemplateDto)); memcpy(&(_oneShotChargeTemplateListDto->oneShotChargeTemplateDtos[_oneShotChargeTemplateListDto->_sizeof_oneShotChargeTemplateDtos++]), _child_accessor, sizeof(struct novaglobalapi_ns0_oneShotChargeTemplateDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}oneShotChargeTemplateListDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}oneShotChargeTemplateListDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _oneShotChargeTemplateListDto; } /** * Writes a OneShotChargeTemplateListDto to XML. * * @param writer The XML writer. * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0OneShotChargeTemplateListDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto) { int status, totalBytes = 0, i; xmlChar *binaryData; for (i = 0; i < _oneShotChargeTemplateListDto->_sizeof_oneShotChargeTemplateDtos; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oneShotChargeTemplateDtos", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}oneShotChargeTemplateDtos. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}oneShotChargeTemplateDto for element {}oneShotChargeTemplateDtos...\n"); #endif status = xmlTextWriterWriteNs0OneShotChargeTemplateDtoType(writer, &(_oneShotChargeTemplateListDto->oneShotChargeTemplateDtos[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}oneShotChargeTemplateDto for element {}oneShotChargeTemplateDtos. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}oneShotChargeTemplateDtos. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a OneShotChargeTemplateListDto. * * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to free. */ static void freeNs0OneShotChargeTemplateListDtoType(struct novaglobalapi_ns0_oneShotChargeTemplateListDto *_oneShotChargeTemplateListDto) { int i; if (_oneShotChargeTemplateListDto->oneShotChargeTemplateDtos != NULL) { for (i = 0; i < _oneShotChargeTemplateListDto->_sizeof_oneShotChargeTemplateDtos; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor oneShotChargeTemplateDtos[%i] of type novaglobalapi_ns0_oneShotChargeTemplateListDto...\n", i); #endif freeNs0OneShotChargeTemplateDtoType(&(_oneShotChargeTemplateListDto->oneShotChargeTemplateDtos[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor oneShotChargeTemplateDtos of type novaglobalapi_ns0_oneShotChargeTemplateListDto...\n"); #endif free(_oneShotChargeTemplateListDto->oneShotChargeTemplateDtos); } } #endif /* DEF_novaglobalapi_ns0_oneShotChargeTemplateListDto_M */ #ifndef DEF_novaglobalapi_ns0_organizationDto_M #define DEF_novaglobalapi_ns0_organizationDto_M /** * Reads a OrganizationDto element from XML. The element to be read is "organization", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The OrganizationDto, or NULL in case of error. */ struct novaglobalapi_ns0_organizationDto *xml_read_novaglobalapi_ns0_organizationDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0OrganizationElement(reader); } /** * Writes a OrganizationDto to XML under element name "organization". * * @param writer The XML writer. * @param _organizationDto The OrganizationDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_organizationDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_organizationDto *_organizationDto) { return xmlTextWriterWriteNs0OrganizationElementNS(writer, _organizationDto, 1); } /** * Frees a OrganizationDto. * * @param _organizationDto The OrganizationDto to free. */ void free_novaglobalapi_ns0_organizationDto(struct novaglobalapi_ns0_organizationDto *_organizationDto) { freeNs0OrganizationDtoType(_organizationDto); free(_organizationDto); } /** * Reads a OrganizationDto element from XML. The element to be read is "organization", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The OrganizationDto, or NULL in case of error. */ struct novaglobalapi_ns0_organizationDto *xmlTextReaderReadNs0OrganizationElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_organizationDto *_organizationDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organization", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}organization.\n"); #endif _organizationDto = xmlTextReaderReadNs0OrganizationDtoType(reader); } #if DEBUG_ENUNCIATE if (_organizationDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}organization failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}organization failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _organizationDto; } /** * Writes a OrganizationDto to XML under element name "organization". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _organizationDto The OrganizationDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0OrganizationElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_organizationDto *_organizationDto) { return xmlTextWriterWriteNs0OrganizationElementNS(writer, _organizationDto, 0); } /** * Writes a OrganizationDto to XML under element name "organization". * * @param writer The XML writer. * @param _organizationDto The OrganizationDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0OrganizationElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_organizationDto *_organizationDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organization", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}organization. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}organizationDto for root element {}organization...\n"); #endif status = xmlTextWriterWriteNs0OrganizationDtoType(writer, _organizationDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}organization. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}organization. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a OrganizationDto. * * @param _organizationDto The OrganizationDto whose children are to be free. */ static void freeNs0OrganizationElement(struct novaglobalapi_ns0_organizationDto *_organizationDto) { freeNs0OrganizationDtoType(_organizationDto); } /** * Reads a OrganizationDto from XML. The reader is assumed to be at the start element. * * @return the OrganizationDto, or NULL in case of error. */ static struct novaglobalapi_ns0_organizationDto *xmlTextReaderReadNs0OrganizationDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_organizationDto *_organizationDto = calloc(1, sizeof(struct novaglobalapi_ns0_organizationDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0OrganizationDtoType(_organizationDto); free(_organizationDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OrganizationDtoType(_organizationDto); free(_organizationDto); return NULL; } _organizationDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OrganizationDtoType(_organizationDto); free(_organizationDto); return NULL; } _organizationDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OrganizationDtoType(_organizationDto); free(_organizationDto); return NULL; } _organizationDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OrganizationDtoType(_organizationDto); free(_organizationDto); return NULL; } _organizationDto->organizationId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OrganizationDtoType(_organizationDto); free(_organizationDto); return NULL; } _organizationDto->name = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "parentId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}parentId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}parentId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OrganizationDtoType(_organizationDto); free(_organizationDto); return NULL; } _organizationDto->parentId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countryCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OrganizationDtoType(_organizationDto); free(_organizationDto); return NULL; } _organizationDto->countryCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "defaultCurrencyCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}defaultCurrencyCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}defaultCurrencyCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OrganizationDtoType(_organizationDto); free(_organizationDto); return NULL; } _organizationDto->defaultCurrencyCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "languageCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0OrganizationDtoType(_organizationDto); free(_organizationDto); return NULL; } _organizationDto->languageCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}organizationDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}organizationDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _organizationDto; } /** * Writes a OrganizationDto to XML. * * @param writer The XML writer. * @param _organizationDto The OrganizationDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0OrganizationDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_organizationDto *_organizationDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_organizationDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_organizationDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_organizationDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_organizationDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_organizationDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_organizationDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_organizationDto->organizationId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_organizationDto->organizationId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_organizationDto->name != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}name. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}name...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_organizationDto->name)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}name. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}name. status: %i\n", status); #endif return status; } totalBytes += status; } if (_organizationDto->parentId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "parentId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}parentId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}parentId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_organizationDto->parentId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}parentId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}parentId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_organizationDto->countryCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}countryCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}countryCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_organizationDto->countryCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}countryCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}countryCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_organizationDto->defaultCurrencyCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "defaultCurrencyCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}defaultCurrencyCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}defaultCurrencyCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_organizationDto->defaultCurrencyCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}defaultCurrencyCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}defaultCurrencyCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_organizationDto->languageCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "languageCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}languageCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}languageCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_organizationDto->languageCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}languageCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}languageCode. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a OrganizationDto. * * @param _organizationDto The OrganizationDto to free. */ static void freeNs0OrganizationDtoType(struct novaglobalapi_ns0_organizationDto *_organizationDto) { int i; if (_organizationDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_organizationDto...\n"); #endif freeXsLongType(_organizationDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_organizationDto...\n"); #endif free(_organizationDto->providerId); } if (_organizationDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_organizationDto...\n"); #endif freeXsLongType(_organizationDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_organizationDto...\n"); #endif free(_organizationDto->currentUserId); } if (_organizationDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_organizationDto...\n"); #endif freeXsStringType(_organizationDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_organizationDto...\n"); #endif free(_organizationDto->requestId); } if (_organizationDto->organizationId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor organizationId of type novaglobalapi_ns0_organizationDto...\n"); #endif freeXsStringType(_organizationDto->organizationId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor organizationId of type novaglobalapi_ns0_organizationDto...\n"); #endif free(_organizationDto->organizationId); } if (_organizationDto->name != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor name of type novaglobalapi_ns0_organizationDto...\n"); #endif freeXsStringType(_organizationDto->name); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor name of type novaglobalapi_ns0_organizationDto...\n"); #endif free(_organizationDto->name); } if (_organizationDto->parentId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor parentId of type novaglobalapi_ns0_organizationDto...\n"); #endif freeXsStringType(_organizationDto->parentId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor parentId of type novaglobalapi_ns0_organizationDto...\n"); #endif free(_organizationDto->parentId); } if (_organizationDto->countryCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor countryCode of type novaglobalapi_ns0_organizationDto...\n"); #endif freeXsStringType(_organizationDto->countryCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor countryCode of type novaglobalapi_ns0_organizationDto...\n"); #endif free(_organizationDto->countryCode); } if (_organizationDto->defaultCurrencyCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor defaultCurrencyCode of type novaglobalapi_ns0_organizationDto...\n"); #endif freeXsStringType(_organizationDto->defaultCurrencyCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor defaultCurrencyCode of type novaglobalapi_ns0_organizationDto...\n"); #endif free(_organizationDto->defaultCurrencyCode); } if (_organizationDto->languageCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor languageCode of type novaglobalapi_ns0_organizationDto...\n"); #endif freeXsStringType(_organizationDto->languageCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor languageCode of type novaglobalapi_ns0_organizationDto...\n"); #endif free(_organizationDto->languageCode); } } #endif /* DEF_novaglobalapi_ns0_organizationDto_M */ #ifndef DEF_novaglobalapi_ns0_ratedTransactionDTO_M #define DEF_novaglobalapi_ns0_ratedTransactionDTO_M /** * Reads a RatedTransactionDTO element from XML. The element to be read is "ratedTransaction", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The RatedTransactionDTO, or NULL in case of error. */ struct novaglobalapi_ns0_ratedTransactionDTO *xml_read_novaglobalapi_ns0_ratedTransactionDTO(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0RatedTransactionElement(reader); } /** * Writes a RatedTransactionDTO to XML under element name "ratedTransaction". * * @param writer The XML writer. * @param _ratedTransactionDTO The RatedTransactionDTO to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_ratedTransactionDTO(xmlTextWriterPtr writer, struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO) { return xmlTextWriterWriteNs0RatedTransactionElementNS(writer, _ratedTransactionDTO, 1); } /** * Frees a RatedTransactionDTO. * * @param _ratedTransactionDTO The RatedTransactionDTO to free. */ void free_novaglobalapi_ns0_ratedTransactionDTO(struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO) { freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); } /** * Reads a RatedTransactionDTO element from XML. The element to be read is "ratedTransaction", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The RatedTransactionDTO, or NULL in case of error. */ struct novaglobalapi_ns0_ratedTransactionDTO *xmlTextReaderReadNs0RatedTransactionElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "ratedTransaction", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}ratedTransaction.\n"); #endif _ratedTransactionDTO = xmlTextReaderReadNs0RatedTransactionDTOType(reader); } #if DEBUG_ENUNCIATE if (_ratedTransactionDTO == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}ratedTransaction failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}ratedTransaction failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _ratedTransactionDTO; } /** * Writes a RatedTransactionDTO to XML under element name "ratedTransaction". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _ratedTransactionDTO The RatedTransactionDTO to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0RatedTransactionElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO) { return xmlTextWriterWriteNs0RatedTransactionElementNS(writer, _ratedTransactionDTO, 0); } /** * Writes a RatedTransactionDTO to XML under element name "ratedTransaction". * * @param writer The XML writer. * @param _ratedTransactionDTO The RatedTransactionDTO to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0RatedTransactionElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ratedTransaction", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}ratedTransaction. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}ratedTransactionDTO for root element {}ratedTransaction...\n"); #endif status = xmlTextWriterWriteNs0RatedTransactionDTOType(writer, _ratedTransactionDTO); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}ratedTransaction. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}ratedTransaction. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a RatedTransactionDTO. * * @param _ratedTransactionDTO The RatedTransactionDTO whose children are to be free. */ static void freeNs0RatedTransactionElement(struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO) { freeNs0RatedTransactionDTOType(_ratedTransactionDTO); } /** * Reads a RatedTransactionDTO from XML. The reader is assumed to be at the start element. * * @return the RatedTransactionDTO, or NULL in case of error. */ static struct novaglobalapi_ns0_ratedTransactionDTO *xmlTextReaderReadNs0RatedTransactionDTOType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO = calloc(1, sizeof(struct novaglobalapi_ns0_ratedTransactionDTO)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "usageDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}usageDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}usageDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->usageDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "unitAmountWithoutTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}unitAmountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}unitAmountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->unitAmountWithoutTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "unitAmountWithTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}unitAmountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}unitAmountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->unitAmountWithTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "unitAmountTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}unitAmountTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}unitAmountTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->unitAmountTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "quantity", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}quantity of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}quantity of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->quantity = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithoutTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->amountWithoutTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->amountWithTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->amountTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "code", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}code of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}code of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->code = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "description", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->description = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "doNotTriggerInvoicing", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}doNotTriggerInvoicing of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif _child_accessor = xmlTextReaderReadXsBooleanType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}doNotTriggerInvoicing of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RatedTransactionDTOType(_ratedTransactionDTO); free(_ratedTransactionDTO); return NULL; } _ratedTransactionDTO->doNotTriggerInvoicing = *((int*)_child_accessor); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}ratedTransactionDTO. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}ratedTransactionDTO. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _ratedTransactionDTO; } /** * Writes a RatedTransactionDTO to XML. * * @param writer The XML writer. * @param _ratedTransactionDTO The RatedTransactionDTO to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0RatedTransactionDTOType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_ratedTransactionDTO->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_ratedTransactionDTO->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_ratedTransactionDTO->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_ratedTransactionDTO->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_ratedTransactionDTO->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_ratedTransactionDTO->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_ratedTransactionDTO->usageDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "usageDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}usageDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}usageDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_ratedTransactionDTO->usageDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}usageDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}usageDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_ratedTransactionDTO->unitAmountWithoutTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "unitAmountWithoutTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}unitAmountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}unitAmountWithoutTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_ratedTransactionDTO->unitAmountWithoutTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}unitAmountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}unitAmountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_ratedTransactionDTO->unitAmountWithTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "unitAmountWithTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}unitAmountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}unitAmountWithTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_ratedTransactionDTO->unitAmountWithTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}unitAmountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}unitAmountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_ratedTransactionDTO->unitAmountTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "unitAmountTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}unitAmountTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}unitAmountTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_ratedTransactionDTO->unitAmountTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}unitAmountTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}unitAmountTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_ratedTransactionDTO->quantity != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "quantity", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}quantity. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}quantity...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_ratedTransactionDTO->quantity)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}quantity. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}quantity. status: %i\n", status); #endif return status; } totalBytes += status; } if (_ratedTransactionDTO->amountWithoutTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithoutTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithoutTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_ratedTransactionDTO->amountWithoutTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_ratedTransactionDTO->amountWithTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_ratedTransactionDTO->amountWithTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_ratedTransactionDTO->amountTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amountTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_ratedTransactionDTO->amountTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amountTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_ratedTransactionDTO->code != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "code", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}code. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}code...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_ratedTransactionDTO->code)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}code. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}code. status: %i\n", status); #endif return status; } totalBytes += status; } if (_ratedTransactionDTO->description != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}description. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}description...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_ratedTransactionDTO->description)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}description. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}description. status: %i\n", status); #endif return status; } totalBytes += status; } if (1) { //always write the primitive element. status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "doNotTriggerInvoicing", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}doNotTriggerInvoicing. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}doNotTriggerInvoicing...\n"); #endif status = xmlTextWriterWriteXsBooleanType(writer, &(_ratedTransactionDTO->doNotTriggerInvoicing)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}doNotTriggerInvoicing. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}doNotTriggerInvoicing. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a RatedTransactionDTO. * * @param _ratedTransactionDTO The RatedTransactionDTO to free. */ static void freeNs0RatedTransactionDTOType(struct novaglobalapi_ns0_ratedTransactionDTO *_ratedTransactionDTO) { int i; if (_ratedTransactionDTO->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsLongType(_ratedTransactionDTO->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->providerId); } if (_ratedTransactionDTO->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsLongType(_ratedTransactionDTO->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->currentUserId); } if (_ratedTransactionDTO->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsStringType(_ratedTransactionDTO->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->requestId); } if (_ratedTransactionDTO->usageDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor usageDate of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsDateTimeType(_ratedTransactionDTO->usageDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor usageDate of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->usageDate); } if (_ratedTransactionDTO->unitAmountWithoutTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor unitAmountWithoutTax of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsDecimalType(_ratedTransactionDTO->unitAmountWithoutTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor unitAmountWithoutTax of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->unitAmountWithoutTax); } if (_ratedTransactionDTO->unitAmountWithTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor unitAmountWithTax of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsDecimalType(_ratedTransactionDTO->unitAmountWithTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor unitAmountWithTax of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->unitAmountWithTax); } if (_ratedTransactionDTO->unitAmountTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor unitAmountTax of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsDecimalType(_ratedTransactionDTO->unitAmountTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor unitAmountTax of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->unitAmountTax); } if (_ratedTransactionDTO->quantity != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor quantity of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsDecimalType(_ratedTransactionDTO->quantity); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor quantity of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->quantity); } if (_ratedTransactionDTO->amountWithoutTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amountWithoutTax of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsDecimalType(_ratedTransactionDTO->amountWithoutTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amountWithoutTax of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->amountWithoutTax); } if (_ratedTransactionDTO->amountWithTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amountWithTax of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsDecimalType(_ratedTransactionDTO->amountWithTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amountWithTax of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->amountWithTax); } if (_ratedTransactionDTO->amountTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amountTax of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsDecimalType(_ratedTransactionDTO->amountTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amountTax of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->amountTax); } if (_ratedTransactionDTO->code != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor code of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsStringType(_ratedTransactionDTO->code); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor code of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->code); } if (_ratedTransactionDTO->description != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor description of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif freeXsStringType(_ratedTransactionDTO->description); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor description of type novaglobalapi_ns0_ratedTransactionDTO...\n"); #endif free(_ratedTransactionDTO->description); } } #endif /* DEF_novaglobalapi_ns0_ratedTransactionDTO_M */ #ifndef DEF_novaglobalapi_ns0_recurringChargeDto_M #define DEF_novaglobalapi_ns0_recurringChargeDto_M /** * Reads a RecurringChargeDto element from XML. The element to be read is "recurringCharge", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The RecurringChargeDto, or NULL in case of error. */ struct novaglobalapi_ns0_recurringChargeDto *xml_read_novaglobalapi_ns0_recurringChargeDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0RecurringChargeElement(reader); } /** * Writes a RecurringChargeDto to XML under element name "recurringCharge". * * @param writer The XML writer. * @param _recurringChargeDto The RecurringChargeDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_recurringChargeDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto) { return xmlTextWriterWriteNs0RecurringChargeElementNS(writer, _recurringChargeDto, 1); } /** * Frees a RecurringChargeDto. * * @param _recurringChargeDto The RecurringChargeDto to free. */ void free_novaglobalapi_ns0_recurringChargeDto(struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto) { freeNs0RecurringChargeDtoType(_recurringChargeDto); free(_recurringChargeDto); } /** * Reads a RecurringChargeDto element from XML. The element to be read is "recurringCharge", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The RecurringChargeDto, or NULL in case of error. */ struct novaglobalapi_ns0_recurringChargeDto *xmlTextReaderReadNs0RecurringChargeElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recurringCharge", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}recurringCharge.\n"); #endif _recurringChargeDto = xmlTextReaderReadNs0RecurringChargeDtoType(reader); } #if DEBUG_ENUNCIATE if (_recurringChargeDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}recurringCharge failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}recurringCharge failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _recurringChargeDto; } /** * Writes a RecurringChargeDto to XML under element name "recurringCharge". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _recurringChargeDto The RecurringChargeDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0RecurringChargeElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto) { return xmlTextWriterWriteNs0RecurringChargeElementNS(writer, _recurringChargeDto, 0); } /** * Writes a RecurringChargeDto to XML under element name "recurringCharge". * * @param writer The XML writer. * @param _recurringChargeDto The RecurringChargeDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0RecurringChargeElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recurringCharge", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}recurringCharge. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}recurringChargeDto for root element {}recurringCharge...\n"); #endif status = xmlTextWriterWriteNs0RecurringChargeDtoType(writer, _recurringChargeDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}recurringCharge. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}recurringCharge. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a RecurringChargeDto. * * @param _recurringChargeDto The RecurringChargeDto whose children are to be free. */ static void freeNs0RecurringChargeElement(struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto) { freeNs0RecurringChargeDtoType(_recurringChargeDto); } /** * Reads a RecurringChargeDto from XML. The reader is assumed to be at the start element. * * @return the RecurringChargeDto, or NULL in case of error. */ static struct novaglobalapi_ns0_recurringChargeDto *xmlTextReaderReadNs0RecurringChargeDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto = calloc(1, sizeof(struct novaglobalapi_ns0_recurringChargeDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0RecurringChargeDtoType(_recurringChargeDto); free(_recurringChargeDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currencyCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RecurringChargeDtoType(_recurringChargeDto); free(_recurringChargeDto); return NULL; } _recurringChargeDto->currencyCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "startDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RecurringChargeDtoType(_recurringChargeDto); free(_recurringChargeDto); return NULL; } _recurringChargeDto->startDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "endDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RecurringChargeDtoType(_recurringChargeDto); free(_recurringChargeDto); return NULL; } _recurringChargeDto->endDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "minAge", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}minAge of type {http://www.w3.org/2001/XMLSchema}int.\n"); #endif _child_accessor = xmlTextReaderReadXsIntType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}minAge of type {http://www.w3.org/2001/XMLSchema}int.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RecurringChargeDtoType(_recurringChargeDto); free(_recurringChargeDto); return NULL; } _recurringChargeDto->minAge = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "maxAge", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}maxAge of type {http://www.w3.org/2001/XMLSchema}int.\n"); #endif _child_accessor = xmlTextReaderReadXsIntType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}maxAge of type {http://www.w3.org/2001/XMLSchema}int.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RecurringChargeDtoType(_recurringChargeDto); free(_recurringChargeDto); return NULL; } _recurringChargeDto->maxAge = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "price", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RecurringChargeDtoType(_recurringChargeDto); free(_recurringChargeDto); return NULL; } _recurringChargeDto->price = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recommendedPrice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0RecurringChargeDtoType(_recurringChargeDto); free(_recurringChargeDto); return NULL; } _recurringChargeDto->recommendedPrice = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}recurringChargeDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}recurringChargeDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _recurringChargeDto; } /** * Writes a RecurringChargeDto to XML. * * @param writer The XML writer. * @param _recurringChargeDto The RecurringChargeDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0RecurringChargeDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_recurringChargeDto->currencyCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currencyCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}currencyCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_recurringChargeDto->currencyCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_recurringChargeDto->startDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "startDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}startDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}startDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_recurringChargeDto->startDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}startDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}startDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_recurringChargeDto->endDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}endDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}endDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_recurringChargeDto->endDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}endDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}endDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_recurringChargeDto->minAge != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "minAge", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}minAge. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}minAge...\n"); #endif status = xmlTextWriterWriteXsIntType(writer, (_recurringChargeDto->minAge)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}minAge. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}minAge. status: %i\n", status); #endif return status; } totalBytes += status; } if (_recurringChargeDto->maxAge != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "maxAge", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}maxAge. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}maxAge...\n"); #endif status = xmlTextWriterWriteXsIntType(writer, (_recurringChargeDto->maxAge)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}maxAge. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}maxAge. status: %i\n", status); #endif return status; } totalBytes += status; } if (_recurringChargeDto->price != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "price", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}price. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}price...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_recurringChargeDto->price)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}price. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}price. status: %i\n", status); #endif return status; } totalBytes += status; } if (_recurringChargeDto->recommendedPrice != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recommendedPrice", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}recommendedPrice. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}recommendedPrice...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_recurringChargeDto->recommendedPrice)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}recommendedPrice. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}recommendedPrice. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a RecurringChargeDto. * * @param _recurringChargeDto The RecurringChargeDto to free. */ static void freeNs0RecurringChargeDtoType(struct novaglobalapi_ns0_recurringChargeDto *_recurringChargeDto) { int i; if (_recurringChargeDto->currencyCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currencyCode of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif freeXsStringType(_recurringChargeDto->currencyCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currencyCode of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif free(_recurringChargeDto->currencyCode); } if (_recurringChargeDto->startDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor startDate of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif freeXsDateTimeType(_recurringChargeDto->startDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor startDate of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif free(_recurringChargeDto->startDate); } if (_recurringChargeDto->endDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor endDate of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif freeXsDateTimeType(_recurringChargeDto->endDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor endDate of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif free(_recurringChargeDto->endDate); } if (_recurringChargeDto->minAge != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor minAge of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif freeXsIntType(_recurringChargeDto->minAge); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor minAge of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif free(_recurringChargeDto->minAge); } if (_recurringChargeDto->maxAge != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor maxAge of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif freeXsIntType(_recurringChargeDto->maxAge); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor maxAge of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif free(_recurringChargeDto->maxAge); } if (_recurringChargeDto->price != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor price of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif freeXsDecimalType(_recurringChargeDto->price); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor price of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif free(_recurringChargeDto->price); } if (_recurringChargeDto->recommendedPrice != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor recommendedPrice of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif freeXsDecimalType(_recurringChargeDto->recommendedPrice); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor recommendedPrice of type novaglobalapi_ns0_recurringChargeDto...\n"); #endif free(_recurringChargeDto->recommendedPrice); } } #endif /* DEF_novaglobalapi_ns0_recurringChargeDto_M */ #ifndef DEF_novaglobalapi_ns0_serviceDto_M #define DEF_novaglobalapi_ns0_serviceDto_M /** * Reads a ServiceDto element from XML. The element to be read is "service", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The ServiceDto, or NULL in case of error. */ struct novaglobalapi_ns0_serviceDto *xml_read_novaglobalapi_ns0_serviceDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0ServiceElement(reader); } /** * Writes a ServiceDto to XML under element name "service". * * @param writer The XML writer. * @param _serviceDto The ServiceDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_serviceDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceDto *_serviceDto) { return xmlTextWriterWriteNs0ServiceElementNS(writer, _serviceDto, 1); } /** * Frees a ServiceDto. * * @param _serviceDto The ServiceDto to free. */ void free_novaglobalapi_ns0_serviceDto(struct novaglobalapi_ns0_serviceDto *_serviceDto) { freeNs0ServiceDtoType(_serviceDto); free(_serviceDto); } /** * Reads a ServiceDto element from XML. The element to be read is "service", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The ServiceDto, or NULL in case of error. */ struct novaglobalapi_ns0_serviceDto *xmlTextReaderReadNs0ServiceElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_serviceDto *_serviceDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "service", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}service.\n"); #endif _serviceDto = xmlTextReaderReadNs0ServiceDtoType(reader); } #if DEBUG_ENUNCIATE if (_serviceDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}service failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}service failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _serviceDto; } /** * Writes a ServiceDto to XML under element name "service". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _serviceDto The ServiceDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0ServiceElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceDto *_serviceDto) { return xmlTextWriterWriteNs0ServiceElementNS(writer, _serviceDto, 0); } /** * Writes a ServiceDto to XML under element name "service". * * @param writer The XML writer. * @param _serviceDto The ServiceDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0ServiceElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceDto *_serviceDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "service", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}service. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}serviceDto for root element {}service...\n"); #endif status = xmlTextWriterWriteNs0ServiceDtoType(writer, _serviceDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}service. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}service. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a ServiceDto. * * @param _serviceDto The ServiceDto whose children are to be free. */ static void freeNs0ServiceElement(struct novaglobalapi_ns0_serviceDto *_serviceDto) { freeNs0ServiceDtoType(_serviceDto); } /** * Reads a ServiceDto from XML. The reader is assumed to be at the start element. * * @return the ServiceDto, or NULL in case of error. */ static struct novaglobalapi_ns0_serviceDto *xmlTextReaderReadNs0ServiceDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_serviceDto *_serviceDto = calloc(1, sizeof(struct novaglobalapi_ns0_serviceDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0ServiceDtoType(_serviceDto); free(_serviceDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceDtoType(_serviceDto); free(_serviceDto); return NULL; } _serviceDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceDtoType(_serviceDto); free(_serviceDto); return NULL; } _serviceDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceDtoType(_serviceDto); free(_serviceDto); return NULL; } _serviceDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "serviceId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceDtoType(_serviceDto); free(_serviceDto); return NULL; } _serviceDto->serviceId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "descriptions", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}descriptions of type {}descriptionDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0DescriptionDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}descriptions of type {}descriptionDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceDtoType(_serviceDto); free(_serviceDto); return NULL; } _serviceDto->descriptions = realloc(_serviceDto->descriptions, (_serviceDto->_sizeof_descriptions + 1) * sizeof(struct novaglobalapi_ns0_descriptionDto)); memcpy(&(_serviceDto->descriptions[_serviceDto->_sizeof_descriptions++]), _child_accessor, sizeof(struct novaglobalapi_ns0_descriptionDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}serviceDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}serviceDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _serviceDto; } /** * Writes a ServiceDto to XML. * * @param writer The XML writer. * @param _serviceDto The ServiceDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0ServiceDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceDto *_serviceDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_serviceDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_serviceDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_serviceDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_serviceDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceDto->serviceId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "serviceId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}serviceId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}serviceId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_serviceDto->serviceId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}serviceId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}serviceId. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _serviceDto->_sizeof_descriptions; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "descriptions", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}descriptions. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}descriptionDto for element {}descriptions...\n"); #endif status = xmlTextWriterWriteNs0DescriptionDtoType(writer, &(_serviceDto->descriptions[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}descriptionDto for element {}descriptions. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}descriptions. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a ServiceDto. * * @param _serviceDto The ServiceDto to free. */ static void freeNs0ServiceDtoType(struct novaglobalapi_ns0_serviceDto *_serviceDto) { int i; if (_serviceDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_serviceDto...\n"); #endif freeXsLongType(_serviceDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_serviceDto...\n"); #endif free(_serviceDto->providerId); } if (_serviceDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_serviceDto...\n"); #endif freeXsLongType(_serviceDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_serviceDto...\n"); #endif free(_serviceDto->currentUserId); } if (_serviceDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_serviceDto...\n"); #endif freeXsStringType(_serviceDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_serviceDto...\n"); #endif free(_serviceDto->requestId); } if (_serviceDto->serviceId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor serviceId of type novaglobalapi_ns0_serviceDto...\n"); #endif freeXsStringType(_serviceDto->serviceId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor serviceId of type novaglobalapi_ns0_serviceDto...\n"); #endif free(_serviceDto->serviceId); } if (_serviceDto->descriptions != NULL) { for (i = 0; i < _serviceDto->_sizeof_descriptions; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor descriptions[%i] of type novaglobalapi_ns0_serviceDto...\n", i); #endif freeNs0DescriptionDtoType(&(_serviceDto->descriptions[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor descriptions of type novaglobalapi_ns0_serviceDto...\n"); #endif free(_serviceDto->descriptions); } } #endif /* DEF_novaglobalapi_ns0_serviceDto_M */ #ifndef DEF_novaglobalapi_ns0_servicePricePlanDto_M #define DEF_novaglobalapi_ns0_servicePricePlanDto_M /** * Reads a ServicePricePlanDto element from XML. The element to be read is "servicePlan", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The ServicePricePlanDto, or NULL in case of error. */ struct novaglobalapi_ns0_servicePricePlanDto *xml_read_novaglobalapi_ns0_servicePricePlanDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0ServicePlanElement(reader); } /** * Writes a ServicePricePlanDto to XML under element name "servicePlan". * * @param writer The XML writer. * @param _servicePricePlanDto The ServicePricePlanDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_servicePricePlanDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto) { return xmlTextWriterWriteNs0ServicePlanElementNS(writer, _servicePricePlanDto, 1); } /** * Frees a ServicePricePlanDto. * * @param _servicePricePlanDto The ServicePricePlanDto to free. */ void free_novaglobalapi_ns0_servicePricePlanDto(struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto) { freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); } /** * Reads a ServicePricePlanDto element from XML. The element to be read is "servicePlan", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The ServicePricePlanDto, or NULL in case of error. */ struct novaglobalapi_ns0_servicePricePlanDto *xmlTextReaderReadNs0ServicePlanElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "servicePlan", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}servicePlan.\n"); #endif _servicePricePlanDto = xmlTextReaderReadNs0ServicePricePlanDtoType(reader); } #if DEBUG_ENUNCIATE if (_servicePricePlanDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}servicePlan failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}servicePlan failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _servicePricePlanDto; } /** * Writes a ServicePricePlanDto to XML under element name "servicePlan". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _servicePricePlanDto The ServicePricePlanDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0ServicePlanElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto) { return xmlTextWriterWriteNs0ServicePlanElementNS(writer, _servicePricePlanDto, 0); } /** * Writes a ServicePricePlanDto to XML under element name "servicePlan". * * @param writer The XML writer. * @param _servicePricePlanDto The ServicePricePlanDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0ServicePlanElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "servicePlan", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}servicePlan. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}servicePricePlanDto for root element {}servicePlan...\n"); #endif status = xmlTextWriterWriteNs0ServicePricePlanDtoType(writer, _servicePricePlanDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}servicePlan. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}servicePlan. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a ServicePricePlanDto. * * @param _servicePricePlanDto The ServicePricePlanDto whose children are to be free. */ static void freeNs0ServicePlanElement(struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto) { freeNs0ServicePricePlanDtoType(_servicePricePlanDto); } /** * Reads a ServicePricePlanDto from XML. The reader is assumed to be at the start element. * * @return the ServicePricePlanDto, or NULL in case of error. */ static struct novaglobalapi_ns0_servicePricePlanDto *xmlTextReaderReadNs0ServicePricePlanDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto = calloc(1, sizeof(struct novaglobalapi_ns0_servicePricePlanDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "serviceId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->serviceId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->organizationId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}taxId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}taxId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->taxId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionProrata", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}subscriptionProrata of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif _child_accessor = xmlTextReaderReadXsBooleanType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}subscriptionProrata of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->subscriptionProrata = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationProrata", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}terminationProrata of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif _child_accessor = xmlTextReaderReadXsBooleanType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}terminationProrata of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->terminationProrata = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "applyInAdvance", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}applyInAdvance of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif _child_accessor = xmlTextReaderReadXsBooleanType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}applyInAdvance of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->applyInAdvance = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param1", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}param1 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}param1 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->param1 = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param2", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}param2 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}param2 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->param2 = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param3", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}param3 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}param3 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->param3 = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "billingPeriod", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}billingPeriod of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}billingPeriod of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->billingPeriod = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recurringCharges", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}recurringCharges of type {}recurringChargeDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0RecurringChargeDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}recurringCharges of type {}recurringChargeDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->recurringCharges = realloc(_servicePricePlanDto->recurringCharges, (_servicePricePlanDto->_sizeof_recurringCharges + 1) * sizeof(struct novaglobalapi_ns0_recurringChargeDto)); memcpy(&(_servicePricePlanDto->recurringCharges[_servicePricePlanDto->_sizeof_recurringCharges++]), _child_accessor, sizeof(struct novaglobalapi_ns0_recurringChargeDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "usageUnit", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}usageUnit of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}usageUnit of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->usageUnit = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "usageCharges", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}usageCharges of type {}usageChargeDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0UsageChargeDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}usageCharges of type {}usageChargeDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->usageCharges = realloc(_servicePricePlanDto->usageCharges, (_servicePricePlanDto->_sizeof_usageCharges + 1) * sizeof(struct novaglobalapi_ns0_usageChargeDto)); memcpy(&(_servicePricePlanDto->usageCharges[_servicePricePlanDto->_sizeof_usageCharges++]), _child_accessor, sizeof(struct novaglobalapi_ns0_usageChargeDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionFees", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}subscriptionFees of type {}subscriptionFeeDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0SubscriptionFeeDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}subscriptionFees of type {}subscriptionFeeDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->subscriptionFees = realloc(_servicePricePlanDto->subscriptionFees, (_servicePricePlanDto->_sizeof_subscriptionFees + 1) * sizeof(struct novaglobalapi_ns0_subscriptionFeeDto)); memcpy(&(_servicePricePlanDto->subscriptionFees[_servicePricePlanDto->_sizeof_subscriptionFees++]), _child_accessor, sizeof(struct novaglobalapi_ns0_subscriptionFeeDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationFees", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}terminationFees of type {}terminationFeeDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0TerminationFeeDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}terminationFees of type {}terminationFeeDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServicePricePlanDtoType(_servicePricePlanDto); free(_servicePricePlanDto); return NULL; } _servicePricePlanDto->terminationFees = realloc(_servicePricePlanDto->terminationFees, (_servicePricePlanDto->_sizeof_terminationFees + 1) * sizeof(struct novaglobalapi_ns0_terminationFeeDto)); memcpy(&(_servicePricePlanDto->terminationFees[_servicePricePlanDto->_sizeof_terminationFees++]), _child_accessor, sizeof(struct novaglobalapi_ns0_terminationFeeDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}servicePricePlanDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}servicePricePlanDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _servicePricePlanDto; } /** * Writes a ServicePricePlanDto to XML. * * @param writer The XML writer. * @param _servicePricePlanDto The ServicePricePlanDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0ServicePricePlanDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_servicePricePlanDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_servicePricePlanDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_servicePricePlanDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_servicePricePlanDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->serviceId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "serviceId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}serviceId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}serviceId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_servicePricePlanDto->serviceId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}serviceId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}serviceId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->organizationId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_servicePricePlanDto->organizationId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->taxId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}taxId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}taxId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_servicePricePlanDto->taxId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}taxId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}taxId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->subscriptionProrata != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionProrata", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}subscriptionProrata. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}subscriptionProrata...\n"); #endif status = xmlTextWriterWriteXsBooleanType(writer, (_servicePricePlanDto->subscriptionProrata)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}subscriptionProrata. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}subscriptionProrata. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->terminationProrata != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationProrata", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}terminationProrata. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}terminationProrata...\n"); #endif status = xmlTextWriterWriteXsBooleanType(writer, (_servicePricePlanDto->terminationProrata)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}terminationProrata. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}terminationProrata. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->applyInAdvance != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "applyInAdvance", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}applyInAdvance. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}applyInAdvance...\n"); #endif status = xmlTextWriterWriteXsBooleanType(writer, (_servicePricePlanDto->applyInAdvance)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}applyInAdvance. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}applyInAdvance. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->param1 != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param1", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}param1. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}param1...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_servicePricePlanDto->param1)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}param1. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}param1. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->param2 != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param2", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}param2. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}param2...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_servicePricePlanDto->param2)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}param2. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}param2. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->param3 != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param3", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}param3. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}param3...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_servicePricePlanDto->param3)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}param3. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}param3. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->billingPeriod != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "billingPeriod", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}billingPeriod. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}billingPeriod...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_servicePricePlanDto->billingPeriod)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}billingPeriod. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}billingPeriod. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _servicePricePlanDto->_sizeof_recurringCharges; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recurringCharges", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}recurringCharges. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}recurringChargeDto for element {}recurringCharges...\n"); #endif status = xmlTextWriterWriteNs0RecurringChargeDtoType(writer, &(_servicePricePlanDto->recurringCharges[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}recurringChargeDto for element {}recurringCharges. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}recurringCharges. status: %i\n", status); #endif return status; } totalBytes += status; } if (_servicePricePlanDto->usageUnit != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "usageUnit", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}usageUnit. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}usageUnit...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_servicePricePlanDto->usageUnit)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}usageUnit. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}usageUnit. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _servicePricePlanDto->_sizeof_usageCharges; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "usageCharges", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}usageCharges. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}usageChargeDto for element {}usageCharges...\n"); #endif status = xmlTextWriterWriteNs0UsageChargeDtoType(writer, &(_servicePricePlanDto->usageCharges[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}usageChargeDto for element {}usageCharges. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}usageCharges. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _servicePricePlanDto->_sizeof_subscriptionFees; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionFees", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}subscriptionFees. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}subscriptionFeeDto for element {}subscriptionFees...\n"); #endif status = xmlTextWriterWriteNs0SubscriptionFeeDtoType(writer, &(_servicePricePlanDto->subscriptionFees[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}subscriptionFeeDto for element {}subscriptionFees. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}subscriptionFees. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _servicePricePlanDto->_sizeof_terminationFees; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationFees", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}terminationFees. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}terminationFeeDto for element {}terminationFees...\n"); #endif status = xmlTextWriterWriteNs0TerminationFeeDtoType(writer, &(_servicePricePlanDto->terminationFees[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}terminationFeeDto for element {}terminationFees. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}terminationFees. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a ServicePricePlanDto. * * @param _servicePricePlanDto The ServicePricePlanDto to free. */ static void freeNs0ServicePricePlanDtoType(struct novaglobalapi_ns0_servicePricePlanDto *_servicePricePlanDto) { int i; if (_servicePricePlanDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsLongType(_servicePricePlanDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->providerId); } if (_servicePricePlanDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsLongType(_servicePricePlanDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->currentUserId); } if (_servicePricePlanDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsStringType(_servicePricePlanDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->requestId); } if (_servicePricePlanDto->serviceId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor serviceId of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsStringType(_servicePricePlanDto->serviceId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor serviceId of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->serviceId); } if (_servicePricePlanDto->organizationId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor organizationId of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsStringType(_servicePricePlanDto->organizationId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor organizationId of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->organizationId); } if (_servicePricePlanDto->taxId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor taxId of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsStringType(_servicePricePlanDto->taxId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor taxId of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->taxId); } if (_servicePricePlanDto->subscriptionProrata != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor subscriptionProrata of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsBooleanType(_servicePricePlanDto->subscriptionProrata); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subscriptionProrata of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->subscriptionProrata); } if (_servicePricePlanDto->terminationProrata != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor terminationProrata of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsBooleanType(_servicePricePlanDto->terminationProrata); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor terminationProrata of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->terminationProrata); } if (_servicePricePlanDto->applyInAdvance != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor applyInAdvance of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsBooleanType(_servicePricePlanDto->applyInAdvance); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor applyInAdvance of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->applyInAdvance); } if (_servicePricePlanDto->param1 != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor param1 of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsStringType(_servicePricePlanDto->param1); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor param1 of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->param1); } if (_servicePricePlanDto->param2 != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor param2 of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsStringType(_servicePricePlanDto->param2); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor param2 of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->param2); } if (_servicePricePlanDto->param3 != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor param3 of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsStringType(_servicePricePlanDto->param3); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor param3 of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->param3); } if (_servicePricePlanDto->billingPeriod != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor billingPeriod of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsStringType(_servicePricePlanDto->billingPeriod); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor billingPeriod of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->billingPeriod); } if (_servicePricePlanDto->recurringCharges != NULL) { for (i = 0; i < _servicePricePlanDto->_sizeof_recurringCharges; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor recurringCharges[%i] of type novaglobalapi_ns0_servicePricePlanDto...\n", i); #endif freeNs0RecurringChargeDtoType(&(_servicePricePlanDto->recurringCharges[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor recurringCharges of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->recurringCharges); } if (_servicePricePlanDto->usageUnit != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor usageUnit of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif freeXsStringType(_servicePricePlanDto->usageUnit); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor usageUnit of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->usageUnit); } if (_servicePricePlanDto->usageCharges != NULL) { for (i = 0; i < _servicePricePlanDto->_sizeof_usageCharges; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor usageCharges[%i] of type novaglobalapi_ns0_servicePricePlanDto...\n", i); #endif freeNs0UsageChargeDtoType(&(_servicePricePlanDto->usageCharges[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor usageCharges of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->usageCharges); } if (_servicePricePlanDto->subscriptionFees != NULL) { for (i = 0; i < _servicePricePlanDto->_sizeof_subscriptionFees; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subscriptionFees[%i] of type novaglobalapi_ns0_servicePricePlanDto...\n", i); #endif freeNs0SubscriptionFeeDtoType(&(_servicePricePlanDto->subscriptionFees[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subscriptionFees of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->subscriptionFees); } if (_servicePricePlanDto->terminationFees != NULL) { for (i = 0; i < _servicePricePlanDto->_sizeof_terminationFees; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor terminationFees[%i] of type novaglobalapi_ns0_servicePricePlanDto...\n", i); #endif freeNs0TerminationFeeDtoType(&(_servicePricePlanDto->terminationFees[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor terminationFees of type novaglobalapi_ns0_servicePricePlanDto...\n"); #endif free(_servicePricePlanDto->terminationFees); } } #endif /* DEF_novaglobalapi_ns0_servicePricePlanDto_M */ #ifndef DEF_novaglobalapi_ns0_serviceToAddDto_M #define DEF_novaglobalapi_ns0_serviceToAddDto_M /** * Reads a ServiceToAddDto element from XML. The element to be read is "serviceToAdd", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The ServiceToAddDto, or NULL in case of error. */ struct novaglobalapi_ns0_serviceToAddDto *xml_read_novaglobalapi_ns0_serviceToAddDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0ServiceToAddElement(reader); } /** * Writes a ServiceToAddDto to XML under element name "serviceToAdd". * * @param writer The XML writer. * @param _serviceToAddDto The ServiceToAddDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_serviceToAddDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto) { return xmlTextWriterWriteNs0ServiceToAddElementNS(writer, _serviceToAddDto, 1); } /** * Frees a ServiceToAddDto. * * @param _serviceToAddDto The ServiceToAddDto to free. */ void free_novaglobalapi_ns0_serviceToAddDto(struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto) { freeNs0ServiceToAddDtoType(_serviceToAddDto); free(_serviceToAddDto); } /** * Reads a ServiceToAddDto element from XML. The element to be read is "serviceToAdd", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The ServiceToAddDto, or NULL in case of error. */ struct novaglobalapi_ns0_serviceToAddDto *xmlTextReaderReadNs0ServiceToAddElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "serviceToAdd", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}serviceToAdd.\n"); #endif _serviceToAddDto = xmlTextReaderReadNs0ServiceToAddDtoType(reader); } #if DEBUG_ENUNCIATE if (_serviceToAddDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}serviceToAdd failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}serviceToAdd failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _serviceToAddDto; } /** * Writes a ServiceToAddDto to XML under element name "serviceToAdd". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _serviceToAddDto The ServiceToAddDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0ServiceToAddElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto) { return xmlTextWriterWriteNs0ServiceToAddElementNS(writer, _serviceToAddDto, 0); } /** * Writes a ServiceToAddDto to XML under element name "serviceToAdd". * * @param writer The XML writer. * @param _serviceToAddDto The ServiceToAddDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0ServiceToAddElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "serviceToAdd", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}serviceToAdd. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}serviceToAddDto for root element {}serviceToAdd...\n"); #endif status = xmlTextWriterWriteNs0ServiceToAddDtoType(writer, _serviceToAddDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}serviceToAdd. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}serviceToAdd. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a ServiceToAddDto. * * @param _serviceToAddDto The ServiceToAddDto whose children are to be free. */ static void freeNs0ServiceToAddElement(struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto) { freeNs0ServiceToAddDtoType(_serviceToAddDto); } /** * Reads a ServiceToAddDto from XML. The reader is assumed to be at the start element. * * @return the ServiceToAddDto, or NULL in case of error. */ static struct novaglobalapi_ns0_serviceToAddDto *xmlTextReaderReadNs0ServiceToAddDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto = calloc(1, sizeof(struct novaglobalapi_ns0_serviceToAddDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0ServiceToAddDtoType(_serviceToAddDto); free(_serviceToAddDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToAddDtoType(_serviceToAddDto); free(_serviceToAddDto); return NULL; } _serviceToAddDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToAddDtoType(_serviceToAddDto); free(_serviceToAddDto); return NULL; } _serviceToAddDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToAddDtoType(_serviceToAddDto); free(_serviceToAddDto); return NULL; } _serviceToAddDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "serviceId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToAddDtoType(_serviceToAddDto); free(_serviceToAddDto); return NULL; } _serviceToAddDto->serviceId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}subscriptionDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}subscriptionDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToAddDtoType(_serviceToAddDto); free(_serviceToAddDto); return NULL; } _serviceToAddDto->subscriptionDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param1", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}param1 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}param1 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToAddDtoType(_serviceToAddDto); free(_serviceToAddDto); return NULL; } _serviceToAddDto->param1 = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param2", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}param2 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}param2 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToAddDtoType(_serviceToAddDto); free(_serviceToAddDto); return NULL; } _serviceToAddDto->param2 = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param3", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}param3 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}param3 of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToAddDtoType(_serviceToAddDto); free(_serviceToAddDto); return NULL; } _serviceToAddDto->param3 = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}serviceToAddDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}serviceToAddDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _serviceToAddDto; } /** * Writes a ServiceToAddDto to XML. * * @param writer The XML writer. * @param _serviceToAddDto The ServiceToAddDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0ServiceToAddDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_serviceToAddDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_serviceToAddDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceToAddDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_serviceToAddDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceToAddDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_serviceToAddDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceToAddDto->serviceId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "serviceId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}serviceId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}serviceId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_serviceToAddDto->serviceId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}serviceId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}serviceId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceToAddDto->subscriptionDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}subscriptionDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}subscriptionDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_serviceToAddDto->subscriptionDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}subscriptionDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}subscriptionDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceToAddDto->param1 != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param1", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}param1. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}param1...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_serviceToAddDto->param1)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}param1. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}param1. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceToAddDto->param2 != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param2", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}param2. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}param2...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_serviceToAddDto->param2)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}param2. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}param2. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceToAddDto->param3 != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param3", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}param3. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}param3...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_serviceToAddDto->param3)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}param3. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}param3. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a ServiceToAddDto. * * @param _serviceToAddDto The ServiceToAddDto to free. */ static void freeNs0ServiceToAddDtoType(struct novaglobalapi_ns0_serviceToAddDto *_serviceToAddDto) { int i; if (_serviceToAddDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif freeXsLongType(_serviceToAddDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif free(_serviceToAddDto->providerId); } if (_serviceToAddDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif freeXsLongType(_serviceToAddDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif free(_serviceToAddDto->currentUserId); } if (_serviceToAddDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif freeXsStringType(_serviceToAddDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif free(_serviceToAddDto->requestId); } if (_serviceToAddDto->serviceId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor serviceId of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif freeXsStringType(_serviceToAddDto->serviceId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor serviceId of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif free(_serviceToAddDto->serviceId); } if (_serviceToAddDto->subscriptionDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor subscriptionDate of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif freeXsDateTimeType(_serviceToAddDto->subscriptionDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subscriptionDate of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif free(_serviceToAddDto->subscriptionDate); } if (_serviceToAddDto->param1 != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor param1 of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif freeXsStringType(_serviceToAddDto->param1); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor param1 of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif free(_serviceToAddDto->param1); } if (_serviceToAddDto->param2 != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor param2 of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif freeXsStringType(_serviceToAddDto->param2); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor param2 of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif free(_serviceToAddDto->param2); } if (_serviceToAddDto->param3 != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor param3 of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif freeXsStringType(_serviceToAddDto->param3); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor param3 of type novaglobalapi_ns0_serviceToAddDto...\n"); #endif free(_serviceToAddDto->param3); } } #endif /* DEF_novaglobalapi_ns0_serviceToAddDto_M */ #ifndef DEF_novaglobalapi_ns0_serviceToTerminateDto_M #define DEF_novaglobalapi_ns0_serviceToTerminateDto_M /** * Reads a ServiceToTerminateDto element from XML. The element to be read is "serviceToTerminate", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The ServiceToTerminateDto, or NULL in case of error. */ struct novaglobalapi_ns0_serviceToTerminateDto *xml_read_novaglobalapi_ns0_serviceToTerminateDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0ServiceToTerminateElement(reader); } /** * Writes a ServiceToTerminateDto to XML under element name "serviceToTerminate". * * @param writer The XML writer. * @param _serviceToTerminateDto The ServiceToTerminateDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_serviceToTerminateDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto) { return xmlTextWriterWriteNs0ServiceToTerminateElementNS(writer, _serviceToTerminateDto, 1); } /** * Frees a ServiceToTerminateDto. * * @param _serviceToTerminateDto The ServiceToTerminateDto to free. */ void free_novaglobalapi_ns0_serviceToTerminateDto(struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto) { freeNs0ServiceToTerminateDtoType(_serviceToTerminateDto); free(_serviceToTerminateDto); } /** * Reads a ServiceToTerminateDto element from XML. The element to be read is "serviceToTerminate", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The ServiceToTerminateDto, or NULL in case of error. */ struct novaglobalapi_ns0_serviceToTerminateDto *xmlTextReaderReadNs0ServiceToTerminateElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "serviceToTerminate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}serviceToTerminate.\n"); #endif _serviceToTerminateDto = xmlTextReaderReadNs0ServiceToTerminateDtoType(reader); } #if DEBUG_ENUNCIATE if (_serviceToTerminateDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}serviceToTerminate failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}serviceToTerminate failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _serviceToTerminateDto; } /** * Writes a ServiceToTerminateDto to XML under element name "serviceToTerminate". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _serviceToTerminateDto The ServiceToTerminateDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0ServiceToTerminateElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto) { return xmlTextWriterWriteNs0ServiceToTerminateElementNS(writer, _serviceToTerminateDto, 0); } /** * Writes a ServiceToTerminateDto to XML under element name "serviceToTerminate". * * @param writer The XML writer. * @param _serviceToTerminateDto The ServiceToTerminateDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0ServiceToTerminateElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "serviceToTerminate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}serviceToTerminate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}serviceToTerminateDto for root element {}serviceToTerminate...\n"); #endif status = xmlTextWriterWriteNs0ServiceToTerminateDtoType(writer, _serviceToTerminateDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}serviceToTerminate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}serviceToTerminate. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a ServiceToTerminateDto. * * @param _serviceToTerminateDto The ServiceToTerminateDto whose children are to be free. */ static void freeNs0ServiceToTerminateElement(struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto) { freeNs0ServiceToTerminateDtoType(_serviceToTerminateDto); } /** * Reads a ServiceToTerminateDto from XML. The reader is assumed to be at the start element. * * @return the ServiceToTerminateDto, or NULL in case of error. */ static struct novaglobalapi_ns0_serviceToTerminateDto *xmlTextReaderReadNs0ServiceToTerminateDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto = calloc(1, sizeof(struct novaglobalapi_ns0_serviceToTerminateDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0ServiceToTerminateDtoType(_serviceToTerminateDto); free(_serviceToTerminateDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToTerminateDtoType(_serviceToTerminateDto); free(_serviceToTerminateDto); return NULL; } _serviceToTerminateDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToTerminateDtoType(_serviceToTerminateDto); free(_serviceToTerminateDto); return NULL; } _serviceToTerminateDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToTerminateDtoType(_serviceToTerminateDto); free(_serviceToTerminateDto); return NULL; } _serviceToTerminateDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "serviceId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToTerminateDtoType(_serviceToTerminateDto); free(_serviceToTerminateDto); return NULL; } _serviceToTerminateDto->serviceId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}terminationDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}terminationDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0ServiceToTerminateDtoType(_serviceToTerminateDto); free(_serviceToTerminateDto); return NULL; } _serviceToTerminateDto->terminationDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}serviceToTerminateDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}serviceToTerminateDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _serviceToTerminateDto; } /** * Writes a ServiceToTerminateDto to XML. * * @param writer The XML writer. * @param _serviceToTerminateDto The ServiceToTerminateDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0ServiceToTerminateDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_serviceToTerminateDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_serviceToTerminateDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceToTerminateDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_serviceToTerminateDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceToTerminateDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_serviceToTerminateDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceToTerminateDto->serviceId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "serviceId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}serviceId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}serviceId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_serviceToTerminateDto->serviceId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}serviceId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}serviceId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_serviceToTerminateDto->terminationDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}terminationDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}terminationDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_serviceToTerminateDto->terminationDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}terminationDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}terminationDate. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a ServiceToTerminateDto. * * @param _serviceToTerminateDto The ServiceToTerminateDto to free. */ static void freeNs0ServiceToTerminateDtoType(struct novaglobalapi_ns0_serviceToTerminateDto *_serviceToTerminateDto) { int i; if (_serviceToTerminateDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_serviceToTerminateDto...\n"); #endif freeXsLongType(_serviceToTerminateDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_serviceToTerminateDto...\n"); #endif free(_serviceToTerminateDto->providerId); } if (_serviceToTerminateDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_serviceToTerminateDto...\n"); #endif freeXsLongType(_serviceToTerminateDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_serviceToTerminateDto...\n"); #endif free(_serviceToTerminateDto->currentUserId); } if (_serviceToTerminateDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_serviceToTerminateDto...\n"); #endif freeXsStringType(_serviceToTerminateDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_serviceToTerminateDto...\n"); #endif free(_serviceToTerminateDto->requestId); } if (_serviceToTerminateDto->serviceId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor serviceId of type novaglobalapi_ns0_serviceToTerminateDto...\n"); #endif freeXsStringType(_serviceToTerminateDto->serviceId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor serviceId of type novaglobalapi_ns0_serviceToTerminateDto...\n"); #endif free(_serviceToTerminateDto->serviceId); } if (_serviceToTerminateDto->terminationDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor terminationDate of type novaglobalapi_ns0_serviceToTerminateDto...\n"); #endif freeXsDateTimeType(_serviceToTerminateDto->terminationDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor terminationDate of type novaglobalapi_ns0_serviceToTerminateDto...\n"); #endif free(_serviceToTerminateDto->terminationDate); } } #endif /* DEF_novaglobalapi_ns0_serviceToTerminateDto_M */ #ifndef DEF_novaglobalapi_ns0_subCategoryInvoiceAgregateDto_M #define DEF_novaglobalapi_ns0_subCategoryInvoiceAgregateDto_M /** * Reads a SubCategoryInvoiceAgregateDto element from XML. The element to be read is "subCategoryInvoiceAgregate", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The SubCategoryInvoiceAgregateDto, or NULL in case of error. */ struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *xml_read_novaglobalapi_ns0_subCategoryInvoiceAgregateDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0SubCategoryInvoiceAgregateElement(reader); } /** * Writes a SubCategoryInvoiceAgregateDto to XML under element name "subCategoryInvoiceAgregate". * * @param writer The XML writer. * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_subCategoryInvoiceAgregateDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto) { return xmlTextWriterWriteNs0SubCategoryInvoiceAgregateElementNS(writer, _subCategoryInvoiceAgregateDto, 1); } /** * Frees a SubCategoryInvoiceAgregateDto. * * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to free. */ void free_novaglobalapi_ns0_subCategoryInvoiceAgregateDto(struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto) { freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); free(_subCategoryInvoiceAgregateDto); } /** * Reads a SubCategoryInvoiceAgregateDto element from XML. The element to be read is "subCategoryInvoiceAgregate", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The SubCategoryInvoiceAgregateDto, or NULL in case of error. */ struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *xmlTextReaderReadNs0SubCategoryInvoiceAgregateElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subCategoryInvoiceAgregate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}subCategoryInvoiceAgregate.\n"); #endif _subCategoryInvoiceAgregateDto = xmlTextReaderReadNs0SubCategoryInvoiceAgregateDtoType(reader); } #if DEBUG_ENUNCIATE if (_subCategoryInvoiceAgregateDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}subCategoryInvoiceAgregate failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}subCategoryInvoiceAgregate failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _subCategoryInvoiceAgregateDto; } /** * Writes a SubCategoryInvoiceAgregateDto to XML under element name "subCategoryInvoiceAgregate". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0SubCategoryInvoiceAgregateElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto) { return xmlTextWriterWriteNs0SubCategoryInvoiceAgregateElementNS(writer, _subCategoryInvoiceAgregateDto, 0); } /** * Writes a SubCategoryInvoiceAgregateDto to XML under element name "subCategoryInvoiceAgregate". * * @param writer The XML writer. * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0SubCategoryInvoiceAgregateElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subCategoryInvoiceAgregate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}subCategoryInvoiceAgregate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}subCategoryInvoiceAgregateDto for root element {}subCategoryInvoiceAgregate...\n"); #endif status = xmlTextWriterWriteNs0SubCategoryInvoiceAgregateDtoType(writer, _subCategoryInvoiceAgregateDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}subCategoryInvoiceAgregate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}subCategoryInvoiceAgregate. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a SubCategoryInvoiceAgregateDto. * * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto whose children are to be free. */ static void freeNs0SubCategoryInvoiceAgregateElement(struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto) { freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); } /** * Reads a SubCategoryInvoiceAgregateDto from XML. The reader is assumed to be at the start element. * * @return the SubCategoryInvoiceAgregateDto, or NULL in case of error. */ static struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *xmlTextReaderReadNs0SubCategoryInvoiceAgregateDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto = calloc(1, sizeof(struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); free(_subCategoryInvoiceAgregateDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "itemNumber", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}itemNumber of type {http://www.w3.org/2001/XMLSchema}int.\n"); #endif _child_accessor = xmlTextReaderReadXsIntType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}itemNumber of type {http://www.w3.org/2001/XMLSchema}int.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); free(_subCategoryInvoiceAgregateDto); return NULL; } _subCategoryInvoiceAgregateDto->itemNumber = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accountingCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}accountingCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}accountingCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); free(_subCategoryInvoiceAgregateDto); return NULL; } _subCategoryInvoiceAgregateDto->accountingCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "description", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); free(_subCategoryInvoiceAgregateDto); return NULL; } _subCategoryInvoiceAgregateDto->description = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxPercent", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}taxPercent of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}taxPercent of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); free(_subCategoryInvoiceAgregateDto); return NULL; } _subCategoryInvoiceAgregateDto->taxPercent = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "quantity", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}quantity of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}quantity of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); free(_subCategoryInvoiceAgregateDto); return NULL; } _subCategoryInvoiceAgregateDto->quantity = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "discount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}discount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}discount of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); free(_subCategoryInvoiceAgregateDto); return NULL; } _subCategoryInvoiceAgregateDto->discount = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithoutTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); free(_subCategoryInvoiceAgregateDto); return NULL; } _subCategoryInvoiceAgregateDto->amountWithoutTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); free(_subCategoryInvoiceAgregateDto); return NULL; } _subCategoryInvoiceAgregateDto->amountTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); free(_subCategoryInvoiceAgregateDto); return NULL; } _subCategoryInvoiceAgregateDto->amountWithTax = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "ratedTransactions", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}ratedTransactions of type {}ratedTransactionDTO.\n"); #endif _child_accessor = xmlTextReaderReadNs0RatedTransactionDTOType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}ratedTransactions of type {}ratedTransactionDTO.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubCategoryInvoiceAgregateDtoType(_subCategoryInvoiceAgregateDto); free(_subCategoryInvoiceAgregateDto); return NULL; } _subCategoryInvoiceAgregateDto->ratedTransactions = realloc(_subCategoryInvoiceAgregateDto->ratedTransactions, (_subCategoryInvoiceAgregateDto->_sizeof_ratedTransactions + 1) * sizeof(struct novaglobalapi_ns0_ratedTransactionDTO)); memcpy(&(_subCategoryInvoiceAgregateDto->ratedTransactions[_subCategoryInvoiceAgregateDto->_sizeof_ratedTransactions++]), _child_accessor, sizeof(struct novaglobalapi_ns0_ratedTransactionDTO)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}subCategoryInvoiceAgregateDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}subCategoryInvoiceAgregateDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _subCategoryInvoiceAgregateDto; } /** * Writes a SubCategoryInvoiceAgregateDto to XML. * * @param writer The XML writer. * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0SubCategoryInvoiceAgregateDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_subCategoryInvoiceAgregateDto->itemNumber != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "itemNumber", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}itemNumber. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}itemNumber...\n"); #endif status = xmlTextWriterWriteXsIntType(writer, (_subCategoryInvoiceAgregateDto->itemNumber)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}itemNumber. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}itemNumber. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subCategoryInvoiceAgregateDto->accountingCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accountingCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}accountingCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}accountingCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subCategoryInvoiceAgregateDto->accountingCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}accountingCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}accountingCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subCategoryInvoiceAgregateDto->description != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}description. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}description...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subCategoryInvoiceAgregateDto->description)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}description. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}description. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subCategoryInvoiceAgregateDto->taxPercent != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxPercent", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}taxPercent. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}taxPercent...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_subCategoryInvoiceAgregateDto->taxPercent)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}taxPercent. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}taxPercent. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subCategoryInvoiceAgregateDto->quantity != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "quantity", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}quantity. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}quantity...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_subCategoryInvoiceAgregateDto->quantity)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}quantity. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}quantity. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subCategoryInvoiceAgregateDto->discount != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "discount", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}discount. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}discount...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_subCategoryInvoiceAgregateDto->discount)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}discount. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}discount. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subCategoryInvoiceAgregateDto->amountWithoutTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithoutTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithoutTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_subCategoryInvoiceAgregateDto->amountWithoutTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amountWithoutTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subCategoryInvoiceAgregateDto->amountTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amountTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_subCategoryInvoiceAgregateDto->amountTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amountTax. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subCategoryInvoiceAgregateDto->amountWithTax != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithTax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}amountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithTax...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_subCategoryInvoiceAgregateDto->amountWithTax)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}amountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}amountWithTax. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _subCategoryInvoiceAgregateDto->_sizeof_ratedTransactions; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ratedTransactions", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}ratedTransactions. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}ratedTransactionDTO for element {}ratedTransactions...\n"); #endif status = xmlTextWriterWriteNs0RatedTransactionDTOType(writer, &(_subCategoryInvoiceAgregateDto->ratedTransactions[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}ratedTransactionDTO for element {}ratedTransactions. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}ratedTransactions. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a SubCategoryInvoiceAgregateDto. * * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to free. */ static void freeNs0SubCategoryInvoiceAgregateDtoType(struct novaglobalapi_ns0_subCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto) { int i; if (_subCategoryInvoiceAgregateDto->itemNumber != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor itemNumber of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif freeXsIntType(_subCategoryInvoiceAgregateDto->itemNumber); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor itemNumber of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif free(_subCategoryInvoiceAgregateDto->itemNumber); } if (_subCategoryInvoiceAgregateDto->accountingCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor accountingCode of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif freeXsStringType(_subCategoryInvoiceAgregateDto->accountingCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor accountingCode of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif free(_subCategoryInvoiceAgregateDto->accountingCode); } if (_subCategoryInvoiceAgregateDto->description != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor description of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif freeXsStringType(_subCategoryInvoiceAgregateDto->description); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor description of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif free(_subCategoryInvoiceAgregateDto->description); } if (_subCategoryInvoiceAgregateDto->taxPercent != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor taxPercent of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif freeXsDecimalType(_subCategoryInvoiceAgregateDto->taxPercent); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor taxPercent of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif free(_subCategoryInvoiceAgregateDto->taxPercent); } if (_subCategoryInvoiceAgregateDto->quantity != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor quantity of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif freeXsDecimalType(_subCategoryInvoiceAgregateDto->quantity); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor quantity of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif free(_subCategoryInvoiceAgregateDto->quantity); } if (_subCategoryInvoiceAgregateDto->discount != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor discount of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif freeXsDecimalType(_subCategoryInvoiceAgregateDto->discount); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor discount of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif free(_subCategoryInvoiceAgregateDto->discount); } if (_subCategoryInvoiceAgregateDto->amountWithoutTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amountWithoutTax of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif freeXsDecimalType(_subCategoryInvoiceAgregateDto->amountWithoutTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amountWithoutTax of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif free(_subCategoryInvoiceAgregateDto->amountWithoutTax); } if (_subCategoryInvoiceAgregateDto->amountTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amountTax of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif freeXsDecimalType(_subCategoryInvoiceAgregateDto->amountTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amountTax of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif free(_subCategoryInvoiceAgregateDto->amountTax); } if (_subCategoryInvoiceAgregateDto->amountWithTax != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor amountWithTax of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif freeXsDecimalType(_subCategoryInvoiceAgregateDto->amountWithTax); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor amountWithTax of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif free(_subCategoryInvoiceAgregateDto->amountWithTax); } if (_subCategoryInvoiceAgregateDto->ratedTransactions != NULL) { for (i = 0; i < _subCategoryInvoiceAgregateDto->_sizeof_ratedTransactions; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor ratedTransactions[%i] of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n", i); #endif freeNs0RatedTransactionDTOType(&(_subCategoryInvoiceAgregateDto->ratedTransactions[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor ratedTransactions of type novaglobalapi_ns0_subCategoryInvoiceAgregateDto...\n"); #endif free(_subCategoryInvoiceAgregateDto->ratedTransactions); } } #endif /* DEF_novaglobalapi_ns0_subCategoryInvoiceAgregateDto_M */ #ifndef DEF_novaglobalapi_ns0_subscriptionFeeDto_M #define DEF_novaglobalapi_ns0_subscriptionFeeDto_M /** * Reads a SubscriptionFeeDto element from XML. The element to be read is "subscriptionFee", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The SubscriptionFeeDto, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionFeeDto *xml_read_novaglobalapi_ns0_subscriptionFeeDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0SubscriptionFeeElement(reader); } /** * Writes a SubscriptionFeeDto to XML under element name "subscriptionFee". * * @param writer The XML writer. * @param _subscriptionFeeDto The SubscriptionFeeDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_subscriptionFeeDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto) { return xmlTextWriterWriteNs0SubscriptionFeeElementNS(writer, _subscriptionFeeDto, 1); } /** * Frees a SubscriptionFeeDto. * * @param _subscriptionFeeDto The SubscriptionFeeDto to free. */ void free_novaglobalapi_ns0_subscriptionFeeDto(struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto) { freeNs0SubscriptionFeeDtoType(_subscriptionFeeDto); free(_subscriptionFeeDto); } /** * Reads a SubscriptionFeeDto element from XML. The element to be read is "subscriptionFee", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The SubscriptionFeeDto, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionFeeDto *xmlTextReaderReadNs0SubscriptionFeeElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionFee", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}subscriptionFee.\n"); #endif _subscriptionFeeDto = xmlTextReaderReadNs0SubscriptionFeeDtoType(reader); } #if DEBUG_ENUNCIATE if (_subscriptionFeeDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}subscriptionFee failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}subscriptionFee failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _subscriptionFeeDto; } /** * Writes a SubscriptionFeeDto to XML under element name "subscriptionFee". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _subscriptionFeeDto The SubscriptionFeeDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0SubscriptionFeeElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto) { return xmlTextWriterWriteNs0SubscriptionFeeElementNS(writer, _subscriptionFeeDto, 0); } /** * Writes a SubscriptionFeeDto to XML under element name "subscriptionFee". * * @param writer The XML writer. * @param _subscriptionFeeDto The SubscriptionFeeDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0SubscriptionFeeElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionFee", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}subscriptionFee. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}subscriptionFeeDto for root element {}subscriptionFee...\n"); #endif status = xmlTextWriterWriteNs0SubscriptionFeeDtoType(writer, _subscriptionFeeDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}subscriptionFee. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}subscriptionFee. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a SubscriptionFeeDto. * * @param _subscriptionFeeDto The SubscriptionFeeDto whose children are to be free. */ static void freeNs0SubscriptionFeeElement(struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto) { freeNs0SubscriptionFeeDtoType(_subscriptionFeeDto); } /** * Reads a SubscriptionFeeDto from XML. The reader is assumed to be at the start element. * * @return the SubscriptionFeeDto, or NULL in case of error. */ static struct novaglobalapi_ns0_subscriptionFeeDto *xmlTextReaderReadNs0SubscriptionFeeDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto = calloc(1, sizeof(struct novaglobalapi_ns0_subscriptionFeeDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0SubscriptionFeeDtoType(_subscriptionFeeDto); free(_subscriptionFeeDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currencyCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionFeeDtoType(_subscriptionFeeDto); free(_subscriptionFeeDto); return NULL; } _subscriptionFeeDto->currencyCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "startDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionFeeDtoType(_subscriptionFeeDto); free(_subscriptionFeeDto); return NULL; } _subscriptionFeeDto->startDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "endDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionFeeDtoType(_subscriptionFeeDto); free(_subscriptionFeeDto); return NULL; } _subscriptionFeeDto->endDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "price", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionFeeDtoType(_subscriptionFeeDto); free(_subscriptionFeeDto); return NULL; } _subscriptionFeeDto->price = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recommendedPrice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionFeeDtoType(_subscriptionFeeDto); free(_subscriptionFeeDto); return NULL; } _subscriptionFeeDto->recommendedPrice = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}subscriptionFeeDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}subscriptionFeeDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _subscriptionFeeDto; } /** * Writes a SubscriptionFeeDto to XML. * * @param writer The XML writer. * @param _subscriptionFeeDto The SubscriptionFeeDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0SubscriptionFeeDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_subscriptionFeeDto->currencyCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currencyCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}currencyCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subscriptionFeeDto->currencyCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionFeeDto->startDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "startDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}startDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}startDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_subscriptionFeeDto->startDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}startDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}startDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionFeeDto->endDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}endDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}endDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_subscriptionFeeDto->endDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}endDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}endDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionFeeDto->price != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "price", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}price. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}price...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_subscriptionFeeDto->price)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}price. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}price. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionFeeDto->recommendedPrice != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recommendedPrice", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}recommendedPrice. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}recommendedPrice...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_subscriptionFeeDto->recommendedPrice)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}recommendedPrice. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}recommendedPrice. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a SubscriptionFeeDto. * * @param _subscriptionFeeDto The SubscriptionFeeDto to free. */ static void freeNs0SubscriptionFeeDtoType(struct novaglobalapi_ns0_subscriptionFeeDto *_subscriptionFeeDto) { int i; if (_subscriptionFeeDto->currencyCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currencyCode of type novaglobalapi_ns0_subscriptionFeeDto...\n"); #endif freeXsStringType(_subscriptionFeeDto->currencyCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currencyCode of type novaglobalapi_ns0_subscriptionFeeDto...\n"); #endif free(_subscriptionFeeDto->currencyCode); } if (_subscriptionFeeDto->startDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor startDate of type novaglobalapi_ns0_subscriptionFeeDto...\n"); #endif freeXsDateTimeType(_subscriptionFeeDto->startDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor startDate of type novaglobalapi_ns0_subscriptionFeeDto...\n"); #endif free(_subscriptionFeeDto->startDate); } if (_subscriptionFeeDto->endDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor endDate of type novaglobalapi_ns0_subscriptionFeeDto...\n"); #endif freeXsDateTimeType(_subscriptionFeeDto->endDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor endDate of type novaglobalapi_ns0_subscriptionFeeDto...\n"); #endif free(_subscriptionFeeDto->endDate); } if (_subscriptionFeeDto->price != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor price of type novaglobalapi_ns0_subscriptionFeeDto...\n"); #endif freeXsDecimalType(_subscriptionFeeDto->price); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor price of type novaglobalapi_ns0_subscriptionFeeDto...\n"); #endif free(_subscriptionFeeDto->price); } if (_subscriptionFeeDto->recommendedPrice != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor recommendedPrice of type novaglobalapi_ns0_subscriptionFeeDto...\n"); #endif freeXsDecimalType(_subscriptionFeeDto->recommendedPrice); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor recommendedPrice of type novaglobalapi_ns0_subscriptionFeeDto...\n"); #endif free(_subscriptionFeeDto->recommendedPrice); } } #endif /* DEF_novaglobalapi_ns0_subscriptionFeeDto_M */ #ifndef DEF_novaglobalapi_ns0_subscriptionWithCreditLimitDto_M #define DEF_novaglobalapi_ns0_subscriptionWithCreditLimitDto_M /** * Reads a SubscriptionWithCreditLimitDto element from XML. The element to be read is "subscriptionWithCreditLimit", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitDto, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *xml_read_novaglobalapi_ns0_subscriptionWithCreditLimitDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0SubscriptionWithCreditLimitElement(reader); } /** * Writes a SubscriptionWithCreditLimitDto to XML under element name "subscriptionWithCreditLimit". * * @param writer The XML writer. * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_subscriptionWithCreditLimitDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto) { return xmlTextWriterWriteNs0SubscriptionWithCreditLimitElementNS(writer, _subscriptionWithCreditLimitDto, 1); } /** * Frees a SubscriptionWithCreditLimitDto. * * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to free. */ void free_novaglobalapi_ns0_subscriptionWithCreditLimitDto(struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto) { freeNs0SubscriptionWithCreditLimitDtoType(_subscriptionWithCreditLimitDto); free(_subscriptionWithCreditLimitDto); } /** * Reads a SubscriptionWithCreditLimitDto element from XML. The element to be read is "subscriptionWithCreditLimit", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitDto, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *xmlTextReaderReadNs0SubscriptionWithCreditLimitElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionWithCreditLimit", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}subscriptionWithCreditLimit.\n"); #endif _subscriptionWithCreditLimitDto = xmlTextReaderReadNs0SubscriptionWithCreditLimitDtoType(reader); } #if DEBUG_ENUNCIATE if (_subscriptionWithCreditLimitDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}subscriptionWithCreditLimit failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}subscriptionWithCreditLimit failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _subscriptionWithCreditLimitDto; } /** * Writes a SubscriptionWithCreditLimitDto to XML under element name "subscriptionWithCreditLimit". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto) { return xmlTextWriterWriteNs0SubscriptionWithCreditLimitElementNS(writer, _subscriptionWithCreditLimitDto, 0); } /** * Writes a SubscriptionWithCreditLimitDto to XML under element name "subscriptionWithCreditLimit". * * @param writer The XML writer. * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionWithCreditLimit", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}subscriptionWithCreditLimit. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}subscriptionWithCreditLimitDto for root element {}subscriptionWithCreditLimit...\n"); #endif status = xmlTextWriterWriteNs0SubscriptionWithCreditLimitDtoType(writer, _subscriptionWithCreditLimitDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}subscriptionWithCreditLimit. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}subscriptionWithCreditLimit. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a SubscriptionWithCreditLimitDto. * * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto whose children are to be free. */ static void freeNs0SubscriptionWithCreditLimitElement(struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto) { freeNs0SubscriptionWithCreditLimitDtoType(_subscriptionWithCreditLimitDto); } /** * Reads a SubscriptionWithCreditLimitDto from XML. The reader is assumed to be at the start element. * * @return the SubscriptionWithCreditLimitDto, or NULL in case of error. */ static struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *xmlTextReaderReadNs0SubscriptionWithCreditLimitDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto = calloc(1, sizeof(struct novaglobalapi_ns0_subscriptionWithCreditLimitDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0SubscriptionWithCreditLimitDtoType(_subscriptionWithCreditLimitDto); free(_subscriptionWithCreditLimitDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitDtoType(_subscriptionWithCreditLimitDto); free(_subscriptionWithCreditLimitDto); return NULL; } _subscriptionWithCreditLimitDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitDtoType(_subscriptionWithCreditLimitDto); free(_subscriptionWithCreditLimitDto); return NULL; } _subscriptionWithCreditLimitDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitDtoType(_subscriptionWithCreditLimitDto); free(_subscriptionWithCreditLimitDto); return NULL; } _subscriptionWithCreditLimitDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "userId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitDtoType(_subscriptionWithCreditLimitDto); free(_subscriptionWithCreditLimitDto); return NULL; } _subscriptionWithCreditLimitDto->userId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitDtoType(_subscriptionWithCreditLimitDto); free(_subscriptionWithCreditLimitDto); return NULL; } _subscriptionWithCreditLimitDto->organizationId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "offerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitDtoType(_subscriptionWithCreditLimitDto); free(_subscriptionWithCreditLimitDto); return NULL; } _subscriptionWithCreditLimitDto->offerId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "servicesToAdd", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}servicesToAdd of type {}serviceToAddDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0ServiceToAddDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}servicesToAdd of type {}serviceToAddDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitDtoType(_subscriptionWithCreditLimitDto); free(_subscriptionWithCreditLimitDto); return NULL; } _subscriptionWithCreditLimitDto->servicesToAdd = realloc(_subscriptionWithCreditLimitDto->servicesToAdd, (_subscriptionWithCreditLimitDto->_sizeof_servicesToAdd + 1) * sizeof(struct novaglobalapi_ns0_serviceToAddDto)); memcpy(&(_subscriptionWithCreditLimitDto->servicesToAdd[_subscriptionWithCreditLimitDto->_sizeof_servicesToAdd++]), _child_accessor, sizeof(struct novaglobalapi_ns0_serviceToAddDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "creditLimits", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}creditLimits of type {}creditLimitDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0CreditLimitDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}creditLimits of type {}creditLimitDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitDtoType(_subscriptionWithCreditLimitDto); free(_subscriptionWithCreditLimitDto); return NULL; } _subscriptionWithCreditLimitDto->creditLimits = realloc(_subscriptionWithCreditLimitDto->creditLimits, (_subscriptionWithCreditLimitDto->_sizeof_creditLimits + 1) * sizeof(struct novaglobalapi_ns0_creditLimitDto)); memcpy(&(_subscriptionWithCreditLimitDto->creditLimits[_subscriptionWithCreditLimitDto->_sizeof_creditLimits++]), _child_accessor, sizeof(struct novaglobalapi_ns0_creditLimitDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}subscriptionDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}subscriptionDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitDtoType(_subscriptionWithCreditLimitDto); free(_subscriptionWithCreditLimitDto); return NULL; } _subscriptionWithCreditLimitDto->subscriptionDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}subscriptionWithCreditLimitDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}subscriptionWithCreditLimitDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _subscriptionWithCreditLimitDto; } /** * Writes a SubscriptionWithCreditLimitDto to XML. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_subscriptionWithCreditLimitDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_subscriptionWithCreditLimitDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_subscriptionWithCreditLimitDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subscriptionWithCreditLimitDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitDto->userId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "userId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}userId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}userId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subscriptionWithCreditLimitDto->userId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}userId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}userId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitDto->organizationId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subscriptionWithCreditLimitDto->organizationId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitDto->offerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}offerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}offerId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subscriptionWithCreditLimitDto->offerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}offerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}offerId. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _subscriptionWithCreditLimitDto->_sizeof_servicesToAdd; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "servicesToAdd", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}servicesToAdd. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}serviceToAddDto for element {}servicesToAdd...\n"); #endif status = xmlTextWriterWriteNs0ServiceToAddDtoType(writer, &(_subscriptionWithCreditLimitDto->servicesToAdd[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}serviceToAddDto for element {}servicesToAdd. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}servicesToAdd. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _subscriptionWithCreditLimitDto->_sizeof_creditLimits; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "creditLimits", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}creditLimits. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}creditLimitDto for element {}creditLimits...\n"); #endif status = xmlTextWriterWriteNs0CreditLimitDtoType(writer, &(_subscriptionWithCreditLimitDto->creditLimits[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}creditLimitDto for element {}creditLimits. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}creditLimits. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitDto->subscriptionDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}subscriptionDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}subscriptionDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_subscriptionWithCreditLimitDto->subscriptionDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}subscriptionDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}subscriptionDate. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a SubscriptionWithCreditLimitDto. * * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to free. */ static void freeNs0SubscriptionWithCreditLimitDtoType(struct novaglobalapi_ns0_subscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto) { int i; if (_subscriptionWithCreditLimitDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif freeXsLongType(_subscriptionWithCreditLimitDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif free(_subscriptionWithCreditLimitDto->providerId); } if (_subscriptionWithCreditLimitDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif freeXsLongType(_subscriptionWithCreditLimitDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif free(_subscriptionWithCreditLimitDto->currentUserId); } if (_subscriptionWithCreditLimitDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif freeXsStringType(_subscriptionWithCreditLimitDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif free(_subscriptionWithCreditLimitDto->requestId); } if (_subscriptionWithCreditLimitDto->userId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor userId of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif freeXsStringType(_subscriptionWithCreditLimitDto->userId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor userId of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif free(_subscriptionWithCreditLimitDto->userId); } if (_subscriptionWithCreditLimitDto->organizationId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor organizationId of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif freeXsStringType(_subscriptionWithCreditLimitDto->organizationId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor organizationId of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif free(_subscriptionWithCreditLimitDto->organizationId); } if (_subscriptionWithCreditLimitDto->offerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor offerId of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif freeXsStringType(_subscriptionWithCreditLimitDto->offerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor offerId of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif free(_subscriptionWithCreditLimitDto->offerId); } if (_subscriptionWithCreditLimitDto->servicesToAdd != NULL) { for (i = 0; i < _subscriptionWithCreditLimitDto->_sizeof_servicesToAdd; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor servicesToAdd[%i] of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n", i); #endif freeNs0ServiceToAddDtoType(&(_subscriptionWithCreditLimitDto->servicesToAdd[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor servicesToAdd of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif free(_subscriptionWithCreditLimitDto->servicesToAdd); } if (_subscriptionWithCreditLimitDto->creditLimits != NULL) { for (i = 0; i < _subscriptionWithCreditLimitDto->_sizeof_creditLimits; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor creditLimits[%i] of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n", i); #endif freeNs0CreditLimitDtoType(&(_subscriptionWithCreditLimitDto->creditLimits[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor creditLimits of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif free(_subscriptionWithCreditLimitDto->creditLimits); } if (_subscriptionWithCreditLimitDto->subscriptionDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor subscriptionDate of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif freeXsDateTimeType(_subscriptionWithCreditLimitDto->subscriptionDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subscriptionDate of type novaglobalapi_ns0_subscriptionWithCreditLimitDto...\n"); #endif free(_subscriptionWithCreditLimitDto->subscriptionDate); } } #endif /* DEF_novaglobalapi_ns0_subscriptionWithCreditLimitDto_M */ #ifndef DEF_novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto_M #define DEF_novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto_M /** * Reads a SubscriptionWithCreditLimitUpdateDto element from XML. The element to be read is "subscriptionWithCreditLimitUpdate", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitUpdateDto, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *xml_read_novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0SubscriptionWithCreditLimitUpdateElement(reader); } /** * Writes a SubscriptionWithCreditLimitUpdateDto to XML under element name "subscriptionWithCreditLimitUpdate". * * @param writer The XML writer. * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto) { return xmlTextWriterWriteNs0SubscriptionWithCreditLimitUpdateElementNS(writer, _subscriptionWithCreditLimitUpdateDto, 1); } /** * Frees a SubscriptionWithCreditLimitUpdateDto. * * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to free. */ void free_novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto(struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto) { freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); free(_subscriptionWithCreditLimitUpdateDto); } /** * Reads a SubscriptionWithCreditLimitUpdateDto element from XML. The element to be read is "subscriptionWithCreditLimitUpdate", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitUpdateDto, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *xmlTextReaderReadNs0SubscriptionWithCreditLimitUpdateElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionWithCreditLimitUpdate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}subscriptionWithCreditLimitUpdate.\n"); #endif _subscriptionWithCreditLimitUpdateDto = xmlTextReaderReadNs0SubscriptionWithCreditLimitUpdateDtoType(reader); } #if DEBUG_ENUNCIATE if (_subscriptionWithCreditLimitUpdateDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}subscriptionWithCreditLimitUpdate failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}subscriptionWithCreditLimitUpdate failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _subscriptionWithCreditLimitUpdateDto; } /** * Writes a SubscriptionWithCreditLimitUpdateDto to XML under element name "subscriptionWithCreditLimitUpdate". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitUpdateElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto) { return xmlTextWriterWriteNs0SubscriptionWithCreditLimitUpdateElementNS(writer, _subscriptionWithCreditLimitUpdateDto, 0); } /** * Writes a SubscriptionWithCreditLimitUpdateDto to XML under element name "subscriptionWithCreditLimitUpdate". * * @param writer The XML writer. * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitUpdateElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionWithCreditLimitUpdate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}subscriptionWithCreditLimitUpdate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}subscriptionWithCreditLimitUpdateDto for root element {}subscriptionWithCreditLimitUpdate...\n"); #endif status = xmlTextWriterWriteNs0SubscriptionWithCreditLimitUpdateDtoType(writer, _subscriptionWithCreditLimitUpdateDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}subscriptionWithCreditLimitUpdate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}subscriptionWithCreditLimitUpdate. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a SubscriptionWithCreditLimitUpdateDto. * * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto whose children are to be free. */ static void freeNs0SubscriptionWithCreditLimitUpdateElement(struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto) { freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); } /** * Reads a SubscriptionWithCreditLimitUpdateDto from XML. The reader is assumed to be at the start element. * * @return the SubscriptionWithCreditLimitUpdateDto, or NULL in case of error. */ static struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *xmlTextReaderReadNs0SubscriptionWithCreditLimitUpdateDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto = calloc(1, sizeof(struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); free(_subscriptionWithCreditLimitUpdateDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); free(_subscriptionWithCreditLimitUpdateDto); return NULL; } _subscriptionWithCreditLimitUpdateDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); free(_subscriptionWithCreditLimitUpdateDto); return NULL; } _subscriptionWithCreditLimitUpdateDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); free(_subscriptionWithCreditLimitUpdateDto); return NULL; } _subscriptionWithCreditLimitUpdateDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "userId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); free(_subscriptionWithCreditLimitUpdateDto); return NULL; } _subscriptionWithCreditLimitUpdateDto->userId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); free(_subscriptionWithCreditLimitUpdateDto); return NULL; } _subscriptionWithCreditLimitUpdateDto->organizationId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "offerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); free(_subscriptionWithCreditLimitUpdateDto); return NULL; } _subscriptionWithCreditLimitUpdateDto->offerId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "servicesToAdd", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}servicesToAdd of type {}serviceToAddDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0ServiceToAddDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}servicesToAdd of type {}serviceToAddDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); free(_subscriptionWithCreditLimitUpdateDto); return NULL; } _subscriptionWithCreditLimitUpdateDto->servicesToAdd = realloc(_subscriptionWithCreditLimitUpdateDto->servicesToAdd, (_subscriptionWithCreditLimitUpdateDto->_sizeof_servicesToAdd + 1) * sizeof(struct novaglobalapi_ns0_serviceToAddDto)); memcpy(&(_subscriptionWithCreditLimitUpdateDto->servicesToAdd[_subscriptionWithCreditLimitUpdateDto->_sizeof_servicesToAdd++]), _child_accessor, sizeof(struct novaglobalapi_ns0_serviceToAddDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "creditLimits", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}creditLimits of type {}creditLimitDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0CreditLimitDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}creditLimits of type {}creditLimitDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); free(_subscriptionWithCreditLimitUpdateDto); return NULL; } _subscriptionWithCreditLimitUpdateDto->creditLimits = realloc(_subscriptionWithCreditLimitUpdateDto->creditLimits, (_subscriptionWithCreditLimitUpdateDto->_sizeof_creditLimits + 1) * sizeof(struct novaglobalapi_ns0_creditLimitDto)); memcpy(&(_subscriptionWithCreditLimitUpdateDto->creditLimits[_subscriptionWithCreditLimitUpdateDto->_sizeof_creditLimits++]), _child_accessor, sizeof(struct novaglobalapi_ns0_creditLimitDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}subscriptionDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}subscriptionDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); free(_subscriptionWithCreditLimitUpdateDto); return NULL; } _subscriptionWithCreditLimitUpdateDto->subscriptionDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "servicesToTerminate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}servicesToTerminate of type {}serviceToTerminateDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0ServiceToTerminateDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}servicesToTerminate of type {}serviceToTerminateDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitUpdateDtoType(_subscriptionWithCreditLimitUpdateDto); free(_subscriptionWithCreditLimitUpdateDto); return NULL; } _subscriptionWithCreditLimitUpdateDto->servicesToTerminate = realloc(_subscriptionWithCreditLimitUpdateDto->servicesToTerminate, (_subscriptionWithCreditLimitUpdateDto->_sizeof_servicesToTerminate + 1) * sizeof(struct novaglobalapi_ns0_serviceToTerminateDto)); memcpy(&(_subscriptionWithCreditLimitUpdateDto->servicesToTerminate[_subscriptionWithCreditLimitUpdateDto->_sizeof_servicesToTerminate++]), _child_accessor, sizeof(struct novaglobalapi_ns0_serviceToTerminateDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}subscriptionWithCreditLimitUpdateDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}subscriptionWithCreditLimitUpdateDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _subscriptionWithCreditLimitUpdateDto; } /** * Writes a SubscriptionWithCreditLimitUpdateDto to XML. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitUpdateDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_subscriptionWithCreditLimitUpdateDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_subscriptionWithCreditLimitUpdateDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitUpdateDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_subscriptionWithCreditLimitUpdateDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitUpdateDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subscriptionWithCreditLimitUpdateDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitUpdateDto->userId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "userId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}userId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}userId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subscriptionWithCreditLimitUpdateDto->userId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}userId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}userId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitUpdateDto->organizationId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subscriptionWithCreditLimitUpdateDto->organizationId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitUpdateDto->offerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}offerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}offerId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subscriptionWithCreditLimitUpdateDto->offerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}offerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}offerId. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _subscriptionWithCreditLimitUpdateDto->_sizeof_servicesToAdd; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "servicesToAdd", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}servicesToAdd. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}serviceToAddDto for element {}servicesToAdd...\n"); #endif status = xmlTextWriterWriteNs0ServiceToAddDtoType(writer, &(_subscriptionWithCreditLimitUpdateDto->servicesToAdd[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}serviceToAddDto for element {}servicesToAdd. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}servicesToAdd. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _subscriptionWithCreditLimitUpdateDto->_sizeof_creditLimits; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "creditLimits", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}creditLimits. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}creditLimitDto for element {}creditLimits...\n"); #endif status = xmlTextWriterWriteNs0CreditLimitDtoType(writer, &(_subscriptionWithCreditLimitUpdateDto->creditLimits[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}creditLimitDto for element {}creditLimits. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}creditLimits. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitUpdateDto->subscriptionDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}subscriptionDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}subscriptionDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_subscriptionWithCreditLimitUpdateDto->subscriptionDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}subscriptionDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}subscriptionDate. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _subscriptionWithCreditLimitUpdateDto->_sizeof_servicesToTerminate; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "servicesToTerminate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}servicesToTerminate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}serviceToTerminateDto for element {}servicesToTerminate...\n"); #endif status = xmlTextWriterWriteNs0ServiceToTerminateDtoType(writer, &(_subscriptionWithCreditLimitUpdateDto->servicesToTerminate[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}serviceToTerminateDto for element {}servicesToTerminate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}servicesToTerminate. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a SubscriptionWithCreditLimitUpdateDto. * * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to free. */ static void freeNs0SubscriptionWithCreditLimitUpdateDtoType(struct novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto) { int i; if (_subscriptionWithCreditLimitUpdateDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif freeXsLongType(_subscriptionWithCreditLimitUpdateDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif free(_subscriptionWithCreditLimitUpdateDto->providerId); } if (_subscriptionWithCreditLimitUpdateDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif freeXsLongType(_subscriptionWithCreditLimitUpdateDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif free(_subscriptionWithCreditLimitUpdateDto->currentUserId); } if (_subscriptionWithCreditLimitUpdateDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif freeXsStringType(_subscriptionWithCreditLimitUpdateDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif free(_subscriptionWithCreditLimitUpdateDto->requestId); } if (_subscriptionWithCreditLimitUpdateDto->userId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor userId of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif freeXsStringType(_subscriptionWithCreditLimitUpdateDto->userId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor userId of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif free(_subscriptionWithCreditLimitUpdateDto->userId); } if (_subscriptionWithCreditLimitUpdateDto->organizationId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor organizationId of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif freeXsStringType(_subscriptionWithCreditLimitUpdateDto->organizationId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor organizationId of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif free(_subscriptionWithCreditLimitUpdateDto->organizationId); } if (_subscriptionWithCreditLimitUpdateDto->offerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor offerId of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif freeXsStringType(_subscriptionWithCreditLimitUpdateDto->offerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor offerId of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif free(_subscriptionWithCreditLimitUpdateDto->offerId); } if (_subscriptionWithCreditLimitUpdateDto->servicesToAdd != NULL) { for (i = 0; i < _subscriptionWithCreditLimitUpdateDto->_sizeof_servicesToAdd; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor servicesToAdd[%i] of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n", i); #endif freeNs0ServiceToAddDtoType(&(_subscriptionWithCreditLimitUpdateDto->servicesToAdd[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor servicesToAdd of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif free(_subscriptionWithCreditLimitUpdateDto->servicesToAdd); } if (_subscriptionWithCreditLimitUpdateDto->creditLimits != NULL) { for (i = 0; i < _subscriptionWithCreditLimitUpdateDto->_sizeof_creditLimits; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor creditLimits[%i] of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n", i); #endif freeNs0CreditLimitDtoType(&(_subscriptionWithCreditLimitUpdateDto->creditLimits[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor creditLimits of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif free(_subscriptionWithCreditLimitUpdateDto->creditLimits); } if (_subscriptionWithCreditLimitUpdateDto->subscriptionDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor subscriptionDate of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif freeXsDateTimeType(_subscriptionWithCreditLimitUpdateDto->subscriptionDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subscriptionDate of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif free(_subscriptionWithCreditLimitUpdateDto->subscriptionDate); } if (_subscriptionWithCreditLimitUpdateDto->servicesToTerminate != NULL) { for (i = 0; i < _subscriptionWithCreditLimitUpdateDto->_sizeof_servicesToTerminate; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor servicesToTerminate[%i] of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n", i); #endif freeNs0ServiceToTerminateDtoType(&(_subscriptionWithCreditLimitUpdateDto->servicesToTerminate[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor servicesToTerminate of type novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto...\n"); #endif free(_subscriptionWithCreditLimitUpdateDto->servicesToTerminate); } } #endif /* DEF_novaglobalapi_ns0_subscriptionWithCreditLimitUpdateDto_M */ #ifndef DEF_novaglobalapi_ns0_taxDto_M #define DEF_novaglobalapi_ns0_taxDto_M /** * Reads a TaxDto element from XML. The element to be read is "tax", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The TaxDto, or NULL in case of error. */ struct novaglobalapi_ns0_taxDto *xml_read_novaglobalapi_ns0_taxDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0TaxElement(reader); } /** * Writes a TaxDto to XML under element name "tax". * * @param writer The XML writer. * @param _taxDto The TaxDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_taxDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_taxDto *_taxDto) { return xmlTextWriterWriteNs0TaxElementNS(writer, _taxDto, 1); } /** * Frees a TaxDto. * * @param _taxDto The TaxDto to free. */ void free_novaglobalapi_ns0_taxDto(struct novaglobalapi_ns0_taxDto *_taxDto) { freeNs0TaxDtoType(_taxDto); free(_taxDto); } /** * Reads a TaxDto element from XML. The element to be read is "tax", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The TaxDto, or NULL in case of error. */ struct novaglobalapi_ns0_taxDto *xmlTextReaderReadNs0TaxElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_taxDto *_taxDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "tax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}tax.\n"); #endif _taxDto = xmlTextReaderReadNs0TaxDtoType(reader); } #if DEBUG_ENUNCIATE if (_taxDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}tax failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}tax failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _taxDto; } /** * Writes a TaxDto to XML under element name "tax". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _taxDto The TaxDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0TaxElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_taxDto *_taxDto) { return xmlTextWriterWriteNs0TaxElementNS(writer, _taxDto, 0); } /** * Writes a TaxDto to XML under element name "tax". * * @param writer The XML writer. * @param _taxDto The TaxDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0TaxElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_taxDto *_taxDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "tax", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}tax. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}taxDto for root element {}tax...\n"); #endif status = xmlTextWriterWriteNs0TaxDtoType(writer, _taxDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}tax. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}tax. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a TaxDto. * * @param _taxDto The TaxDto whose children are to be free. */ static void freeNs0TaxElement(struct novaglobalapi_ns0_taxDto *_taxDto) { freeNs0TaxDtoType(_taxDto); } /** * Reads a TaxDto from XML. The reader is assumed to be at the start element. * * @return the TaxDto, or NULL in case of error. */ static struct novaglobalapi_ns0_taxDto *xmlTextReaderReadNs0TaxDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_taxDto *_taxDto = calloc(1, sizeof(struct novaglobalapi_ns0_taxDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0TaxDtoType(_taxDto); free(_taxDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TaxDtoType(_taxDto); free(_taxDto); return NULL; } _taxDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TaxDtoType(_taxDto); free(_taxDto); return NULL; } _taxDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TaxDtoType(_taxDto); free(_taxDto); return NULL; } _taxDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}taxId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}taxId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TaxDtoType(_taxDto); free(_taxDto); return NULL; } _taxDto->taxId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TaxDtoType(_taxDto); free(_taxDto); return NULL; } _taxDto->name = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countryTaxes", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}countryTaxes of type {}countryTaxDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0CountryTaxDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}countryTaxes of type {}countryTaxDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TaxDtoType(_taxDto); free(_taxDto); return NULL; } _taxDto->countryTaxes = realloc(_taxDto->countryTaxes, (_taxDto->_sizeof_countryTaxes + 1) * sizeof(struct novaglobalapi_ns0_countryTaxDto)); memcpy(&(_taxDto->countryTaxes[_taxDto->_sizeof_countryTaxes++]), _child_accessor, sizeof(struct novaglobalapi_ns0_countryTaxDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}taxDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}taxDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _taxDto; } /** * Writes a TaxDto to XML. * * @param writer The XML writer. * @param _taxDto The TaxDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0TaxDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_taxDto *_taxDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_taxDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_taxDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_taxDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_taxDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_taxDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_taxDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_taxDto->taxId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}taxId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}taxId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_taxDto->taxId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}taxId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}taxId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_taxDto->name != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}name. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}name...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_taxDto->name)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}name. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}name. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _taxDto->_sizeof_countryTaxes; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryTaxes", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}countryTaxes. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}countryTaxDto for element {}countryTaxes...\n"); #endif status = xmlTextWriterWriteNs0CountryTaxDtoType(writer, &(_taxDto->countryTaxes[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}countryTaxDto for element {}countryTaxes. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}countryTaxes. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a TaxDto. * * @param _taxDto The TaxDto to free. */ static void freeNs0TaxDtoType(struct novaglobalapi_ns0_taxDto *_taxDto) { int i; if (_taxDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_taxDto...\n"); #endif freeXsLongType(_taxDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_taxDto...\n"); #endif free(_taxDto->providerId); } if (_taxDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_taxDto...\n"); #endif freeXsLongType(_taxDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_taxDto...\n"); #endif free(_taxDto->currentUserId); } if (_taxDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_taxDto...\n"); #endif freeXsStringType(_taxDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_taxDto...\n"); #endif free(_taxDto->requestId); } if (_taxDto->taxId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor taxId of type novaglobalapi_ns0_taxDto...\n"); #endif freeXsStringType(_taxDto->taxId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor taxId of type novaglobalapi_ns0_taxDto...\n"); #endif free(_taxDto->taxId); } if (_taxDto->name != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor name of type novaglobalapi_ns0_taxDto...\n"); #endif freeXsStringType(_taxDto->name); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor name of type novaglobalapi_ns0_taxDto...\n"); #endif free(_taxDto->name); } if (_taxDto->countryTaxes != NULL) { for (i = 0; i < _taxDto->_sizeof_countryTaxes; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor countryTaxes[%i] of type novaglobalapi_ns0_taxDto...\n", i); #endif freeNs0CountryTaxDtoType(&(_taxDto->countryTaxes[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor countryTaxes of type novaglobalapi_ns0_taxDto...\n"); #endif free(_taxDto->countryTaxes); } } #endif /* DEF_novaglobalapi_ns0_taxDto_M */ #ifndef DEF_novaglobalapi_ns0_terminateCustomerSubscriptionDto_M #define DEF_novaglobalapi_ns0_terminateCustomerSubscriptionDto_M /** * Reads a TerminateCustomerSubscriptionDto element from XML. The element to be read is "terminateSubscription", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The TerminateCustomerSubscriptionDto, or NULL in case of error. */ struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *xml_read_novaglobalapi_ns0_terminateCustomerSubscriptionDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0TerminateSubscriptionElement(reader); } /** * Writes a TerminateCustomerSubscriptionDto to XML under element name "terminateSubscription". * * @param writer The XML writer. * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_terminateCustomerSubscriptionDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto) { return xmlTextWriterWriteNs0TerminateSubscriptionElementNS(writer, _terminateCustomerSubscriptionDto, 1); } /** * Frees a TerminateCustomerSubscriptionDto. * * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to free. */ void free_novaglobalapi_ns0_terminateCustomerSubscriptionDto(struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto) { freeNs0TerminateCustomerSubscriptionDtoType(_terminateCustomerSubscriptionDto); free(_terminateCustomerSubscriptionDto); } /** * Reads a TerminateCustomerSubscriptionDto element from XML. The element to be read is "terminateSubscription", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The TerminateCustomerSubscriptionDto, or NULL in case of error. */ struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *xmlTextReaderReadNs0TerminateSubscriptionElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminateSubscription", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}terminateSubscription.\n"); #endif _terminateCustomerSubscriptionDto = xmlTextReaderReadNs0TerminateCustomerSubscriptionDtoType(reader); } #if DEBUG_ENUNCIATE if (_terminateCustomerSubscriptionDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}terminateSubscription failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}terminateSubscription failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _terminateCustomerSubscriptionDto; } /** * Writes a TerminateCustomerSubscriptionDto to XML under element name "terminateSubscription". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0TerminateSubscriptionElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto) { return xmlTextWriterWriteNs0TerminateSubscriptionElementNS(writer, _terminateCustomerSubscriptionDto, 0); } /** * Writes a TerminateCustomerSubscriptionDto to XML under element name "terminateSubscription". * * @param writer The XML writer. * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0TerminateSubscriptionElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminateSubscription", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}terminateSubscription. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}terminateCustomerSubscriptionDto for root element {}terminateSubscription...\n"); #endif status = xmlTextWriterWriteNs0TerminateCustomerSubscriptionDtoType(writer, _terminateCustomerSubscriptionDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}terminateSubscription. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}terminateSubscription. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a TerminateCustomerSubscriptionDto. * * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto whose children are to be free. */ static void freeNs0TerminateSubscriptionElement(struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto) { freeNs0TerminateCustomerSubscriptionDtoType(_terminateCustomerSubscriptionDto); } /** * Reads a TerminateCustomerSubscriptionDto from XML. The reader is assumed to be at the start element. * * @return the TerminateCustomerSubscriptionDto, or NULL in case of error. */ static struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *xmlTextReaderReadNs0TerminateCustomerSubscriptionDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto = calloc(1, sizeof(struct novaglobalapi_ns0_terminateCustomerSubscriptionDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0TerminateCustomerSubscriptionDtoType(_terminateCustomerSubscriptionDto); free(_terminateCustomerSubscriptionDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminateCustomerSubscriptionDtoType(_terminateCustomerSubscriptionDto); free(_terminateCustomerSubscriptionDto); return NULL; } _terminateCustomerSubscriptionDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminateCustomerSubscriptionDtoType(_terminateCustomerSubscriptionDto); free(_terminateCustomerSubscriptionDto); return NULL; } _terminateCustomerSubscriptionDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminateCustomerSubscriptionDtoType(_terminateCustomerSubscriptionDto); free(_terminateCustomerSubscriptionDto); return NULL; } _terminateCustomerSubscriptionDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "userId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminateCustomerSubscriptionDtoType(_terminateCustomerSubscriptionDto); free(_terminateCustomerSubscriptionDto); return NULL; } _terminateCustomerSubscriptionDto->userId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminateCustomerSubscriptionDtoType(_terminateCustomerSubscriptionDto); free(_terminateCustomerSubscriptionDto); return NULL; } _terminateCustomerSubscriptionDto->organizationId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}subscriptionId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}subscriptionId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminateCustomerSubscriptionDtoType(_terminateCustomerSubscriptionDto); free(_terminateCustomerSubscriptionDto); return NULL; } _terminateCustomerSubscriptionDto->subscriptionId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}terminationDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}terminationDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminateCustomerSubscriptionDtoType(_terminateCustomerSubscriptionDto); free(_terminateCustomerSubscriptionDto); return NULL; } _terminateCustomerSubscriptionDto->terminationDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}terminateCustomerSubscriptionDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}terminateCustomerSubscriptionDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _terminateCustomerSubscriptionDto; } /** * Writes a TerminateCustomerSubscriptionDto to XML. * * @param writer The XML writer. * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0TerminateCustomerSubscriptionDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_terminateCustomerSubscriptionDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_terminateCustomerSubscriptionDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminateCustomerSubscriptionDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_terminateCustomerSubscriptionDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminateCustomerSubscriptionDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_terminateCustomerSubscriptionDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminateCustomerSubscriptionDto->userId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "userId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}userId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}userId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_terminateCustomerSubscriptionDto->userId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}userId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}userId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminateCustomerSubscriptionDto->organizationId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_terminateCustomerSubscriptionDto->organizationId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminateCustomerSubscriptionDto->subscriptionId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}subscriptionId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}subscriptionId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_terminateCustomerSubscriptionDto->subscriptionId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}subscriptionId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}subscriptionId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminateCustomerSubscriptionDto->terminationDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}terminationDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}terminationDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_terminateCustomerSubscriptionDto->terminationDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}terminationDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}terminationDate. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a TerminateCustomerSubscriptionDto. * * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to free. */ static void freeNs0TerminateCustomerSubscriptionDtoType(struct novaglobalapi_ns0_terminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto) { int i; if (_terminateCustomerSubscriptionDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif freeXsLongType(_terminateCustomerSubscriptionDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif free(_terminateCustomerSubscriptionDto->providerId); } if (_terminateCustomerSubscriptionDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif freeXsLongType(_terminateCustomerSubscriptionDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif free(_terminateCustomerSubscriptionDto->currentUserId); } if (_terminateCustomerSubscriptionDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif freeXsStringType(_terminateCustomerSubscriptionDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif free(_terminateCustomerSubscriptionDto->requestId); } if (_terminateCustomerSubscriptionDto->userId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor userId of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif freeXsStringType(_terminateCustomerSubscriptionDto->userId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor userId of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif free(_terminateCustomerSubscriptionDto->userId); } if (_terminateCustomerSubscriptionDto->organizationId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor organizationId of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif freeXsStringType(_terminateCustomerSubscriptionDto->organizationId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor organizationId of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif free(_terminateCustomerSubscriptionDto->organizationId); } if (_terminateCustomerSubscriptionDto->subscriptionId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor subscriptionId of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif freeXsStringType(_terminateCustomerSubscriptionDto->subscriptionId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subscriptionId of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif free(_terminateCustomerSubscriptionDto->subscriptionId); } if (_terminateCustomerSubscriptionDto->terminationDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor terminationDate of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif freeXsDateTimeType(_terminateCustomerSubscriptionDto->terminationDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor terminationDate of type novaglobalapi_ns0_terminateCustomerSubscriptionDto...\n"); #endif free(_terminateCustomerSubscriptionDto->terminationDate); } } #endif /* DEF_novaglobalapi_ns0_terminateCustomerSubscriptionDto_M */ #ifndef DEF_novaglobalapi_ns0_terminationFeeDto_M #define DEF_novaglobalapi_ns0_terminationFeeDto_M /** * Reads a TerminationFeeDto element from XML. The element to be read is "terminationFee", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The TerminationFeeDto, or NULL in case of error. */ struct novaglobalapi_ns0_terminationFeeDto *xml_read_novaglobalapi_ns0_terminationFeeDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0TerminationFeeElement(reader); } /** * Writes a TerminationFeeDto to XML under element name "terminationFee". * * @param writer The XML writer. * @param _terminationFeeDto The TerminationFeeDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_terminationFeeDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto) { return xmlTextWriterWriteNs0TerminationFeeElementNS(writer, _terminationFeeDto, 1); } /** * Frees a TerminationFeeDto. * * @param _terminationFeeDto The TerminationFeeDto to free. */ void free_novaglobalapi_ns0_terminationFeeDto(struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto) { freeNs0TerminationFeeDtoType(_terminationFeeDto); free(_terminationFeeDto); } /** * Reads a TerminationFeeDto element from XML. The element to be read is "terminationFee", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The TerminationFeeDto, or NULL in case of error. */ struct novaglobalapi_ns0_terminationFeeDto *xmlTextReaderReadNs0TerminationFeeElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationFee", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}terminationFee.\n"); #endif _terminationFeeDto = xmlTextReaderReadNs0TerminationFeeDtoType(reader); } #if DEBUG_ENUNCIATE if (_terminationFeeDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}terminationFee failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}terminationFee failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _terminationFeeDto; } /** * Writes a TerminationFeeDto to XML under element name "terminationFee". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _terminationFeeDto The TerminationFeeDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0TerminationFeeElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto) { return xmlTextWriterWriteNs0TerminationFeeElementNS(writer, _terminationFeeDto, 0); } /** * Writes a TerminationFeeDto to XML under element name "terminationFee". * * @param writer The XML writer. * @param _terminationFeeDto The TerminationFeeDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0TerminationFeeElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationFee", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}terminationFee. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}terminationFeeDto for root element {}terminationFee...\n"); #endif status = xmlTextWriterWriteNs0TerminationFeeDtoType(writer, _terminationFeeDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}terminationFee. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}terminationFee. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a TerminationFeeDto. * * @param _terminationFeeDto The TerminationFeeDto whose children are to be free. */ static void freeNs0TerminationFeeElement(struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto) { freeNs0TerminationFeeDtoType(_terminationFeeDto); } /** * Reads a TerminationFeeDto from XML. The reader is assumed to be at the start element. * * @return the TerminationFeeDto, or NULL in case of error. */ static struct novaglobalapi_ns0_terminationFeeDto *xmlTextReaderReadNs0TerminationFeeDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto = calloc(1, sizeof(struct novaglobalapi_ns0_terminationFeeDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0TerminationFeeDtoType(_terminationFeeDto); free(_terminationFeeDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currencyCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminationFeeDtoType(_terminationFeeDto); free(_terminationFeeDto); return NULL; } _terminationFeeDto->currencyCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "startDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminationFeeDtoType(_terminationFeeDto); free(_terminationFeeDto); return NULL; } _terminationFeeDto->startDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "endDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminationFeeDtoType(_terminationFeeDto); free(_terminationFeeDto); return NULL; } _terminationFeeDto->endDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "price", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminationFeeDtoType(_terminationFeeDto); free(_terminationFeeDto); return NULL; } _terminationFeeDto->price = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recommendedPrice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminationFeeDtoType(_terminationFeeDto); free(_terminationFeeDto); return NULL; } _terminationFeeDto->recommendedPrice = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}terminationFeeDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}terminationFeeDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _terminationFeeDto; } /** * Writes a TerminationFeeDto to XML. * * @param writer The XML writer. * @param _terminationFeeDto The TerminationFeeDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0TerminationFeeDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_terminationFeeDto->currencyCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currencyCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}currencyCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_terminationFeeDto->currencyCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminationFeeDto->startDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "startDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}startDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}startDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_terminationFeeDto->startDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}startDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}startDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminationFeeDto->endDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}endDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}endDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_terminationFeeDto->endDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}endDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}endDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminationFeeDto->price != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "price", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}price. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}price...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_terminationFeeDto->price)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}price. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}price. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminationFeeDto->recommendedPrice != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recommendedPrice", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}recommendedPrice. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}recommendedPrice...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_terminationFeeDto->recommendedPrice)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}recommendedPrice. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}recommendedPrice. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a TerminationFeeDto. * * @param _terminationFeeDto The TerminationFeeDto to free. */ static void freeNs0TerminationFeeDtoType(struct novaglobalapi_ns0_terminationFeeDto *_terminationFeeDto) { int i; if (_terminationFeeDto->currencyCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currencyCode of type novaglobalapi_ns0_terminationFeeDto...\n"); #endif freeXsStringType(_terminationFeeDto->currencyCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currencyCode of type novaglobalapi_ns0_terminationFeeDto...\n"); #endif free(_terminationFeeDto->currencyCode); } if (_terminationFeeDto->startDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor startDate of type novaglobalapi_ns0_terminationFeeDto...\n"); #endif freeXsDateTimeType(_terminationFeeDto->startDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor startDate of type novaglobalapi_ns0_terminationFeeDto...\n"); #endif free(_terminationFeeDto->startDate); } if (_terminationFeeDto->endDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor endDate of type novaglobalapi_ns0_terminationFeeDto...\n"); #endif freeXsDateTimeType(_terminationFeeDto->endDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor endDate of type novaglobalapi_ns0_terminationFeeDto...\n"); #endif free(_terminationFeeDto->endDate); } if (_terminationFeeDto->price != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor price of type novaglobalapi_ns0_terminationFeeDto...\n"); #endif freeXsDecimalType(_terminationFeeDto->price); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor price of type novaglobalapi_ns0_terminationFeeDto...\n"); #endif free(_terminationFeeDto->price); } if (_terminationFeeDto->recommendedPrice != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor recommendedPrice of type novaglobalapi_ns0_terminationFeeDto...\n"); #endif freeXsDecimalType(_terminationFeeDto->recommendedPrice); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor recommendedPrice of type novaglobalapi_ns0_terminationFeeDto...\n"); #endif free(_terminationFeeDto->recommendedPrice); } } #endif /* DEF_novaglobalapi_ns0_terminationFeeDto_M */ #ifndef DEF_novaglobalapi_ns0_usageChargeDto_M #define DEF_novaglobalapi_ns0_usageChargeDto_M /** * Reads a UsageChargeDto element from XML. The element to be read is "usageCharge", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The UsageChargeDto, or NULL in case of error. */ struct novaglobalapi_ns0_usageChargeDto *xml_read_novaglobalapi_ns0_usageChargeDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0UsageChargeElement(reader); } /** * Writes a UsageChargeDto to XML under element name "usageCharge". * * @param writer The XML writer. * @param _usageChargeDto The UsageChargeDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_usageChargeDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto) { return xmlTextWriterWriteNs0UsageChargeElementNS(writer, _usageChargeDto, 1); } /** * Frees a UsageChargeDto. * * @param _usageChargeDto The UsageChargeDto to free. */ void free_novaglobalapi_ns0_usageChargeDto(struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto) { freeNs0UsageChargeDtoType(_usageChargeDto); free(_usageChargeDto); } /** * Reads a UsageChargeDto element from XML. The element to be read is "usageCharge", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The UsageChargeDto, or NULL in case of error. */ struct novaglobalapi_ns0_usageChargeDto *xmlTextReaderReadNs0UsageChargeElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "usageCharge", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}usageCharge.\n"); #endif _usageChargeDto = xmlTextReaderReadNs0UsageChargeDtoType(reader); } #if DEBUG_ENUNCIATE if (_usageChargeDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}usageCharge failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}usageCharge failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _usageChargeDto; } /** * Writes a UsageChargeDto to XML under element name "usageCharge". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _usageChargeDto The UsageChargeDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0UsageChargeElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto) { return xmlTextWriterWriteNs0UsageChargeElementNS(writer, _usageChargeDto, 0); } /** * Writes a UsageChargeDto to XML under element name "usageCharge". * * @param writer The XML writer. * @param _usageChargeDto The UsageChargeDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0UsageChargeElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "usageCharge", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}usageCharge. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}usageChargeDto for root element {}usageCharge...\n"); #endif status = xmlTextWriterWriteNs0UsageChargeDtoType(writer, _usageChargeDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}usageCharge. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}usageCharge. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a UsageChargeDto. * * @param _usageChargeDto The UsageChargeDto whose children are to be free. */ static void freeNs0UsageChargeElement(struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto) { freeNs0UsageChargeDtoType(_usageChargeDto); } /** * Reads a UsageChargeDto from XML. The reader is assumed to be at the start element. * * @return the UsageChargeDto, or NULL in case of error. */ static struct novaglobalapi_ns0_usageChargeDto *xmlTextReaderReadNs0UsageChargeDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto = calloc(1, sizeof(struct novaglobalapi_ns0_usageChargeDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0UsageChargeDtoType(_usageChargeDto); free(_usageChargeDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "min", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}min of type {http://www.w3.org/2001/XMLSchema}int.\n"); #endif _child_accessor = xmlTextReaderReadXsIntType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}min of type {http://www.w3.org/2001/XMLSchema}int.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UsageChargeDtoType(_usageChargeDto); free(_usageChargeDto); return NULL; } _usageChargeDto->min = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "max", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}max of type {http://www.w3.org/2001/XMLSchema}int.\n"); #endif _child_accessor = xmlTextReaderReadXsIntType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}max of type {http://www.w3.org/2001/XMLSchema}int.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UsageChargeDtoType(_usageChargeDto); free(_usageChargeDto); return NULL; } _usageChargeDto->max = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currencyCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UsageChargeDtoType(_usageChargeDto); free(_usageChargeDto); return NULL; } _usageChargeDto->currencyCode = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "startDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UsageChargeDtoType(_usageChargeDto); free(_usageChargeDto); return NULL; } _usageChargeDto->startDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "endDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif _child_accessor = xmlTextReaderReadXsDateTimeType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UsageChargeDtoType(_usageChargeDto); free(_usageChargeDto); return NULL; } _usageChargeDto->endDate = ((struct tm*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "price", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UsageChargeDtoType(_usageChargeDto); free(_usageChargeDto); return NULL; } _usageChargeDto->price = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recommendedPrice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif _child_accessor = xmlTextReaderReadXsDecimalType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UsageChargeDtoType(_usageChargeDto); free(_usageChargeDto); return NULL; } _usageChargeDto->recommendedPrice = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}usageChargeDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}usageChargeDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _usageChargeDto; } /** * Writes a UsageChargeDto to XML. * * @param writer The XML writer. * @param _usageChargeDto The UsageChargeDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0UsageChargeDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_usageChargeDto->min != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "min", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}min. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}min...\n"); #endif status = xmlTextWriterWriteXsIntType(writer, (_usageChargeDto->min)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}min. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}min. status: %i\n", status); #endif return status; } totalBytes += status; } if (_usageChargeDto->max != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "max", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}max. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}max...\n"); #endif status = xmlTextWriterWriteXsIntType(writer, (_usageChargeDto->max)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}max. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}max. status: %i\n", status); #endif return status; } totalBytes += status; } if (_usageChargeDto->currencyCode != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currencyCode", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}currencyCode...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_usageChargeDto->currencyCode)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currencyCode. status: %i\n", status); #endif return status; } totalBytes += status; } if (_usageChargeDto->startDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "startDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}startDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}startDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_usageChargeDto->startDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}startDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}startDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_usageChargeDto->endDate != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endDate", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}endDate. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}dateTime for element {}endDate...\n"); #endif status = xmlTextWriterWriteXsDateTimeType(writer, (_usageChargeDto->endDate)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}dateTime for element {}endDate. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}endDate. status: %i\n", status); #endif return status; } totalBytes += status; } if (_usageChargeDto->price != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "price", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}price. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}price...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_usageChargeDto->price)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}price. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}price. status: %i\n", status); #endif return status; } totalBytes += status; } if (_usageChargeDto->recommendedPrice != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recommendedPrice", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}recommendedPrice. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}decimal for element {}recommendedPrice...\n"); #endif status = xmlTextWriterWriteXsDecimalType(writer, (_usageChargeDto->recommendedPrice)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}decimal for element {}recommendedPrice. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}recommendedPrice. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a UsageChargeDto. * * @param _usageChargeDto The UsageChargeDto to free. */ static void freeNs0UsageChargeDtoType(struct novaglobalapi_ns0_usageChargeDto *_usageChargeDto) { int i; if (_usageChargeDto->min != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor min of type novaglobalapi_ns0_usageChargeDto...\n"); #endif freeXsIntType(_usageChargeDto->min); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor min of type novaglobalapi_ns0_usageChargeDto...\n"); #endif free(_usageChargeDto->min); } if (_usageChargeDto->max != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor max of type novaglobalapi_ns0_usageChargeDto...\n"); #endif freeXsIntType(_usageChargeDto->max); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor max of type novaglobalapi_ns0_usageChargeDto...\n"); #endif free(_usageChargeDto->max); } if (_usageChargeDto->currencyCode != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currencyCode of type novaglobalapi_ns0_usageChargeDto...\n"); #endif freeXsStringType(_usageChargeDto->currencyCode); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currencyCode of type novaglobalapi_ns0_usageChargeDto...\n"); #endif free(_usageChargeDto->currencyCode); } if (_usageChargeDto->startDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor startDate of type novaglobalapi_ns0_usageChargeDto...\n"); #endif freeXsDateTimeType(_usageChargeDto->startDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor startDate of type novaglobalapi_ns0_usageChargeDto...\n"); #endif free(_usageChargeDto->startDate); } if (_usageChargeDto->endDate != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor endDate of type novaglobalapi_ns0_usageChargeDto...\n"); #endif freeXsDateTimeType(_usageChargeDto->endDate); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor endDate of type novaglobalapi_ns0_usageChargeDto...\n"); #endif free(_usageChargeDto->endDate); } if (_usageChargeDto->price != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor price of type novaglobalapi_ns0_usageChargeDto...\n"); #endif freeXsDecimalType(_usageChargeDto->price); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor price of type novaglobalapi_ns0_usageChargeDto...\n"); #endif free(_usageChargeDto->price); } if (_usageChargeDto->recommendedPrice != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor recommendedPrice of type novaglobalapi_ns0_usageChargeDto...\n"); #endif freeXsDecimalType(_usageChargeDto->recommendedPrice); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor recommendedPrice of type novaglobalapi_ns0_usageChargeDto...\n"); #endif free(_usageChargeDto->recommendedPrice); } } #endif /* DEF_novaglobalapi_ns0_usageChargeDto_M */ #ifndef DEF_novaglobalapi_ns0_userDto_M #define DEF_novaglobalapi_ns0_userDto_M /** * Reads a UserDto element from XML. The element to be read is "user", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The UserDto, or NULL in case of error. */ struct novaglobalapi_ns0_userDto *xml_read_novaglobalapi_ns0_userDto(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0UserElement(reader); } /** * Writes a UserDto to XML under element name "user". * * @param writer The XML writer. * @param _userDto The UserDto to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_userDto(xmlTextWriterPtr writer, struct novaglobalapi_ns0_userDto *_userDto) { return xmlTextWriterWriteNs0UserElementNS(writer, _userDto, 1); } /** * Frees a UserDto. * * @param _userDto The UserDto to free. */ void free_novaglobalapi_ns0_userDto(struct novaglobalapi_ns0_userDto *_userDto) { freeNs0UserDtoType(_userDto); free(_userDto); } /** * Reads a UserDto element from XML. The element to be read is "user", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The UserDto, or NULL in case of error. */ struct novaglobalapi_ns0_userDto *xmlTextReaderReadNs0UserElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_userDto *_userDto = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "user", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}user.\n"); #endif _userDto = xmlTextReaderReadNs0UserDtoType(reader); } #if DEBUG_ENUNCIATE if (_userDto == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}user failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}user failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _userDto; } /** * Writes a UserDto to XML under element name "user". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _userDto The UserDto to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0UserElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_userDto *_userDto) { return xmlTextWriterWriteNs0UserElementNS(writer, _userDto, 0); } /** * Writes a UserDto to XML under element name "user". * * @param writer The XML writer. * @param _userDto The UserDto to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0UserElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_userDto *_userDto, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "user", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}user. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}userDto for root element {}user...\n"); #endif status = xmlTextWriterWriteNs0UserDtoType(writer, _userDto); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}user. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}user. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a UserDto. * * @param _userDto The UserDto whose children are to be free. */ static void freeNs0UserElement(struct novaglobalapi_ns0_userDto *_userDto) { freeNs0UserDtoType(_userDto); } /** * Reads a UserDto from XML. The reader is assumed to be at the start element. * * @return the UserDto, or NULL in case of error. */ static struct novaglobalapi_ns0_userDto *xmlTextReaderReadNs0UserDtoType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_userDto *_userDto = calloc(1, sizeof(struct novaglobalapi_ns0_userDto)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0UserDtoType(_userDto); free(_userDto); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}providerId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UserDtoType(_userDto); free(_userDto); return NULL; } _userDto->providerId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif _child_accessor = xmlTextReaderReadXsLongType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}currentUserId of type {http://www.w3.org/2001/XMLSchema}long.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UserDtoType(_userDto); free(_userDto); return NULL; } _userDto->currentUserId = ((long long*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UserDtoType(_userDto); free(_userDto); return NULL; } _userDto->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "userId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UserDtoType(_userDto); free(_userDto); return NULL; } _userDto->userId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UserDtoType(_userDto); free(_userDto); return NULL; } _userDto->name = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0UserDtoType(_userDto); free(_userDto); return NULL; } _userDto->organizationId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}userDto. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}userDto. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _userDto; } /** * Writes a UserDto to XML. * * @param writer The XML writer. * @param _userDto The UserDto to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0UserDtoType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_userDto *_userDto) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_userDto->providerId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}providerId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_userDto->providerId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}providerId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_userDto->currentUserId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId...\n"); #endif status = xmlTextWriterWriteXsLongType(writer, (_userDto->currentUserId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}long for element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}currentUserId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_userDto->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_userDto->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_userDto->userId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "userId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}userId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}userId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_userDto->userId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}userId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}userId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_userDto->name != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}name. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}name...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_userDto->name)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}name. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}name. status: %i\n", status); #endif return status; } totalBytes += status; } if (_userDto->organizationId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_userDto->organizationId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}organizationId. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a UserDto. * * @param _userDto The UserDto to free. */ static void freeNs0UserDtoType(struct novaglobalapi_ns0_userDto *_userDto) { int i; if (_userDto->providerId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor providerId of type novaglobalapi_ns0_userDto...\n"); #endif freeXsLongType(_userDto->providerId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor providerId of type novaglobalapi_ns0_userDto...\n"); #endif free(_userDto->providerId); } if (_userDto->currentUserId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor currentUserId of type novaglobalapi_ns0_userDto...\n"); #endif freeXsLongType(_userDto->currentUserId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor currentUserId of type novaglobalapi_ns0_userDto...\n"); #endif free(_userDto->currentUserId); } if (_userDto->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_userDto...\n"); #endif freeXsStringType(_userDto->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_userDto...\n"); #endif free(_userDto->requestId); } if (_userDto->userId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor userId of type novaglobalapi_ns0_userDto...\n"); #endif freeXsStringType(_userDto->userId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor userId of type novaglobalapi_ns0_userDto...\n"); #endif free(_userDto->userId); } if (_userDto->name != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor name of type novaglobalapi_ns0_userDto...\n"); #endif freeXsStringType(_userDto->name); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor name of type novaglobalapi_ns0_userDto...\n"); #endif free(_userDto->name); } if (_userDto->organizationId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor organizationId of type novaglobalapi_ns0_userDto...\n"); #endif freeXsStringType(_userDto->organizationId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor organizationId of type novaglobalapi_ns0_userDto...\n"); #endif free(_userDto->organizationId); } } #endif /* DEF_novaglobalapi_ns0_userDto_M */ #ifndef DEF_novaglobalapi_ns0_countryResponse_M #define DEF_novaglobalapi_ns0_countryResponse_M /** * Reads a CountryResponse element from XML. The element to be read is "countryResponse", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CountryResponse, or NULL in case of error. */ struct novaglobalapi_ns0_countryResponse *xml_read_novaglobalapi_ns0_countryResponse(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0CountryResponseElement(reader); } /** * Writes a CountryResponse to XML under element name "countryResponse". * * @param writer The XML writer. * @param _countryResponse The CountryResponse to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_countryResponse(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryResponse *_countryResponse) { return xmlTextWriterWriteNs0CountryResponseElementNS(writer, _countryResponse, 1); } /** * Frees a CountryResponse. * * @param _countryResponse The CountryResponse to free. */ void free_novaglobalapi_ns0_countryResponse(struct novaglobalapi_ns0_countryResponse *_countryResponse) { freeNs0CountryResponseType(_countryResponse); free(_countryResponse); } /** * Reads a CountryResponse element from XML. The element to be read is "countryResponse", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The CountryResponse, or NULL in case of error. */ struct novaglobalapi_ns0_countryResponse *xmlTextReaderReadNs0CountryResponseElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_countryResponse *_countryResponse = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countryResponse", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}countryResponse.\n"); #endif _countryResponse = xmlTextReaderReadNs0CountryResponseType(reader); } #if DEBUG_ENUNCIATE if (_countryResponse == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}countryResponse failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}countryResponse failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _countryResponse; } /** * Writes a CountryResponse to XML under element name "countryResponse". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _countryResponse The CountryResponse to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CountryResponseElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryResponse *_countryResponse) { return xmlTextWriterWriteNs0CountryResponseElementNS(writer, _countryResponse, 0); } /** * Writes a CountryResponse to XML under element name "countryResponse". * * @param writer The XML writer. * @param _countryResponse The CountryResponse to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CountryResponseElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryResponse *_countryResponse, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryResponse", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}countryResponse. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}countryResponse for root element {}countryResponse...\n"); #endif status = xmlTextWriterWriteNs0CountryResponseType(writer, _countryResponse); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}countryResponse. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}countryResponse. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a CountryResponse. * * @param _countryResponse The CountryResponse whose children are to be free. */ static void freeNs0CountryResponseElement(struct novaglobalapi_ns0_countryResponse *_countryResponse) { freeNs0CountryResponseType(_countryResponse); } /** * Reads a CountryResponse from XML. The reader is assumed to be at the start element. * * @return the CountryResponse, or NULL in case of error. */ static struct novaglobalapi_ns0_countryResponse *xmlTextReaderReadNs0CountryResponseType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_countryResponse *_countryResponse = calloc(1, sizeof(struct novaglobalapi_ns0_countryResponse)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0CountryResponseType(_countryResponse); free(_countryResponse); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "actionStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}actionStatus of type {}actionStatus.\n"); #endif _child_accessor = xmlTextReaderReadNs0ActionStatusType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}actionStatus of type {}actionStatus.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CountryResponseType(_countryResponse); free(_countryResponse); return NULL; } _countryResponse->actionStatus = ((struct novaglobalapi_ns0_actionStatus*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countryDto", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}countryDto of type {}countryDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0CountryDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}countryDto of type {}countryDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CountryResponseType(_countryResponse); free(_countryResponse); return NULL; } _countryResponse->countryDto = ((struct novaglobalapi_ns0_countryDto*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}countryResponse. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}countryResponse. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _countryResponse; } /** * Writes a CountryResponse to XML. * * @param writer The XML writer. * @param _countryResponse The CountryResponse to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0CountryResponseType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_countryResponse *_countryResponse) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_countryResponse->actionStatus != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "actionStatus", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}actionStatus for element {}actionStatus...\n"); #endif status = xmlTextWriterWriteNs0ActionStatusType(writer, (_countryResponse->actionStatus)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}actionStatus for element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; } if (_countryResponse->countryDto != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryDto", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}countryDto. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}countryDto for element {}countryDto...\n"); #endif status = xmlTextWriterWriteNs0CountryDtoType(writer, (_countryResponse->countryDto)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}countryDto for element {}countryDto. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}countryDto. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a CountryResponse. * * @param _countryResponse The CountryResponse to free. */ static void freeNs0CountryResponseType(struct novaglobalapi_ns0_countryResponse *_countryResponse) { int i; if (_countryResponse->actionStatus != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor actionStatus of type novaglobalapi_ns0_countryResponse...\n"); #endif freeNs0ActionStatusType(_countryResponse->actionStatus); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor actionStatus of type novaglobalapi_ns0_countryResponse...\n"); #endif free(_countryResponse->actionStatus); } if (_countryResponse->countryDto != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor countryDto of type novaglobalapi_ns0_countryResponse...\n"); #endif freeNs0CountryDtoType(_countryResponse->countryDto); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor countryDto of type novaglobalapi_ns0_countryResponse...\n"); #endif free(_countryResponse->countryDto); } } #endif /* DEF_novaglobalapi_ns0_countryResponse_M */ #ifndef DEF_novaglobalapi_ns0_customerAccountResponse_M #define DEF_novaglobalapi_ns0_customerAccountResponse_M /** * Reads a CustomerAccountResponse element from XML. The element to be read is "customerAccountResponse", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CustomerAccountResponse, or NULL in case of error. */ struct novaglobalapi_ns0_customerAccountResponse *xml_read_novaglobalapi_ns0_customerAccountResponse(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0CustomerAccountResponseElement(reader); } /** * Writes a CustomerAccountResponse to XML under element name "customerAccountResponse". * * @param writer The XML writer. * @param _customerAccountResponse The CustomerAccountResponse to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_customerAccountResponse(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse) { return xmlTextWriterWriteNs0CustomerAccountResponseElementNS(writer, _customerAccountResponse, 1); } /** * Frees a CustomerAccountResponse. * * @param _customerAccountResponse The CustomerAccountResponse to free. */ void free_novaglobalapi_ns0_customerAccountResponse(struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse) { freeNs0CustomerAccountResponseType(_customerAccountResponse); free(_customerAccountResponse); } /** * Reads a CustomerAccountResponse element from XML. The element to be read is "customerAccountResponse", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The CustomerAccountResponse, or NULL in case of error. */ struct novaglobalapi_ns0_customerAccountResponse *xmlTextReaderReadNs0CustomerAccountResponseElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "customerAccountResponse", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}customerAccountResponse.\n"); #endif _customerAccountResponse = xmlTextReaderReadNs0CustomerAccountResponseType(reader); } #if DEBUG_ENUNCIATE if (_customerAccountResponse == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}customerAccountResponse failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}customerAccountResponse failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _customerAccountResponse; } /** * Writes a CustomerAccountResponse to XML under element name "customerAccountResponse". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _customerAccountResponse The CustomerAccountResponse to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CustomerAccountResponseElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse) { return xmlTextWriterWriteNs0CustomerAccountResponseElementNS(writer, _customerAccountResponse, 0); } /** * Writes a CustomerAccountResponse to XML under element name "customerAccountResponse". * * @param writer The XML writer. * @param _customerAccountResponse The CustomerAccountResponse to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CustomerAccountResponseElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "customerAccountResponse", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}customerAccountResponse. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}customerAccountResponse for root element {}customerAccountResponse...\n"); #endif status = xmlTextWriterWriteNs0CustomerAccountResponseType(writer, _customerAccountResponse); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}customerAccountResponse. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}customerAccountResponse. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a CustomerAccountResponse. * * @param _customerAccountResponse The CustomerAccountResponse whose children are to be free. */ static void freeNs0CustomerAccountResponseElement(struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse) { freeNs0CustomerAccountResponseType(_customerAccountResponse); } /** * Reads a CustomerAccountResponse from XML. The reader is assumed to be at the start element. * * @return the CustomerAccountResponse, or NULL in case of error. */ static struct novaglobalapi_ns0_customerAccountResponse *xmlTextReaderReadNs0CustomerAccountResponseType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse = calloc(1, sizeof(struct novaglobalapi_ns0_customerAccountResponse)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0CustomerAccountResponseType(_customerAccountResponse); free(_customerAccountResponse); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "actionStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}actionStatus of type {}actionStatus.\n"); #endif _child_accessor = xmlTextReaderReadNs0ActionStatusType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}actionStatus of type {}actionStatus.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountResponseType(_customerAccountResponse); free(_customerAccountResponse); return NULL; } _customerAccountResponse->actionStatus = ((struct novaglobalapi_ns0_actionStatus*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "customerAccountDto", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}customerAccountDto of type {}customerAccountDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0CustomerAccountDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}customerAccountDto of type {}customerAccountDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerAccountResponseType(_customerAccountResponse); free(_customerAccountResponse); return NULL; } _customerAccountResponse->customerAccountDto = ((struct novaglobalapi_ns0_customerAccountDto*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}customerAccountResponse. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}customerAccountResponse. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _customerAccountResponse; } /** * Writes a CustomerAccountResponse to XML. * * @param writer The XML writer. * @param _customerAccountResponse The CustomerAccountResponse to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0CustomerAccountResponseType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_customerAccountResponse->actionStatus != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "actionStatus", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}actionStatus for element {}actionStatus...\n"); #endif status = xmlTextWriterWriteNs0ActionStatusType(writer, (_customerAccountResponse->actionStatus)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}actionStatus for element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; } if (_customerAccountResponse->customerAccountDto != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "customerAccountDto", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}customerAccountDto. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}customerAccountDto for element {}customerAccountDto...\n"); #endif status = xmlTextWriterWriteNs0CustomerAccountDtoType(writer, (_customerAccountResponse->customerAccountDto)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}customerAccountDto for element {}customerAccountDto. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}customerAccountDto. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a CustomerAccountResponse. * * @param _customerAccountResponse The CustomerAccountResponse to free. */ static void freeNs0CustomerAccountResponseType(struct novaglobalapi_ns0_customerAccountResponse *_customerAccountResponse) { int i; if (_customerAccountResponse->actionStatus != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor actionStatus of type novaglobalapi_ns0_customerAccountResponse...\n"); #endif freeNs0ActionStatusType(_customerAccountResponse->actionStatus); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor actionStatus of type novaglobalapi_ns0_customerAccountResponse...\n"); #endif free(_customerAccountResponse->actionStatus); } if (_customerAccountResponse->customerAccountDto != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor customerAccountDto of type novaglobalapi_ns0_customerAccountResponse...\n"); #endif freeNs0CustomerAccountDtoType(_customerAccountResponse->customerAccountDto); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor customerAccountDto of type novaglobalapi_ns0_customerAccountResponse...\n"); #endif free(_customerAccountResponse->customerAccountDto); } } #endif /* DEF_novaglobalapi_ns0_customerAccountResponse_M */ #ifndef DEF_novaglobalapi_ns0_customerInvoicesResponse_M #define DEF_novaglobalapi_ns0_customerInvoicesResponse_M /** * Reads a CustomerInvoicesResponse element from XML. The element to be read is "customerInvoicesResponse", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The CustomerInvoicesResponse, or NULL in case of error. */ struct novaglobalapi_ns0_customerInvoicesResponse *xml_read_novaglobalapi_ns0_customerInvoicesResponse(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0CustomerInvoicesResponseElement(reader); } /** * Writes a CustomerInvoicesResponse to XML under element name "customerInvoicesResponse". * * @param writer The XML writer. * @param _customerInvoicesResponse The CustomerInvoicesResponse to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_customerInvoicesResponse(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse) { return xmlTextWriterWriteNs0CustomerInvoicesResponseElementNS(writer, _customerInvoicesResponse, 1); } /** * Frees a CustomerInvoicesResponse. * * @param _customerInvoicesResponse The CustomerInvoicesResponse to free. */ void free_novaglobalapi_ns0_customerInvoicesResponse(struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse) { freeNs0CustomerInvoicesResponseType(_customerInvoicesResponse); free(_customerInvoicesResponse); } /** * Reads a CustomerInvoicesResponse element from XML. The element to be read is "customerInvoicesResponse", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The CustomerInvoicesResponse, or NULL in case of error. */ struct novaglobalapi_ns0_customerInvoicesResponse *xmlTextReaderReadNs0CustomerInvoicesResponseElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "customerInvoicesResponse", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}customerInvoicesResponse.\n"); #endif _customerInvoicesResponse = xmlTextReaderReadNs0CustomerInvoicesResponseType(reader); } #if DEBUG_ENUNCIATE if (_customerInvoicesResponse == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}customerInvoicesResponse failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}customerInvoicesResponse failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _customerInvoicesResponse; } /** * Writes a CustomerInvoicesResponse to XML under element name "customerInvoicesResponse". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _customerInvoicesResponse The CustomerInvoicesResponse to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CustomerInvoicesResponseElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse) { return xmlTextWriterWriteNs0CustomerInvoicesResponseElementNS(writer, _customerInvoicesResponse, 0); } /** * Writes a CustomerInvoicesResponse to XML under element name "customerInvoicesResponse". * * @param writer The XML writer. * @param _customerInvoicesResponse The CustomerInvoicesResponse to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0CustomerInvoicesResponseElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "customerInvoicesResponse", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}customerInvoicesResponse. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}customerInvoicesResponse for root element {}customerInvoicesResponse...\n"); #endif status = xmlTextWriterWriteNs0CustomerInvoicesResponseType(writer, _customerInvoicesResponse); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}customerInvoicesResponse. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}customerInvoicesResponse. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a CustomerInvoicesResponse. * * @param _customerInvoicesResponse The CustomerInvoicesResponse whose children are to be free. */ static void freeNs0CustomerInvoicesResponseElement(struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse) { freeNs0CustomerInvoicesResponseType(_customerInvoicesResponse); } /** * Reads a CustomerInvoicesResponse from XML. The reader is assumed to be at the start element. * * @return the CustomerInvoicesResponse, or NULL in case of error. */ static struct novaglobalapi_ns0_customerInvoicesResponse *xmlTextReaderReadNs0CustomerInvoicesResponseType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse = calloc(1, sizeof(struct novaglobalapi_ns0_customerInvoicesResponse)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0CustomerInvoicesResponseType(_customerInvoicesResponse); free(_customerInvoicesResponse); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "actionStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}actionStatus of type {}actionStatus.\n"); #endif _child_accessor = xmlTextReaderReadNs0ActionStatusType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}actionStatus of type {}actionStatus.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoicesResponseType(_customerInvoicesResponse); free(_customerInvoicesResponse); return NULL; } _customerInvoicesResponse->actionStatus = ((struct novaglobalapi_ns0_actionStatus*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "CustomerInvoiceDtoList", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}CustomerInvoiceDtoList of type {}customerInvoiceDto.\n"); #endif _child_accessor = xmlTextReaderReadNs0CustomerInvoiceDtoType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}CustomerInvoiceDtoList of type {}customerInvoiceDto.\n"); #endif //panic: unable to read the child element for some reason. freeNs0CustomerInvoicesResponseType(_customerInvoicesResponse); free(_customerInvoicesResponse); return NULL; } _customerInvoicesResponse->CustomerInvoiceDtoList = realloc(_customerInvoicesResponse->CustomerInvoiceDtoList, (_customerInvoicesResponse->_sizeof_CustomerInvoiceDtoList + 1) * sizeof(struct novaglobalapi_ns0_customerInvoiceDto)); memcpy(&(_customerInvoicesResponse->CustomerInvoiceDtoList[_customerInvoicesResponse->_sizeof_CustomerInvoiceDtoList++]), _child_accessor, sizeof(struct novaglobalapi_ns0_customerInvoiceDto)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}customerInvoicesResponse. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}customerInvoicesResponse. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _customerInvoicesResponse; } /** * Writes a CustomerInvoicesResponse to XML. * * @param writer The XML writer. * @param _customerInvoicesResponse The CustomerInvoicesResponse to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0CustomerInvoicesResponseType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_customerInvoicesResponse->actionStatus != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "actionStatus", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}actionStatus for element {}actionStatus...\n"); #endif status = xmlTextWriterWriteNs0ActionStatusType(writer, (_customerInvoicesResponse->actionStatus)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}actionStatus for element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; } for (i = 0; i < _customerInvoicesResponse->_sizeof_CustomerInvoiceDtoList; i++) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "CustomerInvoiceDtoList", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}CustomerInvoiceDtoList. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}customerInvoiceDto for element {}CustomerInvoiceDtoList...\n"); #endif status = xmlTextWriterWriteNs0CustomerInvoiceDtoType(writer, &(_customerInvoicesResponse->CustomerInvoiceDtoList[i])); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}customerInvoiceDto for element {}CustomerInvoiceDtoList. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}CustomerInvoiceDtoList. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a CustomerInvoicesResponse. * * @param _customerInvoicesResponse The CustomerInvoicesResponse to free. */ static void freeNs0CustomerInvoicesResponseType(struct novaglobalapi_ns0_customerInvoicesResponse *_customerInvoicesResponse) { int i; if (_customerInvoicesResponse->actionStatus != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor actionStatus of type novaglobalapi_ns0_customerInvoicesResponse...\n"); #endif freeNs0ActionStatusType(_customerInvoicesResponse->actionStatus); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor actionStatus of type novaglobalapi_ns0_customerInvoicesResponse...\n"); #endif free(_customerInvoicesResponse->actionStatus); } if (_customerInvoicesResponse->CustomerInvoiceDtoList != NULL) { for (i = 0; i < _customerInvoicesResponse->_sizeof_CustomerInvoiceDtoList; i++) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor CustomerInvoiceDtoList[%i] of type novaglobalapi_ns0_customerInvoicesResponse...\n", i); #endif freeNs0CustomerInvoiceDtoType(&(_customerInvoicesResponse->CustomerInvoiceDtoList[i])); } #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor CustomerInvoiceDtoList of type novaglobalapi_ns0_customerInvoicesResponse...\n"); #endif free(_customerInvoicesResponse->CustomerInvoiceDtoList); } } #endif /* DEF_novaglobalapi_ns0_customerInvoicesResponse_M */ #ifndef DEF_novaglobalapi_ns0_pdfInvoiceResponse_M #define DEF_novaglobalapi_ns0_pdfInvoiceResponse_M /** * Reads a PdfInvoiceResponse element from XML. The element to be read is "pdfInvoiceResponse", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The PdfInvoiceResponse, or NULL in case of error. */ struct novaglobalapi_ns0_pdfInvoiceResponse *xml_read_novaglobalapi_ns0_pdfInvoiceResponse(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0PdfInvoiceResponseElement(reader); } /** * Writes a PdfInvoiceResponse to XML under element name "pdfInvoiceResponse". * * @param writer The XML writer. * @param _pdfInvoiceResponse The PdfInvoiceResponse to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_pdfInvoiceResponse(xmlTextWriterPtr writer, struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse) { return xmlTextWriterWriteNs0PdfInvoiceResponseElementNS(writer, _pdfInvoiceResponse, 1); } /** * Frees a PdfInvoiceResponse. * * @param _pdfInvoiceResponse The PdfInvoiceResponse to free. */ void free_novaglobalapi_ns0_pdfInvoiceResponse(struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse) { freeNs0PdfInvoiceResponseType(_pdfInvoiceResponse); free(_pdfInvoiceResponse); } /** * Reads a PdfInvoiceResponse element from XML. The element to be read is "pdfInvoiceResponse", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The PdfInvoiceResponse, or NULL in case of error. */ struct novaglobalapi_ns0_pdfInvoiceResponse *xmlTextReaderReadNs0PdfInvoiceResponseElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "pdfInvoiceResponse", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}pdfInvoiceResponse.\n"); #endif _pdfInvoiceResponse = xmlTextReaderReadNs0PdfInvoiceResponseType(reader); } #if DEBUG_ENUNCIATE if (_pdfInvoiceResponse == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}pdfInvoiceResponse failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}pdfInvoiceResponse failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _pdfInvoiceResponse; } /** * Writes a PdfInvoiceResponse to XML under element name "pdfInvoiceResponse". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _pdfInvoiceResponse The PdfInvoiceResponse to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0PdfInvoiceResponseElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse) { return xmlTextWriterWriteNs0PdfInvoiceResponseElementNS(writer, _pdfInvoiceResponse, 0); } /** * Writes a PdfInvoiceResponse to XML under element name "pdfInvoiceResponse". * * @param writer The XML writer. * @param _pdfInvoiceResponse The PdfInvoiceResponse to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0PdfInvoiceResponseElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pdfInvoiceResponse", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}pdfInvoiceResponse. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}pdfInvoiceResponse for root element {}pdfInvoiceResponse...\n"); #endif status = xmlTextWriterWriteNs0PdfInvoiceResponseType(writer, _pdfInvoiceResponse); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}pdfInvoiceResponse. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}pdfInvoiceResponse. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a PdfInvoiceResponse. * * @param _pdfInvoiceResponse The PdfInvoiceResponse whose children are to be free. */ static void freeNs0PdfInvoiceResponseElement(struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse) { freeNs0PdfInvoiceResponseType(_pdfInvoiceResponse); } /** * Reads a PdfInvoiceResponse from XML. The reader is assumed to be at the start element. * * @return the PdfInvoiceResponse, or NULL in case of error. */ static struct novaglobalapi_ns0_pdfInvoiceResponse *xmlTextReaderReadNs0PdfInvoiceResponseType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse = calloc(1, sizeof(struct novaglobalapi_ns0_pdfInvoiceResponse)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0PdfInvoiceResponseType(_pdfInvoiceResponse); free(_pdfInvoiceResponse); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "actionStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}actionStatus of type {}actionStatus.\n"); #endif _child_accessor = xmlTextReaderReadNs0ActionStatusType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}actionStatus of type {}actionStatus.\n"); #endif //panic: unable to read the child element for some reason. freeNs0PdfInvoiceResponseType(_pdfInvoiceResponse); free(_pdfInvoiceResponse); return NULL; } _pdfInvoiceResponse->actionStatus = ((struct novaglobalapi_ns0_actionStatus*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "pdfInvoice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read binary data of choice {}pdfInvoice.\n"); #endif _child_accessor = xmlTextReaderReadEntireNodeValue(reader); _pdfInvoiceResponse->pdfInvoice = _decode_base64((xmlChar *) _child_accessor, &(_pdfInvoiceResponse->_sizeof_pdfInvoice)); free(_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}pdfInvoiceResponse. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}pdfInvoiceResponse. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _pdfInvoiceResponse; } /** * Writes a PdfInvoiceResponse to XML. * * @param writer The XML writer. * @param _pdfInvoiceResponse The PdfInvoiceResponse to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0PdfInvoiceResponseType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_pdfInvoiceResponse->actionStatus != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "actionStatus", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}actionStatus for element {}actionStatus...\n"); #endif status = xmlTextWriterWriteNs0ActionStatusType(writer, (_pdfInvoiceResponse->actionStatus)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {}actionStatus for element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}actionStatus. status: %i\n", status); #endif return status; } totalBytes += status; } if (_pdfInvoiceResponse->pdfInvoice != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pdfInvoice", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}pdfInvoice. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing binary data for element {}pdfInvoice...\n"); #endif binaryData = _encode_base64(_pdfInvoiceResponse->pdfInvoice, _pdfInvoiceResponse->_sizeof_pdfInvoice); status = xmlTextWriterWriteString(writer, binaryData); free(binaryData); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write binary data for element {}pdfInvoice. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}pdfInvoice. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a PdfInvoiceResponse. * * @param _pdfInvoiceResponse The PdfInvoiceResponse to free. */ static void freeNs0PdfInvoiceResponseType(struct novaglobalapi_ns0_pdfInvoiceResponse *_pdfInvoiceResponse) { int i; if (_pdfInvoiceResponse->actionStatus != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor actionStatus of type novaglobalapi_ns0_pdfInvoiceResponse...\n"); #endif freeNs0ActionStatusType(_pdfInvoiceResponse->actionStatus); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor actionStatus of type novaglobalapi_ns0_pdfInvoiceResponse...\n"); #endif free(_pdfInvoiceResponse->actionStatus); } if (_pdfInvoiceResponse->pdfInvoice != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor pdfInvoice of type novaglobalapi_ns0_pdfInvoiceResponse...\n"); #endif free(_pdfInvoiceResponse->pdfInvoice); } } #endif /* DEF_novaglobalapi_ns0_pdfInvoiceResponse_M */ #ifndef DEF_novaglobalapi_ns0_subscriptionWithCreditLimitResponse_M #define DEF_novaglobalapi_ns0_subscriptionWithCreditLimitResponse_M /** * Reads a SubscriptionWithCreditLimitResponse element from XML. The element to be read is "subscriptionWithCreditLimitResponse", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitResponse, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *xml_read_novaglobalapi_ns0_subscriptionWithCreditLimitResponse(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0SubscriptionWithCreditLimitResponseElement(reader); } /** * Writes a SubscriptionWithCreditLimitResponse to XML under element name "subscriptionWithCreditLimitResponse". * * @param writer The XML writer. * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_subscriptionWithCreditLimitResponse(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse) { return xmlTextWriterWriteNs0SubscriptionWithCreditLimitResponseElementNS(writer, _subscriptionWithCreditLimitResponse, 1); } /** * Frees a SubscriptionWithCreditLimitResponse. * * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to free. */ void free_novaglobalapi_ns0_subscriptionWithCreditLimitResponse(struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse) { freeNs0SubscriptionWithCreditLimitResponseType(_subscriptionWithCreditLimitResponse); free(_subscriptionWithCreditLimitResponse); } /** * Reads a SubscriptionWithCreditLimitResponse element from XML. The element to be read is "subscriptionWithCreditLimitResponse", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The SubscriptionWithCreditLimitResponse, or NULL in case of error. */ struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *xmlTextReaderReadNs0SubscriptionWithCreditLimitResponseElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionWithCreditLimitResponse", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}subscriptionWithCreditLimitResponse.\n"); #endif _subscriptionWithCreditLimitResponse = xmlTextReaderReadNs0SubscriptionWithCreditLimitResponseType(reader); } #if DEBUG_ENUNCIATE if (_subscriptionWithCreditLimitResponse == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}subscriptionWithCreditLimitResponse failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}subscriptionWithCreditLimitResponse failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _subscriptionWithCreditLimitResponse; } /** * Writes a SubscriptionWithCreditLimitResponse to XML under element name "subscriptionWithCreditLimitResponse". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitResponseElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse) { return xmlTextWriterWriteNs0SubscriptionWithCreditLimitResponseElementNS(writer, _subscriptionWithCreditLimitResponse, 0); } /** * Writes a SubscriptionWithCreditLimitResponse to XML under element name "subscriptionWithCreditLimitResponse". * * @param writer The XML writer. * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitResponseElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionWithCreditLimitResponse", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}subscriptionWithCreditLimitResponse. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}subscriptionWithCreditLimitResponse for root element {}subscriptionWithCreditLimitResponse...\n"); #endif status = xmlTextWriterWriteNs0SubscriptionWithCreditLimitResponseType(writer, _subscriptionWithCreditLimitResponse); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}subscriptionWithCreditLimitResponse. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}subscriptionWithCreditLimitResponse. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a SubscriptionWithCreditLimitResponse. * * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse whose children are to be free. */ static void freeNs0SubscriptionWithCreditLimitResponseElement(struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse) { freeNs0SubscriptionWithCreditLimitResponseType(_subscriptionWithCreditLimitResponse); } /** * Reads a SubscriptionWithCreditLimitResponse from XML. The reader is assumed to be at the start element. * * @return the SubscriptionWithCreditLimitResponse, or NULL in case of error. */ static struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *xmlTextReaderReadNs0SubscriptionWithCreditLimitResponseType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse = calloc(1, sizeof(struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0SubscriptionWithCreditLimitResponseType(_subscriptionWithCreditLimitResponse); free(_subscriptionWithCreditLimitResponse); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitResponseType(_subscriptionWithCreditLimitResponse); free(_subscriptionWithCreditLimitResponse); return NULL; } _subscriptionWithCreditLimitResponse->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accepted", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}accepted of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif _child_accessor = xmlTextReaderReadXsBooleanType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}accepted of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitResponseType(_subscriptionWithCreditLimitResponse); free(_subscriptionWithCreditLimitResponse); return NULL; } _subscriptionWithCreditLimitResponse->accepted = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}subscriptionId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}subscriptionId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitResponseType(_subscriptionWithCreditLimitResponse); free(_subscriptionWithCreditLimitResponse); return NULL; } _subscriptionWithCreditLimitResponse->subscriptionId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}status of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}status of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0SubscriptionWithCreditLimitResponseType(_subscriptionWithCreditLimitResponse); free(_subscriptionWithCreditLimitResponse); return NULL; } _subscriptionWithCreditLimitResponse->status = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}subscriptionWithCreditLimitResponse. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}subscriptionWithCreditLimitResponse. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _subscriptionWithCreditLimitResponse; } /** * Writes a SubscriptionWithCreditLimitResponse to XML. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0SubscriptionWithCreditLimitResponseType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_subscriptionWithCreditLimitResponse->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subscriptionWithCreditLimitResponse->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitResponse->accepted != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accepted", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}accepted. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}accepted...\n"); #endif status = xmlTextWriterWriteXsBooleanType(writer, (_subscriptionWithCreditLimitResponse->accepted)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}accepted. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}accepted. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitResponse->subscriptionId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}subscriptionId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}subscriptionId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subscriptionWithCreditLimitResponse->subscriptionId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}subscriptionId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}subscriptionId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_subscriptionWithCreditLimitResponse->status != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}status. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}status...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_subscriptionWithCreditLimitResponse->status)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}status. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}status. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a SubscriptionWithCreditLimitResponse. * * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to free. */ static void freeNs0SubscriptionWithCreditLimitResponseType(struct novaglobalapi_ns0_subscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse) { int i; if (_subscriptionWithCreditLimitResponse->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_subscriptionWithCreditLimitResponse...\n"); #endif freeXsStringType(_subscriptionWithCreditLimitResponse->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_subscriptionWithCreditLimitResponse...\n"); #endif free(_subscriptionWithCreditLimitResponse->requestId); } if (_subscriptionWithCreditLimitResponse->accepted != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor accepted of type novaglobalapi_ns0_subscriptionWithCreditLimitResponse...\n"); #endif freeXsBooleanType(_subscriptionWithCreditLimitResponse->accepted); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor accepted of type novaglobalapi_ns0_subscriptionWithCreditLimitResponse...\n"); #endif free(_subscriptionWithCreditLimitResponse->accepted); } if (_subscriptionWithCreditLimitResponse->subscriptionId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor subscriptionId of type novaglobalapi_ns0_subscriptionWithCreditLimitResponse...\n"); #endif freeXsStringType(_subscriptionWithCreditLimitResponse->subscriptionId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subscriptionId of type novaglobalapi_ns0_subscriptionWithCreditLimitResponse...\n"); #endif free(_subscriptionWithCreditLimitResponse->subscriptionId); } if (_subscriptionWithCreditLimitResponse->status != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor status of type novaglobalapi_ns0_subscriptionWithCreditLimitResponse...\n"); #endif freeXsStringType(_subscriptionWithCreditLimitResponse->status); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor status of type novaglobalapi_ns0_subscriptionWithCreditLimitResponse...\n"); #endif free(_subscriptionWithCreditLimitResponse->status); } } #endif /* DEF_novaglobalapi_ns0_subscriptionWithCreditLimitResponse_M */ #ifndef DEF_novaglobalapi_ns0_terminateCustomerSubscriptionResponse_M #define DEF_novaglobalapi_ns0_terminateCustomerSubscriptionResponse_M /** * Reads a TerminateCustomerSubscriptionResponse element from XML. The element to be read is "terminateCustomerSubscriptionResponse", and * it is assumed that the reader is pointing to the XML document (not the element). * * @param reader The XML reader. * @return The TerminateCustomerSubscriptionResponse, or NULL in case of error. */ struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *xml_read_novaglobalapi_ns0_terminateCustomerSubscriptionResponse(xmlTextReaderPtr reader) { int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); return xmlTextReaderReadNs0TerminateCustomerSubscriptionResponseElement(reader); } /** * Writes a TerminateCustomerSubscriptionResponse to XML under element name "terminateCustomerSubscriptionResponse". * * @param writer The XML writer. * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to write. * @return 1 if successful, 0 otherwise. */ int xml_write_novaglobalapi_ns0_terminateCustomerSubscriptionResponse(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse) { return xmlTextWriterWriteNs0TerminateCustomerSubscriptionResponseElementNS(writer, _terminateCustomerSubscriptionResponse, 1); } /** * Frees a TerminateCustomerSubscriptionResponse. * * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to free. */ void free_novaglobalapi_ns0_terminateCustomerSubscriptionResponse(struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse) { freeNs0TerminateCustomerSubscriptionResponseType(_terminateCustomerSubscriptionResponse); free(_terminateCustomerSubscriptionResponse); } /** * Reads a TerminateCustomerSubscriptionResponse element from XML. The element to be read is "terminateCustomerSubscriptionResponse", and * it is assumed that the reader is pointing to that element. * * @param reader The XML reader. * @return The TerminateCustomerSubscriptionResponse, or NULL in case of error. */ struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *xmlTextReaderReadNs0TerminateCustomerSubscriptionResponseElement(xmlTextReaderPtr reader) { struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse = NULL; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminateCustomerSubscriptionResponse", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read root element {}terminateCustomerSubscriptionResponse.\n"); #endif _terminateCustomerSubscriptionResponse = xmlTextReaderReadNs0TerminateCustomerSubscriptionResponseType(reader); } #if DEBUG_ENUNCIATE if (_terminateCustomerSubscriptionResponse == NULL) { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("attempt to read {}terminateCustomerSubscriptionResponse failed. current element: {}%s\n", xmlTextReaderConstLocalName(reader)); } else { printf("attempt to read {}terminateCustomerSubscriptionResponse failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } } #endif return _terminateCustomerSubscriptionResponse; } /** * Writes a TerminateCustomerSubscriptionResponse to XML under element name "terminateCustomerSubscriptionResponse". * Does NOT write the namespace prefixes. * * @param writer The XML writer. * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to write. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0TerminateCustomerSubscriptionResponseElement(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse) { return xmlTextWriterWriteNs0TerminateCustomerSubscriptionResponseElementNS(writer, _terminateCustomerSubscriptionResponse, 0); } /** * Writes a TerminateCustomerSubscriptionResponse to XML under element name "terminateCustomerSubscriptionResponse". * * @param writer The XML writer. * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to write. * @param writeNamespaces Whether to write the namespace prefixes. * @return 1 if successful, 0 otherwise. */ static int xmlTextWriterWriteNs0TerminateCustomerSubscriptionResponseElementNS(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse, int writeNamespaces) { int totalBytes = 0; int status; status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminateCustomerSubscriptionResponse", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write start element {}terminateCustomerSubscriptionResponse. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {}terminateCustomerSubscriptionResponse for root element {}terminateCustomerSubscriptionResponse...\n"); #endif status = xmlTextWriterWriteNs0TerminateCustomerSubscriptionResponseType(writer, _terminateCustomerSubscriptionResponse); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to write type for start element {}terminateCustomerSubscriptionResponse. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("unable to end element {}terminateCustomerSubscriptionResponse. status: %i\n", status); #endif return status; } totalBytes += status; return totalBytes; } /** * Frees the children of a TerminateCustomerSubscriptionResponse. * * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse whose children are to be free. */ static void freeNs0TerminateCustomerSubscriptionResponseElement(struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse) { freeNs0TerminateCustomerSubscriptionResponseType(_terminateCustomerSubscriptionResponse); } /** * Reads a TerminateCustomerSubscriptionResponse from XML. The reader is assumed to be at the start element. * * @return the TerminateCustomerSubscriptionResponse, or NULL in case of error. */ static struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *xmlTextReaderReadNs0TerminateCustomerSubscriptionResponseType(xmlTextReaderPtr reader) { int status, depth; void *_child_accessor; struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse = calloc(1, sizeof(struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse)); if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. #if DEBUG_ENUNCIATE printf("Failure to advance to next child element.\n"); #endif freeNs0TerminateCustomerSubscriptionResponseType(_terminateCustomerSubscriptionResponse); free(_terminateCustomerSubscriptionResponse); return NULL; } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminateCustomerSubscriptionResponseType(_terminateCustomerSubscriptionResponse); free(_terminateCustomerSubscriptionResponse); return NULL; } _terminateCustomerSubscriptionResponse->requestId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accepted", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}accepted of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif _child_accessor = xmlTextReaderReadXsBooleanType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}accepted of type {http://www.w3.org/2001/XMLSchema}boolean.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminateCustomerSubscriptionResponseType(_terminateCustomerSubscriptionResponse); free(_terminateCustomerSubscriptionResponse); return NULL; } _terminateCustomerSubscriptionResponse->accepted = ((int*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}subscriptionId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}subscriptionId of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminateCustomerSubscriptionResponseType(_terminateCustomerSubscriptionResponse); free(_terminateCustomerSubscriptionResponse); return NULL; } _terminateCustomerSubscriptionResponse->subscriptionId = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 printf("Attempting to read choice {}status of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif _child_accessor = xmlTextReaderReadXsStringType(reader); if (_child_accessor == NULL) { #if DEBUG_ENUNCIATE printf("Failed to read choice {}status of type {http://www.w3.org/2001/XMLSchema}string.\n"); #endif //panic: unable to read the child element for some reason. freeNs0TerminateCustomerSubscriptionResponseType(_terminateCustomerSubscriptionResponse); free(_terminateCustomerSubscriptionResponse); return NULL; } _terminateCustomerSubscriptionResponse->status = ((xmlChar*)_child_accessor); status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { #if DEBUG_ENUNCIATE > 1 if (xmlTextReaderConstNamespaceUri(reader) == NULL) { printf("unknown child element {}%s for type {}terminateCustomerSubscriptionResponse. Skipping...\n", xmlTextReaderConstLocalName(reader)); } else { printf("unknown child element {%s}%s for type {}terminateCustomerSubscriptionResponse. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)); } #endif status = xmlTextReaderSkipElement(reader); } } } return _terminateCustomerSubscriptionResponse; } /** * Writes a TerminateCustomerSubscriptionResponse to XML. * * @param writer The XML writer. * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to write. * @return The total bytes written, or -1 on error; */ static int xmlTextWriterWriteNs0TerminateCustomerSubscriptionResponseType(xmlTextWriterPtr writer, struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse) { int status, totalBytes = 0, i; xmlChar *binaryData; if (_terminateCustomerSubscriptionResponse->requestId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}requestId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_terminateCustomerSubscriptionResponse->requestId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}requestId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminateCustomerSubscriptionResponse->accepted != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accepted", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}accepted. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}accepted...\n"); #endif status = xmlTextWriterWriteXsBooleanType(writer, (_terminateCustomerSubscriptionResponse->accepted)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}accepted. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}accepted. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminateCustomerSubscriptionResponse->subscriptionId != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionId", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}subscriptionId. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}subscriptionId...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_terminateCustomerSubscriptionResponse->subscriptionId)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}subscriptionId. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}subscriptionId. status: %i\n", status); #endif return status; } totalBytes += status; } if (_terminateCustomerSubscriptionResponse->status != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write start element {}status. status: %i\n", status); #endif return status; } totalBytes += status; #if DEBUG_ENUNCIATE > 1 printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}status...\n"); #endif status = xmlTextWriterWriteXsStringType(writer, (_terminateCustomerSubscriptionResponse->status)); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}status. status: %i\n", status); #endif return status; } totalBytes += status; status = xmlTextWriterEndElement(writer); if (status < 0) { #if DEBUG_ENUNCIATE printf("Failed to write end element {}status. status: %i\n", status); #endif return status; } totalBytes += status; } return totalBytes; } /** * Frees the elements of a TerminateCustomerSubscriptionResponse. * * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to free. */ static void freeNs0TerminateCustomerSubscriptionResponseType(struct novaglobalapi_ns0_terminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse) { int i; if (_terminateCustomerSubscriptionResponse->requestId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor requestId of type novaglobalapi_ns0_terminateCustomerSubscriptionResponse...\n"); #endif freeXsStringType(_terminateCustomerSubscriptionResponse->requestId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor requestId of type novaglobalapi_ns0_terminateCustomerSubscriptionResponse...\n"); #endif free(_terminateCustomerSubscriptionResponse->requestId); } if (_terminateCustomerSubscriptionResponse->accepted != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor accepted of type novaglobalapi_ns0_terminateCustomerSubscriptionResponse...\n"); #endif freeXsBooleanType(_terminateCustomerSubscriptionResponse->accepted); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor accepted of type novaglobalapi_ns0_terminateCustomerSubscriptionResponse...\n"); #endif free(_terminateCustomerSubscriptionResponse->accepted); } if (_terminateCustomerSubscriptionResponse->subscriptionId != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor subscriptionId of type novaglobalapi_ns0_terminateCustomerSubscriptionResponse...\n"); #endif freeXsStringType(_terminateCustomerSubscriptionResponse->subscriptionId); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor subscriptionId of type novaglobalapi_ns0_terminateCustomerSubscriptionResponse...\n"); #endif free(_terminateCustomerSubscriptionResponse->subscriptionId); } if (_terminateCustomerSubscriptionResponse->status != NULL) { #if DEBUG_ENUNCIATE > 1 printf("Freeing type of accessor status of type novaglobalapi_ns0_terminateCustomerSubscriptionResponse...\n"); #endif freeXsStringType(_terminateCustomerSubscriptionResponse->status); #if DEBUG_ENUNCIATE > 1 printf("Freeing accessor status of type novaglobalapi_ns0_terminateCustomerSubscriptionResponse...\n"); #endif free(_terminateCustomerSubscriptionResponse->status); } } #endif /* DEF_novaglobalapi_ns0_terminateCustomerSubscriptionResponse_M */