Skip to content

Commit 96bc6eb

Browse files
committed
fix Power BI xml response changing
Signed-off-by: dbulahov <[email protected]>
1 parent 1d366f7 commit 96bc6eb

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

api/src/main/java/org/eclipse/daanse/xmla/api/common/enums/ItemTypeEnum.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public enum ItemTypeEnum {
2929

3030
UNSIGNEDSHOT("xsd:unsignedShort"),
3131

32-
UNSIGNEDINT("xsd:xsd:unsignedInt"),
32+
UNSIGNEDINT("xsd:unsignedInt"),
3333

3434
BOOLEAN("xsd:boolean");
3535

api/src/main/java/org/eclipse/daanse/xmla/api/mddataset/RowSetRowItem.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public interface RowSetRowItem {
2121

2222
String tagName();
2323

24+
String fieldName();
25+
2426
String value();
2527

2628
Optional<ItemTypeEnum> type();

model.record/src/main/java/org/eclipse/daanse/xmla/model/record/mddataset/RowSetRowItemR.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818

1919
import java.util.Optional;
2020

21-
public record RowSetRowItemR(String tagName, String value, Optional<ItemTypeEnum> type) implements RowSetRowItem {
21+
public record RowSetRowItemR(String tagName, String fieldName, String value, Optional<ItemTypeEnum> type) implements RowSetRowItem {
2222

23+
public RowSetRowItemR(String tagName, String value, Optional<ItemTypeEnum> type) {
24+
this(tagName, tagName, value, type);
25+
}
2326
}

server/adapter.soapmessage/src/main/java/org/eclipse/daanse/xmla/server/adapter/soapmessage/SoapUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ private static void addRowSetRowItem(SOAPElement e, RowSetRowItem it) {
430430
if (it != null) {
431431
SOAPElement el = addChildElement(e, it.tagName(), Constants.ROWSET.PREFIX);
432432
el.setTextContent(it.value());
433-
//it.type().ifPresent(v -> setAttribute(el, "type", v.getValue()));
433+
it.type().ifPresent(v -> setAttribute(el, "type", v.getValue()));
434434
}
435435
}
436436

@@ -2477,7 +2477,7 @@ private static void addRowsetSchema(SOAPElement root, RowSet rowSet) {
24772477
ItemTypeEnum type = item.type().orElse(ItemTypeEnum.STRING);
24782478
ctSequenceEl1.setAttribute("minOccurs", "0");
24792479
ctSequenceEl1.setAttribute("name", item.tagName());
2480-
ctSequenceEl1.setAttribute("sql:field", item.tagName());
2480+
ctSequenceEl1.setAttribute("sql:field", item.fieldName());
24812481
ctSequenceEl1.setAttribute("type", type.getValue());
24822482
}
24832483
}

0 commit comments

Comments
 (0)