Not able to retrieve child objects from webservice response.

0
Hi,   I am not able to retrieve child objects (Contacts) from webservice response.    I followed the below steps. 1) consumed webservice 2) Imported webservice at domain model. it generated entities with relations. MXClaimSummaryResponse (1 -----1) MXClaimSummary (1----1) MX_Contacts (1----*)MXContact   entity : MXClaimSummary Description ClaimNumber State lose date   entity: MXContacts FirstName LastName   3) created micro flow and called webservice.  4) Passed the response ( MXClaimSummaryResponse )  to page 5) At page I added widget Data view and selected attributes.   at last i tried to select contacts which is not availe            
asked
11 answers
2

your page isnt working because you are trying to view "contact" from the database. Your import mapping is creating non persistable objects, which is why a datagrid from database wont work in this case. You either have to use a datagrid over association, or a datagrid with a microflow as a datasource to retrieve the list of contacts from memory.

 

Alternatively you can persist these objects and then your page should work (as long as your datagrid is retrieving using the associated object). 

 

Edit: This is what your page needs to look like.

 

answered
1

Could you elaborate further why you could not place a grid with the contacts in the dataview? Show a screen may be?

Regards,

Ronald

 

answered
1

Hi, i placed grid and tried, still contacts are not appearing on the page

 

i followed the below steps.. here are the screen shots

 

 

 

 

 

 

 

 

answered
0

Could it be that you have no access rights to read the associations or the name?

If you populate the Contact from a microflow can you see your data in the microflow?

answered
0

here is the screen shot of microflow.

answered
0

After you call your webservice you are returning the 'Summary Response'. Try using a 'Retrieve' Activity from 'Association' to get the nested item list. Once you have the list, you could iterate over the contacts to perform some activity.

 

answered
0

As jeff says, use a retireve action and use the debugger to see if the data is correct

answered
0

As Jeff says, use a retrieve to get the associated values. Also try putting a breakpoint to see the data in the debugger.

answered
0

 

 

 

Tried to map contacts list to ClaimSummary

 

 

 

 

 

 

 

 

answered
0

Your ImportMapping is mapping to Non-Persistable entities. Typically when I'm working with WebService and Non-Persistable entities, I have a MF that retrieves the Non-Persistable data, and creates Persistable data that can then be used throughout my application. I don't have enough of your screen shots to determine if this is the related to your issue, but I would consider using a single MF to gather your data, build your entities, etc. and then a page that pulls from the database.

 

answered
0

Hi Raghava,

  Your response contains three 1-1 associations and a 1-* association.  To show the Contacts on the page using the content of your microflow try the following:

1) In your microflow, you get one of the entity MXClaimSummaryResponse

2) In the microflow, retrieve over 1-1 association the entity MXClaimSummary. You will only get one

3) In another microflow action, retrieve over 1-1 association the entity MX_Contacts.  You will only get one

4)On your page pass the Mx_Contacts entity to the page.  Set this page to accept a data view not of MXClaimSummaryResponse but Mx_Contact

5) Put a data grid, over association, that displays a list of the entity MX_Contact, which are not present in your response.

 

Alternative ideas:

1) After step 3 above, retrieve again to get MX_Contact from the 1-* association to MX_Contacts.  Iterate through this list and make persistent Contact objects as Jeff Watts suggests

2) If having the Claim Number and State from the MXClaimSummaryResponse is important to you, then you can keep the page as you have it, but populate the data grid from a microflow, not database.  Write a microflow that retrieves the MX_Contact objects over the three associations and return the list to fill the grid.

Hope this helps!

answered