|
Rank: Advanced Member
Joined: 5/26/2011 Posts: 31 Location: Ottawa
|
Hi Everyone,
I am receiving XML files with a base64 tag that contains very large .pdf files. I am trying to validate if these entries are valid or not. Is there a way to do this in mapforce? Or a way to detect if the content of the encode data is corrupt?
I would supple an example but the data is sensitive..
Can you please supply me the correct function? This is time sensitive and I am having issues. The data appears to be correct but when I load in my importer and through the schema checker it is reporting as none valid?
Thanks for any help or suggestions,
|
|
Rank: Newbie
Joined: 10/28/2002 Posts: 1,283 Location: AT
|
The following images represent a mapping which maps an invalid base64binary value in the source to a target text component. As you can see, when you provide the xml instance file for the source xsd component you will see an error in the messages window at the bottom, and when you try to switch to the output preview you will also see an error that the value could not be converted to base64binary. How are you executing the mapping? File Attachment(s): test.zip (2kb) downloaded 316 time(s).
island attached the following image(s):
|
|
Rank: Advanced Member
Joined: 5/26/2011 Posts: 31 Location: Ottawa
|
So the client sent me XML files. I have the .xsd provided, from the Professional Medical Body. The XML files adhere to the .xsd. In mapforce I have the left side being the sent file and connecting to the right .xsd. Hoping to copy the information provided into the new xml file after applying some transformation. One of the items I want to check is the base64 field to make sure it conforms to base64. I am using C# as my base language.
Not sure if that explains what you meant?
The specific tag looks like this <ReportsReceived><Content><Media>JUHYSTHJDJF+/03kdi4521....==</Media></Content><ReportsReceived> I want to validate that the information in the tag adheres to base64 format and is a proper image file.
thanks for the reply Island :)
|
|
Rank: Newbie
Joined: 10/28/2002 Posts: 1,283 Location: AT
|
Hi,
if I understand it correctly you are generating c# code from your mapping which you then compile and run, and you want to validate the xml source file of your mapping.
I attached an example mapping in my last post. If you generate c# code from it, compile and run it an exception will be thrown:
Mapping Application ERROR: Invalid character in a Base-64 string.
Is this not what you are looking for?
|
|
guest |