This i s part of a new program
Code: Select all
dcl-s Img64 SQLTYPE(CLOB:500000);
dcl-ds MyDS qualified;
dcl-ds Shipment;
dcl-ds Shipment;
BarcodeId char(30);
BarcodeSource char(30);
Barcode char(30);
end-ds;
Type char(30);
end-ds;
dcl-ds Labels;
dcl-ds Label Dim(2);
type char(30);
label SQLTYPE(CLOB:500000);
end-ds;
end-ds;
End-ds;
postResult is an xml file read on IFS by open....
read(fd_xml : %addr(rddata) : %size(rddata));
postResult = %trimr(rddata);
....
xml-into MyDS %xml(postResult: 'case=convert ns=remove +
allowmissing=yes allowextra=yes +
path=Envelope/Body'+
'/CreateReverseInverseShipmentWithLabelsBcResponse'+
'/CreateReverseInverseShipmentWithLabelsBcResult');
The file on IFS contains this data :
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<CreateReverseInverseShipmentWithLabelsBcResponse xmlns="http://xx.xxx.xxx">
<CreateReverseInverseShipmentWithLabelsBcResult>
<Shipment>
<Shipment>
<BarcodeId>10770800002688</BarcodeId>
<BarcodeSource>902</BarcodeSource>
<BarCode>%008800010770800002688332902</BarCode>
</Shipment>
<Type>REVERSE</Type>
</Shipment>
<Labels>
<Label>
<type>REVERSEBIC3</type>
<label>XlhBDQpeQ0kyOA0KXkxIMTgsOA0KXlB...</label>
</Label>
<Label>
<type>PROOFBIC3</type>
<label>XlhBDQpeQ0kyOA0KXkxIMTgsOA0KXlBPTg0KXkZUNTAwLDIwOQ0KXkEwTiwxNiwwXkZEQXR0ZW50aW9uLCBuJ291YmxpZXogcGFzIGRlIGZhaXJlIGFw...</label>
</Label>
</Labels>
</CreateReverseInverseShipmentWithLabelsBcResult>
</CreateReverseInverseShipmentWithLabelsBcResponse>
</soap:Body>
</soap:Envelope>
The strange thing is when the xml-into is executed i get the MyDS.Labels.Label.type(1) and MyDS.Labels.Label.type(2) with correct values, REVERSEBIC3 and PROOFBIC3, but nothing in MyDS.Labels.Label.label(1) or MyDS.Labels.Label.label(2).
I don't understand why i can't get the label content itself.
I tried with an other xml-into like this :
Code: Select all
xml-into Img64_DATA %xml(postResult:'case=convert ns=remove +
allowmissing=yes allowextra=yes +
path=Envelope/Body'+
'/CreateReverseInverseShipmentWithLabelsBcResponse'+
'/CreateReverseInverseShipmentWithLabelsBcResult'+
'/Labels/label/label');
This way i get the value, but only for the first occurence.
I need to get the two label values , certainly i'm doing something wrong but i dont know what.
Could you please help me figure out what i'm doing wrong ?
Thanx in advance for your help