Skip to content

Association Issue When Consuming Webservice #73

@mkumpf

Description

@mkumpf

I have been struggling with consuming a particular webservice for some time now and have not been able to get it working. The webservice is from Hubspot. The returned JSON is as follows:

{
"contacts":[
{"addedAt":1454958537989,
"vid":1,
"canonical-vid":1,
"merged-vids":[],
"portal-id":2016447,
"is-contact":true,
"profile-token":"AO_T-mOPfmNESRoTf5_p1Q546HYy-3wmBbNdfVTZT9t3838HtAHNLQy4YR91m2oO4BypNJ2s5Mou75sLW_LiS8jtm01gaS2HiVBbV_9TvK3G-HRRGx07k7wUinGlgCX_ybwFuquBGf8Y","profile-url":"https://app.hubspot.com/contacts/2016447/lists/public/contact/_AO_T-mOPfmNESRoTf5_p1Q546HYy-3wmBbNdfVTZT9t3838HtAHNLQy4YR91m2oO4BypNJ2s5Mou75sLW_LiS8jtm01gaS2HiVBbV_9TvK3G-HRRGx07k7wUinGlgCX_ybwFuquBGf8Y/",
"properties":{
"firstname":{"value":"Brian"},
"lastmodifieddate":{"value":"1454959883325"},
"company":{"value":"Customer One"},
"lastname":{"value":"Humphrey"}},
"form-submissions":[],
"identity-profiles":[
{"vid":1,
"saved-at-timestamp":1454958536954,
"deleted-changed-timestamp":0,
"identities":[
{"type":"EMAIL",
"value":"[email protected]",
"timestamp":1454958536939},
{"type":"LEAD_GUID",
"value":"2abdbb41-8d96-4dfd-9060-7576ce71fff7",
"timestamp":1454958536945}]
}],
"merge-audits":[]}
],
"has-more":false,
"vid-offset":1}

I have modeled this in the domain model in the following way:

image

However, after having tried several different ways, I have not been successful at getting identity-profiles to deserialize into the Mendix domain model. I am likely doing something wrong....any pointers would be appreciated.

I have tried:

  • naming the association identity_profiles and putting an attribute called identity_profiles_jsonkey in both the Contact and Identity_ProfilesItem entities
  • naming the association _identity_profiles and adding and attribute called _identity_profiles_jsonkey to both entities

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions