#import "novaglobalapi.h" #ifndef DEF_NOVAGLOBALAPINS0AccountOperationDto_M #define DEF_NOVAGLOBALAPINS0AccountOperationDto_M /** * (no documentation provided) */ @implementation NOVAGLOBALAPINS0AccountOperationDto /** * (no documentation provided) */ - (NSDate *) dueDate { return _dueDate; } /** * (no documentation provided) */ - (void) setDueDate: (NSDate *) newDueDate { [newDueDate retain]; [_dueDate release]; _dueDate = newDueDate; } /** * (no documentation provided) */ - (NSString *) type { return _type; } /** * (no documentation provided) */ - (void) setType: (NSString *) newType { [newType retain]; [_type release]; _type = newType; } /** * (no documentation provided) */ - (NSDate *) transactionDate { return _transactionDate; } /** * (no documentation provided) */ - (void) setTransactionDate: (NSDate *) newTransactionDate { [newTransactionDate retain]; [_transactionDate release]; _transactionDate = newTransactionDate; } /** * (no documentation provided) */ - (NSString *) transactionCategory { return _transactionCategory; } /** * (no documentation provided) */ - (void) setTransactionCategory: (NSString *) newTransactionCategory { [newTransactionCategory retain]; [_transactionCategory release]; _transactionCategory = newTransactionCategory; } /** * (no documentation provided) */ - (NSString *) reference { return _reference; } /** * (no documentation provided) */ - (void) setReference: (NSString *) newReference { [newReference retain]; [_reference release]; _reference = newReference; } /** * (no documentation provided) */ - (NSString *) accountCode { return _accountCode; } /** * (no documentation provided) */ - (void) setAccountCode: (NSString *) newAccountCode { [newAccountCode retain]; [_accountCode release]; _accountCode = newAccountCode; } /** * (no documentation provided) */ - (NSString *) accountCodeClientSide { return _accountCodeClientSide; } /** * (no documentation provided) */ - (void) setAccountCodeClientSide: (NSString *) newAccountCodeClientSide { [newAccountCodeClientSide retain]; [_accountCodeClientSide release]; _accountCodeClientSide = newAccountCodeClientSide; } /** * (no documentation provided) */ - (NSDecimalNumber *) amount { return _amount; } /** * (no documentation provided) */ - (void) setAmount: (NSDecimalNumber *) newAmount { [newAmount retain]; [_amount release]; _amount = newAmount; } /** * (no documentation provided) */ - (NSDecimalNumber *) matchingAmount { return _matchingAmount; } /** * (no documentation provided) */ - (void) setMatchingAmount: (NSDecimalNumber *) newMatchingAmount { [newMatchingAmount retain]; [_matchingAmount release]; _matchingAmount = newMatchingAmount; } /** * (no documentation provided) */ - (NSDecimalNumber *) unMatchingAmount { return _unMatchingAmount; } /** * (no documentation provided) */ - (void) setUnMatchingAmount: (NSDecimalNumber *) newUnMatchingAmount { [newUnMatchingAmount retain]; [_unMatchingAmount release]; _unMatchingAmount = newUnMatchingAmount; } /** * (no documentation provided) */ - (NSString *) matchingStatus { return _matchingStatus; } /** * (no documentation provided) */ - (void) setMatchingStatus: (NSString *) newMatchingStatus { [newMatchingStatus retain]; [_matchingStatus release]; _matchingStatus = newMatchingStatus; } /** * (no documentation provided) */ - (NSArray *) matchingAmounts { return _matchingAmounts; } /** * (no documentation provided) */ - (void) setMatchingAmounts: (NSArray *) newMatchingAmounts { [newMatchingAmounts retain]; [_matchingAmounts release]; _matchingAmounts = newMatchingAmounts; } /** * (no documentation provided) */ - (NSString *) occCode { return _occCode; } /** * (no documentation provided) */ - (void) setOccCode: (NSString *) newOccCode { [newOccCode retain]; [_occCode release]; _occCode = newOccCode; } /** * (no documentation provided) */ - (NSString *) occDescription { return _occDescription; } /** * (no documentation provided) */ - (void) setOccDescription: (NSString *) newOccDescription { [newOccDescription retain]; [_occDescription release]; _occDescription = newOccDescription; } - (void) dealloc { [self setDueDate: nil]; [self setType: nil]; [self setTransactionDate: nil]; [self setTransactionCategory: nil]; [self setReference: nil]; [self setAccountCode: nil]; [self setAccountCodeClientSide: nil]; [self setAmount: nil]; [self setMatchingAmount: nil]; [self setUnMatchingAmount: nil]; [self setMatchingStatus: nil]; [self setMatchingAmounts: nil]; [self setOccCode: nil]; [self setOccDescription: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0AccountOperationDto *_nOVAGLOBALAPINS0AccountOperationDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0AccountOperationDto = (NOVAGLOBALAPINS0AccountOperationDto *) [NOVAGLOBALAPINS0AccountOperationDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0AccountOperationDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0AccountOperationDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0AccountOperationDto (JAXB) @end /*interface NOVAGLOBALAPINS0AccountOperationDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0AccountOperationDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0AccountOperationDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0AccountOperationDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0AccountOperationDto *_nOVAGLOBALAPINS0AccountOperationDto = [[NOVAGLOBALAPINS0AccountOperationDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0AccountOperationDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0AccountOperationDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0AccountOperationDto autorelease]; return _nOVAGLOBALAPINS0AccountOperationDto; } /** * Initialize this instance of NOVAGLOBALAPINS0AccountOperationDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0AccountOperationDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0AccountOperationDto from an XML reader. The element to be read is * "accountOperation". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0AccountOperationDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0AccountOperationDto *_accountOperationDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element accountOperation."]; } } if (xmlStrcmp(BAD_CAST "accountOperation", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}accountOperation."); #endif _accountOperationDto = (NOVAGLOBALAPINS0AccountOperationDto *)[NOVAGLOBALAPINS0AccountOperationDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}accountOperation."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0AccountOperationDto. Expected element accountOperation. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0AccountOperationDto. Expected element accountOperation. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _accountOperationDto; } /** * Writes this NOVAGLOBALAPINS0AccountOperationDto to XML under element name "accountOperation". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _accountOperationDto The AccountOperationDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0AccountOperationDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accountOperation", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}accountOperation. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}accountOperationDto for root element {}accountOperation..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}accountOperationDto for root element {}accountOperation..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}accountOperation. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "dueDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}dueDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}dueDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setDueDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "type", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}type of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}type of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setType: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "transactionDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}transactionDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}transactionDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setTransactionDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "transactionCategory", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}transactionCategory of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}transactionCategory of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTransactionCategory: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "reference", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}reference of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}reference of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setReference: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accountCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}accountCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}accountCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setAccountCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accountCodeClientSide", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}accountCodeClientSide of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}accountCodeClientSide of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setAccountCodeClientSide: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmount: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "matchingAmount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}matchingAmount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}matchingAmount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setMatchingAmount: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "unMatchingAmount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}unMatchingAmount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}unMatchingAmount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setUnMatchingAmount: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "matchingStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}matchingStatus of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}matchingStatus of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setMatchingStatus: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "matchingAmounts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}matchingAmounts of type {}matchingAmountDto."); #endif __child = [NOVAGLOBALAPINS0MatchingAmountDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}matchingAmounts of type {}matchingAmountDto."); #endif if ([self matchingAmounts]) { [self setMatchingAmounts: [[self matchingAmounts] arrayByAddingObject: __child]]; } else { [self setMatchingAmounts: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "occCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}occCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}occCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setOccCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "occDescription", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}occDescription of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}occDescription of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setOccDescription: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self dueDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dueDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}dueDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}dueDate..."); #endif [[self dueDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}dueDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}dueDate."]; } } if ([self type]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "type", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}type."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}type..."); #endif [[self type] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}type..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}type."]; } } if ([self transactionDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "transactionDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}transactionDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}transactionDate..."); #endif [[self transactionDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}transactionDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}transactionDate."]; } } if ([self transactionCategory]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "transactionCategory", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}transactionCategory."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}transactionCategory..."); #endif [[self transactionCategory] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}transactionCategory..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}transactionCategory."]; } } if ([self reference]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "reference", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}reference."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}reference..."); #endif [[self reference] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}reference..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}reference."]; } } if ([self accountCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accountCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}accountCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}accountCode..."); #endif [[self accountCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}accountCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}accountCode."]; } } if ([self accountCodeClientSide]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accountCodeClientSide", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}accountCodeClientSide."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}accountCodeClientSide..."); #endif [[self accountCodeClientSide] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}accountCodeClientSide..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}accountCodeClientSide."]; } } if ([self amount]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amount", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amount."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amount..."); #endif [[self amount] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amount..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amount."]; } } if ([self matchingAmount]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "matchingAmount", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}matchingAmount."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}matchingAmount..."); #endif [[self matchingAmount] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}matchingAmount..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}matchingAmount."]; } } if ([self unMatchingAmount]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "unMatchingAmount", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}unMatchingAmount."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}unMatchingAmount..."); #endif [[self unMatchingAmount] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}unMatchingAmount..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}unMatchingAmount."]; } } if ([self matchingStatus]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "matchingStatus", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}matchingStatus."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}matchingStatus..."); #endif [[self matchingStatus] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}matchingStatus..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}matchingStatus."]; } } if ([self matchingAmounts]) { __enumerator = [[self matchingAmounts] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "matchingAmounts", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}matchingAmounts."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}matchingAmounts..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}matchingAmounts..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}matchingAmounts."]; } } //end item iterator. } if ([self occCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "occCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}occCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}occCode..."); #endif [[self occCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}occCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}occCode."]; } } if ([self occDescription]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "occDescription", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}occDescription."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}occDescription..."); #endif [[self occDescription] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}occDescription..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}occDescription."]; } } } @end /* implementation NOVAGLOBALAPINS0AccountOperationDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0AccountOperationDto_M */ #ifndef DEF_NOVAGLOBALAPINS0DescriptionDto_M #define DEF_NOVAGLOBALAPINS0DescriptionDto_M /** * @author Edward P. Legaspi @since Oct 16, 2013 */ @implementation NOVAGLOBALAPINS0DescriptionDto /** * (no documentation provided) */ - (NSString *) languageCode { return _languageCode; } /** * (no documentation provided) */ - (void) setLanguageCode: (NSString *) newLanguageCode { [newLanguageCode retain]; [_languageCode release]; _languageCode = newLanguageCode; } /** * (no documentation provided) */ - (NSString *) description { return _description; } /** * (no documentation provided) */ - (void) setDescription: (NSString *) newDescription { [newDescription retain]; [_description release]; _description = newDescription; } - (void) dealloc { [self setLanguageCode: nil]; [self setDescription: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0DescriptionDto *_nOVAGLOBALAPINS0DescriptionDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0DescriptionDto = (NOVAGLOBALAPINS0DescriptionDto *) [NOVAGLOBALAPINS0DescriptionDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0DescriptionDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0DescriptionDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0DescriptionDto (JAXB) @end /*interface NOVAGLOBALAPINS0DescriptionDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0DescriptionDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0DescriptionDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0DescriptionDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0DescriptionDto *_nOVAGLOBALAPINS0DescriptionDto = [[NOVAGLOBALAPINS0DescriptionDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0DescriptionDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0DescriptionDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0DescriptionDto autorelease]; return _nOVAGLOBALAPINS0DescriptionDto; } /** * Initialize this instance of NOVAGLOBALAPINS0DescriptionDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0DescriptionDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0DescriptionDto from an XML reader. The element to be read is * "description". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0DescriptionDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0DescriptionDto *_descriptionDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element description."]; } } if (xmlStrcmp(BAD_CAST "description", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}description."); #endif _descriptionDto = (NOVAGLOBALAPINS0DescriptionDto *)[NOVAGLOBALAPINS0DescriptionDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}description."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0DescriptionDto. Expected element description. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0DescriptionDto. Expected element description. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _descriptionDto; } /** * Writes this NOVAGLOBALAPINS0DescriptionDto to XML under element name "description". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _descriptionDto The DescriptionDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0DescriptionDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}description. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}descriptionDto for root element {}description..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}descriptionDto for root element {}description..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}description. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "languageCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setLanguageCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "description", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}description of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setDescription: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self languageCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "languageCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}languageCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}languageCode..."); #endif [[self languageCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}languageCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}languageCode."]; } } if ([self description]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}description."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}description..."); #endif [[self description] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}description..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}description."]; } } } @end /* implementation NOVAGLOBALAPINS0DescriptionDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0DescriptionDto_M */ #ifndef DEF_NOVAGLOBALAPINS0OneShotChargeTemplateDto_M #define DEF_NOVAGLOBALAPINS0OneShotChargeTemplateDto_M /** * @author Edward P. Legaspi */ @implementation NOVAGLOBALAPINS0OneShotChargeTemplateDto /** * (no documentation provided) */ - (NSString *) chargeCode { return _chargeCode; } /** * (no documentation provided) */ - (void) setChargeCode: (NSString *) newChargeCode { [newChargeCode retain]; [_chargeCode release]; _chargeCode = newChargeCode; } /** * (no documentation provided) */ - (NSString *) description { return _description; } /** * (no documentation provided) */ - (void) setDescription: (NSString *) newDescription { [newDescription retain]; [_description release]; _description = newDescription; } /** * (no documentation provided) */ - (double *) unitPriceWithoutTax { return _unitPriceWithoutTax; } /** * (no documentation provided) */ - (void) setUnitPriceWithoutTax: (double *) newUnitPriceWithoutTax { if (_unitPriceWithoutTax != NULL) { free(_unitPriceWithoutTax); } _unitPriceWithoutTax = newUnitPriceWithoutTax; } /** * (no documentation provided) */ - (double *) taxPercent { return _taxPercent; } /** * (no documentation provided) */ - (void) setTaxPercent: (double *) newTaxPercent { if (_taxPercent != NULL) { free(_taxPercent); } _taxPercent = newTaxPercent; } /** * (no documentation provided) */ - (NSString *) taxCode { return _taxCode; } /** * (no documentation provided) */ - (void) setTaxCode: (NSString *) newTaxCode { [newTaxCode retain]; [_taxCode release]; _taxCode = newTaxCode; } /** * (no documentation provided) */ - (NSString *) taxDescription { return _taxDescription; } /** * (no documentation provided) */ - (void) setTaxDescription: (NSString *) newTaxDescription { [newTaxDescription retain]; [_taxDescription release]; _taxDescription = newTaxDescription; } - (void) dealloc { [self setChargeCode: nil]; [self setDescription: nil]; [self setUnitPriceWithoutTax: NULL]; [self setTaxPercent: NULL]; [self setTaxCode: nil]; [self setTaxDescription: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0OneShotChargeTemplateDto *_nOVAGLOBALAPINS0OneShotChargeTemplateDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0OneShotChargeTemplateDto = (NOVAGLOBALAPINS0OneShotChargeTemplateDto *) [NOVAGLOBALAPINS0OneShotChargeTemplateDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0OneShotChargeTemplateDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0OneShotChargeTemplateDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0OneShotChargeTemplateDto (JAXB) @end /*interface NOVAGLOBALAPINS0OneShotChargeTemplateDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0OneShotChargeTemplateDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0OneShotChargeTemplateDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0OneShotChargeTemplateDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0OneShotChargeTemplateDto *_nOVAGLOBALAPINS0OneShotChargeTemplateDto = [[NOVAGLOBALAPINS0OneShotChargeTemplateDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0OneShotChargeTemplateDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0OneShotChargeTemplateDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0OneShotChargeTemplateDto autorelease]; return _nOVAGLOBALAPINS0OneShotChargeTemplateDto; } /** * Initialize this instance of NOVAGLOBALAPINS0OneShotChargeTemplateDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0OneShotChargeTemplateDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0OneShotChargeTemplateDto from an XML reader. The element to be read is * "oneShotChargeTemplate". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0OneShotChargeTemplateDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0OneShotChargeTemplateDto *_oneShotChargeTemplateDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element oneShotChargeTemplate."]; } } if (xmlStrcmp(BAD_CAST "oneShotChargeTemplate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}oneShotChargeTemplate."); #endif _oneShotChargeTemplateDto = (NOVAGLOBALAPINS0OneShotChargeTemplateDto *)[NOVAGLOBALAPINS0OneShotChargeTemplateDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}oneShotChargeTemplate."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0OneShotChargeTemplateDto. Expected element oneShotChargeTemplate. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0OneShotChargeTemplateDto. Expected element oneShotChargeTemplate. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _oneShotChargeTemplateDto; } /** * Writes this NOVAGLOBALAPINS0OneShotChargeTemplateDto to XML under element name "oneShotChargeTemplate". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _oneShotChargeTemplateDto The OneShotChargeTemplateDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0OneShotChargeTemplateDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oneShotChargeTemplate", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}oneShotChargeTemplate. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}oneShotChargeTemplateDto for root element {}oneShotChargeTemplate..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}oneShotChargeTemplateDto for root element {}oneShotChargeTemplate..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}oneShotChargeTemplate. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "chargeCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}chargeCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}chargeCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setChargeCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "description", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}description of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setDescription: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "unitPriceWithoutTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadDoubleType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setUnitPriceWithoutTax: ((double*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxPercent", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadDoubleType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setTaxPercent: ((double*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}taxCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}taxCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTaxCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxDescription", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}taxDescription of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}taxDescription of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTaxDescription: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self chargeCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "chargeCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}chargeCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}chargeCode..."); #endif [[self chargeCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}chargeCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}chargeCode."]; } } if ([self description]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}description."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}description..."); #endif [[self description] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}description..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}description."]; } } if ([self unitPriceWithoutTax] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "unitPriceWithoutTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}unitPriceWithoutTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}unitPriceWithoutTax..."); #endif status = xmlTextWriterWriteDoubleType(writer, [self unitPriceWithoutTax]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}unitPriceWithoutTax..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}unitPriceWithoutTax."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}unitPriceWithoutTax."]; } } if ([self taxPercent] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxPercent", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}taxPercent."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}taxPercent..."); #endif status = xmlTextWriterWriteDoubleType(writer, [self taxPercent]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}taxPercent..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}taxPercent."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}taxPercent."]; } } if ([self taxCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}taxCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}taxCode..."); #endif [[self taxCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}taxCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}taxCode."]; } } if ([self taxDescription]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxDescription", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}taxDescription."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}taxDescription..."); #endif [[self taxDescription] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}taxDescription..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}taxDescription."]; } } } @end /* implementation NOVAGLOBALAPINS0OneShotChargeTemplateDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0OneShotChargeTemplateDto_M */ #ifndef DEF_NOVAGLOBALAPINS0RecurringChargeDto_M #define DEF_NOVAGLOBALAPINS0RecurringChargeDto_M /** * @author Edward P. Legaspi @since Nov 4, 2013 */ @implementation NOVAGLOBALAPINS0RecurringChargeDto /** * (no documentation provided) */ - (NSString *) currencyCode { return _currencyCode; } /** * (no documentation provided) */ - (void) setCurrencyCode: (NSString *) newCurrencyCode { [newCurrencyCode retain]; [_currencyCode release]; _currencyCode = newCurrencyCode; } /** * (no documentation provided) */ - (NSDate *) startDate { return _startDate; } /** * (no documentation provided) */ - (void) setStartDate: (NSDate *) newStartDate { [newStartDate retain]; [_startDate release]; _startDate = newStartDate; } /** * (no documentation provided) */ - (NSDate *) endDate { return _endDate; } /** * (no documentation provided) */ - (void) setEndDate: (NSDate *) newEndDate { [newEndDate retain]; [_endDate release]; _endDate = newEndDate; } /** * (no documentation provided) */ - (int *) minAge { return _minAge; } /** * (no documentation provided) */ - (void) setMinAge: (int *) newMinAge { if (_minAge != NULL) { free(_minAge); } _minAge = newMinAge; } /** * (no documentation provided) */ - (int *) maxAge { return _maxAge; } /** * (no documentation provided) */ - (void) setMaxAge: (int *) newMaxAge { if (_maxAge != NULL) { free(_maxAge); } _maxAge = newMaxAge; } /** * (no documentation provided) */ - (NSDecimalNumber *) price { return _price; } /** * (no documentation provided) */ - (void) setPrice: (NSDecimalNumber *) newPrice { [newPrice retain]; [_price release]; _price = newPrice; } /** * (no documentation provided) */ - (NSDecimalNumber *) recommendedPrice { return _recommendedPrice; } /** * (no documentation provided) */ - (void) setRecommendedPrice: (NSDecimalNumber *) newRecommendedPrice { [newRecommendedPrice retain]; [_recommendedPrice release]; _recommendedPrice = newRecommendedPrice; } - (void) dealloc { [self setCurrencyCode: nil]; [self setStartDate: nil]; [self setEndDate: nil]; [self setMinAge: NULL]; [self setMaxAge: NULL]; [self setPrice: nil]; [self setRecommendedPrice: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0RecurringChargeDto *_nOVAGLOBALAPINS0RecurringChargeDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0RecurringChargeDto = (NOVAGLOBALAPINS0RecurringChargeDto *) [NOVAGLOBALAPINS0RecurringChargeDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0RecurringChargeDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0RecurringChargeDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0RecurringChargeDto (JAXB) @end /*interface NOVAGLOBALAPINS0RecurringChargeDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0RecurringChargeDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0RecurringChargeDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0RecurringChargeDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0RecurringChargeDto *_nOVAGLOBALAPINS0RecurringChargeDto = [[NOVAGLOBALAPINS0RecurringChargeDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0RecurringChargeDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0RecurringChargeDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0RecurringChargeDto autorelease]; return _nOVAGLOBALAPINS0RecurringChargeDto; } /** * Initialize this instance of NOVAGLOBALAPINS0RecurringChargeDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0RecurringChargeDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0RecurringChargeDto from an XML reader. The element to be read is * "recurringCharge". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0RecurringChargeDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0RecurringChargeDto *_recurringChargeDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element recurringCharge."]; } } if (xmlStrcmp(BAD_CAST "recurringCharge", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}recurringCharge."); #endif _recurringChargeDto = (NOVAGLOBALAPINS0RecurringChargeDto *)[NOVAGLOBALAPINS0RecurringChargeDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}recurringCharge."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0RecurringChargeDto. Expected element recurringCharge. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0RecurringChargeDto. Expected element recurringCharge. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _recurringChargeDto; } /** * Writes this NOVAGLOBALAPINS0RecurringChargeDto to XML under element name "recurringCharge". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _recurringChargeDto The RecurringChargeDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0RecurringChargeDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recurringCharge", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}recurringCharge. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}recurringChargeDto for root element {}recurringCharge..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}recurringChargeDto for root element {}recurringCharge..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}recurringCharge. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currencyCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCurrencyCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "startDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setStartDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "endDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setEndDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "minAge", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setMinAge: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "maxAge", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setMaxAge: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "price", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setPrice: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recommendedPrice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setRecommendedPrice: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self currencyCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currencyCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}currencyCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}currencyCode..."); #endif [[self currencyCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}currencyCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}currencyCode."]; } } if ([self startDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "startDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}startDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}startDate..."); #endif [[self startDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}startDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}startDate."]; } } if ([self endDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}endDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}endDate..."); #endif [[self endDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}endDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}endDate."]; } } if ([self minAge] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "minAge", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}minAge."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}minAge..."); #endif status = xmlTextWriterWriteIntType(writer, [self minAge]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}minAge..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}minAge."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}minAge."]; } } if ([self maxAge] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "maxAge", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}maxAge."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}maxAge..."); #endif status = xmlTextWriterWriteIntType(writer, [self maxAge]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}maxAge..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}maxAge."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}maxAge."]; } } if ([self price]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "price", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}price."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}price..."); #endif [[self price] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}price..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}price."]; } } if ([self recommendedPrice]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recommendedPrice", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}recommendedPrice."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}recommendedPrice..."); #endif [[self recommendedPrice] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}recommendedPrice..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}recommendedPrice."]; } } } @end /* implementation NOVAGLOBALAPINS0RecurringChargeDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0RecurringChargeDto_M */ #ifndef DEF_NOVAGLOBALAPINS0OneShotChargeTemplateListDto_M #define DEF_NOVAGLOBALAPINS0OneShotChargeTemplateListDto_M /** * @author Edward P. Legaspi */ @implementation NOVAGLOBALAPINS0OneShotChargeTemplateListDto /** * (no documentation provided) */ - (NSArray *) oneShotChargeTemplateDtos { return _oneShotChargeTemplateDtos; } /** * (no documentation provided) */ - (void) setOneShotChargeTemplateDtos: (NSArray *) newOneShotChargeTemplateDtos { [newOneShotChargeTemplateDtos retain]; [_oneShotChargeTemplateDtos release]; _oneShotChargeTemplateDtos = newOneShotChargeTemplateDtos; } - (void) dealloc { [self setOneShotChargeTemplateDtos: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0OneShotChargeTemplateListDto *_nOVAGLOBALAPINS0OneShotChargeTemplateListDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0OneShotChargeTemplateListDto = (NOVAGLOBALAPINS0OneShotChargeTemplateListDto *) [NOVAGLOBALAPINS0OneShotChargeTemplateListDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0OneShotChargeTemplateListDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0OneShotChargeTemplateListDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0OneShotChargeTemplateListDto (JAXB) @end /*interface NOVAGLOBALAPINS0OneShotChargeTemplateListDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0OneShotChargeTemplateListDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0OneShotChargeTemplateListDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0OneShotChargeTemplateListDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0OneShotChargeTemplateListDto *_nOVAGLOBALAPINS0OneShotChargeTemplateListDto = [[NOVAGLOBALAPINS0OneShotChargeTemplateListDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0OneShotChargeTemplateListDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0OneShotChargeTemplateListDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0OneShotChargeTemplateListDto autorelease]; return _nOVAGLOBALAPINS0OneShotChargeTemplateListDto; } /** * Initialize this instance of NOVAGLOBALAPINS0OneShotChargeTemplateListDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0OneShotChargeTemplateListDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0OneShotChargeTemplateListDto from an XML reader. The element to be read is * "oneShotChargeTemplateList". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0OneShotChargeTemplateListDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0OneShotChargeTemplateListDto *_oneShotChargeTemplateListDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element oneShotChargeTemplateList."]; } } if (xmlStrcmp(BAD_CAST "oneShotChargeTemplateList", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}oneShotChargeTemplateList."); #endif _oneShotChargeTemplateListDto = (NOVAGLOBALAPINS0OneShotChargeTemplateListDto *)[NOVAGLOBALAPINS0OneShotChargeTemplateListDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}oneShotChargeTemplateList."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0OneShotChargeTemplateListDto. Expected element oneShotChargeTemplateList. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0OneShotChargeTemplateListDto. Expected element oneShotChargeTemplateList. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _oneShotChargeTemplateListDto; } /** * Writes this NOVAGLOBALAPINS0OneShotChargeTemplateListDto to XML under element name "oneShotChargeTemplateList". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _oneShotChargeTemplateListDto The OneShotChargeTemplateListDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0OneShotChargeTemplateListDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oneShotChargeTemplateList", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}oneShotChargeTemplateList. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}oneShotChargeTemplateListDto for root element {}oneShotChargeTemplateList..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}oneShotChargeTemplateListDto for root element {}oneShotChargeTemplateList..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}oneShotChargeTemplateList. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "oneShotChargeTemplateDtos", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}oneShotChargeTemplateDtos of type {}oneShotChargeTemplateDto."); #endif __child = [NOVAGLOBALAPINS0OneShotChargeTemplateDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}oneShotChargeTemplateDtos of type {}oneShotChargeTemplateDto."); #endif if ([self oneShotChargeTemplateDtos]) { [self setOneShotChargeTemplateDtos: [[self oneShotChargeTemplateDtos] arrayByAddingObject: __child]]; } else { [self setOneShotChargeTemplateDtos: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self oneShotChargeTemplateDtos]) { __enumerator = [[self oneShotChargeTemplateDtos] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oneShotChargeTemplateDtos", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}oneShotChargeTemplateDtos."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}oneShotChargeTemplateDtos..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}oneShotChargeTemplateDtos..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}oneShotChargeTemplateDtos."]; } } //end item iterator. } } @end /* implementation NOVAGLOBALAPINS0OneShotChargeTemplateListDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0OneShotChargeTemplateListDto_M */ #ifndef DEF_NOVAGLOBALAPINS0SubscriptionFeeDto_M #define DEF_NOVAGLOBALAPINS0SubscriptionFeeDto_M /** * @author Edward P. Legaspi @since Nov 4, 2013 */ @implementation NOVAGLOBALAPINS0SubscriptionFeeDto /** * (no documentation provided) */ - (NSString *) currencyCode { return _currencyCode; } /** * (no documentation provided) */ - (void) setCurrencyCode: (NSString *) newCurrencyCode { [newCurrencyCode retain]; [_currencyCode release]; _currencyCode = newCurrencyCode; } /** * (no documentation provided) */ - (NSDate *) startDate { return _startDate; } /** * (no documentation provided) */ - (void) setStartDate: (NSDate *) newStartDate { [newStartDate retain]; [_startDate release]; _startDate = newStartDate; } /** * (no documentation provided) */ - (NSDate *) endDate { return _endDate; } /** * (no documentation provided) */ - (void) setEndDate: (NSDate *) newEndDate { [newEndDate retain]; [_endDate release]; _endDate = newEndDate; } /** * (no documentation provided) */ - (NSDecimalNumber *) price { return _price; } /** * (no documentation provided) */ - (void) setPrice: (NSDecimalNumber *) newPrice { [newPrice retain]; [_price release]; _price = newPrice; } /** * (no documentation provided) */ - (NSDecimalNumber *) recommendedPrice { return _recommendedPrice; } /** * (no documentation provided) */ - (void) setRecommendedPrice: (NSDecimalNumber *) newRecommendedPrice { [newRecommendedPrice retain]; [_recommendedPrice release]; _recommendedPrice = newRecommendedPrice; } - (void) dealloc { [self setCurrencyCode: nil]; [self setStartDate: nil]; [self setEndDate: nil]; [self setPrice: nil]; [self setRecommendedPrice: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0SubscriptionFeeDto *_nOVAGLOBALAPINS0SubscriptionFeeDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0SubscriptionFeeDto = (NOVAGLOBALAPINS0SubscriptionFeeDto *) [NOVAGLOBALAPINS0SubscriptionFeeDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0SubscriptionFeeDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0SubscriptionFeeDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0SubscriptionFeeDto (JAXB) @end /*interface NOVAGLOBALAPINS0SubscriptionFeeDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0SubscriptionFeeDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0SubscriptionFeeDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0SubscriptionFeeDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0SubscriptionFeeDto *_nOVAGLOBALAPINS0SubscriptionFeeDto = [[NOVAGLOBALAPINS0SubscriptionFeeDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0SubscriptionFeeDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0SubscriptionFeeDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0SubscriptionFeeDto autorelease]; return _nOVAGLOBALAPINS0SubscriptionFeeDto; } /** * Initialize this instance of NOVAGLOBALAPINS0SubscriptionFeeDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0SubscriptionFeeDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0SubscriptionFeeDto from an XML reader. The element to be read is * "subscriptionFee". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0SubscriptionFeeDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0SubscriptionFeeDto *_subscriptionFeeDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element subscriptionFee."]; } } if (xmlStrcmp(BAD_CAST "subscriptionFee", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}subscriptionFee."); #endif _subscriptionFeeDto = (NOVAGLOBALAPINS0SubscriptionFeeDto *)[NOVAGLOBALAPINS0SubscriptionFeeDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}subscriptionFee."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0SubscriptionFeeDto. Expected element subscriptionFee. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0SubscriptionFeeDto. Expected element subscriptionFee. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _subscriptionFeeDto; } /** * Writes this NOVAGLOBALAPINS0SubscriptionFeeDto to XML under element name "subscriptionFee". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _subscriptionFeeDto The SubscriptionFeeDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0SubscriptionFeeDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionFee", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}subscriptionFee. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}subscriptionFeeDto for root element {}subscriptionFee..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}subscriptionFeeDto for root element {}subscriptionFee..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}subscriptionFee. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currencyCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCurrencyCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "startDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setStartDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "endDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setEndDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "price", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setPrice: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recommendedPrice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setRecommendedPrice: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self currencyCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currencyCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}currencyCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}currencyCode..."); #endif [[self currencyCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}currencyCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}currencyCode."]; } } if ([self startDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "startDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}startDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}startDate..."); #endif [[self startDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}startDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}startDate."]; } } if ([self endDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}endDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}endDate..."); #endif [[self endDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}endDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}endDate."]; } } if ([self price]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "price", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}price."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}price..."); #endif [[self price] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}price..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}price."]; } } if ([self recommendedPrice]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recommendedPrice", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}recommendedPrice."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}recommendedPrice..."); #endif [[self recommendedPrice] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}recommendedPrice..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}recommendedPrice."]; } } } @end /* implementation NOVAGLOBALAPINS0SubscriptionFeeDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0SubscriptionFeeDto_M */ #ifndef DEF_NOVAGLOBALAPINS0UsageChargeDto_M #define DEF_NOVAGLOBALAPINS0UsageChargeDto_M /** * @author Edward P. Legaspi @since Nov 4, 2013 */ @implementation NOVAGLOBALAPINS0UsageChargeDto /** * (no documentation provided) */ - (int *) min { return _min; } /** * (no documentation provided) */ - (void) setMin: (int *) newMin { if (_min != NULL) { free(_min); } _min = newMin; } /** * (no documentation provided) */ - (int *) max { return _max; } /** * (no documentation provided) */ - (void) setMax: (int *) newMax { if (_max != NULL) { free(_max); } _max = newMax; } /** * (no documentation provided) */ - (NSString *) currencyCode { return _currencyCode; } /** * (no documentation provided) */ - (void) setCurrencyCode: (NSString *) newCurrencyCode { [newCurrencyCode retain]; [_currencyCode release]; _currencyCode = newCurrencyCode; } /** * (no documentation provided) */ - (NSDate *) startDate { return _startDate; } /** * (no documentation provided) */ - (void) setStartDate: (NSDate *) newStartDate { [newStartDate retain]; [_startDate release]; _startDate = newStartDate; } /** * (no documentation provided) */ - (NSDate *) endDate { return _endDate; } /** * (no documentation provided) */ - (void) setEndDate: (NSDate *) newEndDate { [newEndDate retain]; [_endDate release]; _endDate = newEndDate; } /** * (no documentation provided) */ - (NSDecimalNumber *) price { return _price; } /** * (no documentation provided) */ - (void) setPrice: (NSDecimalNumber *) newPrice { [newPrice retain]; [_price release]; _price = newPrice; } /** * (no documentation provided) */ - (NSDecimalNumber *) recommendedPrice { return _recommendedPrice; } /** * (no documentation provided) */ - (void) setRecommendedPrice: (NSDecimalNumber *) newRecommendedPrice { [newRecommendedPrice retain]; [_recommendedPrice release]; _recommendedPrice = newRecommendedPrice; } - (void) dealloc { [self setMin: NULL]; [self setMax: NULL]; [self setCurrencyCode: nil]; [self setStartDate: nil]; [self setEndDate: nil]; [self setPrice: nil]; [self setRecommendedPrice: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0UsageChargeDto *_nOVAGLOBALAPINS0UsageChargeDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0UsageChargeDto = (NOVAGLOBALAPINS0UsageChargeDto *) [NOVAGLOBALAPINS0UsageChargeDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0UsageChargeDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0UsageChargeDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0UsageChargeDto (JAXB) @end /*interface NOVAGLOBALAPINS0UsageChargeDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0UsageChargeDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0UsageChargeDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0UsageChargeDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0UsageChargeDto *_nOVAGLOBALAPINS0UsageChargeDto = [[NOVAGLOBALAPINS0UsageChargeDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0UsageChargeDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0UsageChargeDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0UsageChargeDto autorelease]; return _nOVAGLOBALAPINS0UsageChargeDto; } /** * Initialize this instance of NOVAGLOBALAPINS0UsageChargeDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0UsageChargeDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0UsageChargeDto from an XML reader. The element to be read is * "usageCharge". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0UsageChargeDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0UsageChargeDto *_usageChargeDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element usageCharge."]; } } if (xmlStrcmp(BAD_CAST "usageCharge", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}usageCharge."); #endif _usageChargeDto = (NOVAGLOBALAPINS0UsageChargeDto *)[NOVAGLOBALAPINS0UsageChargeDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}usageCharge."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0UsageChargeDto. Expected element usageCharge. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0UsageChargeDto. Expected element usageCharge. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _usageChargeDto; } /** * Writes this NOVAGLOBALAPINS0UsageChargeDto to XML under element name "usageCharge". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _usageChargeDto The UsageChargeDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0UsageChargeDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "usageCharge", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}usageCharge. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}usageChargeDto for root element {}usageCharge..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}usageChargeDto for root element {}usageCharge..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}usageCharge. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "min", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setMin: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "max", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setMax: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currencyCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCurrencyCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "startDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setStartDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "endDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setEndDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "price", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setPrice: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recommendedPrice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setRecommendedPrice: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self min] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "min", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}min."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}min..."); #endif status = xmlTextWriterWriteIntType(writer, [self min]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}min..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}min."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}min."]; } } if ([self max] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "max", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}max."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}max..."); #endif status = xmlTextWriterWriteIntType(writer, [self max]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}max..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}max."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}max."]; } } if ([self currencyCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currencyCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}currencyCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}currencyCode..."); #endif [[self currencyCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}currencyCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}currencyCode."]; } } if ([self startDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "startDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}startDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}startDate..."); #endif [[self startDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}startDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}startDate."]; } } if ([self endDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}endDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}endDate..."); #endif [[self endDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}endDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}endDate."]; } } if ([self price]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "price", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}price."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}price..."); #endif [[self price] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}price..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}price."]; } } if ([self recommendedPrice]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recommendedPrice", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}recommendedPrice."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}recommendedPrice..."); #endif [[self recommendedPrice] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}recommendedPrice..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}recommendedPrice."]; } } } @end /* implementation NOVAGLOBALAPINS0UsageChargeDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0UsageChargeDto_M */ #ifndef DEF_NOVAGLOBALAPINS0CustomerInvoicesResponse_M #define DEF_NOVAGLOBALAPINS0CustomerInvoicesResponse_M /** * @author R.AITYAAZZA */ @implementation NOVAGLOBALAPINS0CustomerInvoicesResponse /** * (no documentation provided) */ - (NOVAGLOBALAPINS0ActionStatus *) actionStatus { return _actionStatus; } /** * (no documentation provided) */ - (void) setActionStatus: (NOVAGLOBALAPINS0ActionStatus *) newActionStatus { [newActionStatus retain]; [_actionStatus release]; _actionStatus = newActionStatus; } /** * (no documentation provided) */ - (NSArray *) CustomerInvoiceDtoList { return _CustomerInvoiceDtoList; } /** * (no documentation provided) */ - (void) setCustomerInvoiceDtoList: (NSArray *) newCustomerInvoiceDtoList { [newCustomerInvoiceDtoList retain]; [_CustomerInvoiceDtoList release]; _CustomerInvoiceDtoList = newCustomerInvoiceDtoList; } - (void) dealloc { [self setActionStatus: nil]; [self setCustomerInvoiceDtoList: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0CustomerInvoicesResponse *_nOVAGLOBALAPINS0CustomerInvoicesResponse; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0CustomerInvoicesResponse = (NOVAGLOBALAPINS0CustomerInvoicesResponse *) [NOVAGLOBALAPINS0CustomerInvoicesResponse readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0CustomerInvoicesResponse; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0CustomerInvoicesResponse */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0CustomerInvoicesResponse (JAXB) @end /*interface NOVAGLOBALAPINS0CustomerInvoicesResponse (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0CustomerInvoicesResponse (JAXB) /** * Read an instance of NOVAGLOBALAPINS0CustomerInvoicesResponse from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0CustomerInvoicesResponse defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0CustomerInvoicesResponse *_nOVAGLOBALAPINS0CustomerInvoicesResponse = [[NOVAGLOBALAPINS0CustomerInvoicesResponse alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0CustomerInvoicesResponse initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0CustomerInvoicesResponse = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0CustomerInvoicesResponse autorelease]; return _nOVAGLOBALAPINS0CustomerInvoicesResponse; } /** * Initialize this instance of NOVAGLOBALAPINS0CustomerInvoicesResponse according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0CustomerInvoicesResponse to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0CustomerInvoicesResponse from an XML reader. The element to be read is * "customerInvoicesResponse". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0CustomerInvoicesResponse. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0CustomerInvoicesResponse *_customerInvoicesResponse = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element customerInvoicesResponse."]; } } if (xmlStrcmp(BAD_CAST "customerInvoicesResponse", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}customerInvoicesResponse."); #endif _customerInvoicesResponse = (NOVAGLOBALAPINS0CustomerInvoicesResponse *)[NOVAGLOBALAPINS0CustomerInvoicesResponse readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}customerInvoicesResponse."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CustomerInvoicesResponse. Expected element customerInvoicesResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CustomerInvoicesResponse. Expected element customerInvoicesResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _customerInvoicesResponse; } /** * Writes this NOVAGLOBALAPINS0CustomerInvoicesResponse to XML under element name "customerInvoicesResponse". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _customerInvoicesResponse The CustomerInvoicesResponse to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0CustomerInvoicesResponse to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "customerInvoicesResponse", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}customerInvoicesResponse. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}customerInvoicesResponse for root element {}customerInvoicesResponse..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}customerInvoicesResponse for root element {}customerInvoicesResponse..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}customerInvoicesResponse. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "actionStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}actionStatus of type {}actionStatus."); #endif __child = [NOVAGLOBALAPINS0ActionStatus readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}actionStatus of type {}actionStatus."); #endif [self setActionStatus: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "CustomerInvoiceDtoList", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}CustomerInvoiceDtoList of type {}customerInvoiceDto."); #endif __child = [NOVAGLOBALAPINS0CustomerInvoiceDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}CustomerInvoiceDtoList of type {}customerInvoiceDto."); #endif if ([self CustomerInvoiceDtoList]) { [self setCustomerInvoiceDtoList: [[self CustomerInvoiceDtoList] arrayByAddingObject: __child]]; } else { [self setCustomerInvoiceDtoList: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self actionStatus]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "actionStatus", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}actionStatus."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}actionStatus..."); #endif [[self actionStatus] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}actionStatus..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}actionStatus."]; } } if ([self CustomerInvoiceDtoList]) { __enumerator = [[self CustomerInvoiceDtoList] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "CustomerInvoiceDtoList", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}CustomerInvoiceDtoList."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}CustomerInvoiceDtoList..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}CustomerInvoiceDtoList..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}CustomerInvoiceDtoList."]; } } //end item iterator. } } @end /* implementation NOVAGLOBALAPINS0CustomerInvoicesResponse (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0CustomerInvoicesResponse_M */ #ifndef DEF_NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse_M #define DEF_NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse_M /** * @author Edward P. Legaspi @since Nov 13, 2013 */ @implementation NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse /** * (no documentation provided) */ - (NSString *) requestId { return _requestId; } /** * (no documentation provided) */ - (void) setRequestId: (NSString *) newRequestId { [newRequestId retain]; [_requestId release]; _requestId = newRequestId; } /** * (no documentation provided) */ - (BOOL *) accepted { return _accepted; } /** * (no documentation provided) */ - (void) setAccepted: (BOOL *) newAccepted { if (_accepted != NULL) { free(_accepted); } _accepted = newAccepted; } /** * (no documentation provided) */ - (NSString *) subscriptionId { return _subscriptionId; } /** * (no documentation provided) */ - (void) setSubscriptionId: (NSString *) newSubscriptionId { [newSubscriptionId retain]; [_subscriptionId release]; _subscriptionId = newSubscriptionId; } /** * (no documentation provided) */ - (NSString *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (NSString *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setRequestId: nil]; [self setAccepted: NULL]; [self setSubscriptionId: nil]; [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse *_nOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse = (NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse *) [NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse (JAXB) @end /*interface NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse (JAXB) /** * Read an instance of NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse *_nOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse = [[NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse autorelease]; return _nOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse; } /** * Initialize this instance of NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse from an XML reader. The element to be read is * "terminateCustomerSubscriptionResponse". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse *_terminateCustomerSubscriptionResponse = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element terminateCustomerSubscriptionResponse."]; } } if (xmlStrcmp(BAD_CAST "terminateCustomerSubscriptionResponse", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}terminateCustomerSubscriptionResponse."); #endif _terminateCustomerSubscriptionResponse = (NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse *)[NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}terminateCustomerSubscriptionResponse."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse. Expected element terminateCustomerSubscriptionResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse. Expected element terminateCustomerSubscriptionResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _terminateCustomerSubscriptionResponse; } /** * Writes this NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse to XML under element name "terminateCustomerSubscriptionResponse". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _terminateCustomerSubscriptionResponse The TerminateCustomerSubscriptionResponse to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminateCustomerSubscriptionResponse", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}terminateCustomerSubscriptionResponse. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}terminateCustomerSubscriptionResponse for root element {}terminateCustomerSubscriptionResponse..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}terminateCustomerSubscriptionResponse for root element {}terminateCustomerSubscriptionResponse..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}terminateCustomerSubscriptionResponse. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setRequestId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accepted", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setAccepted: ((BOOL*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}subscriptionId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}subscriptionId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setSubscriptionId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self requestId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}requestId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}requestId..."); #endif [[self requestId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}requestId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}requestId."]; } } if ([self accepted] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accepted", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}accepted."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}accepted..."); #endif status = xmlTextWriterWriteBooleanType(writer, [self accepted]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}accepted..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}accepted."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}accepted."]; } } if ([self subscriptionId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}subscriptionId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}subscriptionId..."); #endif [[self subscriptionId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}subscriptionId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}subscriptionId."]; } } if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0TerminateCustomerSubscriptionResponse_M */ #ifndef DEF_NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse_M #define DEF_NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse_M /** * @author Edward P. Legaspi @since Nov 13, 2013 */ @implementation NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse /** * (no documentation provided) */ - (NSString *) requestId { return _requestId; } /** * (no documentation provided) */ - (void) setRequestId: (NSString *) newRequestId { [newRequestId retain]; [_requestId release]; _requestId = newRequestId; } /** * (no documentation provided) */ - (BOOL *) accepted { return _accepted; } /** * (no documentation provided) */ - (void) setAccepted: (BOOL *) newAccepted { if (_accepted != NULL) { free(_accepted); } _accepted = newAccepted; } /** * (no documentation provided) */ - (NSString *) subscriptionId { return _subscriptionId; } /** * (no documentation provided) */ - (void) setSubscriptionId: (NSString *) newSubscriptionId { [newSubscriptionId retain]; [_subscriptionId release]; _subscriptionId = newSubscriptionId; } /** * (no documentation provided) */ - (NSString *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (NSString *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setRequestId: nil]; [self setAccepted: NULL]; [self setSubscriptionId: nil]; [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse *_nOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse = (NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse *) [NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse (JAXB) @end /*interface NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse (JAXB) /** * Read an instance of NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse *_nOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse = [[NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse autorelease]; return _nOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse; } /** * Initialize this instance of NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse from an XML reader. The element to be read is * "subscriptionWithCreditLimitResponse". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse *_subscriptionWithCreditLimitResponse = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element subscriptionWithCreditLimitResponse."]; } } if (xmlStrcmp(BAD_CAST "subscriptionWithCreditLimitResponse", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}subscriptionWithCreditLimitResponse."); #endif _subscriptionWithCreditLimitResponse = (NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse *)[NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}subscriptionWithCreditLimitResponse."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse. Expected element subscriptionWithCreditLimitResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse. Expected element subscriptionWithCreditLimitResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _subscriptionWithCreditLimitResponse; } /** * Writes this NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse to XML under element name "subscriptionWithCreditLimitResponse". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitResponse The SubscriptionWithCreditLimitResponse to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionWithCreditLimitResponse", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}subscriptionWithCreditLimitResponse. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}subscriptionWithCreditLimitResponse for root element {}subscriptionWithCreditLimitResponse..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}subscriptionWithCreditLimitResponse for root element {}subscriptionWithCreditLimitResponse..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}subscriptionWithCreditLimitResponse. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setRequestId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accepted", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setAccepted: ((BOOL*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}subscriptionId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}subscriptionId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setSubscriptionId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self requestId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}requestId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}requestId..."); #endif [[self requestId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}requestId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}requestId."]; } } if ([self accepted] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accepted", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}accepted."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}accepted..."); #endif status = xmlTextWriterWriteBooleanType(writer, [self accepted]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}accepted..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}accepted."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}accepted."]; } } if ([self subscriptionId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}subscriptionId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}subscriptionId..."); #endif [[self subscriptionId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}subscriptionId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}subscriptionId."]; } } if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0SubscriptionWithCreditLimitResponse_M */ #ifndef DEF_NOVAGLOBALAPINS0PdfInvoiceResponse_M #define DEF_NOVAGLOBALAPINS0PdfInvoiceResponse_M /** * @author R.AITYAAZZA */ @implementation NOVAGLOBALAPINS0PdfInvoiceResponse /** * (no documentation provided) */ - (NOVAGLOBALAPINS0ActionStatus *) actionStatus { return _actionStatus; } /** * (no documentation provided) */ - (void) setActionStatus: (NOVAGLOBALAPINS0ActionStatus *) newActionStatus { [newActionStatus retain]; [_actionStatus release]; _actionStatus = newActionStatus; } /** * (no documentation provided) */ - (NSData *) pdfInvoice { return _pdfInvoice; } /** * (no documentation provided) */ - (void) setPdfInvoice: (NSData *) newPdfInvoice { [newPdfInvoice retain]; [_pdfInvoice release]; _pdfInvoice = newPdfInvoice; } - (void) dealloc { [self setActionStatus: nil]; [self setPdfInvoice: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0PdfInvoiceResponse *_nOVAGLOBALAPINS0PdfInvoiceResponse; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0PdfInvoiceResponse = (NOVAGLOBALAPINS0PdfInvoiceResponse *) [NOVAGLOBALAPINS0PdfInvoiceResponse readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0PdfInvoiceResponse; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0PdfInvoiceResponse */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0PdfInvoiceResponse (JAXB) @end /*interface NOVAGLOBALAPINS0PdfInvoiceResponse (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0PdfInvoiceResponse (JAXB) /** * Read an instance of NOVAGLOBALAPINS0PdfInvoiceResponse from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0PdfInvoiceResponse defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0PdfInvoiceResponse *_nOVAGLOBALAPINS0PdfInvoiceResponse = [[NOVAGLOBALAPINS0PdfInvoiceResponse alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0PdfInvoiceResponse initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0PdfInvoiceResponse = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0PdfInvoiceResponse autorelease]; return _nOVAGLOBALAPINS0PdfInvoiceResponse; } /** * Initialize this instance of NOVAGLOBALAPINS0PdfInvoiceResponse according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0PdfInvoiceResponse to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0PdfInvoiceResponse from an XML reader. The element to be read is * "pdfInvoiceResponse". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0PdfInvoiceResponse. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0PdfInvoiceResponse *_pdfInvoiceResponse = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element pdfInvoiceResponse."]; } } if (xmlStrcmp(BAD_CAST "pdfInvoiceResponse", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}pdfInvoiceResponse."); #endif _pdfInvoiceResponse = (NOVAGLOBALAPINS0PdfInvoiceResponse *)[NOVAGLOBALAPINS0PdfInvoiceResponse readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}pdfInvoiceResponse."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0PdfInvoiceResponse. Expected element pdfInvoiceResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0PdfInvoiceResponse. Expected element pdfInvoiceResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _pdfInvoiceResponse; } /** * Writes this NOVAGLOBALAPINS0PdfInvoiceResponse to XML under element name "pdfInvoiceResponse". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _pdfInvoiceResponse The PdfInvoiceResponse to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0PdfInvoiceResponse to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pdfInvoiceResponse", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}pdfInvoiceResponse. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}pdfInvoiceResponse for root element {}pdfInvoiceResponse..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}pdfInvoiceResponse for root element {}pdfInvoiceResponse..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}pdfInvoiceResponse. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "actionStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}actionStatus of type {}actionStatus."); #endif __child = [NOVAGLOBALAPINS0ActionStatus readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}actionStatus of type {}actionStatus."); #endif [self setActionStatus: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "pdfInvoice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}pdfInvoice of type {http://www.w3.org/2001/XMLSchema}base64Binary."); #endif __child = [NSData readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}pdfInvoice of type {http://www.w3.org/2001/XMLSchema}base64Binary."); #endif [self setPdfInvoice: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self actionStatus]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "actionStatus", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}actionStatus."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}actionStatus..."); #endif [[self actionStatus] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}actionStatus..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}actionStatus."]; } } if ([self pdfInvoice]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pdfInvoice", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}pdfInvoice."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}pdfInvoice..."); #endif [[self pdfInvoice] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}pdfInvoice..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}pdfInvoice."]; } } } @end /* implementation NOVAGLOBALAPINS0PdfInvoiceResponse (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0PdfInvoiceResponse_M */ #ifndef DEF_NOVAGLOBALAPINS0CustomerAccountResponse_M #define DEF_NOVAGLOBALAPINS0CustomerAccountResponse_M /** * @author R.AITYAAZZA */ @implementation NOVAGLOBALAPINS0CustomerAccountResponse /** * (no documentation provided) */ - (NOVAGLOBALAPINS0ActionStatus *) actionStatus { return _actionStatus; } /** * (no documentation provided) */ - (void) setActionStatus: (NOVAGLOBALAPINS0ActionStatus *) newActionStatus { [newActionStatus retain]; [_actionStatus release]; _actionStatus = newActionStatus; } /** * (no documentation provided) */ - (NOVAGLOBALAPINS0CustomerAccountDto *) customerAccountDto { return _customerAccountDto; } /** * (no documentation provided) */ - (void) setCustomerAccountDto: (NOVAGLOBALAPINS0CustomerAccountDto *) newCustomerAccountDto { [newCustomerAccountDto retain]; [_customerAccountDto release]; _customerAccountDto = newCustomerAccountDto; } - (void) dealloc { [self setActionStatus: nil]; [self setCustomerAccountDto: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0CustomerAccountResponse *_nOVAGLOBALAPINS0CustomerAccountResponse; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0CustomerAccountResponse = (NOVAGLOBALAPINS0CustomerAccountResponse *) [NOVAGLOBALAPINS0CustomerAccountResponse readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0CustomerAccountResponse; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0CustomerAccountResponse */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0CustomerAccountResponse (JAXB) @end /*interface NOVAGLOBALAPINS0CustomerAccountResponse (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0CustomerAccountResponse (JAXB) /** * Read an instance of NOVAGLOBALAPINS0CustomerAccountResponse from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0CustomerAccountResponse defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0CustomerAccountResponse *_nOVAGLOBALAPINS0CustomerAccountResponse = [[NOVAGLOBALAPINS0CustomerAccountResponse alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0CustomerAccountResponse initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0CustomerAccountResponse = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0CustomerAccountResponse autorelease]; return _nOVAGLOBALAPINS0CustomerAccountResponse; } /** * Initialize this instance of NOVAGLOBALAPINS0CustomerAccountResponse according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0CustomerAccountResponse to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0CustomerAccountResponse from an XML reader. The element to be read is * "customerAccountResponse". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0CustomerAccountResponse. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0CustomerAccountResponse *_customerAccountResponse = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element customerAccountResponse."]; } } if (xmlStrcmp(BAD_CAST "customerAccountResponse", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}customerAccountResponse."); #endif _customerAccountResponse = (NOVAGLOBALAPINS0CustomerAccountResponse *)[NOVAGLOBALAPINS0CustomerAccountResponse readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}customerAccountResponse."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CustomerAccountResponse. Expected element customerAccountResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CustomerAccountResponse. Expected element customerAccountResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _customerAccountResponse; } /** * Writes this NOVAGLOBALAPINS0CustomerAccountResponse to XML under element name "customerAccountResponse". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _customerAccountResponse The CustomerAccountResponse to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0CustomerAccountResponse to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "customerAccountResponse", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}customerAccountResponse. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}customerAccountResponse for root element {}customerAccountResponse..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}customerAccountResponse for root element {}customerAccountResponse..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}customerAccountResponse. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "actionStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}actionStatus of type {}actionStatus."); #endif __child = [NOVAGLOBALAPINS0ActionStatus readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}actionStatus of type {}actionStatus."); #endif [self setActionStatus: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "customerAccountDto", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}customerAccountDto of type {}customerAccountDto."); #endif __child = [NOVAGLOBALAPINS0CustomerAccountDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}customerAccountDto of type {}customerAccountDto."); #endif [self setCustomerAccountDto: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self actionStatus]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "actionStatus", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}actionStatus."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}actionStatus..."); #endif [[self actionStatus] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}actionStatus..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}actionStatus."]; } } if ([self customerAccountDto]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "customerAccountDto", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}customerAccountDto."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}customerAccountDto..."); #endif [[self customerAccountDto] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}customerAccountDto..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}customerAccountDto."]; } } } @end /* implementation NOVAGLOBALAPINS0CustomerAccountResponse (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0CustomerAccountResponse_M */ #ifndef DEF_NOVAGLOBALAPINS0CountryResponse_M #define DEF_NOVAGLOBALAPINS0CountryResponse_M /** * @author Edward P. Legaspi @since Oct 7, 2013 */ @implementation NOVAGLOBALAPINS0CountryResponse /** * (no documentation provided) */ - (NOVAGLOBALAPINS0ActionStatus *) actionStatus { return _actionStatus; } /** * (no documentation provided) */ - (void) setActionStatus: (NOVAGLOBALAPINS0ActionStatus *) newActionStatus { [newActionStatus retain]; [_actionStatus release]; _actionStatus = newActionStatus; } /** * (no documentation provided) */ - (NOVAGLOBALAPINS0CountryDto *) countryDto { return _countryDto; } /** * (no documentation provided) */ - (void) setCountryDto: (NOVAGLOBALAPINS0CountryDto *) newCountryDto { [newCountryDto retain]; [_countryDto release]; _countryDto = newCountryDto; } - (void) dealloc { [self setActionStatus: nil]; [self setCountryDto: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0CountryResponse *_nOVAGLOBALAPINS0CountryResponse; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0CountryResponse = (NOVAGLOBALAPINS0CountryResponse *) [NOVAGLOBALAPINS0CountryResponse readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0CountryResponse; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0CountryResponse */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0CountryResponse (JAXB) @end /*interface NOVAGLOBALAPINS0CountryResponse (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0CountryResponse (JAXB) /** * Read an instance of NOVAGLOBALAPINS0CountryResponse from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0CountryResponse defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0CountryResponse *_nOVAGLOBALAPINS0CountryResponse = [[NOVAGLOBALAPINS0CountryResponse alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0CountryResponse initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0CountryResponse = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0CountryResponse autorelease]; return _nOVAGLOBALAPINS0CountryResponse; } /** * Initialize this instance of NOVAGLOBALAPINS0CountryResponse according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0CountryResponse to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0CountryResponse from an XML reader. The element to be read is * "countryResponse". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0CountryResponse. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0CountryResponse *_countryResponse = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element countryResponse."]; } } if (xmlStrcmp(BAD_CAST "countryResponse", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}countryResponse."); #endif _countryResponse = (NOVAGLOBALAPINS0CountryResponse *)[NOVAGLOBALAPINS0CountryResponse readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}countryResponse."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CountryResponse. Expected element countryResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CountryResponse. Expected element countryResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _countryResponse; } /** * Writes this NOVAGLOBALAPINS0CountryResponse to XML under element name "countryResponse". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _countryResponse The CountryResponse to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0CountryResponse to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryResponse", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}countryResponse. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}countryResponse for root element {}countryResponse..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}countryResponse for root element {}countryResponse..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}countryResponse. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "actionStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}actionStatus of type {}actionStatus."); #endif __child = [NOVAGLOBALAPINS0ActionStatus readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}actionStatus of type {}actionStatus."); #endif [self setActionStatus: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countryDto", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}countryDto of type {}countryDto."); #endif __child = [NOVAGLOBALAPINS0CountryDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}countryDto of type {}countryDto."); #endif [self setCountryDto: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self actionStatus]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "actionStatus", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}actionStatus."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}actionStatus..."); #endif [[self actionStatus] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}actionStatus..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}actionStatus."]; } } if ([self countryDto]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryDto", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}countryDto."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}countryDto..."); #endif [[self countryDto] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}countryDto..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}countryDto."]; } } } @end /* implementation NOVAGLOBALAPINS0CountryResponse (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0CountryResponse_M */ #ifndef DEF_NOVAGLOBALAPINS0TerminationFeeDto_M #define DEF_NOVAGLOBALAPINS0TerminationFeeDto_M /** * @author Edward P. Legaspi @since Nov 4, 2013 */ @implementation NOVAGLOBALAPINS0TerminationFeeDto /** * (no documentation provided) */ - (NSString *) currencyCode { return _currencyCode; } /** * (no documentation provided) */ - (void) setCurrencyCode: (NSString *) newCurrencyCode { [newCurrencyCode retain]; [_currencyCode release]; _currencyCode = newCurrencyCode; } /** * (no documentation provided) */ - (NSDate *) startDate { return _startDate; } /** * (no documentation provided) */ - (void) setStartDate: (NSDate *) newStartDate { [newStartDate retain]; [_startDate release]; _startDate = newStartDate; } /** * (no documentation provided) */ - (NSDate *) endDate { return _endDate; } /** * (no documentation provided) */ - (void) setEndDate: (NSDate *) newEndDate { [newEndDate retain]; [_endDate release]; _endDate = newEndDate; } /** * (no documentation provided) */ - (NSDecimalNumber *) price { return _price; } /** * (no documentation provided) */ - (void) setPrice: (NSDecimalNumber *) newPrice { [newPrice retain]; [_price release]; _price = newPrice; } /** * (no documentation provided) */ - (NSDecimalNumber *) recommendedPrice { return _recommendedPrice; } /** * (no documentation provided) */ - (void) setRecommendedPrice: (NSDecimalNumber *) newRecommendedPrice { [newRecommendedPrice retain]; [_recommendedPrice release]; _recommendedPrice = newRecommendedPrice; } - (void) dealloc { [self setCurrencyCode: nil]; [self setStartDate: nil]; [self setEndDate: nil]; [self setPrice: nil]; [self setRecommendedPrice: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0TerminationFeeDto *_nOVAGLOBALAPINS0TerminationFeeDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0TerminationFeeDto = (NOVAGLOBALAPINS0TerminationFeeDto *) [NOVAGLOBALAPINS0TerminationFeeDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0TerminationFeeDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0TerminationFeeDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0TerminationFeeDto (JAXB) @end /*interface NOVAGLOBALAPINS0TerminationFeeDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0TerminationFeeDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0TerminationFeeDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0TerminationFeeDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0TerminationFeeDto *_nOVAGLOBALAPINS0TerminationFeeDto = [[NOVAGLOBALAPINS0TerminationFeeDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0TerminationFeeDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0TerminationFeeDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0TerminationFeeDto autorelease]; return _nOVAGLOBALAPINS0TerminationFeeDto; } /** * Initialize this instance of NOVAGLOBALAPINS0TerminationFeeDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0TerminationFeeDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0TerminationFeeDto from an XML reader. The element to be read is * "terminationFee". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0TerminationFeeDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0TerminationFeeDto *_terminationFeeDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element terminationFee."]; } } if (xmlStrcmp(BAD_CAST "terminationFee", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}terminationFee."); #endif _terminationFeeDto = (NOVAGLOBALAPINS0TerminationFeeDto *)[NOVAGLOBALAPINS0TerminationFeeDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}terminationFee."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0TerminationFeeDto. Expected element terminationFee. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0TerminationFeeDto. Expected element terminationFee. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _terminationFeeDto; } /** * Writes this NOVAGLOBALAPINS0TerminationFeeDto to XML under element name "terminationFee". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _terminationFeeDto The TerminationFeeDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0TerminationFeeDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationFee", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}terminationFee. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}terminationFeeDto for root element {}terminationFee..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}terminationFeeDto for root element {}terminationFee..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}terminationFee. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currencyCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCurrencyCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "startDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setStartDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "endDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setEndDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "price", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}price of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setPrice: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recommendedPrice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}recommendedPrice of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setRecommendedPrice: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self currencyCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currencyCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}currencyCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}currencyCode..."); #endif [[self currencyCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}currencyCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}currencyCode."]; } } if ([self startDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "startDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}startDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}startDate..."); #endif [[self startDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}startDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}startDate."]; } } if ([self endDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}endDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}endDate..."); #endif [[self endDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}endDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}endDate."]; } } if ([self price]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "price", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}price."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}price..."); #endif [[self price] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}price..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}price."]; } } if ([self recommendedPrice]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recommendedPrice", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}recommendedPrice."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}recommendedPrice..."); #endif [[self recommendedPrice] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}recommendedPrice..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}recommendedPrice."]; } } } @end /* implementation NOVAGLOBALAPINS0TerminationFeeDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0TerminationFeeDto_M */ #ifndef DEF_NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto_M #define DEF_NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto_M /** * @author R.AITYAAZZA */ @implementation NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto /** * (no documentation provided) */ - (int *) itemNumber { return _itemNumber; } /** * (no documentation provided) */ - (void) setItemNumber: (int *) newItemNumber { if (_itemNumber != NULL) { free(_itemNumber); } _itemNumber = newItemNumber; } /** * (no documentation provided) */ - (NSString *) accountingCode { return _accountingCode; } /** * (no documentation provided) */ - (void) setAccountingCode: (NSString *) newAccountingCode { [newAccountingCode retain]; [_accountingCode release]; _accountingCode = newAccountingCode; } /** * (no documentation provided) */ - (NSString *) description { return _description; } /** * (no documentation provided) */ - (void) setDescription: (NSString *) newDescription { [newDescription retain]; [_description release]; _description = newDescription; } /** * (no documentation provided) */ - (NSDecimalNumber *) taxPercent { return _taxPercent; } /** * (no documentation provided) */ - (void) setTaxPercent: (NSDecimalNumber *) newTaxPercent { [newTaxPercent retain]; [_taxPercent release]; _taxPercent = newTaxPercent; } /** * (no documentation provided) */ - (NSDecimalNumber *) quantity { return _quantity; } /** * (no documentation provided) */ - (void) setQuantity: (NSDecimalNumber *) newQuantity { [newQuantity retain]; [_quantity release]; _quantity = newQuantity; } /** * (no documentation provided) */ - (NSDecimalNumber *) discount { return _discount; } /** * (no documentation provided) */ - (void) setDiscount: (NSDecimalNumber *) newDiscount { [newDiscount retain]; [_discount release]; _discount = newDiscount; } /** * (no documentation provided) */ - (NSDecimalNumber *) amountWithoutTax { return _amountWithoutTax; } /** * (no documentation provided) */ - (void) setAmountWithoutTax: (NSDecimalNumber *) newAmountWithoutTax { [newAmountWithoutTax retain]; [_amountWithoutTax release]; _amountWithoutTax = newAmountWithoutTax; } /** * (no documentation provided) */ - (NSDecimalNumber *) amountTax { return _amountTax; } /** * (no documentation provided) */ - (void) setAmountTax: (NSDecimalNumber *) newAmountTax { [newAmountTax retain]; [_amountTax release]; _amountTax = newAmountTax; } /** * (no documentation provided) */ - (NSDecimalNumber *) amountWithTax { return _amountWithTax; } /** * (no documentation provided) */ - (void) setAmountWithTax: (NSDecimalNumber *) newAmountWithTax { [newAmountWithTax retain]; [_amountWithTax release]; _amountWithTax = newAmountWithTax; } /** * (no documentation provided) */ - (NSArray *) ratedTransactions { return _ratedTransactions; } /** * (no documentation provided) */ - (void) setRatedTransactions: (NSArray *) newRatedTransactions { [newRatedTransactions retain]; [_ratedTransactions release]; _ratedTransactions = newRatedTransactions; } - (void) dealloc { [self setItemNumber: NULL]; [self setAccountingCode: nil]; [self setDescription: nil]; [self setTaxPercent: nil]; [self setQuantity: nil]; [self setDiscount: nil]; [self setAmountWithoutTax: nil]; [self setAmountTax: nil]; [self setAmountWithTax: nil]; [self setRatedTransactions: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto *_nOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto = (NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto *) [NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto (JAXB) @end /*interface NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto *_nOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto = [[NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto autorelease]; return _nOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto; } /** * Initialize this instance of NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto from an XML reader. The element to be read is * "subCategoryInvoiceAgregate". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto *_subCategoryInvoiceAgregateDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element subCategoryInvoiceAgregate."]; } } if (xmlStrcmp(BAD_CAST "subCategoryInvoiceAgregate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}subCategoryInvoiceAgregate."); #endif _subCategoryInvoiceAgregateDto = (NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto *)[NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}subCategoryInvoiceAgregate."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto. Expected element subCategoryInvoiceAgregate. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto. Expected element subCategoryInvoiceAgregate. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _subCategoryInvoiceAgregateDto; } /** * Writes this NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto to XML under element name "subCategoryInvoiceAgregate". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _subCategoryInvoiceAgregateDto The SubCategoryInvoiceAgregateDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subCategoryInvoiceAgregate", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}subCategoryInvoiceAgregate. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}subCategoryInvoiceAgregateDto for root element {}subCategoryInvoiceAgregate..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}subCategoryInvoiceAgregateDto for root element {}subCategoryInvoiceAgregate..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}subCategoryInvoiceAgregate. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "itemNumber", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setItemNumber: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accountingCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}accountingCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}accountingCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setAccountingCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "description", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}description of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setDescription: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxPercent", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}taxPercent of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}taxPercent of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setTaxPercent: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "quantity", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}quantity of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}quantity of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setQuantity: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "discount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}discount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}discount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setDiscount: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithoutTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmountWithoutTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmountTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmountWithTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "ratedTransactions", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}ratedTransactions of type {}ratedTransactionDTO."); #endif __child = [NOVAGLOBALAPINS0RatedTransactionDTO readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}ratedTransactions of type {}ratedTransactionDTO."); #endif if ([self ratedTransactions]) { [self setRatedTransactions: [[self ratedTransactions] arrayByAddingObject: __child]]; } else { [self setRatedTransactions: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self itemNumber] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "itemNumber", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}itemNumber."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}itemNumber..."); #endif status = xmlTextWriterWriteIntType(writer, [self itemNumber]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}itemNumber..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}itemNumber."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}itemNumber."]; } } if ([self accountingCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accountingCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}accountingCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}accountingCode..."); #endif [[self accountingCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}accountingCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}accountingCode."]; } } if ([self description]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}description."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}description..."); #endif [[self description] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}description..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}description."]; } } if ([self taxPercent]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxPercent", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}taxPercent."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}taxPercent..."); #endif [[self taxPercent] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}taxPercent..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}taxPercent."]; } } if ([self quantity]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "quantity", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}quantity."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}quantity..."); #endif [[self quantity] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}quantity..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}quantity."]; } } if ([self discount]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "discount", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}discount."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}discount..."); #endif [[self discount] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}discount..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}discount."]; } } if ([self amountWithoutTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithoutTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amountWithoutTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amountWithoutTax..."); #endif [[self amountWithoutTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amountWithoutTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amountWithoutTax."]; } } if ([self amountTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amountTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amountTax..."); #endif [[self amountTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amountTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amountTax."]; } } if ([self amountWithTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amountWithTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amountWithTax..."); #endif [[self amountWithTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amountWithTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amountWithTax."]; } } if ([self ratedTransactions]) { __enumerator = [[self ratedTransactions] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ratedTransactions", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}ratedTransactions."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}ratedTransactions..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}ratedTransactions..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}ratedTransactions."]; } } //end item iterator. } } @end /* implementation NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto_M */ #ifndef DEF_NOVAGLOBALAPINS0MatchingAmountDto_M #define DEF_NOVAGLOBALAPINS0MatchingAmountDto_M /** * (no documentation provided) */ @implementation NOVAGLOBALAPINS0MatchingAmountDto /** * (no documentation provided) */ - (NSString *) matchingCode { return _matchingCode; } /** * (no documentation provided) */ - (void) setMatchingCode: (NSString *) newMatchingCode { [newMatchingCode retain]; [_matchingCode release]; _matchingCode = newMatchingCode; } /** * (no documentation provided) */ - (NSDecimalNumber *) matchingAmount { return _matchingAmount; } /** * (no documentation provided) */ - (void) setMatchingAmount: (NSDecimalNumber *) newMatchingAmount { [newMatchingAmount retain]; [_matchingAmount release]; _matchingAmount = newMatchingAmount; } - (void) dealloc { [self setMatchingCode: nil]; [self setMatchingAmount: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0MatchingAmountDto *_nOVAGLOBALAPINS0MatchingAmountDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0MatchingAmountDto = (NOVAGLOBALAPINS0MatchingAmountDto *) [NOVAGLOBALAPINS0MatchingAmountDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0MatchingAmountDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0MatchingAmountDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0MatchingAmountDto (JAXB) @end /*interface NOVAGLOBALAPINS0MatchingAmountDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0MatchingAmountDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0MatchingAmountDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0MatchingAmountDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0MatchingAmountDto *_nOVAGLOBALAPINS0MatchingAmountDto = [[NOVAGLOBALAPINS0MatchingAmountDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0MatchingAmountDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0MatchingAmountDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0MatchingAmountDto autorelease]; return _nOVAGLOBALAPINS0MatchingAmountDto; } /** * Initialize this instance of NOVAGLOBALAPINS0MatchingAmountDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0MatchingAmountDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0MatchingAmountDto from an XML reader. The element to be read is * "matchingAmount". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0MatchingAmountDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0MatchingAmountDto *_matchingAmountDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element matchingAmount."]; } } if (xmlStrcmp(BAD_CAST "matchingAmount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}matchingAmount."); #endif _matchingAmountDto = (NOVAGLOBALAPINS0MatchingAmountDto *)[NOVAGLOBALAPINS0MatchingAmountDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}matchingAmount."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0MatchingAmountDto. Expected element matchingAmount. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0MatchingAmountDto. Expected element matchingAmount. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _matchingAmountDto; } /** * Writes this NOVAGLOBALAPINS0MatchingAmountDto to XML under element name "matchingAmount". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _matchingAmountDto The MatchingAmountDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0MatchingAmountDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "matchingAmount", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}matchingAmount. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}matchingAmountDto for root element {}matchingAmount..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}matchingAmountDto for root element {}matchingAmount..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}matchingAmount. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "matchingCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}matchingCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}matchingCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setMatchingCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "matchingAmount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}matchingAmount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}matchingAmount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setMatchingAmount: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self matchingCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "matchingCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}matchingCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}matchingCode..."); #endif [[self matchingCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}matchingCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}matchingCode."]; } } if ([self matchingAmount]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "matchingAmount", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}matchingAmount."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}matchingAmount..."); #endif [[self matchingAmount] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}matchingAmount..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}matchingAmount."]; } } } @end /* implementation NOVAGLOBALAPINS0MatchingAmountDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0MatchingAmountDto_M */ #ifndef DEF_NOVAGLOBALAPINS0BaseDto_M #define DEF_NOVAGLOBALAPINS0BaseDto_M /** * @author Edward P. Legaspi @since Oct 4, 2013 */ @implementation NOVAGLOBALAPINS0BaseDto /** * (no documentation provided) */ - (long long *) providerId { return _providerId; } /** * (no documentation provided) */ - (void) setProviderId: (long long *) newProviderId { if (_providerId != NULL) { free(_providerId); } _providerId = newProviderId; } /** * (no documentation provided) */ - (long long *) currentUserId { return _currentUserId; } /** * (no documentation provided) */ - (void) setCurrentUserId: (long long *) newCurrentUserId { if (_currentUserId != NULL) { free(_currentUserId); } _currentUserId = newCurrentUserId; } /** * (no documentation provided) */ - (NSString *) requestId { return _requestId; } /** * (no documentation provided) */ - (void) setRequestId: (NSString *) newRequestId { [newRequestId retain]; [_requestId release]; _requestId = newRequestId; } - (void) dealloc { [self setProviderId: NULL]; [self setCurrentUserId: NULL]; [self setRequestId: nil]; [super dealloc]; } @end /* implementation NOVAGLOBALAPINS0BaseDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0BaseDto (JAXB) @end /*interface NOVAGLOBALAPINS0BaseDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0BaseDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0BaseDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0BaseDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0BaseDto *_nOVAGLOBALAPINS0BaseDto = [[NOVAGLOBALAPINS0BaseDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0BaseDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0BaseDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0BaseDto autorelease]; return _nOVAGLOBALAPINS0BaseDto; } /** * Initialize this instance of NOVAGLOBALAPINS0BaseDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0BaseDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "providerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadLongType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setProviderId: ((long long*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currentUserId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadLongType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setCurrentUserId: ((long long*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "requestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}requestId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setRequestId: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self providerId] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "providerId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}providerId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}providerId..."); #endif status = xmlTextWriterWriteLongType(writer, [self providerId]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}providerId..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}providerId."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}providerId."]; } } if ([self currentUserId] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currentUserId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}currentUserId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}currentUserId..."); #endif status = xmlTextWriterWriteLongType(writer, [self currentUserId]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}currentUserId..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}currentUserId."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}currentUserId."]; } } if ([self requestId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}requestId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}requestId..."); #endif [[self requestId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}requestId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}requestId."]; } } } @end /* implementation NOVAGLOBALAPINS0BaseDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0BaseDto_M */ #ifndef DEF_NOVAGLOBALAPINS0CountryTaxDto_M #define DEF_NOVAGLOBALAPINS0CountryTaxDto_M /** * @author Edward P. Legaspi @since Oct 11, 2013 */ @implementation NOVAGLOBALAPINS0CountryTaxDto /** * (no documentation provided) */ - (NSString *) countryCode { return _countryCode; } /** * (no documentation provided) */ - (void) setCountryCode: (NSString *) newCountryCode { [newCountryCode retain]; [_countryCode release]; _countryCode = newCountryCode; } /** * (no documentation provided) */ - (NSDecimalNumber *) taxValue { return _taxValue; } /** * (no documentation provided) */ - (void) setTaxValue: (NSDecimalNumber *) newTaxValue { [newTaxValue retain]; [_taxValue release]; _taxValue = newTaxValue; } - (void) dealloc { [self setCountryCode: nil]; [self setTaxValue: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0CountryTaxDto *_nOVAGLOBALAPINS0CountryTaxDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0CountryTaxDto = (NOVAGLOBALAPINS0CountryTaxDto *) [NOVAGLOBALAPINS0CountryTaxDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0CountryTaxDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0CountryTaxDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0CountryTaxDto (JAXB) @end /*interface NOVAGLOBALAPINS0CountryTaxDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0CountryTaxDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0CountryTaxDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0CountryTaxDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0CountryTaxDto *_nOVAGLOBALAPINS0CountryTaxDto = [[NOVAGLOBALAPINS0CountryTaxDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0CountryTaxDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0CountryTaxDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0CountryTaxDto autorelease]; return _nOVAGLOBALAPINS0CountryTaxDto; } /** * Initialize this instance of NOVAGLOBALAPINS0CountryTaxDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0CountryTaxDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0CountryTaxDto from an XML reader. The element to be read is * "countryTax". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0CountryTaxDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0CountryTaxDto *_countryTaxDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element countryTax."]; } } if (xmlStrcmp(BAD_CAST "countryTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}countryTax."); #endif _countryTaxDto = (NOVAGLOBALAPINS0CountryTaxDto *)[NOVAGLOBALAPINS0CountryTaxDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}countryTax."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CountryTaxDto. Expected element countryTax. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CountryTaxDto. Expected element countryTax. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _countryTaxDto; } /** * Writes this NOVAGLOBALAPINS0CountryTaxDto to XML under element name "countryTax". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _countryTaxDto The CountryTaxDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0CountryTaxDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryTax", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}countryTax. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}countryTaxDto for root element {}countryTax..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}countryTaxDto for root element {}countryTax..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}countryTax. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countryCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCountryCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxValue", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}taxValue of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}taxValue of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setTaxValue: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self countryCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}countryCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}countryCode..."); #endif [[self countryCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}countryCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}countryCode."]; } } if ([self taxValue]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxValue", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}taxValue."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}taxValue..."); #endif [[self taxValue] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}taxValue..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}taxValue."]; } } } @end /* implementation NOVAGLOBALAPINS0CountryTaxDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0CountryTaxDto_M */ #ifndef DEF_NOVAGLOBALAPINS0ActionStatus_M #define DEF_NOVAGLOBALAPINS0ActionStatus_M /** * @author Edward P. Legaspi @since Oct 3, 2013 */ @implementation NOVAGLOBALAPINS0ActionStatus /** * (no documentation provided) */ - (enum NOVAGLOBALAPINS0ActionStatusEnum *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (enum NOVAGLOBALAPINS0ActionStatusEnum *) newStatus { if (_status != NULL) { free(_status); } _status = newStatus; } /** * (no documentation provided) */ - (int) errorCode { return _errorCode; } /** * (no documentation provided) */ - (void) setErrorCode: (int) newErrorCode { _errorCode = newErrorCode; } /** * (no documentation provided) */ - (NSString *) message { return _message; } /** * (no documentation provided) */ - (void) setMessage: (NSString *) newMessage { [newMessage retain]; [_message release]; _message = newMessage; } - (void) dealloc { [self setStatus: NULL]; [self setMessage: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0ActionStatus *_nOVAGLOBALAPINS0ActionStatus; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0ActionStatus = (NOVAGLOBALAPINS0ActionStatus *) [NOVAGLOBALAPINS0ActionStatus readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0ActionStatus; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0ActionStatus */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0ActionStatus (JAXB) @end /*interface NOVAGLOBALAPINS0ActionStatus (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0ActionStatus (JAXB) /** * Read an instance of NOVAGLOBALAPINS0ActionStatus from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0ActionStatus defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0ActionStatus *_nOVAGLOBALAPINS0ActionStatus = [[NOVAGLOBALAPINS0ActionStatus alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0ActionStatus initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0ActionStatus = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0ActionStatus autorelease]; return _nOVAGLOBALAPINS0ActionStatus; } /** * Initialize this instance of NOVAGLOBALAPINS0ActionStatus according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0ActionStatus to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0ActionStatus from an XML reader. The element to be read is * "actionStatus". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0ActionStatus. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0ActionStatus *_actionStatus = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element actionStatus."]; } } if (xmlStrcmp(BAD_CAST "actionStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}actionStatus."); #endif _actionStatus = (NOVAGLOBALAPINS0ActionStatus *)[NOVAGLOBALAPINS0ActionStatus readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}actionStatus."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0ActionStatus. Expected element actionStatus. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0ActionStatus. Expected element actionStatus. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _actionStatus; } /** * Writes this NOVAGLOBALAPINS0ActionStatus to XML under element name "actionStatus". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _actionStatus The ActionStatus to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0ActionStatus to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "actionStatus", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}actionStatus. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}actionStatus for root element {}actionStatus..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}actionStatus for root element {}actionStatus..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}actionStatus. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadNOVAGLOBALAPINS0ActionStatusEnumType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setStatus: ((enum NOVAGLOBALAPINS0ActionStatusEnum*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "errorCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setErrorCode: *((int*) _child_accessor)]; free(_child_accessor); return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "message", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}message of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setMessage: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self status] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif status = xmlTextWriterWriteNOVAGLOBALAPINS0ActionStatusEnumType(writer, [self status]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}status."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } if (YES) { //always write the primitive element... status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "errorCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}errorCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}errorCode..."); #endif status = xmlTextWriterWriteIntType(writer, &_errorCode); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}errorCode..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}errorCode."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}errorCode."]; } } if ([self message]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "message", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}message."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}message..."); #endif [[self message] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}message..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}message."]; } } } @end /* implementation NOVAGLOBALAPINS0ActionStatus (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0ActionStatus_M */ #ifndef DEF_NOVAGLOBALAPINS0ServicePricePlanDto_M #define DEF_NOVAGLOBALAPINS0ServicePricePlanDto_M /** * @author Edward P. Legaspi @since Oct 11, 2013 */ @implementation NOVAGLOBALAPINS0ServicePricePlanDto /** * (no documentation provided) */ - (NSString *) serviceId { return _serviceId; } /** * (no documentation provided) */ - (void) setServiceId: (NSString *) newServiceId { [newServiceId retain]; [_serviceId release]; _serviceId = newServiceId; } /** * (no documentation provided) */ - (NSString *) organizationId { return _organizationId; } /** * (no documentation provided) */ - (void) setOrganizationId: (NSString *) newOrganizationId { [newOrganizationId retain]; [_organizationId release]; _organizationId = newOrganizationId; } /** * (no documentation provided) */ - (NSString *) taxId { return _taxId; } /** * (no documentation provided) */ - (void) setTaxId: (NSString *) newTaxId { [newTaxId retain]; [_taxId release]; _taxId = newTaxId; } /** * (no documentation provided) */ - (BOOL *) subscriptionProrata { return _subscriptionProrata; } /** * (no documentation provided) */ - (void) setSubscriptionProrata: (BOOL *) newSubscriptionProrata { if (_subscriptionProrata != NULL) { free(_subscriptionProrata); } _subscriptionProrata = newSubscriptionProrata; } /** * (no documentation provided) */ - (BOOL *) terminationProrata { return _terminationProrata; } /** * (no documentation provided) */ - (void) setTerminationProrata: (BOOL *) newTerminationProrata { if (_terminationProrata != NULL) { free(_terminationProrata); } _terminationProrata = newTerminationProrata; } /** * (no documentation provided) */ - (BOOL *) applyInAdvance { return _applyInAdvance; } /** * (no documentation provided) */ - (void) setApplyInAdvance: (BOOL *) newApplyInAdvance { if (_applyInAdvance != NULL) { free(_applyInAdvance); } _applyInAdvance = newApplyInAdvance; } /** * (no documentation provided) */ - (NSString *) param1 { return _param1; } /** * (no documentation provided) */ - (void) setParam1: (NSString *) newParam1 { [newParam1 retain]; [_param1 release]; _param1 = newParam1; } /** * (no documentation provided) */ - (NSString *) param2 { return _param2; } /** * (no documentation provided) */ - (void) setParam2: (NSString *) newParam2 { [newParam2 retain]; [_param2 release]; _param2 = newParam2; } /** * (no documentation provided) */ - (NSString *) param3 { return _param3; } /** * (no documentation provided) */ - (void) setParam3: (NSString *) newParam3 { [newParam3 retain]; [_param3 release]; _param3 = newParam3; } /** * (no documentation provided) */ - (NSString *) billingPeriod { return _billingPeriod; } /** * (no documentation provided) */ - (void) setBillingPeriod: (NSString *) newBillingPeriod { [newBillingPeriod retain]; [_billingPeriod release]; _billingPeriod = newBillingPeriod; } /** * (no documentation provided) */ - (NSArray *) recurringCharges { return _recurringCharges; } /** * (no documentation provided) */ - (void) setRecurringCharges: (NSArray *) newRecurringCharges { [newRecurringCharges retain]; [_recurringCharges release]; _recurringCharges = newRecurringCharges; } /** * (no documentation provided) */ - (NSString *) usageUnit { return _usageUnit; } /** * (no documentation provided) */ - (void) setUsageUnit: (NSString *) newUsageUnit { [newUsageUnit retain]; [_usageUnit release]; _usageUnit = newUsageUnit; } /** * (no documentation provided) */ - (NSArray *) usageCharges { return _usageCharges; } /** * (no documentation provided) */ - (void) setUsageCharges: (NSArray *) newUsageCharges { [newUsageCharges retain]; [_usageCharges release]; _usageCharges = newUsageCharges; } /** * (no documentation provided) */ - (NSArray *) subscriptionFees { return _subscriptionFees; } /** * (no documentation provided) */ - (void) setSubscriptionFees: (NSArray *) newSubscriptionFees { [newSubscriptionFees retain]; [_subscriptionFees release]; _subscriptionFees = newSubscriptionFees; } /** * (no documentation provided) */ - (NSArray *) terminationFees { return _terminationFees; } /** * (no documentation provided) */ - (void) setTerminationFees: (NSArray *) newTerminationFees { [newTerminationFees retain]; [_terminationFees release]; _terminationFees = newTerminationFees; } - (void) dealloc { [self setServiceId: nil]; [self setOrganizationId: nil]; [self setTaxId: nil]; [self setSubscriptionProrata: NULL]; [self setTerminationProrata: NULL]; [self setApplyInAdvance: NULL]; [self setParam1: nil]; [self setParam2: nil]; [self setParam3: nil]; [self setBillingPeriod: nil]; [self setRecurringCharges: nil]; [self setUsageUnit: nil]; [self setUsageCharges: nil]; [self setSubscriptionFees: nil]; [self setTerminationFees: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0ServicePricePlanDto *_nOVAGLOBALAPINS0ServicePricePlanDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0ServicePricePlanDto = (NOVAGLOBALAPINS0ServicePricePlanDto *) [NOVAGLOBALAPINS0ServicePricePlanDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0ServicePricePlanDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0ServicePricePlanDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0ServicePricePlanDto (JAXB) @end /*interface NOVAGLOBALAPINS0ServicePricePlanDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0ServicePricePlanDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0ServicePricePlanDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0ServicePricePlanDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0ServicePricePlanDto *_nOVAGLOBALAPINS0ServicePricePlanDto = [[NOVAGLOBALAPINS0ServicePricePlanDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0ServicePricePlanDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0ServicePricePlanDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0ServicePricePlanDto autorelease]; return _nOVAGLOBALAPINS0ServicePricePlanDto; } /** * Initialize this instance of NOVAGLOBALAPINS0ServicePricePlanDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0ServicePricePlanDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0ServicePricePlanDto from an XML reader. The element to be read is * "servicePlan". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0ServicePricePlanDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0ServicePricePlanDto *_servicePricePlanDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element servicePlan."]; } } if (xmlStrcmp(BAD_CAST "servicePlan", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}servicePlan."); #endif _servicePricePlanDto = (NOVAGLOBALAPINS0ServicePricePlanDto *)[NOVAGLOBALAPINS0ServicePricePlanDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}servicePlan."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0ServicePricePlanDto. Expected element servicePlan. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0ServicePricePlanDto. Expected element servicePlan. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _servicePricePlanDto; } /** * Writes this NOVAGLOBALAPINS0ServicePricePlanDto to XML under element name "servicePlan". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _servicePricePlanDto The ServicePricePlanDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0ServicePricePlanDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "servicePlan", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}servicePlan. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}servicePricePlanDto for root element {}servicePlan..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}servicePricePlanDto for root element {}servicePlan..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}servicePlan. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "serviceId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setServiceId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setOrganizationId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}taxId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}taxId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTaxId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionProrata", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setSubscriptionProrata: ((BOOL*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationProrata", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setTerminationProrata: ((BOOL*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "applyInAdvance", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setApplyInAdvance: ((BOOL*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param1", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}param1 of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}param1 of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setParam1: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param2", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}param2 of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}param2 of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setParam2: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param3", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}param3 of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}param3 of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setParam3: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "billingPeriod", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}billingPeriod of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}billingPeriod of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setBillingPeriod: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recurringCharges", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}recurringCharges of type {}recurringChargeDto."); #endif __child = [NOVAGLOBALAPINS0RecurringChargeDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}recurringCharges of type {}recurringChargeDto."); #endif if ([self recurringCharges]) { [self setRecurringCharges: [[self recurringCharges] arrayByAddingObject: __child]]; } else { [self setRecurringCharges: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "usageUnit", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}usageUnit of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}usageUnit of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setUsageUnit: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "usageCharges", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}usageCharges of type {}usageChargeDto."); #endif __child = [NOVAGLOBALAPINS0UsageChargeDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}usageCharges of type {}usageChargeDto."); #endif if ([self usageCharges]) { [self setUsageCharges: [[self usageCharges] arrayByAddingObject: __child]]; } else { [self setUsageCharges: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionFees", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}subscriptionFees of type {}subscriptionFeeDto."); #endif __child = [NOVAGLOBALAPINS0SubscriptionFeeDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}subscriptionFees of type {}subscriptionFeeDto."); #endif if ([self subscriptionFees]) { [self setSubscriptionFees: [[self subscriptionFees] arrayByAddingObject: __child]]; } else { [self setSubscriptionFees: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationFees", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}terminationFees of type {}terminationFeeDto."); #endif __child = [NOVAGLOBALAPINS0TerminationFeeDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}terminationFees of type {}terminationFeeDto."); #endif if ([self terminationFees]) { [self setTerminationFees: [[self terminationFees] arrayByAddingObject: __child]]; } else { [self setTerminationFees: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self serviceId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "serviceId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}serviceId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}serviceId..."); #endif [[self serviceId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}serviceId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}serviceId."]; } } if ([self organizationId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}organizationId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}organizationId..."); #endif [[self organizationId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}organizationId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}organizationId."]; } } if ([self taxId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}taxId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}taxId..."); #endif [[self taxId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}taxId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}taxId."]; } } if ([self subscriptionProrata] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionProrata", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}subscriptionProrata."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}subscriptionProrata..."); #endif status = xmlTextWriterWriteBooleanType(writer, [self subscriptionProrata]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}subscriptionProrata..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}subscriptionProrata."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}subscriptionProrata."]; } } if ([self terminationProrata] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationProrata", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}terminationProrata."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}terminationProrata..."); #endif status = xmlTextWriterWriteBooleanType(writer, [self terminationProrata]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}terminationProrata..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}terminationProrata."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}terminationProrata."]; } } if ([self applyInAdvance] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "applyInAdvance", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}applyInAdvance."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}applyInAdvance..."); #endif status = xmlTextWriterWriteBooleanType(writer, [self applyInAdvance]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}applyInAdvance..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}applyInAdvance."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}applyInAdvance."]; } } if ([self param1]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param1", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}param1."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}param1..."); #endif [[self param1] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}param1..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}param1."]; } } if ([self param2]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param2", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}param2."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}param2..."); #endif [[self param2] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}param2..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}param2."]; } } if ([self param3]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param3", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}param3."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}param3..."); #endif [[self param3] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}param3..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}param3."]; } } if ([self billingPeriod]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "billingPeriod", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}billingPeriod."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}billingPeriod..."); #endif [[self billingPeriod] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}billingPeriod..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}billingPeriod."]; } } if ([self recurringCharges]) { __enumerator = [[self recurringCharges] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recurringCharges", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}recurringCharges."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}recurringCharges..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}recurringCharges..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}recurringCharges."]; } } //end item iterator. } if ([self usageUnit]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "usageUnit", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}usageUnit."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}usageUnit..."); #endif [[self usageUnit] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}usageUnit..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}usageUnit."]; } } if ([self usageCharges]) { __enumerator = [[self usageCharges] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "usageCharges", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}usageCharges."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}usageCharges..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}usageCharges..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}usageCharges."]; } } //end item iterator. } if ([self subscriptionFees]) { __enumerator = [[self subscriptionFees] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionFees", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}subscriptionFees."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}subscriptionFees..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}subscriptionFees..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}subscriptionFees."]; } } //end item iterator. } if ([self terminationFees]) { __enumerator = [[self terminationFees] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationFees", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}terminationFees."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}terminationFees..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}terminationFees..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}terminationFees."]; } } //end item iterator. } } @end /* implementation NOVAGLOBALAPINS0ServicePricePlanDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0ServicePricePlanDto_M */ #ifndef DEF_NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto_M #define DEF_NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto_M /** * @author Edward P. Legaspi @since Nov 13, 2013 */ @implementation NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto /** * (no documentation provided) */ - (NSString *) userId { return _userId; } /** * (no documentation provided) */ - (void) setUserId: (NSString *) newUserId { [newUserId retain]; [_userId release]; _userId = newUserId; } /** * (no documentation provided) */ - (NSString *) organizationId { return _organizationId; } /** * (no documentation provided) */ - (void) setOrganizationId: (NSString *) newOrganizationId { [newOrganizationId retain]; [_organizationId release]; _organizationId = newOrganizationId; } /** * (no documentation provided) */ - (NSString *) offerId { return _offerId; } /** * (no documentation provided) */ - (void) setOfferId: (NSString *) newOfferId { [newOfferId retain]; [_offerId release]; _offerId = newOfferId; } /** * (no documentation provided) */ - (NSArray *) servicesToAdd { return _servicesToAdd; } /** * (no documentation provided) */ - (void) setServicesToAdd: (NSArray *) newServicesToAdd { [newServicesToAdd retain]; [_servicesToAdd release]; _servicesToAdd = newServicesToAdd; } /** * (no documentation provided) */ - (NSArray *) creditLimits { return _creditLimits; } /** * (no documentation provided) */ - (void) setCreditLimits: (NSArray *) newCreditLimits { [newCreditLimits retain]; [_creditLimits release]; _creditLimits = newCreditLimits; } /** * (no documentation provided) */ - (NSDate *) subscriptionDate { return _subscriptionDate; } /** * (no documentation provided) */ - (void) setSubscriptionDate: (NSDate *) newSubscriptionDate { [newSubscriptionDate retain]; [_subscriptionDate release]; _subscriptionDate = newSubscriptionDate; } - (void) dealloc { [self setUserId: nil]; [self setOrganizationId: nil]; [self setOfferId: nil]; [self setServicesToAdd: nil]; [self setCreditLimits: nil]; [self setSubscriptionDate: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto *_nOVAGLOBALAPINS0SubscriptionWithCreditLimitDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0SubscriptionWithCreditLimitDto = (NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto *) [NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0SubscriptionWithCreditLimitDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto (JAXB) @end /*interface NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto *_nOVAGLOBALAPINS0SubscriptionWithCreditLimitDto = [[NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0SubscriptionWithCreditLimitDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0SubscriptionWithCreditLimitDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0SubscriptionWithCreditLimitDto autorelease]; return _nOVAGLOBALAPINS0SubscriptionWithCreditLimitDto; } /** * Initialize this instance of NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto from an XML reader. The element to be read is * "subscriptionWithCreditLimit". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto *_subscriptionWithCreditLimitDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element subscriptionWithCreditLimit."]; } } if (xmlStrcmp(BAD_CAST "subscriptionWithCreditLimit", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}subscriptionWithCreditLimit."); #endif _subscriptionWithCreditLimitDto = (NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto *)[NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}subscriptionWithCreditLimit."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto. Expected element subscriptionWithCreditLimit. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto. Expected element subscriptionWithCreditLimit. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _subscriptionWithCreditLimitDto; } /** * Writes this NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto to XML under element name "subscriptionWithCreditLimit". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitDto The SubscriptionWithCreditLimitDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionWithCreditLimit", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}subscriptionWithCreditLimit. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}subscriptionWithCreditLimitDto for root element {}subscriptionWithCreditLimit..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}subscriptionWithCreditLimitDto for root element {}subscriptionWithCreditLimit..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}subscriptionWithCreditLimit. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "userId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setUserId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setOrganizationId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "offerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setOfferId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "servicesToAdd", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}servicesToAdd of type {}serviceToAddDto."); #endif __child = [NOVAGLOBALAPINS0ServiceToAddDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}servicesToAdd of type {}serviceToAddDto."); #endif if ([self servicesToAdd]) { [self setServicesToAdd: [[self servicesToAdd] arrayByAddingObject: __child]]; } else { [self setServicesToAdd: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "creditLimits", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}creditLimits of type {}creditLimitDto."); #endif __child = [NOVAGLOBALAPINS0CreditLimitDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}creditLimits of type {}creditLimitDto."); #endif if ([self creditLimits]) { [self setCreditLimits: [[self creditLimits] arrayByAddingObject: __child]]; } else { [self setCreditLimits: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}subscriptionDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}subscriptionDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setSubscriptionDate: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self userId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "userId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}userId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}userId..."); #endif [[self userId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}userId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}userId."]; } } if ([self organizationId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}organizationId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}organizationId..."); #endif [[self organizationId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}organizationId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}organizationId."]; } } if ([self offerId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offerId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}offerId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}offerId..."); #endif [[self offerId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}offerId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}offerId."]; } } if ([self servicesToAdd]) { __enumerator = [[self servicesToAdd] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "servicesToAdd", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}servicesToAdd."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}servicesToAdd..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}servicesToAdd..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}servicesToAdd."]; } } //end item iterator. } if ([self creditLimits]) { __enumerator = [[self creditLimits] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "creditLimits", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}creditLimits."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}creditLimits..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}creditLimits..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}creditLimits."]; } } //end item iterator. } if ([self subscriptionDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}subscriptionDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}subscriptionDate..."); #endif [[self subscriptionDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}subscriptionDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}subscriptionDate."]; } } } @end /* implementation NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0SubscriptionWithCreditLimitDto_M */ #ifndef DEF_NOVAGLOBALAPINS0UserDto_M #define DEF_NOVAGLOBALAPINS0UserDto_M /** * @author Edward P. Legaspi @since Oct 11, 2013 */ @implementation NOVAGLOBALAPINS0UserDto /** * (no documentation provided) */ - (NSString *) userId { return _userId; } /** * (no documentation provided) */ - (void) setUserId: (NSString *) newUserId { [newUserId retain]; [_userId release]; _userId = newUserId; } /** * (no documentation provided) */ - (NSString *) name { return _name; } /** * (no documentation provided) */ - (void) setName: (NSString *) newName { [newName retain]; [_name release]; _name = newName; } /** * (no documentation provided) */ - (NSString *) organizationId { return _organizationId; } /** * (no documentation provided) */ - (void) setOrganizationId: (NSString *) newOrganizationId { [newOrganizationId retain]; [_organizationId release]; _organizationId = newOrganizationId; } - (void) dealloc { [self setUserId: nil]; [self setName: nil]; [self setOrganizationId: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0UserDto *_nOVAGLOBALAPINS0UserDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0UserDto = (NOVAGLOBALAPINS0UserDto *) [NOVAGLOBALAPINS0UserDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0UserDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0UserDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0UserDto (JAXB) @end /*interface NOVAGLOBALAPINS0UserDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0UserDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0UserDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0UserDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0UserDto *_nOVAGLOBALAPINS0UserDto = [[NOVAGLOBALAPINS0UserDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0UserDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0UserDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0UserDto autorelease]; return _nOVAGLOBALAPINS0UserDto; } /** * Initialize this instance of NOVAGLOBALAPINS0UserDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0UserDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0UserDto from an XML reader. The element to be read is * "user". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0UserDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0UserDto *_userDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element user."]; } } if (xmlStrcmp(BAD_CAST "user", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}user."); #endif _userDto = (NOVAGLOBALAPINS0UserDto *)[NOVAGLOBALAPINS0UserDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}user."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0UserDto. Expected element user. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0UserDto. Expected element user. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _userDto; } /** * Writes this NOVAGLOBALAPINS0UserDto to XML under element name "user". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _userDto The UserDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0UserDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "user", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}user. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}userDto for root element {}user..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}userDto for root element {}user..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}user. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "userId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setUserId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setName: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setOrganizationId: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self userId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "userId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}userId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}userId..."); #endif [[self userId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}userId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}userId."]; } } if ([self name]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}name."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}name..."); #endif [[self name] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}name..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}name."]; } } if ([self organizationId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}organizationId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}organizationId..."); #endif [[self organizationId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}organizationId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}organizationId."]; } } } @end /* implementation NOVAGLOBALAPINS0UserDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0UserDto_M */ #ifndef DEF_NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto_M #define DEF_NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto_M /** * @author Edward P. Legaspi */ @implementation NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto /** * (no documentation provided) */ - (NSString *) userId { return _userId; } /** * (no documentation provided) */ - (void) setUserId: (NSString *) newUserId { [newUserId retain]; [_userId release]; _userId = newUserId; } /** * (no documentation provided) */ - (NSString *) organizationId { return _organizationId; } /** * (no documentation provided) */ - (void) setOrganizationId: (NSString *) newOrganizationId { [newOrganizationId retain]; [_organizationId release]; _organizationId = newOrganizationId; } /** * (no documentation provided) */ - (NSString *) subscriptionId { return _subscriptionId; } /** * (no documentation provided) */ - (void) setSubscriptionId: (NSString *) newSubscriptionId { [newSubscriptionId retain]; [_subscriptionId release]; _subscriptionId = newSubscriptionId; } /** * (no documentation provided) */ - (NSDate *) terminationDate { return _terminationDate; } /** * (no documentation provided) */ - (void) setTerminationDate: (NSDate *) newTerminationDate { [newTerminationDate retain]; [_terminationDate release]; _terminationDate = newTerminationDate; } - (void) dealloc { [self setUserId: nil]; [self setOrganizationId: nil]; [self setSubscriptionId: nil]; [self setTerminationDate: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto *_nOVAGLOBALAPINS0TerminateCustomerSubscriptionDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0TerminateCustomerSubscriptionDto = (NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto *) [NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0TerminateCustomerSubscriptionDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto (JAXB) @end /*interface NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto *_nOVAGLOBALAPINS0TerminateCustomerSubscriptionDto = [[NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0TerminateCustomerSubscriptionDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0TerminateCustomerSubscriptionDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0TerminateCustomerSubscriptionDto autorelease]; return _nOVAGLOBALAPINS0TerminateCustomerSubscriptionDto; } /** * Initialize this instance of NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto from an XML reader. The element to be read is * "terminateSubscription". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto *_terminateCustomerSubscriptionDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element terminateSubscription."]; } } if (xmlStrcmp(BAD_CAST "terminateSubscription", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}terminateSubscription."); #endif _terminateCustomerSubscriptionDto = (NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto *)[NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}terminateSubscription."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto. Expected element terminateSubscription. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto. Expected element terminateSubscription. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _terminateCustomerSubscriptionDto; } /** * Writes this NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto to XML under element name "terminateSubscription". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _terminateCustomerSubscriptionDto The TerminateCustomerSubscriptionDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminateSubscription", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}terminateSubscription. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}terminateCustomerSubscriptionDto for root element {}terminateSubscription..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}terminateCustomerSubscriptionDto for root element {}terminateSubscription..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}terminateSubscription. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "userId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}userId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setUserId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setOrganizationId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}subscriptionId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}subscriptionId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setSubscriptionId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}terminationDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}terminationDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setTerminationDate: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self userId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "userId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}userId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}userId..."); #endif [[self userId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}userId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}userId."]; } } if ([self organizationId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}organizationId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}organizationId..."); #endif [[self organizationId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}organizationId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}organizationId."]; } } if ([self subscriptionId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}subscriptionId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}subscriptionId..."); #endif [[self subscriptionId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}subscriptionId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}subscriptionId."]; } } if ([self terminationDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}terminationDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}terminationDate..."); #endif [[self terminationDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}terminationDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}terminationDate."]; } } } @end /* implementation NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0TerminateCustomerSubscriptionDto_M */ #ifndef DEF_NOVAGLOBALAPINS0TaxDto_M #define DEF_NOVAGLOBALAPINS0TaxDto_M /** * @author Edward P. Legaspi @since Oct 11, 2013 */ @implementation NOVAGLOBALAPINS0TaxDto /** * (no documentation provided) */ - (NSString *) taxId { return _taxId; } /** * (no documentation provided) */ - (void) setTaxId: (NSString *) newTaxId { [newTaxId retain]; [_taxId release]; _taxId = newTaxId; } /** * (no documentation provided) */ - (NSString *) name { return _name; } /** * (no documentation provided) */ - (void) setName: (NSString *) newName { [newName retain]; [_name release]; _name = newName; } /** * (no documentation provided) */ - (NSArray *) countryTaxes { return _countryTaxes; } /** * (no documentation provided) */ - (void) setCountryTaxes: (NSArray *) newCountryTaxes { [newCountryTaxes retain]; [_countryTaxes release]; _countryTaxes = newCountryTaxes; } - (void) dealloc { [self setTaxId: nil]; [self setName: nil]; [self setCountryTaxes: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0TaxDto *_nOVAGLOBALAPINS0TaxDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0TaxDto = (NOVAGLOBALAPINS0TaxDto *) [NOVAGLOBALAPINS0TaxDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0TaxDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0TaxDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0TaxDto (JAXB) @end /*interface NOVAGLOBALAPINS0TaxDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0TaxDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0TaxDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0TaxDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0TaxDto *_nOVAGLOBALAPINS0TaxDto = [[NOVAGLOBALAPINS0TaxDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0TaxDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0TaxDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0TaxDto autorelease]; return _nOVAGLOBALAPINS0TaxDto; } /** * Initialize this instance of NOVAGLOBALAPINS0TaxDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0TaxDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0TaxDto from an XML reader. The element to be read is * "tax". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0TaxDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0TaxDto *_taxDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element tax."]; } } if (xmlStrcmp(BAD_CAST "tax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}tax."); #endif _taxDto = (NOVAGLOBALAPINS0TaxDto *)[NOVAGLOBALAPINS0TaxDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}tax."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0TaxDto. Expected element tax. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0TaxDto. Expected element tax. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _taxDto; } /** * Writes this NOVAGLOBALAPINS0TaxDto to XML under element name "tax". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _taxDto The TaxDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0TaxDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "tax", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}tax. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}taxDto for root element {}tax..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}taxDto for root element {}tax..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}tax. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}taxId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}taxId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTaxId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setName: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countryTaxes", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}countryTaxes of type {}countryTaxDto."); #endif __child = [NOVAGLOBALAPINS0CountryTaxDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}countryTaxes of type {}countryTaxDto."); #endif if ([self countryTaxes]) { [self setCountryTaxes: [[self countryTaxes] arrayByAddingObject: __child]]; } else { [self setCountryTaxes: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self taxId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}taxId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}taxId..."); #endif [[self taxId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}taxId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}taxId."]; } } if ([self name]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}name."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}name..."); #endif [[self name] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}name..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}name."]; } } if ([self countryTaxes]) { __enumerator = [[self countryTaxes] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryTaxes", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}countryTaxes."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}countryTaxes..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}countryTaxes..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}countryTaxes."]; } } //end item iterator. } } @end /* implementation NOVAGLOBALAPINS0TaxDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0TaxDto_M */ #ifndef DEF_NOVAGLOBALAPINS0ServiceToTerminateDto_M #define DEF_NOVAGLOBALAPINS0ServiceToTerminateDto_M /** * @author Edward P. Legaspi @since Nov 13, 2013 */ @implementation NOVAGLOBALAPINS0ServiceToTerminateDto /** * (no documentation provided) */ - (NSString *) serviceId { return _serviceId; } /** * (no documentation provided) */ - (void) setServiceId: (NSString *) newServiceId { [newServiceId retain]; [_serviceId release]; _serviceId = newServiceId; } /** * (no documentation provided) */ - (NSDate *) terminationDate { return _terminationDate; } /** * (no documentation provided) */ - (void) setTerminationDate: (NSDate *) newTerminationDate { [newTerminationDate retain]; [_terminationDate release]; _terminationDate = newTerminationDate; } - (void) dealloc { [self setServiceId: nil]; [self setTerminationDate: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0ServiceToTerminateDto *_nOVAGLOBALAPINS0ServiceToTerminateDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0ServiceToTerminateDto = (NOVAGLOBALAPINS0ServiceToTerminateDto *) [NOVAGLOBALAPINS0ServiceToTerminateDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0ServiceToTerminateDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0ServiceToTerminateDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0ServiceToTerminateDto (JAXB) @end /*interface NOVAGLOBALAPINS0ServiceToTerminateDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0ServiceToTerminateDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0ServiceToTerminateDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0ServiceToTerminateDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0ServiceToTerminateDto *_nOVAGLOBALAPINS0ServiceToTerminateDto = [[NOVAGLOBALAPINS0ServiceToTerminateDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0ServiceToTerminateDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0ServiceToTerminateDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0ServiceToTerminateDto autorelease]; return _nOVAGLOBALAPINS0ServiceToTerminateDto; } /** * Initialize this instance of NOVAGLOBALAPINS0ServiceToTerminateDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0ServiceToTerminateDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0ServiceToTerminateDto from an XML reader. The element to be read is * "serviceToTerminate". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0ServiceToTerminateDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0ServiceToTerminateDto *_serviceToTerminateDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element serviceToTerminate."]; } } if (xmlStrcmp(BAD_CAST "serviceToTerminate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}serviceToTerminate."); #endif _serviceToTerminateDto = (NOVAGLOBALAPINS0ServiceToTerminateDto *)[NOVAGLOBALAPINS0ServiceToTerminateDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}serviceToTerminate."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0ServiceToTerminateDto. Expected element serviceToTerminate. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0ServiceToTerminateDto. Expected element serviceToTerminate. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _serviceToTerminateDto; } /** * Writes this NOVAGLOBALAPINS0ServiceToTerminateDto to XML under element name "serviceToTerminate". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _serviceToTerminateDto The ServiceToTerminateDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0ServiceToTerminateDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "serviceToTerminate", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}serviceToTerminate. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}serviceToTerminateDto for root element {}serviceToTerminate..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}serviceToTerminateDto for root element {}serviceToTerminate..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}serviceToTerminate. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "serviceId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setServiceId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}terminationDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}terminationDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setTerminationDate: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self serviceId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "serviceId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}serviceId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}serviceId..."); #endif [[self serviceId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}serviceId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}serviceId."]; } } if ([self terminationDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}terminationDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}terminationDate..."); #endif [[self terminationDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}terminationDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}terminationDate."]; } } } @end /* implementation NOVAGLOBALAPINS0ServiceToTerminateDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0ServiceToTerminateDto_M */ #ifndef DEF_NOVAGLOBALAPINS0ServiceToAddDto_M #define DEF_NOVAGLOBALAPINS0ServiceToAddDto_M /** * @author Edward P. Legaspi @since Nov 13, 2013 */ @implementation NOVAGLOBALAPINS0ServiceToAddDto /** * (no documentation provided) */ - (NSString *) serviceId { return _serviceId; } /** * (no documentation provided) */ - (void) setServiceId: (NSString *) newServiceId { [newServiceId retain]; [_serviceId release]; _serviceId = newServiceId; } /** * (no documentation provided) */ - (NSDate *) subscriptionDate { return _subscriptionDate; } /** * (no documentation provided) */ - (void) setSubscriptionDate: (NSDate *) newSubscriptionDate { [newSubscriptionDate retain]; [_subscriptionDate release]; _subscriptionDate = newSubscriptionDate; } /** * (no documentation provided) */ - (NSString *) param1 { return _param1; } /** * (no documentation provided) */ - (void) setParam1: (NSString *) newParam1 { [newParam1 retain]; [_param1 release]; _param1 = newParam1; } /** * (no documentation provided) */ - (NSString *) param2 { return _param2; } /** * (no documentation provided) */ - (void) setParam2: (NSString *) newParam2 { [newParam2 retain]; [_param2 release]; _param2 = newParam2; } /** * (no documentation provided) */ - (NSString *) param3 { return _param3; } /** * (no documentation provided) */ - (void) setParam3: (NSString *) newParam3 { [newParam3 retain]; [_param3 release]; _param3 = newParam3; } - (void) dealloc { [self setServiceId: nil]; [self setSubscriptionDate: nil]; [self setParam1: nil]; [self setParam2: nil]; [self setParam3: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0ServiceToAddDto *_nOVAGLOBALAPINS0ServiceToAddDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0ServiceToAddDto = (NOVAGLOBALAPINS0ServiceToAddDto *) [NOVAGLOBALAPINS0ServiceToAddDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0ServiceToAddDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0ServiceToAddDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0ServiceToAddDto (JAXB) @end /*interface NOVAGLOBALAPINS0ServiceToAddDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0ServiceToAddDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0ServiceToAddDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0ServiceToAddDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0ServiceToAddDto *_nOVAGLOBALAPINS0ServiceToAddDto = [[NOVAGLOBALAPINS0ServiceToAddDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0ServiceToAddDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0ServiceToAddDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0ServiceToAddDto autorelease]; return _nOVAGLOBALAPINS0ServiceToAddDto; } /** * Initialize this instance of NOVAGLOBALAPINS0ServiceToAddDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0ServiceToAddDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0ServiceToAddDto from an XML reader. The element to be read is * "serviceToAdd". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0ServiceToAddDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0ServiceToAddDto *_serviceToAddDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element serviceToAdd."]; } } if (xmlStrcmp(BAD_CAST "serviceToAdd", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}serviceToAdd."); #endif _serviceToAddDto = (NOVAGLOBALAPINS0ServiceToAddDto *)[NOVAGLOBALAPINS0ServiceToAddDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}serviceToAdd."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0ServiceToAddDto. Expected element serviceToAdd. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0ServiceToAddDto. Expected element serviceToAdd. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _serviceToAddDto; } /** * Writes this NOVAGLOBALAPINS0ServiceToAddDto to XML under element name "serviceToAdd". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _serviceToAddDto The ServiceToAddDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0ServiceToAddDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "serviceToAdd", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}serviceToAdd. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}serviceToAddDto for root element {}serviceToAdd..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}serviceToAddDto for root element {}serviceToAdd..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}serviceToAdd. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "serviceId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setServiceId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}subscriptionDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}subscriptionDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setSubscriptionDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param1", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}param1 of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}param1 of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setParam1: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param2", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}param2 of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}param2 of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setParam2: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param3", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}param3 of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}param3 of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setParam3: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self serviceId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "serviceId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}serviceId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}serviceId..."); #endif [[self serviceId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}serviceId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}serviceId."]; } } if ([self subscriptionDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}subscriptionDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}subscriptionDate..."); #endif [[self subscriptionDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}subscriptionDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}subscriptionDate."]; } } if ([self param1]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param1", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}param1."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}param1..."); #endif [[self param1] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}param1..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}param1."]; } } if ([self param2]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param2", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}param2."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}param2..."); #endif [[self param2] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}param2..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}param2."]; } } if ([self param3]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param3", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}param3."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}param3..."); #endif [[self param3] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}param3..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}param3."]; } } } @end /* implementation NOVAGLOBALAPINS0ServiceToAddDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0ServiceToAddDto_M */ #ifndef DEF_NOVAGLOBALAPINS0ServiceDto_M #define DEF_NOVAGLOBALAPINS0ServiceDto_M /** * @author Edward P. Legaspi @since Oct 11, 2013 */ @implementation NOVAGLOBALAPINS0ServiceDto /** * (no documentation provided) */ - (NSString *) serviceId { return _serviceId; } /** * (no documentation provided) */ - (void) setServiceId: (NSString *) newServiceId { [newServiceId retain]; [_serviceId release]; _serviceId = newServiceId; } /** * (no documentation provided) */ - (NSArray *) descriptions { return _descriptions; } /** * (no documentation provided) */ - (void) setDescriptions: (NSArray *) newDescriptions { [newDescriptions retain]; [_descriptions release]; _descriptions = newDescriptions; } - (void) dealloc { [self setServiceId: nil]; [self setDescriptions: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0ServiceDto *_nOVAGLOBALAPINS0ServiceDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0ServiceDto = (NOVAGLOBALAPINS0ServiceDto *) [NOVAGLOBALAPINS0ServiceDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0ServiceDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0ServiceDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0ServiceDto (JAXB) @end /*interface NOVAGLOBALAPINS0ServiceDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0ServiceDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0ServiceDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0ServiceDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0ServiceDto *_nOVAGLOBALAPINS0ServiceDto = [[NOVAGLOBALAPINS0ServiceDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0ServiceDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0ServiceDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0ServiceDto autorelease]; return _nOVAGLOBALAPINS0ServiceDto; } /** * Initialize this instance of NOVAGLOBALAPINS0ServiceDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0ServiceDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0ServiceDto from an XML reader. The element to be read is * "service". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0ServiceDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0ServiceDto *_serviceDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element service."]; } } if (xmlStrcmp(BAD_CAST "service", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}service."); #endif _serviceDto = (NOVAGLOBALAPINS0ServiceDto *)[NOVAGLOBALAPINS0ServiceDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}service."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0ServiceDto. Expected element service. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0ServiceDto. Expected element service. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _serviceDto; } /** * Writes this NOVAGLOBALAPINS0ServiceDto to XML under element name "service". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _serviceDto The ServiceDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0ServiceDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "service", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}service. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}serviceDto for root element {}service..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}serviceDto for root element {}service..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}service. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "serviceId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}serviceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setServiceId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "descriptions", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}descriptions of type {}descriptionDto."); #endif __child = [NOVAGLOBALAPINS0DescriptionDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}descriptions of type {}descriptionDto."); #endif if ([self descriptions]) { [self setDescriptions: [[self descriptions] arrayByAddingObject: __child]]; } else { [self setDescriptions: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self serviceId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "serviceId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}serviceId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}serviceId..."); #endif [[self serviceId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}serviceId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}serviceId."]; } } if ([self descriptions]) { __enumerator = [[self descriptions] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "descriptions", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}descriptions."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}descriptions..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}descriptions..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}descriptions."]; } } //end item iterator. } } @end /* implementation NOVAGLOBALAPINS0ServiceDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0ServiceDto_M */ #ifndef DEF_NOVAGLOBALAPINS0RatedTransactionDTO_M #define DEF_NOVAGLOBALAPINS0RatedTransactionDTO_M /** * @author R.AITYAAZZA */ @implementation NOVAGLOBALAPINS0RatedTransactionDTO /** * (no documentation provided) */ - (NSDate *) usageDate { return _usageDate; } /** * (no documentation provided) */ - (void) setUsageDate: (NSDate *) newUsageDate { [newUsageDate retain]; [_usageDate release]; _usageDate = newUsageDate; } /** * (no documentation provided) */ - (NSDecimalNumber *) unitAmountWithoutTax { return _unitAmountWithoutTax; } /** * (no documentation provided) */ - (void) setUnitAmountWithoutTax: (NSDecimalNumber *) newUnitAmountWithoutTax { [newUnitAmountWithoutTax retain]; [_unitAmountWithoutTax release]; _unitAmountWithoutTax = newUnitAmountWithoutTax; } /** * (no documentation provided) */ - (NSDecimalNumber *) unitAmountWithTax { return _unitAmountWithTax; } /** * (no documentation provided) */ - (void) setUnitAmountWithTax: (NSDecimalNumber *) newUnitAmountWithTax { [newUnitAmountWithTax retain]; [_unitAmountWithTax release]; _unitAmountWithTax = newUnitAmountWithTax; } /** * (no documentation provided) */ - (NSDecimalNumber *) unitAmountTax { return _unitAmountTax; } /** * (no documentation provided) */ - (void) setUnitAmountTax: (NSDecimalNumber *) newUnitAmountTax { [newUnitAmountTax retain]; [_unitAmountTax release]; _unitAmountTax = newUnitAmountTax; } /** * (no documentation provided) */ - (NSDecimalNumber *) quantity { return _quantity; } /** * (no documentation provided) */ - (void) setQuantity: (NSDecimalNumber *) newQuantity { [newQuantity retain]; [_quantity release]; _quantity = newQuantity; } /** * (no documentation provided) */ - (NSDecimalNumber *) amountWithoutTax { return _amountWithoutTax; } /** * (no documentation provided) */ - (void) setAmountWithoutTax: (NSDecimalNumber *) newAmountWithoutTax { [newAmountWithoutTax retain]; [_amountWithoutTax release]; _amountWithoutTax = newAmountWithoutTax; } /** * (no documentation provided) */ - (NSDecimalNumber *) amountWithTax { return _amountWithTax; } /** * (no documentation provided) */ - (void) setAmountWithTax: (NSDecimalNumber *) newAmountWithTax { [newAmountWithTax retain]; [_amountWithTax release]; _amountWithTax = newAmountWithTax; } /** * (no documentation provided) */ - (NSDecimalNumber *) amountTax { return _amountTax; } /** * (no documentation provided) */ - (void) setAmountTax: (NSDecimalNumber *) newAmountTax { [newAmountTax retain]; [_amountTax release]; _amountTax = newAmountTax; } /** * (no documentation provided) */ - (NSString *) code { return _code; } /** * (no documentation provided) */ - (void) setCode: (NSString *) newCode { [newCode retain]; [_code release]; _code = newCode; } /** * (no documentation provided) */ - (NSString *) description { return _description; } /** * (no documentation provided) */ - (void) setDescription: (NSString *) newDescription { [newDescription retain]; [_description release]; _description = newDescription; } /** * (no documentation provided) */ - (BOOL) doNotTriggerInvoicing { return _doNotTriggerInvoicing; } /** * (no documentation provided) */ - (void) setDoNotTriggerInvoicing: (BOOL) newDoNotTriggerInvoicing { _doNotTriggerInvoicing = newDoNotTriggerInvoicing; } - (void) dealloc { [self setUsageDate: nil]; [self setUnitAmountWithoutTax: nil]; [self setUnitAmountWithTax: nil]; [self setUnitAmountTax: nil]; [self setQuantity: nil]; [self setAmountWithoutTax: nil]; [self setAmountWithTax: nil]; [self setAmountTax: nil]; [self setCode: nil]; [self setDescription: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0RatedTransactionDTO *_nOVAGLOBALAPINS0RatedTransactionDTO; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0RatedTransactionDTO = (NOVAGLOBALAPINS0RatedTransactionDTO *) [NOVAGLOBALAPINS0RatedTransactionDTO readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0RatedTransactionDTO; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0RatedTransactionDTO */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0RatedTransactionDTO (JAXB) @end /*interface NOVAGLOBALAPINS0RatedTransactionDTO (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0RatedTransactionDTO (JAXB) /** * Read an instance of NOVAGLOBALAPINS0RatedTransactionDTO from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0RatedTransactionDTO defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0RatedTransactionDTO *_nOVAGLOBALAPINS0RatedTransactionDTO = [[NOVAGLOBALAPINS0RatedTransactionDTO alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0RatedTransactionDTO initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0RatedTransactionDTO = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0RatedTransactionDTO autorelease]; return _nOVAGLOBALAPINS0RatedTransactionDTO; } /** * Initialize this instance of NOVAGLOBALAPINS0RatedTransactionDTO according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0RatedTransactionDTO to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0RatedTransactionDTO from an XML reader. The element to be read is * "ratedTransaction". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0RatedTransactionDTO. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0RatedTransactionDTO *_ratedTransactionDTO = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element ratedTransaction."]; } } if (xmlStrcmp(BAD_CAST "ratedTransaction", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}ratedTransaction."); #endif _ratedTransactionDTO = (NOVAGLOBALAPINS0RatedTransactionDTO *)[NOVAGLOBALAPINS0RatedTransactionDTO readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}ratedTransaction."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0RatedTransactionDTO. Expected element ratedTransaction. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0RatedTransactionDTO. Expected element ratedTransaction. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _ratedTransactionDTO; } /** * Writes this NOVAGLOBALAPINS0RatedTransactionDTO to XML under element name "ratedTransaction". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _ratedTransactionDTO The RatedTransactionDTO to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0RatedTransactionDTO to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ratedTransaction", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}ratedTransaction. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}ratedTransactionDTO for root element {}ratedTransaction..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}ratedTransactionDTO for root element {}ratedTransaction..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}ratedTransaction. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "usageDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}usageDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}usageDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setUsageDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "unitAmountWithoutTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}unitAmountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}unitAmountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setUnitAmountWithoutTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "unitAmountWithTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}unitAmountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}unitAmountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setUnitAmountWithTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "unitAmountTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}unitAmountTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}unitAmountTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setUnitAmountTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "quantity", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}quantity of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}quantity of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setQuantity: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithoutTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmountWithoutTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmountWithTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmountTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "code", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}code of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}code of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "description", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}description of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setDescription: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "doNotTriggerInvoicing", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setDoNotTriggerInvoicing: *((BOOL*) _child_accessor)]; free(_child_accessor); return YES; } return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self usageDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "usageDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}usageDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}usageDate..."); #endif [[self usageDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}usageDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}usageDate."]; } } if ([self unitAmountWithoutTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "unitAmountWithoutTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}unitAmountWithoutTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}unitAmountWithoutTax..."); #endif [[self unitAmountWithoutTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}unitAmountWithoutTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}unitAmountWithoutTax."]; } } if ([self unitAmountWithTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "unitAmountWithTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}unitAmountWithTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}unitAmountWithTax..."); #endif [[self unitAmountWithTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}unitAmountWithTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}unitAmountWithTax."]; } } if ([self unitAmountTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "unitAmountTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}unitAmountTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}unitAmountTax..."); #endif [[self unitAmountTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}unitAmountTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}unitAmountTax."]; } } if ([self quantity]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "quantity", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}quantity."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}quantity..."); #endif [[self quantity] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}quantity..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}quantity."]; } } if ([self amountWithoutTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithoutTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amountWithoutTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amountWithoutTax..."); #endif [[self amountWithoutTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amountWithoutTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amountWithoutTax."]; } } if ([self amountWithTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amountWithTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amountWithTax..."); #endif [[self amountWithTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amountWithTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amountWithTax."]; } } if ([self amountTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amountTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amountTax..."); #endif [[self amountTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amountTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amountTax."]; } } if ([self code]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "code", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}code."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}code..."); #endif [[self code] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}code..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}code."]; } } if ([self description]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}description."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}description..."); #endif [[self description] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}description..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}description."]; } } if (YES) { //always write the primitive element... status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "doNotTriggerInvoicing", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}doNotTriggerInvoicing."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}doNotTriggerInvoicing..."); #endif status = xmlTextWriterWriteBooleanType(writer, &_doNotTriggerInvoicing); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}doNotTriggerInvoicing..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}doNotTriggerInvoicing."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}doNotTriggerInvoicing."]; } } } @end /* implementation NOVAGLOBALAPINS0RatedTransactionDTO (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0RatedTransactionDTO_M */ #ifndef DEF_NOVAGLOBALAPINS0OfferPricePlanDto_M #define DEF_NOVAGLOBALAPINS0OfferPricePlanDto_M /** * @author Edward P. Legaspi @since Oct 11, 2013 */ @implementation NOVAGLOBALAPINS0OfferPricePlanDto /** * (no documentation provided) */ - (NSString *) offerId { return _offerId; } /** * (no documentation provided) */ - (void) setOfferId: (NSString *) newOfferId { [newOfferId retain]; [_offerId release]; _offerId = newOfferId; } /** * (no documentation provided) */ - (NSString *) organizationId { return _organizationId; } /** * (no documentation provided) */ - (void) setOrganizationId: (NSString *) newOrganizationId { [newOrganizationId retain]; [_organizationId release]; _organizationId = newOrganizationId; } /** * (no documentation provided) */ - (NSString *) taxId { return _taxId; } /** * (no documentation provided) */ - (void) setTaxId: (NSString *) newTaxId { [newTaxId retain]; [_taxId release]; _taxId = newTaxId; } /** * (no documentation provided) */ - (BOOL *) subscriptionProrata { return _subscriptionProrata; } /** * (no documentation provided) */ - (void) setSubscriptionProrata: (BOOL *) newSubscriptionProrata { if (_subscriptionProrata != NULL) { free(_subscriptionProrata); } _subscriptionProrata = newSubscriptionProrata; } /** * (no documentation provided) */ - (BOOL *) terminationProrata { return _terminationProrata; } /** * (no documentation provided) */ - (void) setTerminationProrata: (BOOL *) newTerminationProrata { if (_terminationProrata != NULL) { free(_terminationProrata); } _terminationProrata = newTerminationProrata; } /** * (no documentation provided) */ - (BOOL *) applyInAdvance { return _applyInAdvance; } /** * (no documentation provided) */ - (void) setApplyInAdvance: (BOOL *) newApplyInAdvance { if (_applyInAdvance != NULL) { free(_applyInAdvance); } _applyInAdvance = newApplyInAdvance; } /** * (no documentation provided) */ - (NSString *) param1 { return _param1; } /** * (no documentation provided) */ - (void) setParam1: (NSString *) newParam1 { [newParam1 retain]; [_param1 release]; _param1 = newParam1; } /** * (no documentation provided) */ - (NSString *) param2 { return _param2; } /** * (no documentation provided) */ - (void) setParam2: (NSString *) newParam2 { [newParam2 retain]; [_param2 release]; _param2 = newParam2; } /** * (no documentation provided) */ - (NSString *) param3 { return _param3; } /** * (no documentation provided) */ - (void) setParam3: (NSString *) newParam3 { [newParam3 retain]; [_param3 release]; _param3 = newParam3; } /** * (no documentation provided) */ - (NSString *) billingPeriod { return _billingPeriod; } /** * (no documentation provided) */ - (void) setBillingPeriod: (NSString *) newBillingPeriod { [newBillingPeriod retain]; [_billingPeriod release]; _billingPeriod = newBillingPeriod; } /** * (no documentation provided) */ - (NSArray *) recurringCharges { return _recurringCharges; } /** * (no documentation provided) */ - (void) setRecurringCharges: (NSArray *) newRecurringCharges { [newRecurringCharges retain]; [_recurringCharges release]; _recurringCharges = newRecurringCharges; } /** * (no documentation provided) */ - (NSString *) usageUnit { return _usageUnit; } /** * (no documentation provided) */ - (void) setUsageUnit: (NSString *) newUsageUnit { [newUsageUnit retain]; [_usageUnit release]; _usageUnit = newUsageUnit; } /** * (no documentation provided) */ - (NSArray *) usageCharges { return _usageCharges; } /** * (no documentation provided) */ - (void) setUsageCharges: (NSArray *) newUsageCharges { [newUsageCharges retain]; [_usageCharges release]; _usageCharges = newUsageCharges; } /** * (no documentation provided) */ - (NSArray *) subscriptionFees { return _subscriptionFees; } /** * (no documentation provided) */ - (void) setSubscriptionFees: (NSArray *) newSubscriptionFees { [newSubscriptionFees retain]; [_subscriptionFees release]; _subscriptionFees = newSubscriptionFees; } /** * (no documentation provided) */ - (NSArray *) terminationFees { return _terminationFees; } /** * (no documentation provided) */ - (void) setTerminationFees: (NSArray *) newTerminationFees { [newTerminationFees retain]; [_terminationFees release]; _terminationFees = newTerminationFees; } - (void) dealloc { [self setOfferId: nil]; [self setOrganizationId: nil]; [self setTaxId: nil]; [self setSubscriptionProrata: NULL]; [self setTerminationProrata: NULL]; [self setApplyInAdvance: NULL]; [self setParam1: nil]; [self setParam2: nil]; [self setParam3: nil]; [self setBillingPeriod: nil]; [self setRecurringCharges: nil]; [self setUsageUnit: nil]; [self setUsageCharges: nil]; [self setSubscriptionFees: nil]; [self setTerminationFees: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0OfferPricePlanDto *_nOVAGLOBALAPINS0OfferPricePlanDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0OfferPricePlanDto = (NOVAGLOBALAPINS0OfferPricePlanDto *) [NOVAGLOBALAPINS0OfferPricePlanDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0OfferPricePlanDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0OfferPricePlanDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0OfferPricePlanDto (JAXB) @end /*interface NOVAGLOBALAPINS0OfferPricePlanDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0OfferPricePlanDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0OfferPricePlanDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0OfferPricePlanDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0OfferPricePlanDto *_nOVAGLOBALAPINS0OfferPricePlanDto = [[NOVAGLOBALAPINS0OfferPricePlanDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0OfferPricePlanDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0OfferPricePlanDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0OfferPricePlanDto autorelease]; return _nOVAGLOBALAPINS0OfferPricePlanDto; } /** * Initialize this instance of NOVAGLOBALAPINS0OfferPricePlanDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0OfferPricePlanDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0OfferPricePlanDto from an XML reader. The element to be read is * "offerPricePlan". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0OfferPricePlanDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0OfferPricePlanDto *_offerPricePlanDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element offerPricePlan."]; } } if (xmlStrcmp(BAD_CAST "offerPricePlan", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}offerPricePlan."); #endif _offerPricePlanDto = (NOVAGLOBALAPINS0OfferPricePlanDto *)[NOVAGLOBALAPINS0OfferPricePlanDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}offerPricePlan."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0OfferPricePlanDto. Expected element offerPricePlan. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0OfferPricePlanDto. Expected element offerPricePlan. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _offerPricePlanDto; } /** * Writes this NOVAGLOBALAPINS0OfferPricePlanDto to XML under element name "offerPricePlan". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _offerPricePlanDto The OfferPricePlanDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0OfferPricePlanDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offerPricePlan", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}offerPricePlan. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}offerPricePlanDto for root element {}offerPricePlan..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}offerPricePlanDto for root element {}offerPricePlan..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}offerPricePlan. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "offerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setOfferId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setOrganizationId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "taxId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}taxId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}taxId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTaxId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionProrata", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setSubscriptionProrata: ((BOOL*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationProrata", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setTerminationProrata: ((BOOL*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "applyInAdvance", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setApplyInAdvance: ((BOOL*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param1", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}param1 of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}param1 of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setParam1: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param2", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}param2 of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}param2 of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setParam2: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "param3", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}param3 of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}param3 of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setParam3: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "billingPeriod", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}billingPeriod of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}billingPeriod of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setBillingPeriod: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recurringCharges", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}recurringCharges of type {}recurringChargeDto."); #endif __child = [NOVAGLOBALAPINS0RecurringChargeDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}recurringCharges of type {}recurringChargeDto."); #endif if ([self recurringCharges]) { [self setRecurringCharges: [[self recurringCharges] arrayByAddingObject: __child]]; } else { [self setRecurringCharges: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "usageUnit", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}usageUnit of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}usageUnit of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setUsageUnit: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "usageCharges", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}usageCharges of type {}usageChargeDto."); #endif __child = [NOVAGLOBALAPINS0UsageChargeDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}usageCharges of type {}usageChargeDto."); #endif if ([self usageCharges]) { [self setUsageCharges: [[self usageCharges] arrayByAddingObject: __child]]; } else { [self setUsageCharges: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subscriptionFees", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}subscriptionFees of type {}subscriptionFeeDto."); #endif __child = [NOVAGLOBALAPINS0SubscriptionFeeDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}subscriptionFees of type {}subscriptionFeeDto."); #endif if ([self subscriptionFees]) { [self setSubscriptionFees: [[self subscriptionFees] arrayByAddingObject: __child]]; } else { [self setSubscriptionFees: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "terminationFees", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}terminationFees of type {}terminationFeeDto."); #endif __child = [NOVAGLOBALAPINS0TerminationFeeDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}terminationFees of type {}terminationFeeDto."); #endif if ([self terminationFees]) { [self setTerminationFees: [[self terminationFees] arrayByAddingObject: __child]]; } else { [self setTerminationFees: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self offerId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offerId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}offerId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}offerId..."); #endif [[self offerId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}offerId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}offerId."]; } } if ([self organizationId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}organizationId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}organizationId..."); #endif [[self organizationId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}organizationId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}organizationId."]; } } if ([self taxId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "taxId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}taxId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}taxId..."); #endif [[self taxId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}taxId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}taxId."]; } } if ([self subscriptionProrata] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionProrata", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}subscriptionProrata."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}subscriptionProrata..."); #endif status = xmlTextWriterWriteBooleanType(writer, [self subscriptionProrata]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}subscriptionProrata..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}subscriptionProrata."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}subscriptionProrata."]; } } if ([self terminationProrata] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationProrata", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}terminationProrata."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}terminationProrata..."); #endif status = xmlTextWriterWriteBooleanType(writer, [self terminationProrata]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}terminationProrata..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}terminationProrata."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}terminationProrata."]; } } if ([self applyInAdvance] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "applyInAdvance", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}applyInAdvance."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}applyInAdvance..."); #endif status = xmlTextWriterWriteBooleanType(writer, [self applyInAdvance]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}applyInAdvance..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}applyInAdvance."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}applyInAdvance."]; } } if ([self param1]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param1", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}param1."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}param1..."); #endif [[self param1] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}param1..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}param1."]; } } if ([self param2]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param2", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}param2."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}param2..."); #endif [[self param2] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}param2..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}param2."]; } } if ([self param3]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "param3", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}param3."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}param3..."); #endif [[self param3] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}param3..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}param3."]; } } if ([self billingPeriod]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "billingPeriod", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}billingPeriod."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}billingPeriod..."); #endif [[self billingPeriod] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}billingPeriod..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}billingPeriod."]; } } if ([self recurringCharges]) { __enumerator = [[self recurringCharges] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recurringCharges", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}recurringCharges."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}recurringCharges..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}recurringCharges..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}recurringCharges."]; } } //end item iterator. } if ([self usageUnit]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "usageUnit", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}usageUnit."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}usageUnit..."); #endif [[self usageUnit] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}usageUnit..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}usageUnit."]; } } if ([self usageCharges]) { __enumerator = [[self usageCharges] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "usageCharges", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}usageCharges."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}usageCharges..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}usageCharges..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}usageCharges."]; } } //end item iterator. } if ([self subscriptionFees]) { __enumerator = [[self subscriptionFees] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionFees", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}subscriptionFees."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}subscriptionFees..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}subscriptionFees..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}subscriptionFees."]; } } //end item iterator. } if ([self terminationFees]) { __enumerator = [[self terminationFees] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "terminationFees", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}terminationFees."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}terminationFees..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}terminationFees..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}terminationFees."]; } } //end item iterator. } } @end /* implementation NOVAGLOBALAPINS0OfferPricePlanDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0OfferPricePlanDto_M */ #ifndef DEF_NOVAGLOBALAPINS0CreditLimitDto_M #define DEF_NOVAGLOBALAPINS0CreditLimitDto_M /** * @author Edward P. Legaspi @since Nov 13, 2013 */ @implementation NOVAGLOBALAPINS0CreditLimitDto /** * (no documentation provided) */ - (NSString *) organizationId { return _organizationId; } /** * (no documentation provided) */ - (void) setOrganizationId: (NSString *) newOrganizationId { [newOrganizationId retain]; [_organizationId release]; _organizationId = newOrganizationId; } /** * (no documentation provided) */ - (NSDecimalNumber *) creditLimit { return _creditLimit; } /** * (no documentation provided) */ - (void) setCreditLimit: (NSDecimalNumber *) newCreditLimit { [newCreditLimit retain]; [_creditLimit release]; _creditLimit = newCreditLimit; } - (void) dealloc { [self setOrganizationId: nil]; [self setCreditLimit: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0CreditLimitDto *_nOVAGLOBALAPINS0CreditLimitDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0CreditLimitDto = (NOVAGLOBALAPINS0CreditLimitDto *) [NOVAGLOBALAPINS0CreditLimitDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0CreditLimitDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0CreditLimitDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0CreditLimitDto (JAXB) @end /*interface NOVAGLOBALAPINS0CreditLimitDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0CreditLimitDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0CreditLimitDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0CreditLimitDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0CreditLimitDto *_nOVAGLOBALAPINS0CreditLimitDto = [[NOVAGLOBALAPINS0CreditLimitDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0CreditLimitDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0CreditLimitDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0CreditLimitDto autorelease]; return _nOVAGLOBALAPINS0CreditLimitDto; } /** * Initialize this instance of NOVAGLOBALAPINS0CreditLimitDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0CreditLimitDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0CreditLimitDto from an XML reader. The element to be read is * "creditLimit". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0CreditLimitDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0CreditLimitDto *_creditLimitDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element creditLimit."]; } } if (xmlStrcmp(BAD_CAST "creditLimit", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}creditLimit."); #endif _creditLimitDto = (NOVAGLOBALAPINS0CreditLimitDto *)[NOVAGLOBALAPINS0CreditLimitDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}creditLimit."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CreditLimitDto. Expected element creditLimit. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CreditLimitDto. Expected element creditLimit. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _creditLimitDto; } /** * Writes this NOVAGLOBALAPINS0CreditLimitDto to XML under element name "creditLimit". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _creditLimitDto The CreditLimitDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0CreditLimitDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "creditLimit", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}creditLimit. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}creditLimitDto for root element {}creditLimit..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}creditLimitDto for root element {}creditLimit..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}creditLimit. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setOrganizationId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "creditLimit", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}creditLimit of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}creditLimit of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setCreditLimit: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self organizationId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}organizationId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}organizationId..."); #endif [[self organizationId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}organizationId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}organizationId."]; } } if ([self creditLimit]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "creditLimit", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}creditLimit."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}creditLimit..."); #endif [[self creditLimit] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}creditLimit..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}creditLimit."]; } } } @end /* implementation NOVAGLOBALAPINS0CreditLimitDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0CreditLimitDto_M */ #ifndef DEF_NOVAGLOBALAPINS0CustomerInvoiceDto_M #define DEF_NOVAGLOBALAPINS0CustomerInvoiceDto_M /** * (no documentation provided) */ @implementation NOVAGLOBALAPINS0CustomerInvoiceDto /** * (no documentation provided) */ - (NSString *) billingAccount { return _billingAccount; } /** * (no documentation provided) */ - (void) setBillingAccount: (NSString *) newBillingAccount { [newBillingAccount retain]; [_billingAccount release]; _billingAccount = newBillingAccount; } /** * (no documentation provided) */ - (NSDate *) invoiceDate { return _invoiceDate; } /** * (no documentation provided) */ - (void) setInvoiceDate: (NSDate *) newInvoiceDate { [newInvoiceDate retain]; [_invoiceDate release]; _invoiceDate = newInvoiceDate; } /** * (no documentation provided) */ - (NSDate *) dueDate { return _dueDate; } /** * (no documentation provided) */ - (void) setDueDate: (NSDate *) newDueDate { [newDueDate retain]; [_dueDate release]; _dueDate = newDueDate; } /** * (no documentation provided) */ - (NSDecimalNumber *) amount { return _amount; } /** * (no documentation provided) */ - (void) setAmount: (NSDecimalNumber *) newAmount { [newAmount retain]; [_amount release]; _amount = newAmount; } /** * (no documentation provided) */ - (NSDecimalNumber *) discount { return _discount; } /** * (no documentation provided) */ - (void) setDiscount: (NSDecimalNumber *) newDiscount { [newDiscount retain]; [_discount release]; _discount = newDiscount; } /** * (no documentation provided) */ - (NSDecimalNumber *) amountWithoutTax { return _amountWithoutTax; } /** * (no documentation provided) */ - (void) setAmountWithoutTax: (NSDecimalNumber *) newAmountWithoutTax { [newAmountWithoutTax retain]; [_amountWithoutTax release]; _amountWithoutTax = newAmountWithoutTax; } /** * (no documentation provided) */ - (NSDecimalNumber *) amountTax { return _amountTax; } /** * (no documentation provided) */ - (void) setAmountTax: (NSDecimalNumber *) newAmountTax { [newAmountTax retain]; [_amountTax release]; _amountTax = newAmountTax; } /** * (no documentation provided) */ - (NSDecimalNumber *) amountWithTax { return _amountWithTax; } /** * (no documentation provided) */ - (void) setAmountWithTax: (NSDecimalNumber *) newAmountWithTax { [newAmountWithTax retain]; [_amountWithTax release]; _amountWithTax = newAmountWithTax; } /** * (no documentation provided) */ - (NSString *) invoiceNumber { return _invoiceNumber; } /** * (no documentation provided) */ - (void) setInvoiceNumber: (NSString *) newInvoiceNumber { [newInvoiceNumber retain]; [_invoiceNumber release]; _invoiceNumber = newInvoiceNumber; } /** * (no documentation provided) */ - (NSDate *) productDate { return _productDate; } /** * (no documentation provided) */ - (void) setProductDate: (NSDate *) newProductDate { [newProductDate retain]; [_productDate release]; _productDate = newProductDate; } /** * (no documentation provided) */ - (NSDecimalNumber *) netToPay { return _netToPay; } /** * (no documentation provided) */ - (void) setNetToPay: (NSDecimalNumber *) newNetToPay { [newNetToPay retain]; [_netToPay release]; _netToPay = newNetToPay; } /** * (no documentation provided) */ - (NSString *) paymentMethod { return _paymentMethod; } /** * (no documentation provided) */ - (void) setPaymentMethod: (NSString *) newPaymentMethod { [newPaymentMethod retain]; [_paymentMethod release]; _paymentMethod = newPaymentMethod; } /** * (no documentation provided) */ - (NSString *) iban { return _iban; } /** * (no documentation provided) */ - (void) setIban: (NSString *) newIban { [newIban retain]; [_iban release]; _iban = newIban; } /** * (no documentation provided) */ - (NSString *) alias { return _alias; } /** * (no documentation provided) */ - (void) setAlias: (NSString *) newAlias { [newAlias retain]; [_alias release]; _alias = newAlias; } /** * (no documentation provided) */ - (NSData *) pdf { return _pdf; } /** * (no documentation provided) */ - (void) setPdf: (NSData *) newPdf { [newPdf retain]; [_pdf release]; _pdf = newPdf; } /** * (no documentation provided) */ - (NSString *) invoiceType { return _invoiceType; } /** * (no documentation provided) */ - (void) setInvoiceType: (NSString *) newInvoiceType { [newInvoiceType retain]; [_invoiceType release]; _invoiceType = newInvoiceType; } /** * (no documentation provided) */ - (NSArray *) subCategoryInvoiceAgregates { return _subCategoryInvoiceAgregates; } /** * (no documentation provided) */ - (void) setSubCategoryInvoiceAgregates: (NSArray *) newSubCategoryInvoiceAgregates { [newSubCategoryInvoiceAgregates retain]; [_subCategoryInvoiceAgregates release]; _subCategoryInvoiceAgregates = newSubCategoryInvoiceAgregates; } - (void) dealloc { [self setBillingAccount: nil]; [self setInvoiceDate: nil]; [self setDueDate: nil]; [self setAmount: nil]; [self setDiscount: nil]; [self setAmountWithoutTax: nil]; [self setAmountTax: nil]; [self setAmountWithTax: nil]; [self setInvoiceNumber: nil]; [self setProductDate: nil]; [self setNetToPay: nil]; [self setPaymentMethod: nil]; [self setIban: nil]; [self setAlias: nil]; [self setPdf: nil]; [self setInvoiceType: nil]; [self setSubCategoryInvoiceAgregates: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0CustomerInvoiceDto *_nOVAGLOBALAPINS0CustomerInvoiceDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0CustomerInvoiceDto = (NOVAGLOBALAPINS0CustomerInvoiceDto *) [NOVAGLOBALAPINS0CustomerInvoiceDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0CustomerInvoiceDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0CustomerInvoiceDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0CustomerInvoiceDto (JAXB) @end /*interface NOVAGLOBALAPINS0CustomerInvoiceDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0CustomerInvoiceDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0CustomerInvoiceDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0CustomerInvoiceDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0CustomerInvoiceDto *_nOVAGLOBALAPINS0CustomerInvoiceDto = [[NOVAGLOBALAPINS0CustomerInvoiceDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0CustomerInvoiceDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0CustomerInvoiceDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0CustomerInvoiceDto autorelease]; return _nOVAGLOBALAPINS0CustomerInvoiceDto; } /** * Initialize this instance of NOVAGLOBALAPINS0CustomerInvoiceDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0CustomerInvoiceDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0CustomerInvoiceDto from an XML reader. The element to be read is * "customerInvoice". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0CustomerInvoiceDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0CustomerInvoiceDto *_customerInvoiceDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element customerInvoice."]; } } if (xmlStrcmp(BAD_CAST "customerInvoice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}customerInvoice."); #endif _customerInvoiceDto = (NOVAGLOBALAPINS0CustomerInvoiceDto *)[NOVAGLOBALAPINS0CustomerInvoiceDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}customerInvoice."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CustomerInvoiceDto. Expected element customerInvoice. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CustomerInvoiceDto. Expected element customerInvoice. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _customerInvoiceDto; } /** * Writes this NOVAGLOBALAPINS0CustomerInvoiceDto to XML under element name "customerInvoice". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _customerInvoiceDto The CustomerInvoiceDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0CustomerInvoiceDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "customerInvoice", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}customerInvoice. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}customerInvoiceDto for root element {}customerInvoice..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}customerInvoiceDto for root element {}customerInvoice..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}customerInvoice. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "billingAccount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}billingAccount of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}billingAccount of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setBillingAccount: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "invoiceDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}invoiceDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}invoiceDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setInvoiceDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "dueDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}dueDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}dueDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setDueDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmount: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "discount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}discount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}discount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setDiscount: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithoutTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmountWithoutTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmountTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmountWithTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "invoiceNumber", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}invoiceNumber of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}invoiceNumber of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setInvoiceNumber: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "productDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}productDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}productDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setProductDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "netToPay", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}netToPay of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}netToPay of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setNetToPay: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "paymentMethod", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}paymentMethod of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}paymentMethod of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setPaymentMethod: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "iban", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}iban of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}iban of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setIban: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "alias", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}alias of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}alias of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setAlias: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "pdf", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}pdf of type {http://www.w3.org/2001/XMLSchema}base64Binary."); #endif __child = [NSData readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}pdf of type {http://www.w3.org/2001/XMLSchema}base64Binary."); #endif [self setPdf: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "invoiceType", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}invoiceType of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}invoiceType of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setInvoiceType: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subCategoryInvoiceAgregates", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}subCategoryInvoiceAgregates of type {}subCategoryInvoiceAgregateDto."); #endif __child = [NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}subCategoryInvoiceAgregates of type {}subCategoryInvoiceAgregateDto."); #endif if ([self subCategoryInvoiceAgregates]) { [self setSubCategoryInvoiceAgregates: [[self subCategoryInvoiceAgregates] arrayByAddingObject: __child]]; } else { [self setSubCategoryInvoiceAgregates: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self billingAccount]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "billingAccount", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}billingAccount."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}billingAccount..."); #endif [[self billingAccount] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}billingAccount..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}billingAccount."]; } } if ([self invoiceDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "invoiceDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}invoiceDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}invoiceDate..."); #endif [[self invoiceDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}invoiceDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}invoiceDate."]; } } if ([self dueDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dueDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}dueDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}dueDate..."); #endif [[self dueDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}dueDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}dueDate."]; } } if ([self amount]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amount", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amount."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amount..."); #endif [[self amount] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amount..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amount."]; } } if ([self discount]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "discount", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}discount."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}discount..."); #endif [[self discount] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}discount..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}discount."]; } } if ([self amountWithoutTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithoutTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amountWithoutTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amountWithoutTax..."); #endif [[self amountWithoutTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amountWithoutTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amountWithoutTax."]; } } if ([self amountTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amountTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amountTax..."); #endif [[self amountTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amountTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amountTax."]; } } if ([self amountWithTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amountWithTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amountWithTax..."); #endif [[self amountWithTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amountWithTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amountWithTax."]; } } if ([self invoiceNumber]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "invoiceNumber", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}invoiceNumber."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}invoiceNumber..."); #endif [[self invoiceNumber] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}invoiceNumber..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}invoiceNumber."]; } } if ([self productDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "productDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}productDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}productDate..."); #endif [[self productDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}productDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}productDate."]; } } if ([self netToPay]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "netToPay", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}netToPay."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}netToPay..."); #endif [[self netToPay] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}netToPay..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}netToPay."]; } } if ([self paymentMethod]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "paymentMethod", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}paymentMethod."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}paymentMethod..."); #endif [[self paymentMethod] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}paymentMethod..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}paymentMethod."]; } } if ([self iban]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "iban", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}iban."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}iban..."); #endif [[self iban] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}iban..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}iban."]; } } if ([self alias]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "alias", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}alias."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}alias..."); #endif [[self alias] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}alias..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}alias."]; } } if ([self pdf]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pdf", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}pdf."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}pdf..."); #endif [[self pdf] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}pdf..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}pdf."]; } } if ([self invoiceType]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "invoiceType", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}invoiceType."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}invoiceType..."); #endif [[self invoiceType] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}invoiceType..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}invoiceType."]; } } if ([self subCategoryInvoiceAgregates]) { __enumerator = [[self subCategoryInvoiceAgregates] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subCategoryInvoiceAgregates", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}subCategoryInvoiceAgregates."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}subCategoryInvoiceAgregates..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}subCategoryInvoiceAgregates..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}subCategoryInvoiceAgregates."]; } } //end item iterator. } } @end /* implementation NOVAGLOBALAPINS0CustomerInvoiceDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0CustomerInvoiceDto_M */ #ifndef DEF_NOVAGLOBALAPINS0OrganizationDto_M #define DEF_NOVAGLOBALAPINS0OrganizationDto_M /** * @author Edward P. Legaspi @since Oct 11, 2013 */ @implementation NOVAGLOBALAPINS0OrganizationDto /** * (no documentation provided) */ - (NSString *) organizationId { return _organizationId; } /** * (no documentation provided) */ - (void) setOrganizationId: (NSString *) newOrganizationId { [newOrganizationId retain]; [_organizationId release]; _organizationId = newOrganizationId; } /** * (no documentation provided) */ - (NSString *) name { return _name; } /** * (no documentation provided) */ - (void) setName: (NSString *) newName { [newName retain]; [_name release]; _name = newName; } /** * (no documentation provided) */ - (NSString *) parentId { return _parentId; } /** * (no documentation provided) */ - (void) setParentId: (NSString *) newParentId { [newParentId retain]; [_parentId release]; _parentId = newParentId; } /** * (no documentation provided) */ - (NSString *) countryCode { return _countryCode; } /** * (no documentation provided) */ - (void) setCountryCode: (NSString *) newCountryCode { [newCountryCode retain]; [_countryCode release]; _countryCode = newCountryCode; } /** * (no documentation provided) */ - (NSString *) defaultCurrencyCode { return _defaultCurrencyCode; } /** * (no documentation provided) */ - (void) setDefaultCurrencyCode: (NSString *) newDefaultCurrencyCode { [newDefaultCurrencyCode retain]; [_defaultCurrencyCode release]; _defaultCurrencyCode = newDefaultCurrencyCode; } /** * (no documentation provided) */ - (NSString *) languageCode { return _languageCode; } /** * (no documentation provided) */ - (void) setLanguageCode: (NSString *) newLanguageCode { [newLanguageCode retain]; [_languageCode release]; _languageCode = newLanguageCode; } - (void) dealloc { [self setOrganizationId: nil]; [self setName: nil]; [self setParentId: nil]; [self setCountryCode: nil]; [self setDefaultCurrencyCode: nil]; [self setLanguageCode: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0OrganizationDto *_nOVAGLOBALAPINS0OrganizationDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0OrganizationDto = (NOVAGLOBALAPINS0OrganizationDto *) [NOVAGLOBALAPINS0OrganizationDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0OrganizationDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0OrganizationDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0OrganizationDto (JAXB) @end /*interface NOVAGLOBALAPINS0OrganizationDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0OrganizationDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0OrganizationDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0OrganizationDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0OrganizationDto *_nOVAGLOBALAPINS0OrganizationDto = [[NOVAGLOBALAPINS0OrganizationDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0OrganizationDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0OrganizationDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0OrganizationDto autorelease]; return _nOVAGLOBALAPINS0OrganizationDto; } /** * Initialize this instance of NOVAGLOBALAPINS0OrganizationDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0OrganizationDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0OrganizationDto from an XML reader. The element to be read is * "organization". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0OrganizationDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0OrganizationDto *_organizationDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element organization."]; } } if (xmlStrcmp(BAD_CAST "organization", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}organization."); #endif _organizationDto = (NOVAGLOBALAPINS0OrganizationDto *)[NOVAGLOBALAPINS0OrganizationDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}organization."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0OrganizationDto. Expected element organization. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0OrganizationDto. Expected element organization. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _organizationDto; } /** * Writes this NOVAGLOBALAPINS0OrganizationDto to XML under element name "organization". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _organizationDto The OrganizationDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0OrganizationDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organization", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}organization. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}organizationDto for root element {}organization..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}organizationDto for root element {}organization..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}organization. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "organizationId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}organizationId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setOrganizationId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setName: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "parentId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}parentId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}parentId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setParentId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countryCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCountryCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "defaultCurrencyCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}defaultCurrencyCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}defaultCurrencyCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setDefaultCurrencyCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "languageCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setLanguageCode: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self organizationId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "organizationId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}organizationId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}organizationId..."); #endif [[self organizationId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}organizationId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}organizationId."]; } } if ([self name]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}name."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}name..."); #endif [[self name] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}name..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}name."]; } } if ([self parentId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "parentId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}parentId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}parentId..."); #endif [[self parentId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}parentId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}parentId."]; } } if ([self countryCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}countryCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}countryCode..."); #endif [[self countryCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}countryCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}countryCode."]; } } if ([self defaultCurrencyCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "defaultCurrencyCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}defaultCurrencyCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}defaultCurrencyCode..."); #endif [[self defaultCurrencyCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}defaultCurrencyCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}defaultCurrencyCode."]; } } if ([self languageCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "languageCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}languageCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}languageCode..."); #endif [[self languageCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}languageCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}languageCode."]; } } } @end /* implementation NOVAGLOBALAPINS0OrganizationDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0OrganizationDto_M */ #ifndef DEF_NOVAGLOBALAPINS0OfferDto_M #define DEF_NOVAGLOBALAPINS0OfferDto_M /** * @author Edward P. Legaspi @since Oct 11, 2013 */ @implementation NOVAGLOBALAPINS0OfferDto /** * (no documentation provided) */ - (NSString *) offerId { return _offerId; } /** * (no documentation provided) */ - (void) setOfferId: (NSString *) newOfferId { [newOfferId retain]; [_offerId release]; _offerId = newOfferId; } /** * (no documentation provided) */ - (NSArray *) descriptions { return _descriptions; } /** * (no documentation provided) */ - (void) setDescriptions: (NSArray *) newDescriptions { [newDescriptions retain]; [_descriptions release]; _descriptions = newDescriptions; } /** * (no documentation provided) */ - (NSArray *) services { return _services; } /** * (no documentation provided) */ - (void) setServices: (NSArray *) newServices { [newServices retain]; [_services release]; _services = newServices; } - (void) dealloc { [self setOfferId: nil]; [self setDescriptions: nil]; [self setServices: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0OfferDto *_nOVAGLOBALAPINS0OfferDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0OfferDto = (NOVAGLOBALAPINS0OfferDto *) [NOVAGLOBALAPINS0OfferDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0OfferDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0OfferDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0OfferDto (JAXB) @end /*interface NOVAGLOBALAPINS0OfferDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0OfferDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0OfferDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0OfferDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0OfferDto *_nOVAGLOBALAPINS0OfferDto = [[NOVAGLOBALAPINS0OfferDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0OfferDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0OfferDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0OfferDto autorelease]; return _nOVAGLOBALAPINS0OfferDto; } /** * Initialize this instance of NOVAGLOBALAPINS0OfferDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0OfferDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0OfferDto from an XML reader. The element to be read is * "offer". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0OfferDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0OfferDto *_offerDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element offer."]; } } if (xmlStrcmp(BAD_CAST "offer", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}offer."); #endif _offerDto = (NOVAGLOBALAPINS0OfferDto *)[NOVAGLOBALAPINS0OfferDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}offer."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0OfferDto. Expected element offer. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0OfferDto. Expected element offer. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _offerDto; } /** * Writes this NOVAGLOBALAPINS0OfferDto to XML under element name "offer". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _offerDto The OfferDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0OfferDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offer", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}offer. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}offerDto for root element {}offer..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}offerDto for root element {}offer..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}offer. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "offerId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}offerId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setOfferId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "descriptions", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}descriptions of type {}descriptionDto."); #endif __child = [NOVAGLOBALAPINS0DescriptionDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}descriptions of type {}descriptionDto."); #endif if ([self descriptions]) { [self setDescriptions: [[self descriptions] arrayByAddingObject: __child]]; } else { [self setDescriptions: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "services", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}services of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}services of type {http://www.w3.org/2001/XMLSchema}string."); #endif if ([self services]) { [self setServices: [[self services] arrayByAddingObject: __child]]; } else { [self setServices: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self offerId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offerId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}offerId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}offerId..."); #endif [[self offerId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}offerId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}offerId."]; } } if ([self descriptions]) { __enumerator = [[self descriptions] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "descriptions", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}descriptions."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}descriptions..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}descriptions..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}descriptions."]; } } //end item iterator. } if ([self services]) { __enumerator = [[self services] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "services", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}services."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}services..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}services..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}services."]; } } //end item iterator. } } @end /* implementation NOVAGLOBALAPINS0OfferDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0OfferDto_M */ #ifndef DEF_NOVAGLOBALAPINS0InvoiceDto_M #define DEF_NOVAGLOBALAPINS0InvoiceDto_M /** * @author R.AITYAAZZA */ @implementation NOVAGLOBALAPINS0InvoiceDto /** * (no documentation provided) */ - (NSString *) billingAccountCode { return _billingAccountCode; } /** * (no documentation provided) */ - (void) setBillingAccountCode: (NSString *) newBillingAccountCode { [newBillingAccountCode retain]; [_billingAccountCode release]; _billingAccountCode = newBillingAccountCode; } /** * (no documentation provided) */ - (NSDate *) invoiceDate { return _invoiceDate; } /** * (no documentation provided) */ - (void) setInvoiceDate: (NSDate *) newInvoiceDate { [newInvoiceDate retain]; [_invoiceDate release]; _invoiceDate = newInvoiceDate; } /** * (no documentation provided) */ - (NSDate *) dueDate { return _dueDate; } /** * (no documentation provided) */ - (void) setDueDate: (NSDate *) newDueDate { [newDueDate retain]; [_dueDate release]; _dueDate = newDueDate; } /** * (no documentation provided) */ - (NSDecimalNumber *) amount { return _amount; } /** * (no documentation provided) */ - (void) setAmount: (NSDecimalNumber *) newAmount { [newAmount retain]; [_amount release]; _amount = newAmount; } /** * (no documentation provided) */ - (NSDecimalNumber *) discount { return _discount; } /** * (no documentation provided) */ - (void) setDiscount: (NSDecimalNumber *) newDiscount { [newDiscount retain]; [_discount release]; _discount = newDiscount; } /** * (no documentation provided) */ - (NSDecimalNumber *) amountWithoutTax { return _amountWithoutTax; } /** * (no documentation provided) */ - (void) setAmountWithoutTax: (NSDecimalNumber *) newAmountWithoutTax { [newAmountWithoutTax retain]; [_amountWithoutTax release]; _amountWithoutTax = newAmountWithoutTax; } /** * (no documentation provided) */ - (NSDecimalNumber *) amountTax { return _amountTax; } /** * (no documentation provided) */ - (void) setAmountTax: (NSDecimalNumber *) newAmountTax { [newAmountTax retain]; [_amountTax release]; _amountTax = newAmountTax; } /** * (no documentation provided) */ - (NSDecimalNumber *) amountWithTax { return _amountWithTax; } /** * (no documentation provided) */ - (void) setAmountWithTax: (NSDecimalNumber *) newAmountWithTax { [newAmountWithTax retain]; [_amountWithTax release]; _amountWithTax = newAmountWithTax; } /** * (no documentation provided) */ - (NSString *) comment { return _comment; } /** * (no documentation provided) */ - (void) setComment: (NSString *) newComment { [newComment retain]; [_comment release]; _comment = newComment; } /** * (no documentation provided) */ - (NSArray *) subCategoryInvoiceAgregates { return _subCategoryInvoiceAgregates; } /** * (no documentation provided) */ - (void) setSubCategoryInvoiceAgregates: (NSArray *) newSubCategoryInvoiceAgregates { [newSubCategoryInvoiceAgregates retain]; [_subCategoryInvoiceAgregates release]; _subCategoryInvoiceAgregates = newSubCategoryInvoiceAgregates; } - (void) dealloc { [self setBillingAccountCode: nil]; [self setInvoiceDate: nil]; [self setDueDate: nil]; [self setAmount: nil]; [self setDiscount: nil]; [self setAmountWithoutTax: nil]; [self setAmountTax: nil]; [self setAmountWithTax: nil]; [self setComment: nil]; [self setSubCategoryInvoiceAgregates: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0InvoiceDto *_nOVAGLOBALAPINS0InvoiceDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0InvoiceDto = (NOVAGLOBALAPINS0InvoiceDto *) [NOVAGLOBALAPINS0InvoiceDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0InvoiceDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0InvoiceDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0InvoiceDto (JAXB) @end /*interface NOVAGLOBALAPINS0InvoiceDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0InvoiceDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0InvoiceDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0InvoiceDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0InvoiceDto *_nOVAGLOBALAPINS0InvoiceDto = [[NOVAGLOBALAPINS0InvoiceDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0InvoiceDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0InvoiceDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0InvoiceDto autorelease]; return _nOVAGLOBALAPINS0InvoiceDto; } /** * Initialize this instance of NOVAGLOBALAPINS0InvoiceDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0InvoiceDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0InvoiceDto from an XML reader. The element to be read is * "invoice". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0InvoiceDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0InvoiceDto *_invoiceDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element invoice."]; } } if (xmlStrcmp(BAD_CAST "invoice", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}invoice."); #endif _invoiceDto = (NOVAGLOBALAPINS0InvoiceDto *)[NOVAGLOBALAPINS0InvoiceDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}invoice."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0InvoiceDto. Expected element invoice. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0InvoiceDto. Expected element invoice. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _invoiceDto; } /** * Writes this NOVAGLOBALAPINS0InvoiceDto to XML under element name "invoice". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _invoiceDto The InvoiceDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0InvoiceDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "invoice", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}invoice. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}invoiceDto for root element {}invoice..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}invoiceDto for root element {}invoice..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}invoice. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "billingAccountCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}billingAccountCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}billingAccountCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setBillingAccountCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "invoiceDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}invoiceDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}invoiceDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setInvoiceDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "dueDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}dueDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}dueDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setDueDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmount: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "discount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}discount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}discount of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setDiscount: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithoutTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amountWithoutTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmountWithoutTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amountTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmountTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amountWithTax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}amountWithTax of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setAmountWithTax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "comment", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}comment of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}comment of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setComment: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subCategoryInvoiceAgregates", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}subCategoryInvoiceAgregates of type {}subCategoryInvoiceAgregateDto."); #endif __child = [NOVAGLOBALAPINS0SubCategoryInvoiceAgregateDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}subCategoryInvoiceAgregates of type {}subCategoryInvoiceAgregateDto."); #endif if ([self subCategoryInvoiceAgregates]) { [self setSubCategoryInvoiceAgregates: [[self subCategoryInvoiceAgregates] arrayByAddingObject: __child]]; } else { [self setSubCategoryInvoiceAgregates: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self billingAccountCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "billingAccountCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}billingAccountCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}billingAccountCode..."); #endif [[self billingAccountCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}billingAccountCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}billingAccountCode."]; } } if ([self invoiceDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "invoiceDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}invoiceDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}invoiceDate..."); #endif [[self invoiceDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}invoiceDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}invoiceDate."]; } } if ([self dueDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dueDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}dueDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}dueDate..."); #endif [[self dueDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}dueDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}dueDate."]; } } if ([self amount]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amount", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amount."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amount..."); #endif [[self amount] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amount..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amount."]; } } if ([self discount]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "discount", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}discount."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}discount..."); #endif [[self discount] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}discount..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}discount."]; } } if ([self amountWithoutTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithoutTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amountWithoutTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amountWithoutTax..."); #endif [[self amountWithoutTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amountWithoutTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amountWithoutTax."]; } } if ([self amountTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amountTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amountTax..."); #endif [[self amountTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amountTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amountTax."]; } } if ([self amountWithTax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amountWithTax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amountWithTax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amountWithTax..."); #endif [[self amountWithTax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amountWithTax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amountWithTax."]; } } if ([self comment]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "comment", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}comment."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}comment..."); #endif [[self comment] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}comment..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}comment."]; } } if ([self subCategoryInvoiceAgregates]) { __enumerator = [[self subCategoryInvoiceAgregates] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subCategoryInvoiceAgregates", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}subCategoryInvoiceAgregates."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}subCategoryInvoiceAgregates..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}subCategoryInvoiceAgregates..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}subCategoryInvoiceAgregates."]; } } //end item iterator. } } @end /* implementation NOVAGLOBALAPINS0InvoiceDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0InvoiceDto_M */ #ifndef DEF_NOVAGLOBALAPINS0CustomerAccountDto_M #define DEF_NOVAGLOBALAPINS0CustomerAccountDto_M /** * (no documentation provided) */ @implementation NOVAGLOBALAPINS0CustomerAccountDto /** * (no documentation provided) */ - (NSString *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (NSString *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * (no documentation provided) */ - (NSString *) paymentMethod { return _paymentMethod; } /** * (no documentation provided) */ - (void) setPaymentMethod: (NSString *) newPaymentMethod { [newPaymentMethod retain]; [_paymentMethod release]; _paymentMethod = newPaymentMethod; } /** * (no documentation provided) */ - (NSString *) creditCategory { return _creditCategory; } /** * (no documentation provided) */ - (void) setCreditCategory: (NSString *) newCreditCategory { [newCreditCategory retain]; [_creditCategory release]; _creditCategory = newCreditCategory; } /** * (no documentation provided) */ - (NSArray *) accountOperations { return _accountOperations; } /** * (no documentation provided) */ - (void) setAccountOperations: (NSArray *) newAccountOperations { [newAccountOperations retain]; [_accountOperations release]; _accountOperations = newAccountOperations; } /** * (no documentation provided) */ - (NSDate *) dateStatus { return _dateStatus; } /** * (no documentation provided) */ - (void) setDateStatus: (NSDate *) newDateStatus { [newDateStatus retain]; [_dateStatus release]; _dateStatus = newDateStatus; } /** * (no documentation provided) */ - (NSDate *) dateDunningLevel { return _dateDunningLevel; } /** * (no documentation provided) */ - (void) setDateDunningLevel: (NSDate *) newDateDunningLevel { [newDateDunningLevel retain]; [_dateDunningLevel release]; _dateDunningLevel = newDateDunningLevel; } /** * (no documentation provided) */ - (NSString *) email { return _email; } /** * (no documentation provided) */ - (void) setEmail: (NSString *) newEmail { [newEmail retain]; [_email release]; _email = newEmail; } /** * (no documentation provided) */ - (NSString *) phone { return _phone; } /** * (no documentation provided) */ - (void) setPhone: (NSString *) newPhone { [newPhone retain]; [_phone release]; _phone = newPhone; } /** * (no documentation provided) */ - (NSString *) mobile { return _mobile; } /** * (no documentation provided) */ - (void) setMobile: (NSString *) newMobile { [newMobile retain]; [_mobile release]; _mobile = newMobile; } /** * (no documentation provided) */ - (NSString *) fax { return _fax; } /** * (no documentation provided) */ - (void) setFax: (NSString *) newFax { [newFax retain]; [_fax release]; _fax = newFax; } /** * (no documentation provided) */ - (NSString *) customerCode { return _customerCode; } /** * (no documentation provided) */ - (void) setCustomerCode: (NSString *) newCustomerCode { [newCustomerCode retain]; [_customerCode release]; _customerCode = newCustomerCode; } /** * (no documentation provided) */ - (NSString *) dunningLevel { return _dunningLevel; } /** * (no documentation provided) */ - (void) setDunningLevel: (NSString *) newDunningLevel { [newDunningLevel retain]; [_dunningLevel release]; _dunningLevel = newDunningLevel; } /** * (no documentation provided) */ - (NSString *) mandateIdentification { return _mandateIdentification; } /** * (no documentation provided) */ - (void) setMandateIdentification: (NSString *) newMandateIdentification { [newMandateIdentification retain]; [_mandateIdentification release]; _mandateIdentification = newMandateIdentification; } /** * (no documentation provided) */ - (NSDate *) mandateDate { return _mandateDate; } /** * (no documentation provided) */ - (void) setMandateDate: (NSDate *) newMandateDate { [newMandateDate retain]; [_mandateDate release]; _mandateDate = newMandateDate; } /** * (no documentation provided) */ - (NSDecimalNumber *) balance { return _balance; } /** * (no documentation provided) */ - (void) setBalance: (NSDecimalNumber *) newBalance { [newBalance retain]; [_balance release]; _balance = newBalance; } - (void) dealloc { [self setStatus: nil]; [self setPaymentMethod: nil]; [self setCreditCategory: nil]; [self setAccountOperations: nil]; [self setDateStatus: nil]; [self setDateDunningLevel: nil]; [self setEmail: nil]; [self setPhone: nil]; [self setMobile: nil]; [self setFax: nil]; [self setCustomerCode: nil]; [self setDunningLevel: nil]; [self setMandateIdentification: nil]; [self setMandateDate: nil]; [self setBalance: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0CustomerAccountDto *_nOVAGLOBALAPINS0CustomerAccountDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0CustomerAccountDto = (NOVAGLOBALAPINS0CustomerAccountDto *) [NOVAGLOBALAPINS0CustomerAccountDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0CustomerAccountDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0CustomerAccountDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0CustomerAccountDto (JAXB) @end /*interface NOVAGLOBALAPINS0CustomerAccountDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0CustomerAccountDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0CustomerAccountDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0CustomerAccountDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0CustomerAccountDto *_nOVAGLOBALAPINS0CustomerAccountDto = [[NOVAGLOBALAPINS0CustomerAccountDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0CustomerAccountDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0CustomerAccountDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0CustomerAccountDto autorelease]; return _nOVAGLOBALAPINS0CustomerAccountDto; } /** * Initialize this instance of NOVAGLOBALAPINS0CustomerAccountDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0CustomerAccountDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0CustomerAccountDto from an XML reader. The element to be read is * "customerAccount". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0CustomerAccountDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0CustomerAccountDto *_customerAccountDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element customerAccount."]; } } if (xmlStrcmp(BAD_CAST "customerAccount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}customerAccount."); #endif _customerAccountDto = (NOVAGLOBALAPINS0CustomerAccountDto *)[NOVAGLOBALAPINS0CustomerAccountDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}customerAccount."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CustomerAccountDto. Expected element customerAccount. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CustomerAccountDto. Expected element customerAccount. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _customerAccountDto; } /** * Writes this NOVAGLOBALAPINS0CustomerAccountDto to XML under element name "customerAccount". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _customerAccountDto The CustomerAccountDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0CustomerAccountDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "customerAccount", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}customerAccount. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}customerAccountDto for root element {}customerAccount..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}customerAccountDto for root element {}customerAccount..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}customerAccount. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setStatus: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "paymentMethod", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}paymentMethod of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}paymentMethod of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setPaymentMethod: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "creditCategory", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}creditCategory of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}creditCategory of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCreditCategory: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "accountOperations", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}accountOperations of type {}accountOperationDto."); #endif __child = [NOVAGLOBALAPINS0AccountOperationDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}accountOperations of type {}accountOperationDto."); #endif if ([self accountOperations]) { [self setAccountOperations: [[self accountOperations] arrayByAddingObject: __child]]; } else { [self setAccountOperations: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "dateStatus", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}dateStatus of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}dateStatus of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setDateStatus: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "dateDunningLevel", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}dateDunningLevel of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}dateDunningLevel of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setDateDunningLevel: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "email", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}email of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}email of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setEmail: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "phone", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}phone of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}phone of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setPhone: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "mobile", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}mobile of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}mobile of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setMobile: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "fax", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}fax of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}fax of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setFax: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "customerCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}customerCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}customerCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCustomerCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "dunningLevel", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}dunningLevel of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}dunningLevel of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setDunningLevel: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "mandateIdentification", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}mandateIdentification of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}mandateIdentification of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setMandateIdentification: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "mandateDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}mandateDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}mandateDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setMandateDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "balance", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}balance of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}balance of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setBalance: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } if ([self paymentMethod]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "paymentMethod", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}paymentMethod."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}paymentMethod..."); #endif [[self paymentMethod] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}paymentMethod..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}paymentMethod."]; } } if ([self creditCategory]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "creditCategory", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}creditCategory."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}creditCategory..."); #endif [[self creditCategory] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}creditCategory..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}creditCategory."]; } } if ([self accountOperations]) { __enumerator = [[self accountOperations] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "accountOperations", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}accountOperations."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}accountOperations..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}accountOperations..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}accountOperations."]; } } //end item iterator. } if ([self dateStatus]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateStatus", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}dateStatus."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}dateStatus..."); #endif [[self dateStatus] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}dateStatus..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}dateStatus."]; } } if ([self dateDunningLevel]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateDunningLevel", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}dateDunningLevel."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}dateDunningLevel..."); #endif [[self dateDunningLevel] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}dateDunningLevel..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}dateDunningLevel."]; } } if ([self email]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "email", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}email."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}email..."); #endif [[self email] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}email..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}email."]; } } if ([self phone]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "phone", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}phone."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}phone..."); #endif [[self phone] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}phone..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}phone."]; } } if ([self mobile]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "mobile", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}mobile."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}mobile..."); #endif [[self mobile] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}mobile..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}mobile."]; } } if ([self fax]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "fax", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}fax."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}fax..."); #endif [[self fax] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}fax..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}fax."]; } } if ([self customerCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "customerCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}customerCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}customerCode..."); #endif [[self customerCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}customerCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}customerCode."]; } } if ([self dunningLevel]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dunningLevel", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}dunningLevel."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}dunningLevel..."); #endif [[self dunningLevel] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}dunningLevel..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}dunningLevel."]; } } if ([self mandateIdentification]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "mandateIdentification", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}mandateIdentification."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}mandateIdentification..."); #endif [[self mandateIdentification] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}mandateIdentification..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}mandateIdentification."]; } } if ([self mandateDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "mandateDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}mandateDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}mandateDate..."); #endif [[self mandateDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}mandateDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}mandateDate."]; } } if ([self balance]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "balance", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}balance."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}balance..."); #endif [[self balance] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}balance..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}balance."]; } } } @end /* implementation NOVAGLOBALAPINS0CustomerAccountDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0CustomerAccountDto_M */ #ifndef DEF_NOVAGLOBALAPINS0CountryDto_M #define DEF_NOVAGLOBALAPINS0CountryDto_M /** * @author Edward P. Legaspi @since Oct 4, 2013 */ @implementation NOVAGLOBALAPINS0CountryDto /** * (no documentation provided) */ - (NSString *) countryCode { return _countryCode; } /** * (no documentation provided) */ - (void) setCountryCode: (NSString *) newCountryCode { [newCountryCode retain]; [_countryCode release]; _countryCode = newCountryCode; } /** * (no documentation provided) */ - (NSString *) name { return _name; } /** * (no documentation provided) */ - (void) setName: (NSString *) newName { [newName retain]; [_name release]; _name = newName; } /** * (no documentation provided) */ - (NSString *) currencyCode { return _currencyCode; } /** * (no documentation provided) */ - (void) setCurrencyCode: (NSString *) newCurrencyCode { [newCurrencyCode retain]; [_currencyCode release]; _currencyCode = newCurrencyCode; } /** * (no documentation provided) */ - (NSString *) languageCode { return _languageCode; } /** * (no documentation provided) */ - (void) setLanguageCode: (NSString *) newLanguageCode { [newLanguageCode retain]; [_languageCode release]; _languageCode = newLanguageCode; } - (void) dealloc { [self setCountryCode: nil]; [self setName: nil]; [self setCurrencyCode: nil]; [self setLanguageCode: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0CountryDto *_nOVAGLOBALAPINS0CountryDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0CountryDto = (NOVAGLOBALAPINS0CountryDto *) [NOVAGLOBALAPINS0CountryDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0CountryDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0CountryDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0CountryDto (JAXB) @end /*interface NOVAGLOBALAPINS0CountryDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0CountryDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0CountryDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0CountryDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0CountryDto *_nOVAGLOBALAPINS0CountryDto = [[NOVAGLOBALAPINS0CountryDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0CountryDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0CountryDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0CountryDto autorelease]; return _nOVAGLOBALAPINS0CountryDto; } /** * Initialize this instance of NOVAGLOBALAPINS0CountryDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0CountryDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0CountryDto from an XML reader. The element to be read is * "country". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0CountryDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0CountryDto *_countryDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element country."]; } } if (xmlStrcmp(BAD_CAST "country", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}country."); #endif _countryDto = (NOVAGLOBALAPINS0CountryDto *)[NOVAGLOBALAPINS0CountryDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}country."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CountryDto. Expected element country. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0CountryDto. Expected element country. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _countryDto; } /** * Writes this NOVAGLOBALAPINS0CountryDto to XML under element name "country". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _countryDto The CountryDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0CountryDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "country", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}country. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}countryDto for root element {}country..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}countryDto for root element {}country..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}country. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countryCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCountryCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setName: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "currencyCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCurrencyCode: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "languageCode", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setLanguageCode: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self countryCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}countryCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}countryCode..."); #endif [[self countryCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}countryCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}countryCode."]; } } if ([self name]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}name."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}name..."); #endif [[self name] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}name..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}name."]; } } if ([self currencyCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currencyCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}currencyCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}currencyCode..."); #endif [[self currencyCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}currencyCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}currencyCode."]; } } if ([self languageCode]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "languageCode", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}languageCode."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}languageCode..."); #endif [[self languageCode] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}languageCode..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}languageCode."]; } } } @end /* implementation NOVAGLOBALAPINS0CountryDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0CountryDto_M */ #ifndef DEF_NOVAGLOBALAPINS0ActionStatusEnum_M #define DEF_NOVAGLOBALAPINS0ActionStatusEnum_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 NOVAGLOBALAPINS0ActionStatusEnum *xmlTextReaderReadNOVAGLOBALAPINS0ActionStatusEnumType(xmlTextReaderPtr reader) { xmlChar *enumValue = xmlTextReaderReadEntireNodeValue(reader); enum NOVAGLOBALAPINS0ActionStatusEnum *value = calloc(1, sizeof(enum NOVAGLOBALAPINS0ActionStatusEnum)); 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 NSLog(@"Attempt to read enum value failed: %s doesn't match an enum value.", enumValue); #endif } #if DEBUG_ENUNCIATE else { NSLog(@"Attempt to read enum value failed: NULL value."); } #endif return NULL; } /** * Utility method for getting the enum value for a string. * * @param _actionStatusEnum The string to format. * @return The enum value or NULL on error. */ static enum NOVAGLOBALAPINS0ActionStatusEnum *formatStringToNOVAGLOBALAPINS0ActionStatusEnumType(NSString *_actionStatusEnum) { enum NOVAGLOBALAPINS0ActionStatusEnum *value = calloc(1, sizeof(enum NOVAGLOBALAPINS0ActionStatusEnum)); value = NULL; if ([@"SUCCESS" isEqualToString:_actionStatusEnum]) { *value = NOVAGLOBALAPI_NS0_ACTIONSTATUSENUM_SUCCESS; } if ([@"FAIL" isEqualToString:_actionStatusEnum]) { *value = NOVAGLOBALAPI_NS0_ACTIONSTATUSENUM_FAIL; } #if DEBUG_ENUNCIATE NSLog(@"Attempt to read enum value failed: %s doesn't match an enum value.", _actionStatusEnum); #endif return value; } /** * 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 xmlTextWriterWriteNOVAGLOBALAPINS0ActionStatusEnumType(xmlTextWriterPtr writer, enum NOVAGLOBALAPINS0ActionStatusEnum *_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 NSLog(@"Unable to write enum value (no valid value found)."); #endif return -1; } /** * Utility method for getting the string value of ActionStatusEnum. * * @param _actionStatusEnum The ActionStatusEnum to format. * @return The string value or NULL on error. */ static NSString *formatNOVAGLOBALAPINS0ActionStatusEnumTypeToString(enum NOVAGLOBALAPINS0ActionStatusEnum *_actionStatusEnum) { switch (*_actionStatusEnum) { case NOVAGLOBALAPI_NS0_ACTIONSTATUSENUM_SUCCESS: return @"SUCCESS"; case NOVAGLOBALAPI_NS0_ACTIONSTATUSENUM_FAIL: return @"FAIL"; default: return NULL; } return NULL; } #endif /* DEF_NOVAGLOBALAPINS0ActionStatusEnum_M */ #ifndef DEF_NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto_M #define DEF_NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto_M /** * @author Edward P. Legaspi @since Nov 13, 2013 */ @implementation NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto /** * (no documentation provided) */ - (NSArray *) servicesToTerminate { return _servicesToTerminate; } /** * (no documentation provided) */ - (void) setServicesToTerminate: (NSArray *) newServicesToTerminate { [newServicesToTerminate retain]; [_servicesToTerminate release]; _servicesToTerminate = newServicesToTerminate; } - (void) dealloc { [self setServicesToTerminate: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto *_nOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _nOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto = (NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto *) [NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _nOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto */ /** * Internal, private interface for JAXB reading and writing. */ @interface NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto (JAXB) @end /*interface NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto (JAXB) /** * Read an instance of NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto from an XML reader. * * @param reader The reader. * @return An instance of NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto *_nOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto = [[NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto alloc] init]; NS_DURING { [_nOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto initWithReader: reader]; } NS_HANDLER { _nOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto = nil; [localException raise]; } NS_ENDHANDLER [_nOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto autorelease]; return _nOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto; } /** * Initialize this instance of NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto from an XML reader. The element to be read is * "subscriptionWithCreditLimitUpdate". * * @param reader The XML reader. * @return The NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto *_subscriptionWithCreditLimitUpdateDto = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element subscriptionWithCreditLimitUpdate."]; } } if (xmlStrcmp(BAD_CAST "subscriptionWithCreditLimitUpdate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}subscriptionWithCreditLimitUpdate."); #endif _subscriptionWithCreditLimitUpdateDto = (NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto *)[NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}subscriptionWithCreditLimitUpdate."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto. Expected element subscriptionWithCreditLimitUpdate. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto. Expected element subscriptionWithCreditLimitUpdate. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _subscriptionWithCreditLimitUpdateDto; } /** * Writes this NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto to XML under element name "subscriptionWithCreditLimitUpdate". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _subscriptionWithCreditLimitUpdateDto The SubscriptionWithCreditLimitUpdateDto to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionWithCreditLimitUpdate", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}subscriptionWithCreditLimitUpdate. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}subscriptionWithCreditLimitUpdateDto for root element {}subscriptionWithCreditLimitUpdate..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}subscriptionWithCreditLimitUpdateDto for root element {}subscriptionWithCreditLimitUpdate..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}subscriptionWithCreditLimitUpdate. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "servicesToTerminate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}servicesToTerminate of type {}serviceToTerminateDto."); #endif __child = [NOVAGLOBALAPINS0ServiceToTerminateDto readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}servicesToTerminate of type {}serviceToTerminateDto."); #endif if ([self servicesToTerminate]) { [self setServicesToTerminate: [[self servicesToTerminate] arrayByAddingObject: __child]]; } else { [self setServicesToTerminate: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; id __item_copy; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self servicesToTerminate]) { __enumerator = [[self servicesToTerminate] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "servicesToTerminate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}servicesToTerminate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}servicesToTerminate..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}servicesToTerminate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}servicesToTerminate."]; } } //end item iterator. } } @end /* implementation NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto (JAXB) */ #endif /* DEF_NOVAGLOBALAPINS0SubscriptionWithCreditLimitUpdateDto_M */