SNC using JCO API

I am trying to connect to a SAP Server (having SNC enabled) using JCO
API. I am using a simple java program. I mentioned the following
parameters
jco.client.snc_mode=1
jco.client.snc_partnername=p:CN=IDS, OU=IT, O=CSW, C=DE
jco.client.snc_qop=1
jco.client.snc_myname=p:CN=RFC, OU=IT, O=CSW, C=DE
jco.client.snc_lib=C:/usr/sap/UC6/SYS/exe/uc/NTAMD64/sapcrypto.dll
I have placed the sapcrypto.dll in the Path. I have generated the
Client PSE and Cred_V2 files too. I have placed them in the Path too.
I am using the "$X509CERT$" as user and sending the x509 certificate
information as password.
But I get the following error
(103) RFC_ERROR_LOGON_FAILURE: SNC required for this connection
When I look at the error files dev_w0 (in the work folder) I see the
following error
ERROR => iSignSncServerLogin: insecure transmission of X.509 client
certificate (SNC required) [sign.c 8638]
Any help is greatly appreciate as this is a mjor blocker for our release

1. obviously, the JCO connection (using RFC) is not SNC-protected; otherwise you'd not receive that error information
2. I'm not sure whether you are using the right approach: forwarding a X.509 client certificate via SNC-protected RFC connnection is only intended to work for a small number of trusted middleware components (such as the ITS Agate or a NWAS Java). It is assumed that this middleware component (or a component in front of it, such as a webserver in front of the ITS) is performing a proper SSL handshake in order to validate the X.509 client certificate.
3. Instead of jco.client.user = "$X509CERT$" and jco.client.passwd = ... you should use jco.client.x509cert = ...
Java-based applets running on a user's PC should act as SSL client and submit their https requests directly to the NWAS ABAP (which is the SSL server in that case). It does not make sense to use JCO and SNC to forward externally validated X.509 client certificates - not just because it's much more complex (and increasing the TCO) but also because it's not intended to be used in that way (it simply does not scale).
Regards, Wolfgang
PS: the error is most likely caused because of the missing SNCSYSACL entry (see trace, using note 495911)
Edited by: Wolfgang Janzen on Jan 22, 2008 10:25 AM

Similar Messages

  • JCO API which accepts system

    Hi all,
    I want to use JCO API to connect to R/3 and call my BAPI (i.e, I am not using the JCO destination which we normally create in Web dynpro content administartor screen). This is specially for MODEL DATA (i.e., to get the application data).
    I found the following API which works :-
    JCO.Client C = JCO.createClient(client, userid, pwd, null, system name, system number);
    C.connect();
    < execute the BAPI >
    C.disconnect();
    Other than this, Is there any JCO API which accepts a system (which we create in the portal under system admin role) and returns a client object or gives a conneciton directly??
    Any info on this would be of great help.
    Regards,
    Narahari

    Hi,
    SAP had CCI with its own APIs which will solve this purpose..
    Check this .This is one code i have used,, this should help..
    IConnectorService service = (IConnectorService)PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
    IConnectorGatewayService cgs = (IConnectorGatewayService)service;
    ConnectionProperties cp = new ConnectionProperties(request.getLocale(),request.getUser());
    try {     
         IConnection conn = cgs.getConnection(system name,cp);
         Interaction ix = conn.createInteractionEx();
           IInteractionSpec ixspec = ix.getInteractionSpec();
              ixspec.setPropertyValue("Name","BAPI_SALESORDER_GETLIST");
                   //---------------------------------//For scalar values
                   RecordFactory rf = ix.getRecordFactory();
                   MappedRecord input = rf.createMappedRecord("input");
                   input.put("CUSTOMER_NUMBER","0000001000");
                   input.put("SALES_ORGANIZATION","1000");
                   MappedRecord output =(MappedRecord) ix.execute(ixspec,input);
                   IRecordSet res =(IRecordSet)output.get("SALES_ORDERS");
    Regards
    Bharathwaj

  • QRFC example using JCo

    Hi Friends,
    I am Looking for an example to make qRFC inbound call to SAP, using JCo API.
    Please helpme if you have any JCo example for the same.
    Thanks.

    Look here:
    Re: qRFC list of inbound queues
    http://help.sap.com/saphelp_470/helpdata/en/ee/fa5f3c90de2d73e10000000a114084/frameset.htm

  • How to execute Transaction Using JCO

    Hello Developper;
      Is it possible to execute Transactions using JCO API's or not ?
    If yes, can you please provide me with a snippets, from conecting to executing the Transaction and then getting the result.
    Regards
    Anis

    Hi Anis,
    I really don't understand the use of JCO if you to use it in the same SAP Box. As JCO is basically to have some front end applications without SAP GUI Client,
    Could you please let me know if I am not on the same level.
    Thanks,
    Hamendra

  • Calling Java API from ABAP using JCo (Part 2)

    Hello,
    This is an additional question to thread Calling Java API from ABAP using JCo
    Has anyone managed to get the input parameter value
    input.getString("REQUTEXT")
    that is being passed from ABAP?
    If yes, what kind of setting you need to do? Because when I execute, it has no value.
    Thus, the below ECHOTEXT parameter returns blank value:
    output.setValue(input.getString("REQUTEXT"),"ECHOTEXT");
    When I debug by printing the below line, the input XML is indeed without value:
    System.out.println(input.toXML());
    Anybody knows how to pass input variable from ABAP to JAVA using JCo?
    rgs,
    hiroshi

    Hallo Hiroshi,
    as far as I can see, you are doing it the right way. The problem might be that the ABAP program does not fill in this parameter because something went wrong in the SAP System.
    Have you tried setting a breakpoint (an HTTP session - remote breakpoint) and tried checking step by step if the value is being processed and put into the REQUTEXT field?
    Bye,
    Sameer

  • Use of JCO ??? ...i need to pay to use this API ????

    Hi experts...
    Please ...SomeBody can help-me in this Questions ???
    I need to pay to use the API JCO to make integration with SAP Systems and NO-SAP Systems ????
    Or simply ....I enter in the marketPlace and download this API to use ???
    Only this Friends...
    Best Regards.
    MBoni

    Hi,
    Pls don't forget to reward points and close the question if you find the answers useful.
    Eddy

  • How to query an Infoset using SAP JCO APIs

    Hi
    How can I  query an Infoset (on SAP ECC) using SAP JCO APIs?
    Thanks

    Hi,
    Please use the DDIF_FIELDINFO_GET (standard) Function Module to retireve the details which you have mentioned.
    Thanks,
    Arun

  • Urgent : Error in RFC  Look Up using JCO.

    Hi,
    I have a scenario od accessing a database table by passing the name through XI and also giving the Where condition ,passing the fieldnames and getting back the field values . The FM that id used for this on ABAP side is <b>RFC_READ_TABLE</b>. 
    For this Scenario I inserted a Java Code using JCO's in th UDF for the  RFC Look Up's.
    I got errors while activating the MM which i am not able to rectify.Please Help me in this.
    <b>Activation of the change list canceled Check result for Message Mapping MM_Notes_2_ED_Z_SDIDOC |
    Starting compilation  Source code has syntax error:  /usr/sap/EXD/DVEBMGS49/j2ee/cluster/server0/./temp/classpath_resolver/Map303c42607df411dc8b1d00e000c553d9/source/com/sap/xi/tf/_MM_Notes_2_ED_Z_SDIDOC_.java:1539: cannot resolve symbol symbol : method createClient (java.lang.String,java.lang.String) location: class com.sap.mw.jco.JCO JCO.Client mConnection = JCO.createClient("200","EN"); ^ /usr/sap/EXD/DVEBMGS49/j2ee/cluster/server0/./temp/classpath_resolver/Map303c42607df411dc8b1d00e000c553d9/source/com/sap/xi/tf/_MM_Notes_2_ED_Z_SDIDOC_.java:1578: cannot resolve symbol symbol : variable result location: class com.sap.xi.tf._MM_Notes_2_ED_Z_SDIDOC_ result.addValue(resultSet[pos]); ^ 2 errors</b>
    <b>This is an Urgent Requirement. Please reply ASAP.</b>
    Regards,
    Priyanka.

    Hi Priyanka,
    The error message says there are 2 errors:
    1. createClient
    2. result.addValue
    For the first one, I guess you might not have included all the API required for lookup
    For second one, please check what is the type of object you are adding to the resultset, maybe you can just say result.addValue(resultSet[pos] + ""); to typecast it.

  • Problem calling BAPI_document_checkoutview2 using JCO of xMII

    Hi DMS Gurus,
    The above FM is successfully executing and creating a local copy in temp folder of where the FM running using SAP GUI.
    But when i call using jco,i am getting some problems.
    1. If i execute the FM with default values for http dest and ftp dest, i am getting error saying << c:\temp\....file could not be created.
    2. When i changed the HTTP destination to <<SAPHTTPA>, it is executing fm successfully but dont know in which system the file is downloaded.
    My client application or xMII server ( where jco service is running ) or ABAP server.
    I checked in the first 2,i didn't find.
    SAP GUI is not installed in xMII server.
    But my requirement is to download to the physical server of xMII ( jco ).
    Is this any thing to do with creating http destinations??
    If that is the case, can any body help me in creating http destinations..
    and i heard  something about SAPFTP.EXE ,is that should be some where in client or any servers??
    Please help me.
    Thanks
    Vansi

    Hi Vansi,
    that's correct. BAPIs always require a SAPGUI connection. Therefore I would recommend you to use API function modules instead, because they are more flexible and better to use for background processing. Please see SAP note <a href="https://service.sap.com/sap/support/notes/504692">504692</a>
    which contains also some sample programs for these API modules.
    Best regards,
    Christoph

  • Without BPM:Call RFC using JCO in interface mapping using java mapping

    Hi all
    I have a very small scenario where REQUEST from the customer comes via Web Service all i have to do is to read the request using SOAP adapter and call an interface mapping(lets say the name is IM_TEST) inside which there is a JAVA MAPPING program written which will call an RFC in CRM using JCO.
    Now this was really simple and i cud test the Interface mapping successfully, but the problem is when loading the scenario in integration directory i have certain things to do
    1. to set the SENDER AGREEMENT which i did correctly
    2. set the RECEIVER DETERMINATION, INTERFACE DETERMINATION AND RECEIVER AGREEMENT now here i am stuck because there is no receiver in my case as the RFC is called inside the mapping only.
    can i call one more message mapping in IM_TEST which will write file onto the XI directory and then in RECEIVER DETERMINATION, INTERFACE DETERMINATION AND RECEIVER AGREEMENT i can mention the reciever as FTP.
    I tried it but i gives the following error
    Runtime exception occurred during execution of application mapping program com/sap/xi/tf/_MM_TEST_WRITE_FILE: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Parsing an empty source. Root element expected!
    Please help me how to complete the scenario so that customer can run it end to end.
    <REMOVED BY MODERATOR>
    Edited by: Prateek Raj Srivastava on May 12, 2010 1:44 PM

    Stefen
    What do i do then...actually this is the project requirement. They want a very fast response from PI and thats why they wnt us to omit BPM and the Graphical mapping from the scenario.
    I am able to test the interface mapping which calls the the Java mapping inside which there is an RFC call, but i cannot implement it end - to - end as there is no receiver business system in this case. The only business system i have is the SOAP sender.
    I am really troubled now, please help me with a solution.
    Is there any other possible way through which the process can become very fast whic hcan meet their requirement.
    Regards
    Naina

  • Need sample code to connect MDM using JCO

    hi friends,
    I want to connect MDM server using JCO,
    can you please provide me the sample code for that.
    Regards,
    Venki.

    Hello Venki,
    why do you want to use JCo for connecting to MDM? MDM has its own specific Java API for this task. There's no need for using JCo at all.
    BR Michael.

  • Any standard way to use JCO

    Hi Gurus,
    I want to use JCO to communicate with a custom Bapi.
    In one standard application I observed that many classes related to interface are created.
    With this I assume that there must be some API to create the class files required to read the data from a BAPI.
    The code looks like this
    EmergencyContact_PortType proxy = new EmergencyContact_PortType();
    ((AbstractProxy) (proxy)).messageSpecifier.setJcoClient(client);
    Hrwpc_Rfc_Address_Getlist_Output output = proxy.hrwpc_Rfc_Address_Getlist(input);
    Any help in this regard is grateful.
    Regards,
    Suraj.

    Hi Suraj
    Refer to
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/11/e2bc3d9ecc6b3be10000000a114084/content.htm">Proxy Generation</a>. Proxy generation will be done in NWDS and that helps you creating all the class files required.
    Regards,
    ND

  • Runtime exception while I connect to SAP using JCO

    I am getting this error when I am trying to write a Java DC Project using NWDS.
    I have added all the JCO API DC to my project and all the classes are available in that.
    I am getting runtime exception class not found - com.sap.mw.jco.JCO$Repository
    I am deploying the java dc in the SAP J2EE Server by making Java Lib DC & deploy that.
    Is it possible to connect to SAP R/3 from Java DC? or we need to have Portal Projects like PAR or Webdynpro only?
    I want to use Background Callable object using GP API here.

    Thank you Venkat. One more question - in one of my java library, I want to make a class a public part and I added as public part but it is not accessible from SAP Portal GP as Background callable object,  getting message: cannot find this class name
    Do you have any idea ?
    see my post:Custom Email Template in GP
    Thank you once again.

  • Unable to display double values in Excel sheet using JExcel API

    Hi
    I am writing code to generate report in the form of Excel Sheet using JExcel API.
    Everything is going fine but whenever I want to put some double values in a cell it is only showing 2 decimal places. My problem is "I want to show upto five decimal places".
    Any kind of reply might help me lot.
    Thank U.

    If you enable the submit zero option, it still happens? This is a new feature on the display tabl
    #NumericZero Enhancements
    To display a numeric zero in place of an error message, you can enter #NumericZero in any of the three Replacement text fields. When you use the #NumericZero option:
    · Excel formatting for the cell is retained.
    · All calculations with dependency on the cell will compute correctly and will take the value of this cell as zero.
    · This numeric zero is for display only. When you submit, the zero value is NOT submitted back to the data source.
    You cannot set display strings for cells that contain an invalid member or dimension name (metadata error). Metadata errors produce standard descriptive error messages.
    Errors are prioritized in the following order from highest to lowest. The error message for a higher-priority error takes precedence over that for a lower-priority error.
    1. (Highest) Metadata errors
    2. #No access
    3. #Invalid/Meaningless
    4. #No data\Missing

  • RFC_ERROR_SYSTEM_FAILURE: Time limit exceeded. Connection Pool - JCO api

    Hi Everyone
    My Connection  Pool parameters JCO api.
    client=300
    user=SISGERAL_RFC
    passwd=******
    ashost=14.29.3.120
    sysnr=00
    size=10
    I have these parameters on my Connection Pool and sometimes appear these wrongs in my application:
    1.
    2006-01-07 13:20:37,414 ERROR com.tel.webapp.framework.SAPDataSource - ##### Time limit exceeded. LOCALIZED MESSAGE = Time limit exceeded. KEY = RFC_ERROR_SYSTEM_FAILURE GROUP = 104 TOSTRING = com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Time limit exceeded.
    2.
    2006-01-07 14:01:31,007 ERROR com.tel.webapp.framework.SapPoolConnectionManager - Timeout
    I’d like to know if is happening.
    Are there something wrong with my connection pool?
    What can be happening?
    Thanks

    Raghu,
    Thanks for your response.
    Yes, the pool connections are in place according to the sAP note mentioned above.
    Regards,
    Faisal

Maybe you are looking for