345
346
value.array = TrackedCMPIArray(max,t,NULL);
346
347
if (value.array != NULL) {
347
348
for (i=0; i<max; i++) {
348
v = str2CMPIValue(t, arr->values[i], refarr->values+i,NULL);
349
v = str2CMPIValue(t, arr->values[i], refarr->values+i,ns);
349
350
CMSetArrayElementAt(value.array, i, &v, t);
629
630
sb->ft->appendBlock(sb, bTag,bTagLen);
630
631
sb->ft->appendChars(sb, (char *) name->hdl);
631
632
if (param) SFCB_APPENDCHARS_BLOCK(sb, "\" PARAMTYPE=\"");
633
SFCB_APPENDCHARS_BLOCK(sb, "\" TYPE=\"");
634
if(data->type & CMPI_instance || data->type & CMPI_class) {
635
SFCB_APPENDCHARS_BLOCK(sb, "string");
637
sb->ft->appendChars(sb, dataType(data->type));
633
else if (bTag) SFCB_APPENDCHARS_BLOCK(sb, "\" TYPE=\"");
634
if (data->type == CMPI_refA) {
635
SFCB_APPENDCHARS_BLOCK(sb, "reference");
637
else if(((data->type & ~CMPI_ARRAY) == CMPI_instance)
638
|| ((data->type & ~CMPI_ARRAY) == CMPI_class)) {
639
SFCB_APPENDCHARS_BLOCK(sb, "string");
641
sb->ft->appendChars(sb, dataType(data->type));
640
643
SFCB_APPENDCHARS_BLOCK(sb, "\">\n");
641
644
if (qsb) sb->ft->appendChars(sb, (char *) qsb->hdl);
642
645
if (data->state == 0) {
643
SFCB_APPENDCHARS_BLOCK(sb, "<VALUE.ARRAY>\n");
646
if (data->type == CMPI_refA) {
647
SFCB_APPENDCHARS_BLOCK(sb, "<VALUE.REFARRAY>\n");
650
SFCB_APPENDCHARS_BLOCK(sb, "<VALUE.ARRAY>\n");
644
652
for (j = 0; j < ac; j++) {
645
653
d = CMGetArrayElementAt(ar, j, NULL);
646
654
if ((d.state & CMPI_nullValue)==0) {
654
SFCB_APPENDCHARS_BLOCK(sb, "</VALUE.ARRAY>\n");
662
if (data->type == CMPI_refA) {
663
SFCB_APPENDCHARS_BLOCK(sb, "</VALUE.REFARRAY>\n");
665
SFCB_APPENDCHARS_BLOCK(sb, "</VALUE.ARRAY>\n");
676
688
else if (*type == '%') {
677
sb->ft->appendBlock(sb, bTag, bTagLen);
689
sb->ft->appendBlock(sb, bTag, bTagLen);
678
690
sb->ft->appendChars(sb, (char *) name->hdl);
679
691
SFCB_APPENDCHARS_BLOCK(sb, "\" EmbeddedObject=\"object");
680
692
if (param) SFCB_APPENDCHARS_BLOCK(sb, "\" PARAMTYPE=\"string\">\n");
692
sb->ft->appendBlock(sb, bTag, bTagLen);
704
sb->ft->appendBlock(sb, bTag, bTagLen);
693
705
sb->ft->appendChars(sb, (char *) name->hdl);
694
706
if (param) SFCB_APPENDCHARS_BLOCK(sb, "\" PARAMTYPE=\"");
696
SFCB_APPENDCHARS_BLOCK(sb, "\" TYPE=\"");
697
sb->ft->appendChars(sb, type);
698
SFCB_APPENDCHARS_BLOCK(sb, "\">\n");
707
else if (bTag) SFCB_APPENDCHARS_BLOCK(sb, "\" TYPE=\"");
708
sb->ft->appendChars(sb, type);
709
SFCB_APPENDCHARS_BLOCK(sb, "\">\n");
700
710
if (qsb) sb->ft->appendChars(sb, (char *) qsb->hdl);
701
711
if (data->state == 0) value2xml(*data, sb, 1);