Problem with validating SAML assertion signature ("bad" certificate?)

Hi,
We've been developing and testing webservices and webservice clients under WebLogic for awhile. In our typical configuration, we have the SAML Credential mapper configured on the webservice client side, and the SAML Identity Asserter on the webservice side, and we are using "sender-vouches", whereby the SAML assertions are being signed by the SAML Credential mapper.
Up through development, for the signing, we've been using certs issued by a test CA that we have, but now, we are moving to a pre-production environment, and we're required to use certs issued by a specific 3rd party CA. Since we've started using those new certs, we have been getting "token failed to validate" errors. We've been trying to diagnose this problem for awhile, and we're at the point that we believe that, for some reason, the certs that we got that were issued by the 3rd party CA are "bad".
Specifically, those certs are SSL Server certs, with the following characteristics:
Usages:
Digital Signature
Key Encipherment
Key Agreement
Netscape Type: SSL Server Authentication
but, they also have two "extended usage extension" OIDs, both are "2.16.840.1.101.2.x.yy.zz".
When we looked at the certs using various tools, e.g., "openssl x509...", etc., those extended usage extensions are being displayed as "unknown", which made us a littel suspicious about them, so I setup a simple test configuration with two WebLogic 10.0 MP1 instances.
For testing, we first used a cert from the 3rd party CA, which gave us the "failed to validate token" errors.
During this testing, we put a sniffer on the line, and captured the SOAP message with the signed SAML assertion, and we used a small Java app that I wrote awhile ago that will validate a digital signature. When we ran that Java app, the digital signature validated successfully (i.e., the digital signature was GOOD).
This seems to imply that the "failed to validate token signature" errors are happening because of something other than the digital signature being incorrect.
So, then, we created a certificate that matches the 3rd party CA certs almost exactly, except that we did not include the two extended usage extensions, and we configured the two WebLogic instances to use this new certificate.
When we tested with the new certificate, we no longer got the errors.
So, it appears that when the cert has those two enhanced usage extensions, WebLogic is either not willing to, or not able to, utilize the certs for validating digital signatures.
Does anyone have any insight into this problem, or has anyone encountered a problem like this before?
I also was wondering if there are any parameters for WebLogic that we might try to set that would tell WebLogic to perhaps ignore the certificate extensions and to just do the digital signature validation?
Thanks,
Jim

Hi,
FYI, we were able to resolve this problem today. It turned out to be that the certificate and key were not "matched".
The way that we figured this out was to use openssl and the procedure here:
http://kb.wisc.edu/middleware/page.php?id=4064
which showed the mismatch.
We've since generated a new cert request and got a new certificate, and it's working now.
Jim

Similar Messages

  • Problem with signed SAML assertion and Web Services Manager

    Folks,
    I’m having some issues trying to generate a proper signed SAML assertion using JDeveloper 10.1.3. I am securing a java proxy class using the wizard as described in http://www.oracle.com/technology/products/jdev/howtos/1013/wssecure/10gwssecurity_howto.html .
    On the OWSM side, I have a service that I am securing with SAML - Verify WSS 1.0 Token. If I set the "Allow signed assertions only" property to false I can complete the service call. However, when it is set to true I am receiving the following fault: javax.xml.rpc.soap.SOAPFaultException: SAML token verification failed.
    When I examine the message going to OWSM in a packet analyzer, it is missing the signature in the SAML assertion. The <saml:Assertion> tags looks like:
          <saml:Assertion MajorVersion="1" MinorVersion="1"
                          xmlns="urn:oasis:names:tc:SAML:1.0:assertion"
                          xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
                          AssertionID="yM0oqZgF0N1a1td6yzKgOQ22"
                          IssueInstant="2007-01-23T17:15:27Z"
                          Issuer="HealthMarkets_s3">
            <saml:Conditions NotBefore="2007-01-23T17:15:27Z"
                             NotOnOrAfter="2007-01-24T17:15:27Z"/>
            <saml:AuthenticationStatement AuthenticationInstant="2007-01-23T17:15:27Z"
                                          AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password">
              <saml:Subject>
                <saml:NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">client_s3</saml:NameIdentifier>
                <saml:SubjectConfirmation>
                  <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:sender-vouches</saml:ConfirmationMethod>
                </saml:SubjectConfirmation>
              </saml:Subject>
            </saml:AuthenticationStatement>
          </saml:AssertionI have selected the Sign Outbound Messages in step 3 of the Secure Web Proxy Wizard. This step uses the DSA-SHA1 algorithm.
    Any help is greatly appreciated.
    Thanks in advance,
    Joseph

    Thanks for the response. I am not using any pages for this application yet... just calling the web service from SOAP UI or any Web Service testing tool causes the problem.
    All that has to be done to replicate it is to build a simple EJB 3.0 JPA bean using the entities from tables wizard and then add named query as follows:
    @NamedQuery(name = "BomHeader.findByDesc", query = "select o from BomHeader o where o.bomDesc like :p_bomDesc")
    then build a session bean with the wizard that includes the JPA persistence unit and the entity and subsequently use the wizard to wrap the session bean in a web service.
    The whole replication process should take 5 minutes if you have some database tables to work with. It breaks when the web service is called.
    Thanks in advance

  • 1 year ago i installed Elements 12 on my PC with a serial number.  Today i have installed Elements 12 also on my laptop. But,...there is a problem with validation of the serial number on my laptop. Is there a need to validate Elements  or will this progra

    One year ago i installed Elements 12 on my PC with a serial number and it was OK.
    Today i have installed Elements 12 also on my laptop.
    But,...there is a problem with validation of the serial number on my laptop. Is there a need to validate Elements  or will this program real disapeare in 7 days?
    Hans

    Hi,
    Since you already have one copy activated the serial number must be logged in your account details - I would first check that the one logged and the one you are attempting to enter are the same.
    You can check your account details by going to www.adobe.com and clicking on Manage Account. You need to sign in with your Adobe Id and then click on View All under Plans & Products. Next click on View your products and after a while it should produce your list.
    If there is a problem with the serial number, only Adobe can help you there (we are just users). Please see the response in this thread
    First of all, I would have to say that getting in touch with you is a nightmare and I am not at all happy that I can't just email or live chat with someone who can help!  I am not a technical person, I just want to be able to use Photoshop Elements and ge
    Brian

  • Intermittent proxy error "There is a problem with the proxy server's security certificate. Outlook is unable to connect to the proxy server "

    Hi all,
    From time to time (at least once a day), the following message pops up on the user's screen:
    "There is a problem with the proxy server's security certificate. Outlook is unable to connect to the proxy server . Error Code 80000000)."
    If we click "OK" it goes away and everything continues to work although sometimes Outlook disconnects. It is quite annoying...
    Any ideas?
    Thank you in advance

    Hi,
    For the security alert issue, I'd like to recommend you check the name in the alert windows, and confirm if the name is in your certificate.
    Additionally, to narrow down the cause, when the Outlook client cannot connect again, I recommand you firstly check the connectivity by using Test E-mail AutoConfiguration. For more information, you can refe to the following article:
    http://social.technet.microsoft.com/Forums/en-US/54bc6b17-9b60-46a4-9dad-584836d15a02/troubleshooting-and-introduction-for-exchange-20072010-autodiscover-details-about-test-email?forum=exchangesvrgeneral
    Thanks,
    Angela Shi
    TechNet Community Support

  • There is a problem with the proxy server's security certificate. The name on the security certificate is invalid or does not match the name of the target site "Mailserver"

    Good day Guys
    First of all I am not an Exchange Expert, and I might be asking a very stupid question, but please bare with me. :) 
    While I was on leave our Mail server fell over and The company got a Specialist to help out for the time being.
    We where\are on Microsoft Exchange 2007 , which Fell over, and the specialist was able to recover as much data as he could.
    They then installed Exchange 2013 and tried to migrate everything from 2007 to 2013 and not everything migrated over.
    But the problem is, Outlook Anywhere was enable on 2007 and worked a 100% (before the disaster)
    With Exchange 2013 I get the following error message when trying to connect With Outlook 2013, using an external connection:
    "There is a problem with the proxy server's security certificate. The name on the security certificate is invalid or does not match the name of the target site "Mailserver"
    Outlook is unable to connect to the Proxy server. (Error Code 0)"
    Has anyone had the Similar when migrating over from 2007 to 2013 or is this an Issue on IIS and nothing to do with Exchange migration?
    Your assistance will be greatly appreciated.

    Hi,
    Firstly, I would suggest we use Exchange 2013 FE as the Outlook Anywhere proxy server.
    For the certificate issue, it mostly occurs because the host name that Outlook are trying to access does not match the certificate SAN. Please check with this point. If they do not match, you
    can change the host name by referring to the following article:
    https://support.microsoft.com/kb/940726/en-us?wa=wsignin1.0
    Thanks,
    Simon Wu
    TechNet Community Support

  • Problem with Validation in Struts

    Dear All,
    I am facing a proble with validation in struts.
    I have got this code in my action class
    //Initial Code...
    ArrayList branches=new ArrayList();
    branches.add("B01", "Main Branch");
    branches.add("B02", "Second Branch");
    branches.add("B03", "Third Branch");
    DynaValidatorForm memberForm=(DynaValidatorForm)form;
    memberForm.set(branches);
    //Finalizing code.....This form is getting validated in validation.xml.
    This action is being forwarded to folllowing JSP.
    //Initial Code...
            <tr>
                <td align="right"><strong>Branch Name </strong></td>
                <td> </td>
                <td align="left">
                    <html:select property="branid">
                        <html:optionsCollection name="memberForm" property="branches" value="key" label="value"/>
                    </html:select>
                </td>
            </tr>
    //Later code...I have action mapping as..
            <action path="/member/save" input="member.page" name="memberForm" validate="true"
            scope="request" type="com.mlm.action.MemberAction" parameter="action">
                <forward name="success" path="/show.do?action=member" redirect="true"/>
            </action>Now, the problem is that when the form doesn't pass the validation then it gives an exception that..
    Can't find collection 'branches' in bean

    sauanu wrote:
    Ok, now I am giving full code of my module...
    Form-bean
    <form-beans>
    <form-bean name="memberForm" type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="id" type="java.lang.String"/>
    <form-property name="membname" type="java.lang.String"/>
    <form-property name="address" type="java.lang.String"/>
    <form-property name="branid" type="java.lang.String"/>
    <form-property name="branches" type="java.util.ArrayList"/>
    </form-bean>
    </form-beans>Validation is being done for all fileds except "branches". Validation type is "requried"
    My Jsp....
    <html:form action="/member/save?action=save">
    <html:hidden property="id"/>
    <tr>
    <td align="right"><strong>Member Name </strong></td>
    <td> </td>
    <td align="left">
    <html:text property="membname"/>
    </td>
    </tr>
    <tr>
    <td align="right"><strong>Address</strong></td>
    <td> </td>
    <td align="left">
    <html:text property="address"/>
    </td>
    </tr>
    <tr>
    <td align="right"><strong>Branch Name </strong></td>
    <td> </td>
    <td align="left">
    <html:select property="branid">
    <html:optionsCollection name="memberForm" property="branches" />
    </html:select>
    </td>
    </tr>
    <tr>
    <td align="right">
    <html:submit/>
    </td>
    <b><td>   </td></b>
    <td>
    <html:button value="Cancel" onclick="javascript:history.go(-1)" property="cancel"/>
    </td>
    </tr>
    </html:form>This is the code..
    I tried to find out the problem and I found that.. when the form does not pass the validation its input page gets displayed..
    Now, when the input is getting displayed.. "branches" field of the form contains null???Why?
    Edited by: sauanu on ?? ??????, ???? ??:?? ?????????Forget,about Validations.
    Who is forwarding the control to this JSP page or view ??
    Is it Action method code which metioned earlier doing it ??
    Or some other Action is involved if it is some other action please intialize Values of branches component in the respective action.
    Also,
    Also,
    ArrayList branches=new ArrayList();
    branches.add("B01", "Main Branch");
    branches.add("B02", "Second Branch");
    branches.add("B03", "Third Branch"); I believe you need to get a good understanding of Java Collection classes aswell.
    You can add things as entities in the above case lets create a simple java bean named Option.
    public class Option implements Serializable{
        private String label;
        private String value;
        public void setValue(String value){this.value = value;};
        public String getValue(){return this.value;}
        public void setLabel(String label){this.label = label;}
        public String getLabel(){return this.label;}
    } and inside the action which is forwarding to the respective view
    ArrayList branches=new ArrayList();
    Option option = new Option();
    option.setValue("B01");
    option.setLabel("Main Branch");
    branches.add(option);
    option = new Option();
    option.setValue("B02");
    option.setLabel("Second Branch");
    branches.add(option);
    option = new Option();
    option.setValue("B03");
    option.setLabel("Third Branch");
    branches.add(option);
          <html:select property="branid">
                   <html:options name="memberForm" collection="branches"   value="value" label="label" />
           </html:select>and one more thing is is that after the validation if it is not validated it'd be sent back to input page which destorys the request therefore try making scope of "memberForm" to session in your action mappings and check.
    Hope this might help :)
    REGARDS,
    RaHuL

  • PostCode - problem with validation

    Hello,
    I have problem with codes in Netbeans.I Have two code.
    The first is to mask formatter and i put in on Post int code
    try
    MaskFormatter PostCode = new MaskFormatter("##-###");
    PostCode.setValidCharacters("0123456789");
    RegisterPostCode = new JFormattedTextField(PostCode);
    catch (ParseException e) {
    }The Second check, the RegisterPostCode is not null
    class Steps implements ActionListener{
       int step = 0;  
          public void actionPerformed(ActionEvent e) {
          if (step == 0){
    String NotEmptyPostCode = RegisterPostCode.getText();
             if(NotEmptyPostCode == null || NotEmptyPostCode.length() == 0) {
       jLabel4.setText("This Field is empty");
             return;
    step++;
          }Problem is the second code doesnt work and I dont now how to create code to check the JFormatterField is compatible with the first code
    Please help.

    Hi! I have an HTML region and on my "before header process" I fetch only one record (the data is got from a package I've created on the DB).
    This region has a few items and when I press the save button (I created on the screen) the value of all the items are cleared if the validation ocurrs, I don't know why, is this because the page doesn;t perfom again my "before header process"?
    Thanks!

  • Problem with Validations

    Hi All,
    I have another problem with validators. I have some components like inputText and selectOneChoice and selectBooleanCheckBox. I set the Required attribute to "true" and immediate attribute to "true". For selectOneChoice component autoSubmit attribute is set to "true".
    Here My problem is when i select one option in the selectOneChoice component then the value of the InputText should be changed depending on the value of the selectOneChoice Component.
    But When I select the option in the selectOneChoice component, I'm getting error popup dialog for the validation of all other components as selectOneChoice. so I'm unable to perform the required task.
    could anyone help me out,
    Thanks in advance,
    -Prapansol

    Prapan Sol,
    Please refer to the tag documentation on the af:subform tag. A combination of subforms and the use of the immediate attribute should solve your problem.
    http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/adf-richclient-api/tagdoc/af_subform.html
    --Ric                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problem with validation - can this be fixed?

    Hello I used an online tutorial to create an "express CSS
    menu" the menu looks really good but it does not validate and in
    IE7-Vista every page you try to access prompts an error that says
    "Problems with this webpage may prevent it from displaying
    properly.... error object expected..."
    Is there anyway for me to fix this and keep this menu??
    here is the link:
    http://122.252.5.31/~lisa927/index.html
    I did validate the menu example I used before I began but did
    not realize the example used doctype html 4.01 and I am using xhtml
    1.0, if I try to change my doctype to html 4.01 I get all sorts of
    errors so my question is can i make this menu validate in xhtml
    1.0???
    shontelle

    > <script type="text/javascript"
    src="p7exp/p7exp.js"></script>
    >
    That would be correct assuming the file is IN THE TEMPLATES
    FOLDER. It
    should not be.
    All links in the TEMPLATE file *should* be one of three kinds
    1. Relative to the template file, e.g.,
    <a href="../ (meaning that you must go up one level from
    the template folder
    to reach the root of the site, hence all other files, since
    none of them
    should be in the templates folder)
    2. Relative to the site root, e.g.,
    <a href="/ (meaning that one would begin looking for the
    linked file at the
    root of the site and follow the pathing from that point)
    3. Absolute, e.g.,
    <a href="
    http:// (meaning that the link is to a page
    external to the site).
    If you are seeing any other kind of link, then it hasn't been
    made properly.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "shonts" <[email protected]> wrote in
    message
    news:g16sce$a2k$[email protected]..
    > HI something very strange going on.
    >
    > the code in my template reads : <link
    href="../truestyles.css"
    > rel="stylesheet" type="text/css" media="screen" />
    > <script type="text/javascript"
    src="p7exp/p7exp.js"></script>
    >
    > but when all the child pages created from the template
    the code appears
    > <link href="truestyles.css" rel="stylesheet"
    type="text/css"
    > media="screen" />
    > <script type="text/javascript"
    src="Templates/p7exp/p7exp.js"></script>
    > <!--[if lte IE 7]>
    > <style>
    >
    > The file "templates" is added there is nothing in my
    templates folder but
    > templates.
    >
    > if you access
    http://122.252.5.31/~lisa927/p7exp/p7exp.js
    where the
    > template
    > tells you to you will see the file has been uploaded.
    >
    > any ideas why the "template" is being added to the code
    on child pages??
    >

  • Business Rule - Problem with Validation Execution

    I'm running into an issue where conditional Validation Execution is not working as expected. The background is that i have an Entity Object containing a few string attributes on which i must apply Regular Expression business rules to make sure only characters in a certain range is set. I am using a Not Matches regex on the following:
    .*[^\u0020-\uD7FF].*1 attribute is required, 2 are optional. The problem I am experiencing is with the 2 optional attributes.
    Since these are optional, I intended to use the Validation Execution tab so that the Rule is executed only when the attribute is not null. For example, here is what i tried for an attribute named Comments:
    Comments != nullNo validation occurred when I entered an invalid value, such as a string containing line breaks, in a corresponding ADF Faces page. For the heck of it, i experimented by setting the validation execution to the opposite of what i should be - in other words, trigger validation if the attribute is null, such as:
    Comments == nullWith this, the validation occurred as expected.
    Is this a bug, or am I misunderstanding something? I'm not particularly good with RegEx - is it possible this is due to some nuance of the expression?
    Version: JDeveloper 11.1.1.6.
    Thanks-
    -george

    i'm not sure if this is the correct answer or a workaround to the issue i had asked about. Given that caveat, if anyone else ever runs across this thread, what i found worked was to not use the attribute name in the Validation Execution tab's expression, but instead to just newValue as in the following:
    newValue != null

  • Problem with validating a field in VA01/VA02

    Hi,
    I was required to add validation for Material Group 3 (VBAP-MVGR3) in 'Additional Data A' tab (VA01/VA02). The corresponding screen number in 4459. In the PAI section, there is a module called 'vbap_bearbeiten'. In this module, there is an enhancement point called 'VBAP_BEARBEITEN_10 '. I created an implementation of this enhancement point to call a validation subroutine which i put in user exit MV45AFZZ. My problem is whenever a wrong entry is entered for that field, the whole screen in the 'Additional Data A' tab turned grey and disabled for user entry. Re-entry for the correct Material Group 3 is not allowed.
    Initially, i used a different approach. I made a core change to screen 4459 by adding a statement like below in the PAI section :-
    FIELD vbap-mvgr3 MODULE zsd_check_mvgr3 ON REQUEST.
    In fact, the validation worked without any issue. User was prompted for an error message and then was allowed to re-enter a correct entry for that field if a wrong entry was entered initially. However, since this approach involved a core change, it was not allowed by my superior and he demands for using the enhancement framework approach.
    Kindly please let me know if you have any idea of resolving this issue. Thanks much in advance.

    Hi guys, thanks much for your feedback.
    I tried to call my validation subroutine from USEREXIT_CHECK_VBAP (MV45AFZB). However, it did not work as well. Although the validation subroutine was successfully called in USEREXIT_CHECK_VBAP and error message dialog box was shown if entry was not correct, but when i clicked on the dialog box / pressed the 'enter' key, the 'Material Group 3' field was not opened for re-editing (it was still shown in grey and disallowed for user entry). In fact, through debugging, i found that USEREXIT_CHECK_VBAP was called again (after i pressed the 'enter' key) and it caused the program to enter an infinite loop.
    On the other hand, i also tried to use USEREXIT_MOVE_FIELD_TO_VBKD (MV45ZFZZ). Unfortunately, i also met with the same issue as described above.  Kindly please let me know if there is a way to solve this issue. Thanks.

  • Problem with validating my RSS Feed

    Hi,
    Been trying to submit my podcasts to iTunes but got a problem as it keeps coming up saying 'We had difficulty downloading episodes from your feed'.
    My feed is: http://feeds.feedburner.com/MarkandNinashow and when i check it on feedvalidator.org it says the following;
    Recommendations
    This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.
    line 15, column 0: description should not contain iframe tag (17 occurrences) [help] <description><![CDATA[<iframe width="300" height="300" src="//www.mixclou ...
    line 13, column 82: Misplaced Item (17 occurrences) [help]... sic" /><itunes:category text="Comedy" /><item>
    Could someone please help me with this as i have no idea what this all means.
    would appreciate any help.
    Many thanks,
    Mark Evans

    Hi
    Thanks for this. I'm new to this as when it was done before, someone else did it for me and I have no contact with them now.
    Originally our interviews etc were uploaded to soundcloud and then I used Google Feedburner for RSS feed then submitted to iTunes the feedburner link and that was it - iTunes would automatically update.
    But our station has now been told we must use Mixcloud for licensing and copyright reasons. So all I did was use an RSS feed converter for mixcloud as is is what was suggested. I then used this generated link on Feedburner then used feedburner link for iTunes - well I tried.
    Hope the above makes sense. Was this correct thing to do? Or is it a mixcloud problem?
    I'm not very technical so a lot of this talk in your response was foreign to me.
    Are you able to help?
    Many thanks for your time.
    Mark

  • Just downloaded PE12 and paid and got serial number - Now problems with validation

    As mentioned in the title I have bought a license for updating PE 11 to PE 12. I received the serial number and I downloaded the program.
    Started the installation and when prompted to inset the serial number, which I do, I get the following warning:
    We are enable to validate this serial number for Adobe Photoshop Elements 12 - Please contact Customer support.
    Please help!!  Thank you!!

    Hi,thank you, that is fine, just not so quick but I resolved the problem alone.Thanks anyway you helped me.Eva
    Date: Sat, 1 Aug 2009 11:53:58 -0600
    From: [email protected]
    To: [email protected]
    Subject: Pls help me with  Mac and had a trial  serial number problems
    Hello, Eva. For CS4 problems, you need to ask in the Photoshop forum (this is the Photoshop Elements forum). It's here:
    http://forums.adobe.com/community/photoshop/photoshop_macintosh
    Good luck!
    >

  • Problem with validation

    Hi
    Im validating nullable item using LOV, when i enter something it validates ok, but when i enter nothing to it (i want to erase that item), it cannot be saved, because the item is not validated. How can i solve this?
    null

    I've already solved the problem, the problem was, that i used the FK, and it was not set to validate on client or server ;)

  • Problem with validation of selection screen

    I am creating session process for BDC
    For that i am taking the flat file at runtime.i want check whether the entered file is valid or not..that means it exists are not?
    how to do that..

    Hi,
    DATA: W_FILENAME TYPE STRING,
    W_RESULT TYPE C.
    W_FILENAME = WK_DIRECTRY.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_EXIST
    EXPORTING
    FILE = W_FILENAME
    RECEIVING
    RESULT = W_RESULT
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    WRONG_PARAMETER = 3
    NOT_SUPPORTED_BY_GUI = 4
    others = 5.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-* MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF W_RESULT IS INITIAL.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_EXIST
    EXPORTING
    DIRECTORY = W_FILENAME
    RECEIVING
    RESULT = W_RESULT
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    WRONG_PARAMETER = 3
    NOT_SUPPORTED_BY_GUI = 4
    OTHERS = 5.
    IF SY-SUBRC 0.
    ENDIF.
    ENDIF.
    IF W_RESULT = 'X'.
    RC = '1'.
    ELSE.
    RC = '0'.
    ENDIF.
    Regards,
    nagaraj

Maybe you are looking for