Question

I am working with an external service which returns an XML which is exactly equal to the XML generated from a service operation in peoplesoft. Therefore, I used loadXMLStrin function as mentioned below. But, only one field is copied to the rowset. I dont know whats wrong.

Here is the code.

&msgAddrResp = CreateMessage(Operation.FG_ADDR_RESP);
  &msgAddrResp.LoadXMLString(&sXML);

  &rsFgAddrStndRespWr = &msgAddrResp.GetRowset();

Here is the XML

<?xml version="1.0"?>
<FG_ADDR_RESP2>
<FieldTypes>
<FG_ADDR_RESP_WR class="R">
<cmid type="NUMBER"/>
<AddressLine1 type="CHAR"/>
<City type="CHAR"/>
<State type="CHAR"/>
<PostalCode type="CHAR"/>
<TimeZone type="CHAR"/>
<InCityLimit type="CHAR"/>
</FG_ADDR_RESP_WR>
<PSCAMA class="R">
<LANGUAGE_CD type="CHAR"/>
<AUDIT_ACTN type="CHAR"/>
<BASE_LANGUAGE_CD type="CHAR"/>
<MSG_SEQ_FLG type="CHAR"/>
<PROCESS_INSTANCE type="NUMBER"/>
<PUBLISH_RULE_ID type="CHAR"/>
<MSGNODENAME type="CHAR"/>
</PSCAMA>
</FieldTypes>
<MsgData>
<Transaction>
<FG_ADDR_RESP_WR class="R">
<cmid IsChanged="Y">0</cmid>
<AddressLine1 IsChanged="Y">xxxxx<AddressLine1/>
<City IsChanged="Y">xxxxxxxxx<City/>
<State IsChanged="Y">xx<State/>
<PostalCode IsChanged="Y">xxxxxxx<PostalCode/>
<TimeZone IsChanged="Y">xxx<TimeZone/>
<InCityLimit IsChanged="Y">x<InCityLimit/>
</FG_ADDR_RESP_WR>
<PSCAMA class="R">
<LANGUAGE_CD>ENG<LANGUAGE_CD/>
<AUDIT_ACTN><AUDIT_ACTN/>
<BASE_LANGUAGE_CD>ENG<BASE_LANGUAGE_CD/>
<MSG_SEQ_FLG><MSG_SEQ_FLG/>
<PROCESS_INSTANCE>0</PROCESS_INSTANCE/>
<PUBLISH_RULE_ID><PUBLISH_RULE_ID/>
<MSGNODENAME><MSGNODENAME/>
</PSCAMA>
</Transaction>
</MsgData>
</FG_ADDR_RESP2>
Was it helpful?

Solution

The problem was the XML. It wasn't structured properly. I changed the structure and its working now.

Thank You.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top