Accessing files in library from adapter module

Hello everyone!
We are using XI with Netweaver 2004 and have programmed our own adapter for message transformations.
After the transformation we want to validate the generated XML file with the validator from SAP XML Toolkit.
Validator validator = new Validator();
String[] xsdFileNames = new String[]{
     "???/de/nordakademie/ext/gen/" + ediStandard + "/" + parser.getEdiVersion().toLowerCase() + "/xsd/" + parser.getEdiMessageName().toLowerCase() + ".xsd",
     "???/de/nordakademie/ext/gen/" + ediStandard + "/" + parser.getEdiVersion().toLowerCase() + "/xsd/segments.xsd"
boolean isValid = validator.validate(byteIn, xsdFileNames);
But we don't know how to address the necessary xsdFiles for the transformation. At the moment we get thw following error: [location : null] ERROR : E:\...\de\nordakademie\ext\gen\edifact\d96a\xsd\orders.xsd (The system cannot find the path specified)
The xsd files are located in the following package: de.nordakademie.ext.gen.edifact.d96a.xsd.
This package is part of a jar file which was deployed to the J2EE-Engine in a Libary.
But how can we access these files in the code example above?
Thanks in advance!

Hey!
Thanks for your help. I ha´ve now solved the problem. The following code works:
String xsdMessagePath = "de/nordakademie/ext/gen/.../abc.xsd";          
String xsdSegmentsPath = "de/nordakademie/ext/gen/.../xyz.xsd";
Validator validator = new Validator();
URL xsdMessageUrl = getClass().getClassLoader().getResource(xsdMessagePath);
URL xsdSegmentsUrl = getClass().getClassLoader().getResource(xsdSegmentsPath);                                   
String[] xsdFileNames = new String[]{
     xsdMessageUrl.toString(),
     xsdSegmentsUrl.toString()
boolean isValid = validator.validate(byteIn, xsdFileNames);

Similar Messages

  • Retrieving the file name in the adapter module in the sender file adapter

    hi,
    i need to retrieve the file name, in the adapter module. This module is placed in the sender file channel.
    After the file adapter has picked up the file from the file directory, the file is placed in the archived directory.Custom adapter mofule is place in the file shanel. i need to retrieve the file name of the file in the adapter module. Is it possible to retrieve the file name?
    Also is it possible to retrieve the archive directory path in module?
    Regards,
    Meenkashi

    Hi Meenakshi,
    I guess you are looking for this
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    Regards
    Suraj

  • "Check that you have permission to write to the library directory." I had this error pop up when trying to access a iPhoto Library from Finder.

    The error, "Check that you have permission to write to the library directory." Displayed after trying to access a iPhoto Library from finder. The file is located on the local hard drive and was accessed not 5 minutes before the error displayed. Upon searching the forums I found a similar problem and the instructions said to check a permission box in the "Get Info" tab. There was no box visible and after clicking the arrow to open the "Open With" tab, the rainbow wheel started to spin and I could no longer access Finder or the desktop. I was deleting files trying to make space on my hard drive and noticed as I was deleting files more data was being added to the iPhoto Library. My question is how can I fix this and how can I prevent this in the future, thank you very much for any help, I would really like to keep these pictures.

    I found a similar problem and the instructions said to check a permission box in the "Get Info" tab.
    This applies only when the Library is on an external drive. You cannot ignore permissions on the system drive.
    I was deleting files trying to make space on my hard drive
    What were you deleting?
    and noticed as I was deleting files more data was being added to the iPhoto Library.
    Hard to see how deleting files can add data to the iPhoto Library. Can you explain why you thought this?
    I would really like to keep these pictures.
    Make a back up now.
    Most Simple Back Up:
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex: Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically.
    Example of such apps: Chronosync - but there are many others. Search on MacUpdate or the App Store

  • Can't access iPhoto 09 library from outside iPhoto

    Since upgrading to iLife 09 I can't access my iPhoto library from anywhere BUT iPhoto. I use Photoshop CS2 and open my photos directly from that application. But now when the directory actually appears, it is greyed-out and inaccessible.

    Yes you can do this
    In Finder you can right click the iPhoto library and choose 'show package contents'.
    but you shouldn't.
    With iPhoto 7 (iLife 08) the old iPhoto Library Folder is now a Package File. This is simply a folder that looks like a file in the Finder. The change was made to the format of the iPhoto library because many users were inadvertently corrupting their library by browsing through it with other software or making changes in it themselves.
    There are many, many ways to access your files in iPhoto:
    *For Users of 10.5 and later*
    You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    Uploaded with plasq's Skitch!
    (Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)
    You can access the Library from the New Message Window in Mail:
    Uploaded with plasq's Skitch!
    *For users of 10.4 and later* ...
    Many internet sites such as Flickr and SmugMug have plug-ins for accessing the iPhoto Library. If the site you want to use doesn’t then some, one or any of these will also work:
    To upload to a site that does not have an iPhoto Export Plug-in the recommended way is to Select the Pic in the iPhoto Window and go File -> Export and export the pic to the desktop, then upload from there. After the upload you can trash the pic on the desktop. It's only a copy and your original is safe in iPhoto.
    This is also true for emailing with Web-based services. However, if you're using Gmail you can use iPhoto2GMail
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    *If you want to access the files with iPhoto not running*:
    For users of 10.6 and later:
    You can download a free Services component from MacOSXAutomation which will give you access to the iPhoto Library from your Services Menu. Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and later:
    Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    1. *Drag and Drop*: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. *File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3. *Show File*: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.
    You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.
    All of these are a: faster and b: safer than rooting around in the folders of the Library package
    Regards
    TD

  • Is it possible to send error message from Adapter Module to CCMS?

    Hi
    Is it possible to send error message from Adapter Module  to CCMS...?I have written on adatper module from there i have to send error message to CCMS or SXMB_MONI. Is it possible if yes please send me the related documents
    Best Regards
    Ravi Shankar B

    Hi
    I have written following User Defined Exeption in my Module program
    class DuplicateFileException extends ModuleException{
              DuplicateFileException(String message){
                   super(message);
    I am throwing my Exception like this
    try{
         throw new DuplicateFileException("Duplicate File");
    }catch(DuplicateFileException e){
         throw e;
    But i am not getting this exception in SXMB_MONI. In adpater monitoring i am getting the following exceptions
    <b>
    2007-05-16 15:51:30 GMT+05:30: Retry interval started. Length: 5.000 s
    - 2007-05-16 15:51:30 GMT+05:30: Error: java.lang.NullPointerException
    - 2007-05-16 15:51:30 GMT+05:30: An unknown error occured.
    - 2007-05-16 15:51:30 GMT+05:30: Processing started
    - 2007-05-16 15:51:25 GMT+05:30: Error: java.lang.NullPointerException</b>
    can any one give me the idea how to send error from module program to SXMB_MONI
    Thanks & Regards
    Ravi Shankar B

  • How can I transfer all of my music library from my iTunes library on my PC to my iPhone without Internet connection will filesharing for home sharing allow me to access my iTunes library from my iPhone if I do not have Internet access on my PC

    How can I transfer music from my home PC in my iTunes library to my iPhone for without Internet access will home sharing allow me to access my iTunes library from my iPhone 4 without Internet

    Why don't you just sync it to your phone?

  • When I try to access my music library from AppleTV is keeps telling me to turn on ITunes Match. I am not supposed to need iTunes Match for Home Sharing. I tripled checked to ensure Home Sharing is turned on and it is. Can anyone offer a solution?

    When I try to access my music library from AppleTV is keeps telling me to turn on ITunes Match. I am not supposed to need iTunes Match for Home Sharing. I tripled checked to ensure Home Sharing is turned on and it is. Can anyone offer a solution?

    All of your computers content are available in the AppleTV section called "Computer".  This is where you will find your music.
    The Music section of the AppleTV is only for those who subscribed to iTunes Match.

  • Jar files required to develop adapter module in 7.1

    Hi,
    can any one tell me whether below jar files are enough to develop the adapter modules in 7.1,
    u2022 aii_af_cci.jar
    u2022 aii_af_mp.jar
    u2022 aii_af_ms_api.jar
    u2022 aii_af_ms_spi.jar
    u2022 aii_af_trace.jar
    u2022 aii_af_svc.jar
    u2022 aii_af_cpa.jar
    if not please let me know set of jar files need to develop adapter module in 7.1.
    Thank You,
    Madhav

    Hi ,
    Below Jar files Required to develop Adapter Module in PI7.1
    com.sap.aii.af.cpa.svc.api
    com.sap.aii.af.lib.mod
    com.sap.aii.af.ms.ifc_api
    com.sap.aii.af.svc_api
    sap.comtcloggingjavaimpl
    Regards,
    Raj

  • Why can't   i access my itunes library from anywhere?

    Why can't I access all of my iTunes library when I am of at home connected to wifi.. The whole reason I bought iTunes Match was do I could access my entire library from anywhere?

    On iTunes using your computer have you completed the iTunes Match 3-step process?
    If so, within Song view you can enable a field called iCloud status - sorting Songs on this field will show what is available from the cloud.
    It sounds like all you need to do is to enable mobile internet on your iPhone to allow access over 3G as well as WiFi.

  • Not able to access my iPhoto library from external harddrive

    I get this message when I attempt to access my iphoto Library from my LeCie external hard drive.  "Your photo library is either in use by another application or has become unreadable. Shut down and restart your computer, and then open iPhoto again. If the problem persists, try rebuilding your photo library. To do this, quit iPhoto, and then reopen it while keeping the Option and Command keys pressed. You can also try restoring your photo library from a backup.
    I'm nervous to do as instructed for fear of deleting my photos from the external harddrive.

    What format is the external drive? Has the iPhoto library been working on the external drive in the past? What recently changed? what ahppened when you tried
    Shut down and restart your computer, and then open iPhoto again.
    LN

  • New user here.  Trying to import iPhoto 9.4.2 libraries into Aperture 3.4.3 as referenced files. When accessing File Import Library, it finds the iPhoto library just fine, but then imports it as Master files. No option that I can find to leave the photos

    New user here.  Trying to import iPhoto 9.4.2 libraries into Aperture 3.4.3 as referenced files. When accessing File>Import>Library, it finds the iPhoto library just fine, but then imports it as Master files. No option that I can find to leave the photos in place on the file system.  All the literature says their should be an option to choose, but I never get that option.  What?

    All the literature says their should be an option to choose, but I never get that option.
    That has been true for the previous Aperture versions. Now Aperture simply treats the original image files exactly as they are in the imported library. Referenced images will stay referenced, managed will be imported as managed. But you can always relocate the imported managed images afterwards by using "File > Relocate".
    Regards
    Léonie

  • HT1918 I cannot access files I uploaded from an old computer.  The email account to which some tracks are connected is deleted. For some reason my birth date doesn't work either. Is there some way to transfer the files to my current address?

    I cannot access files I uploaded from an old computer. The email account to which some tracks are connected is deleted. For some reason my birth date doesn't work either. Is there some way to transfer the files to my current address and username?

    Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
    Apple's iWork suite (Pages, Numbers, and Keynote.)
    Open Office (Office 2007-like suite compatible with OS X.)
    NeoOffice (similar to Open Office.)
    LibreOffice (a new direction for the Open Office suite.)

  • How can I access my music library from a laptop on the road, as if my PC is not active? I tunes is installed on both PC and Home Sharing is enabled on both devices.

    How can I access my music library from a laptop on the road, as if my PC is not active? I tunes is installed on both PC and Home Sharing is enabled on both devices.

    The key constraint for Home Sharing in this context is that both PCs need to be on the same wifi network. So once you get out of range of the wifi network covering your home PC, the laptop is not going to be able to Home Share.
    Have you considered importing your iTunes music to the laptop? Then you could listen to a local copy of the music on the laptop while you're on the road. (You can do the import via home sharing when both computers are on the same wifi network.)

  • Can I access my Itunes library from my brother's computer so I can download my library to his new Ipod/  I have almost all CD loaded music and little purchased music.  THANK YOU!!!

    Can I access my Itunes Library from my brother's computer via the internet so I can download my Library to his new IPod?  Thanks!

    The songs that you want to sync need to be on the "local" storage of the computer being used to sync the iPod.

  • I can't access my digital library from a new pc

    i can't access by digital library from a new pc and the pc gets to 2 of 3 for downloading

    i can't access by digital library from a new pc and the pc gets to 2 of 3 for downloading

Maybe you are looking for