Validate the input file against a given schema inside an orchestration and producing 2 different files based on the validation result

HI All,
I have a situation.
I need to validate the input file against a given schema inside an orchestration and producing 2 different files based on the validation result.
A predefined success schema in case of  validation success and negative schema structure for validation failure.
any advice ?

Hi Rachit,I following the blog
http://dietergobeyn.be/validating-biztalk-messages-orchestration/ and stuck in few things
I created a helper class with the name Validation and following code
[Serializable]
    public class Validation
        private bool _isValid = true;
        public bool Validate(XmlDocument document, Type schema)
            XmlSchemaSet set = new XmlSchemaSet();
            if (typeof(SchemaBase).IsAssignableFrom(schema) && !schema.IsNested)
                set.Add((Activator.CreateInstance(schema) as SchemaBase).Schema);
            ValidationEventHandler eventHandler = new ValidationEventHandler(HandleValidationError);
            document.Schemas = set;
            document.Validate(eventHandler);
            return _isValid;
        private void HandleValidationError(object sender, ValidationEventArgs ve)
            _isValid = false;
public static bool ValidateMessage(XLANGMessage msg)
XmlDocument xDoc = new XmlDocument();
xDoc = (System.Xml.XmlDocument)msg[0].RetrieveAs(xDoc.GetType());
Type t = typeof(Schemas.External.Invoice_v3_1);
Validation validation = new Validation();
return validation.Validate(xDoc, t);
First thing, Do i need to write the ValidateMessage method inside the helper class or not ??
If inside, how to add the reference of schema files in the statement (Type t = typeof(Schemas.External.Invoice_v3_1);)
 I tried adding the reference of my schema project but it is showing error.
And what is to be written in the ValidateMessage expression shape in Orchestration ?
Really appreciate your help.

Similar Messages

  • I have been given a 28 page Pdf and have been asked to optimize the item to reduce the file size. Can this be done in Photoshop Elements? if so how?

    I am using a Mac and just bought Photoshop Elements 13. I have been given a 28 page Pdf and have been asked to optimize the item to reduce the file size. Can this be done in Photoshop Elements? if so how?

    No the pages will open as separate documents in Expert Mode. You really need Acrobat or possibly you could copy and paste the contents into MS word. Then re-save as PDF.

  • Hi thee.  As logical as I can be.  I export a file back into my folder as a PSD.  I then export that file to PS.  Work on it, save and return it to LR.  The file goes to the bottom of the folder from where I have to put it back in the original place, taki

    Hi thee.  As logical as I can be.  I export a file back into my folder as a PSD.  I then export that file to PS.  Work on it, save and return it to LR.  The file goes to the bottom of the folder from where I have to put it back in the original place, taking time and driving me slightly mad.  Why does the file not go back to where it came from please?  Thanks  Tim

    Umm, but this folder is an amalgam of two cameras and five cards, and I want them in capture order!  Thanks for trying though Jim.
    Cheers
    Tim

  • Firfox is ceashing when I attepmt to download a file. Everything works until I close Firfox and then attempt to re-open the browser then it crashes. I tried deleting the download file in my profile folder but it didn't work.

    Firefox is crashing when I attempt to download a file. Everything works until I close Firefox and then attempt to re-open the browser then it crashes. I tried deleting the download file in my profile folder but it didn't work.

    Downgrade to an older nightly that works for a week or so, then test again to see if the bug's still there. In the mean time, report the bug on Bugzilla if it hasn't already been. There's really nothing you can do about bugs in nightlies.
    (A similar sort of bug that triggered 60 seconds after opening, every time, was what got me out of using nightlies as my main browser.)

  • What is causing this?  The file "iTunes Library.itl" does not appear to be a valid iTunes library file. iTunes has created a new iTunes library and renamed this file to "iTunes Library (Damaged) 4".  This happens everytime I start iTunes lateley.  Help!!!

    Everytime I open iTunes lately...I get all my music thrown out of the library and this annoying message come up...The file “iTunes Library.itl” does not appear to be a valid iTunes library file. iTunes has created a new iTunes library and renamed this file to “iTunes Library (Damaged) 4”.  Is this how an apple works?  It doesn't?  Why all of a sudden is it doing this?  Please help.  Thank you.
    David

    Did you happen to bring this iTunes library over from a windows machine? You might read this kb article to see if it helps http://support.apple.com/kb/HT1451

  • As good will gesture, we can help you with the upgrade for PSE 13. We would request you to place the order for Adobe Photoshop Elements 13 as an upgrade and then we will provide you the full version serial number for the same product against the new upgra

    I RECIVED AN EMAIL FROM ADOBE AS  :  As good will gesture, we can help you with the upgrade for PSE 13. We would request you to place the order for Adobe Photoshop Elements 13 as an upgrade and then we will provide you the full version serial number for the same product against the new upgrade order"  IS THIS UPGRADE FREE AND WHAT SHOULD I DO, HOW CAN I HAVE THIS UPGRADE?

    Compare with on-line stores. The full version is often cheaper than Adobe's upgrade price.
    See this example from Amazon, but check pricing in your own region.
    http://www.amazon.com/gp/product/B00N4OLCRO/ref=s9_simh_gw_p65_d4_i2?pf_rd_m=ATVPDKIKX0DER &pf_rd_s=desktop-1&pf_rd_r=0F1GED9546928YP3PHC0&pf_rd_t=36701&pf_rd_p=1970559082&pf_rd_i=d esktop

  • Why has this occurred The file "iTunes Library.itl" does not appear to be a valid iTunes library file. iTunes has created a new iTunes library and renamed this file to "iTunes Library (Damaged)".

    My itunes library suddenly that the file “iTunes Library.itl” does not appear to be a valid iTunes library file. iTunes has created a new iTunes library and renamed this file to “iTunes Library (Damaged)”. I use an external hard drive for my Itunes.

    The library file appears to have been corrupted.  You say you use your external drive but is the whole library on it or only your media?  No matter, you will have to rebuild the library file:
    iTunes: How to re-create your iTunes library and playlists - http://support.apple.com/kb/ht1451

  • HT1349 I'll be able to store and share different files that are not page,numbers or keynote, like I'd with idisk?

    I'll be able to store and share different files that are not page,numbers or keynote, like I'd with idisk?

    Not going to happen the way you want it to.
    When you add a gift card balance to the Apple ID, it's available for the Apple ID.
    Probably best to create unique Apple ID's for each... this will also make things easier in the future as purchases are eternally tied to the Apple ID they were purchased with.

  • Two CS4's produce different published .swf from the same fileset

    Hello, I'm a novice at Flash, but an experienced troubleshooter, I've spent days on this intriguing problem:
    *Can two CS4's produce different published .swf from the same fileset?
    I have a flash suite written by a young man in China.
    When I test the .swf file in the suite it works fine.
    However I need to make some minor redesigns so I need to change the .fla file - but before I do I found that when I publish a new .swf from the .fla file (with all the necessary action scripts/xml etc in the right place) it doesn't produce the same outcome. Instead the navigation (next page, items per page etc) is missing.
    When he does the same thing (I trust his integrity) he gets the new .swf with the navigation in tact.
    You can see the two outcomes at the web address below (mock data).
    There are no code changes, no library changes that I can find.
    So I thought maybe there is something about different settings or 'environments' that can affect the outcome?
    You can see at   >> http://www.zaphmann.com/source/source.html << the correct navigation.
    Then merely republishing the source.fla (and a rename of .swf) NOW The navigation is gone.  >>>> http://www.zaphmann.com/source/sourcetoFromFLAswf.html <<<<<
    Any ideas???
    Thank you - a free book to anyone who has the answer.

    Hello Ned, I
    definitely have the very latest version, I will ask Mr. Chen to confirm his version. If his version were, say, 6 months old could that be of any significance?
    The software suite appears to have authored produced a while ago as it uses actionscript 2, or maybe he just prefers that.
    Basically the suite worked until he added a custom 'deeplink' (basically id tags in a few AS) and after which it still works at his end (compiled with CS3 or CS4), but not when I do likewise from the fla.
    I have trawled through the AS code changes and see no errors or changes that would affect the navigation portion of the code which remains the same, so I hypothesized that there may some settings that could affect the publishing.
    Young Mr. Chen in China seems to be a bright young man but not sto be so keen on deep troubleshooting...
    Any ideas you have, however wild are welcomed, I can also send source files if that would help.

  • The computer that had my iTunes account on has broken, and was thrown away. All the media I bought are on my iPhone only - is there any way to re-open my iTunes on the new computer or to download them off my iPhone? Thanks!

    The computer that had my iTunes account on has broken, and was thrown away.
    All the media I bought on it are on my iPhone only - is there any way to re-open my iTunes on the new computer or to download them off my iPhone?
    I'm worried that if I lose my iPhone all will be lost. Please help!
    Thanks,
    Alastair

    Buy yourself a backup drive. Your i-device was not designed for unique storage of your media. It is not a backup device and media transfer is structured around you maintaining your media on a computer which is itself properly backed up against loss. Syncing is one way, computer to device, matching the device content to the content on the computer. The exception is purchased content.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only media purchased from iTunes Store
    For transferring other items from an i-device to a computer you will probably have to use third party commercial software unless you have an older model iPod. Examples (check the web for others; this is not an exhaustive listing, nor do I have any idea if they are any good):
    - Senuti - http://www.fadingred.com/senuti/
    - Phoneview - http://www.ecamm.com/mac/phoneview/
    - MusicRescue - http://www.kennettnet.co.uk/products/musicrescue/ - Mac & Windows
    - Sharepod (free) - http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2 - Windows
    - Snowfox/iMedia - http://www.mac-videoconverter.com/imedia-transfer-mac.html - Mac & PC
    - Yamipod (free) - http://www.yamipod.com/main/modules/downloads/ - PC, Linux, Mac [Still updated for use on newer devices? No edits to site since 2010.]
    - Post by Zevoneer: iPod media recovery options - https://discussions.apple.com/message/11624224 - this is an older post and many of the links are also for old posts, so bear this in mind when reading them.
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive - https://discussions.apple.com/docs/DOC-3141 - dates from 2008 and some outdated information now.
    Copying Content from your iPod to your Computer - The Definitive Guide - http://www.ilounge.com/index.php/articles/comments/copying-music-from-ipod-to-co mputer/ - Information about use in disk mode pertains only to older model iPods.
    Get Your Music Off of Your iPod - http://howto.wired.com/wiki/Get_Your_Music_Off_of_Your_iPod - I am not sure but this may only work with some models and not newer Touch, iPhone, or iPad.
    Additional information here https://discussions.apple.com/message/18324797

  • The iphoto on my macbook isn't responding. I click on the app but once it opens it starts to load and thats all it does. The wheel continues to spins. any one have any suggestion on how to fix the problem? i'd appreciate the help =]

    The iphoto on my macbook isn't responding. I click on the app but once it opens it starts to load and thats all it does. The wheel continues to spins. any one have any suggestion on how to fix the problem? i'd appreciate the help =]

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • [svn] 4308: Now that ASdoc processes MXML files, add comments to RichTextEditor.mxml, DefaultListEffect.mxml, and DefaultTileListEffect.mxml files.

    Revision: 4308
    Author: [email protected]
    Date: 2008-12-15 12:25:20 -0800 (Mon, 15 Dec 2008)
    Log Message:
    Now that ASdoc processes MXML files, add comments to RichTextEditor.mxml, DefaultListEffect.mxml, and DefaultTileListEffect.mxml files.
    QE Notes: None
    Doc Notes: None
    Bugs: -
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RichTextEditor.mxml
    flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/DefaultListEffect.mxml
    flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/DefaultTileListEffect.mxml

    I'm also having this problem. I'm using Flash Builder 4.6, AIR 3.4 and I've made a DLL (e.g. ExtensionDll.dll) which needs to call functions in another DLL (e.g. DllUsedByExtensionDll.dll) . I've made sure my ANE is working with the ExtensionDll.dll already, so there are no issues with my actionscript code or my ANE packaging or my DLL compilation. However, once I start calling functions from the other DLL, it starts throwing me Error #3500. Even if I call this function (e.g. abc()) in ExtensionDll.dll, but I never actually use the function from actionscript, and I call another function (e.g. def()) from actionscript, the Error #3500 still appears, so it does not seem to depened on the whether the code is used or not.
    It's similar to this problem.
    http://stackoverflow.com/questions/9823504/how-to-use-external-dll-in-air-native-extension
    Does anyone have a solution or at least a way to debug this?

  • How to set a default value for a drop down list box and then apply cascading based on the default value in Infopath 2010.

    Hello Everyone
    I have two drop downs. Both are coming from look up fields from two lists. i want to set a default value(first list item) for the first drop down list box and then apply cascading based on the default value for the next drop down list box. I found one article(http://www.bizsupportonline.net/infopath2010/display-first-item-drop-down-list-box-infopath-2010.htm)
    where in i can set a default value but i can't apply cascading based on that default value. Any suggestions would be highly appreciated.
    Thanks
    Ramanjulu Naidu N

    Hey Ramanjulu,
    Take a look at the below article which I believe will answer your question.
    http://basquang.wordpress.com/2010/03/29/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010/
    Daniel Christian (MCTS)

  • I have been trying to log onto the Wounded Warriors Program Portal.  I can Log in and then when I click on the rewards it tried to go to the page the just takes me back to the same page I was on.  This is very frustrating.

    I have been trying to log onto the Wounded Warriors Program Portal.  I can Log in and then when I click on the rewards it tried to go to the page the just takes me back to the same page I was on.  This is very frustrating.  I am new to the Mac World so please bare with me.  Please tell me there is help somewhere for this issue.  It seems it is blocked or not letting me through.  Can anyone please help me out.  Thanks 

    Both Mail and Safari have Activity Options that open a  screen that shows you just how the site or mail is loading.
    In Safari if you are having trouble with a site in activity you will see the count of items being downloaded - and if an error occurs it shows red.
    On the top is the number of items it is loading or trying to load and the count should be increasing.   If the count stops, and you don't have errors it may be that too many people are going after the same site and your request just timed out. Have had the time out on a news site when trying to load a most popular article.

  • How do i keep only the name of a month in a cell in Numbers and not have it auto fill the date and time?

    how do i keep only the name of a month in a cell in Numbers and not have it auto fill the date and time?

    Hi JN and Barry,
    Barry wrote:
    The second case may not be included in the available D&T formats in Numbers 3
    For my region, the Date & Time data formats include month.
    The Date Pop-Up
    This may not be the case for all regions.
    Remember that the month is only the display, and the Full Date & Time is still there. If I change the format to reveal what is behind the curtain:
    Regards,
    Ian.

Maybe you are looking for

  • PROBLEM FOR P.O

    Dear cons   I want to create a purchase order for validity period of 3 month. that means we can enter G.R Upto 3 month. After that the system will not accecpt G.R.  example- Creation date of P.O- 01.01.2008 on 01.04.2008 the system will not acccpt GO

  • IPhoto8.1.2  does not answer

    When I try to open my iPhoto, the page is blank and it keeps spinning. I have to force the program to close. It happened all of a sudden, and has been like this for a couple of days now. What can I do?

  • How do I start up my computer when the screen is black after "waking" it up from sleep mode and/or turning it on from the shut down?

    I really need help! I just got this MacBook Air almost two weeks ago. It is a refirbished one. Now lately, when I put it to sleep and then get back to it, it won't wake up. It just gives me a black screen and a running noise. Sometimes it does it too

  • Regarding Help

    Hi all, please give me suggestion,I am a oracel developer but i got a opportunity to slide to DBA,Please send us how to prepare and learn DBA activities..If anybody having good material regarding DBA(don't tell like google or oracle sites)..if anybod

  • Portege Z830 Battery Manager stopped working

    Hi - first time here and have looked extensively for an answer to this problem. I use the Toshiba Battery Manager facility to charge my battery no higher than 80% unless I need to. A month or so ago, I disabled some start up programs and fear I've me