Import list of objects trought REST services

1
Hi Experts, i have two applications in application -1 i have two entity's  Take picture and clint submit they both are associate with each other  (many to many) and take picture entity is generalized to system.images so when i'm crating the clint submit object i'm committing client submit object along with all the images. so in the application 2 i want to retrive the data application 1 and show in the application 2 for this i have created json structure '[  {    "ClaimNumber": "string",    "PolicyNumber": "string",    "UserName": "string",    "Image": "string",    "TakePictures": [      {        "PublicThumbnailPath": "string",        "FileID": 0,        "Name": "string",        "Contents": "string",        "HasContents": true,        "DeleteAfterDownload": true,        "Size": 0,        "image": "string"      }    ]  }]'  and int import mapping i have selected all the fields as shown below    and the did the mapping my domain model is  here i'm getting the errors are    Below is the jsonobject which is reviving from application 1  [  {    "ClaimNumber": "%khEae1oK6M3",    "PolicyNumber": "1010144",    "UserName": "lokesh",    "TakePictures": [      {        "FileID": 12,        "Name": "insurance.jpg",        "Contents": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDIBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIG9bG87orDkXfsBlHxQetMN5k6LHr1ihlImlo4DJ7evXS7tysNVx5lqiciMZxGnx0sVZsHlrBt/wBfkW1fraujND0siGchhWI1dVanoWbJYcachVlyL4YEhRN5gyo1hR/H47qLT2KloNm7eiPWtgMLk1Ei8qi",        "HasContents": true,        "DeleteAfterDownload": false,        "Size": 293035,        "image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDIBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMj"      }    ]  }]   Can anyone please help me that how to resolve this errors and how to retrive the whole object. Thanks in advance.
asked
1 answers
0

I would not inherit from image but use a base64 string to convert the file to string and on the other end convert it back again to an image. This way you control the whole process yourself and you do not have to bother about those system entities and security rules on them.

Regards,

Ronald

 

answered