Code to connect to RFCs/ webservices

Hi All,
Can anyone provide me the complete source code of  a simple Widget ( .kon & .js javascript file ). Actually I am trying to develope a simple widget which can integrate with SAP. Hence Javascript code of connecting to RFCs/ Webservices would be usefull. Your response would be very helpfull.
Thanks & Regards,
Santhosh

Hi,
Did you check
RFC connection to SAP with Yahoo Widgets
/people/nathan.jones3/blog/2006/10/26/rfc-connections-to-sap-with-yahoo-widgets
Eddy
Pimp up the S(D)N site and earn points. Check this web log for details

Similar Messages

  • ABAP code to connect 2 systems.

    Hi,
    My requirement is such that I need to read the data from a cube of one BI system and write it into the cube of another BI system.
    I am able to read the cube data through "RSDRI_INFOPROV_READ" function module.
    2 questions:
    1) Is the above solution possible?
    2) Is there ABAP code to connect 2 systems?
    Please help with some suggestions.
    Thanks,
    Pankaj

    You can call function modules in other systems using RFC - so you probably need to create a RFC wrapper function module for your 'RSDRI_INFOPROV_READ'. Then you can create/look up a RFC destination for the other system using SM59.
    All you have to do to call a RFC function in another system, is to add the destination to the function call (if the destination is setup up right):
    CALL FUNCTION 'ZRSDRI_INFOPROV_READ'
       DESTINATION 'DEST_NAME'

  • TCP/IP Connections in RFC Destination

    Hi,
    When we are using TCP/IP Connections in RFC Destinations in SAP XI and why?
    Regards
    bobby

    >
    jak jak wrote:
    > Hi Sujit,
    >
    > i have one small doubt,we are using WAS 6.40 with EP 6.0. So can we use this RFC destination service in our code?
    >
    >
    >
    > Thanks,
    > Jak
    You can use RFC Destinations with WAS 6.40. I wrote a blog on about it [here|/people/stefan.thibeault2/blog/2008/07/16/a-real-world-example-of-using-the-sap-enterprise-connector].

  • Connect a simple WebService fails

    Hello Experts,
    System:
    ECC6.0 with
    -SAP_ABA 700 SP 16
    -SAP_BASIS 700 SP 16
    I created a very simple functionmodule with one import parameter and 3 export parameters. The import parameter doesn't have any further function and the export par. are set with constant values.
    FUNCTION zmm_ws_materialklass_mermale .
    *"  IMPORTING
    *"     VALUE(FANUMMER) TYPE  BAPI_ORDER_KEY-ORDER_NUMBER
    *"  EXPORTING
    *"     VALUE(ZEICHNDATENBLNR) TYPE  DZEINR
    *"     VALUE(ZEICHNIDX) TYPE  DZEIVR
    *"     VALUE(DATENBLIDX) TYPE  AESZN
        zeichndatenblnr = '613582'.
        zeichnidx       = '00'.
        datenblidx      = '01'.
    ENDFUNCTION.
    Then I created the Webservice via transaction SOAMANAGER, exactly like it is demonstrated [here|http://enterprisegeeks.com/blog/2009/02/18/abap-freak-show-february-18-2009/].
    The WSDL open up correctly:
    <wsdl:definitions targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:n1="urn:sap-com:document:sap:rfc:functions">
       <wsdl:documentation>
          <sidl:sidl xmlns:sidl="http://www.sap.com/2007/03/sidl"/>
       </wsdl:documentation>
       <wsp:UsingPolicy wsdl:required="true"/>
       <wsp:Policy wsu:Id="BN_ZWS_MAT_CLASS_CHARACT">
          <wsp:ExactlyOne xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility">
             <wsp:All>
                <sp:TransportBinding>
                   <wsp:Policy>
                      <sp:TransportToken>
                         <wsp:Policy>
                            <sp:HttpsToken/>
                         </wsp:Policy>
                      </sp:TransportToken>
                      <sp:AlgorithmSuite>
                         <wsp:Policy>
                            <sp:TripleDesRsa15/>
                         </wsp:Policy>
                      </sp:AlgorithmSuite>
                      <sp:Layout>
                         <wsp:Policy>
                            <sp:Strict/>
                         </wsp:Policy>
                      </sp:Layout>
                   </wsp:Policy>
                </sp:TransportBinding>
             </wsp:All>
          </wsp:ExactlyOne>
          <saptrnbnd:OptimizedXMLTransfer uri="http://xml.sap.com/2006/11/esi/esp/binxml" wsp:Optional="true" xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/"/>
       </wsp:Policy>
       <wsp:Policy wsu:Id="IF_ZWS_MAT_CLASS_CHARACT">
          <sapsession:Session xmlns:sapsession="http://www.sap.com/webas/630/soap/features/session/">
             <sapsession:enableSession>false</sapsession:enableSession>
          </sapsession:Session>
          <wsp:ExactlyOne xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility"/>
       </wsp:Policy>
       <wsp:Policy wsu:Id="OP_ZmmWsMaterialklassMermale">
          <sapcomhnd:enableCommit xmlns:sapcomhnd="http://www.sap.com/NW05/soap/features/commit/">false</sapcomhnd:enableCommit>
          <sapblock:enableBlocking xmlns:sapblock="http://www.sap.com/NW05/soap/features/blocking/">true</sapblock:enableBlocking>
          <saptrhnw05:required xmlns:saptrhnw05="http://www.sap.com/NW05/soap/features/transaction/">no</saptrhnw05:required>
          <saprmnw05:enableWSRM xmlns:saprmnw05="http://www.sap.com/NW05/soap/features/wsrm/">false</saprmnw05:enableWSRM>
       </wsp:Policy>
       <wsdl:types>
          <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:rfc:functions">
             <xsd:simpleType name="char12">
                <xsd:restriction base="xsd:string">
                   <xsd:maxLength value="12"/>
                </xsd:restriction>
             </xsd:simpleType>
             <xsd:simpleType name="char2">
                <xsd:restriction base="xsd:string">
                   <xsd:maxLength value="2"/>
                </xsd:restriction>
             </xsd:simpleType>
             <xsd:simpleType name="char22">
                <xsd:restriction base="xsd:string">
                   <xsd:maxLength value="22"/>
                </xsd:restriction>
             </xsd:simpleType>
             <xsd:simpleType name="char6">
                <xsd:restriction base="xsd:string">
                   <xsd:maxLength value="6"/>
                </xsd:restriction>
             </xsd:simpleType>
          </xsd:schema>
          <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:n0="urn:sap-com:document:sap:rfc:functions">
             <xsd:import namespace="urn:sap-com:document:sap:rfc:functions"/>
             <xsd:element name="ZmmWsMaterialklassMermale">
                <xsd:complexType>
                   <xsd:sequence>
                      <xsd:element name="Fanummer" type="n0:char12"/>
                   </xsd:sequence>
                </xsd:complexType>
             </xsd:element>
             <xsd:element name="ZmmWsMaterialklassMermaleResponse">
                <xsd:complexType>
                   <xsd:sequence>
                      <xsd:element name="Datenblidx" type="n0:char6"/>
                      <xsd:element name="Zeichndatenblnr" type="n0:char22"/>
                      <xsd:element name="Zeichnidx" type="n0:char2"/>
                   </xsd:sequence>
                </xsd:complexType>
             </xsd:element>
          </xsd:schema>
       </wsdl:types>
       <wsdl:message name="ZmmWsMaterialklassMermale">
          <wsdl:part name="parameters" element="tns:ZmmWsMaterialklassMermale"/>
       </wsdl:message>
       <wsdl:message name="ZmmWsMaterialklassMermaleResponse">
          <wsdl:part name="parameter" element="tns:ZmmWsMaterialklassMermaleResponse"/>
       </wsdl:message>
       <wsdl:portType name="ZWS_MAT_CLASS_CHARACT">
          <wsp:Policy>
             <wsp:PolicyReference URI="#IF_ZWS_MAT_CLASS_CHARACT"/>
          </wsp:Policy>
          <wsdl:operation name="ZmmWsMaterialklassMermale">
             <wsp:Policy>
                <wsp:PolicyReference URI="#OP_ZmmWsMaterialklassMermale"/>
             </wsp:Policy>
             <wsdl:input message="tns:ZmmWsMaterialklassMermale"/>
             <wsdl:output message="tns:ZmmWsMaterialklassMermaleResponse"/>
          </wsdl:operation>
       </wsdl:portType>
       <wsdl:binding name="ZWS_MAT_CLASS_CHARACT" type="tns:ZWS_MAT_CLASS_CHARACT">
          <wsp:Policy>
             <wsp:PolicyReference URI="#BN_ZWS_MAT_CLASS_CHARACT"/>
          </wsp:Policy>
          <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
          <wsdl:operation name="ZmmWsMaterialklassMermale">
             <soap:operation soapAction="" style="document"/>
             <wsdl:input>
                <soap:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                <soap:body use="literal"/>
             </wsdl:output>
          </wsdl:operation>
       </wsdl:binding>
       <wsdl:service name="service">
          <wsdl:port name="ZWS_MAT_CLASS_CHARACT" binding="tns:ZWS_MAT_CLASS_CHARACT">
             <soap:address location="http://myserver:8080/sap/bc/srt/rfc/sap/zws_mat_class_charact/100/zws_mat_class_charact/zws_mat_class_charact"/>
          </wsdl:port>
       </wsdl:service>
    </wsdl:definitions>
    So I could think it should works well. But when I would test it with [soapUI|http://www.soapui.org] the WSDL is parsed well:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
       <soapenv:Header/>
       <soapenv:Body>
          <urn:ZmmWsMaterialklassMermale>
             <Fanummer>?</Fanummer>
          </urn:ZmmWsMaterialklassMermale>
       </soapenv:Body>
    </soapenv:Envelope>
    but finally by submit this request to the endpoint it gives me errors back:
    400 Bad HTTP request
    Error: -21
    Version: 7000
    Component: HTTP_PLG
    Date/Time: Thu Feb 26 13:25:20 2009
    Module: http_plg_mt.c
    Line:4893
    Server: hg21288_ETT_00
    Error Tag: {0002b381
    Detail: illegal request version
    Even simple test cases with soapui like this [example|http://www.soapui.org/userguide/functional/getting_started.html] didn't work. But the user login works for this Webservice...
    SchemaComplianceAssertion
    line -1: error: Unexpected character encountered: 'w'
    line 6: Unexpected character encountered: 'w'
    SoapFaultAssertion
    Response is not a SOAP Fault
    What does it mean?
    When I enter the location address which is showed up in the WSDL document directly in the browser it gives me the following response:
    <soap-env:Envelope>
         <soap-env:Header/>
         <soap-env:Body>
              <soap-env:Fault>
                   <faultcode>soap-env:Server</faultcode>
                   <faultstring xml:lang="en">
                   SRT: Wrong Content-Type and empty HTTP-Body received
                   </faultstring>
                   <detail>
                     <ns:SystemFault>
                     <Host>undefined</Host>
                     <Component>COREMSG</Component>
                     <ChainedException>
                       <Exception_Name>CX_SOAP_CORE</Exception_Name>
                       <Exception_Text>
                       SRT: Wrong Content-Type and empty HTTP-Body received
                       </Exception_Text>
                     </ChainedException>
                     </ns:SystemFault>
                   </detail>
              </soap-env:Fault>
         </soap-env:Body>
    </soap-env:Envelope>
    The user who connects to the webservice has SAP_ALL profile and all the SAP_BC_WEBSERVICE* roles.
    So maybe I have to test one step before, without the soapui tool, but what does the [documentation|http://help.sap.com/saphelp_nw70/helpdata/en/47/39b5df39591a53e10000000a1553f7/frameset.htm] for SOAMANAGER mean with point 7? Where do I have to specify the parameters?
    regards,
    Steffen

    I reread all the help documents by SAP but with no success.
    https://service.sap.com/sap/support/notes/1043195
    https://service.sap.com/sap/support/notes/1135610
    https://service.sap.com/sap/support/notes/1163844
    Also the asych. Webservices with report SRT_ADMIN is configured correctly (SRT_ADMIN_CHECK looks fine now), but still no success.
    http://help.sap.com/saphelp_nw70/helpdata/en/46/4420e292b75e3fe10000000a11466f/frameset.htm
    I also tried an standard BAPI function module, and produced a web service out of it. But with the same 400 error in soapUI tool.
    What could I check next?
    EDIT: this workaround works for me, but it's not the way I want to go...
    /people/graham.robinson/blog/2008/10/09/another-way-to-leverage-abap-web-services
    thanks
    Steffen
    Edited by: Steffen Fröhlich on Mar 4, 2009 5:00 PM

  • Code to connect to database in  Webdynpro-- iviews

    Hi All-
    Could you let me know the code to connect to database
    in WebDynPro-->iviews.
    Regards,
    Cris

    Hi,
    Here are the two ways of connecting to a database through coding:
    ////1////
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
              java.sql.Connection conn= java.sql.DriverManager.getConnection("jdbc:microsoft:sqlserver://<IP>:<port>;user=<abc>;password=<xyz>;database=<DB name>");
    ////2////     
    InitialContext initialContext = new InitialContext();
    DataSource dataSource = (DataSource)initialContext.lookup("jdbc/SRI");
    java.sql.Connection conn = dataSource.getConnection();
    Regards
    Srinivasan T

  • Client Code not connecting to WebLogic 8.1 with Mutual Authentication

    I am trying to connect to a WebLogic 8.1 web services application. The weblogic instance has mutual authentication enabled, so the client needs to send a certificate when it does an SSL handshake with the server. I am trying to connect with standalone Java JUnit tests. Both the web services and the JUnit tests are using Apache Axis 1.4.0. I've obtained what I believe to be the appropriate certificates from the weblogic administrator that configured the mutual authentication. There is a certificate for the machine I'm trying to connect to, and two other certificates in the chain (three certificates all together, including the root). I've tried several different methods of putting those three certificates in keystores and trust keystores, reading in those keystores in my java code, and connecting to the web services, and I always end up with the same error in the WebLogic server logs. "Certificate chain receved from <ip address> was incomplete."
    Here is an example of my code:
    I initialize like so:
         Properties tempProperties = // (here is where I obtain my properties from a properties file... code removed for security reasons)
         System.setProperty("javax.net.ssl.trustStore", tempProperties.getProperty("trust.keystore.file"));
         System.setProperty("javax.net.ssl.trustStorePassword", tempProperties.getProperty("trust.keystore.password"));
         System.setProperty("javax.net.ssl.trustStoreType", "jks");
         System.setProperty("javax.net.ssl.keyStore", tempProperties.getProperty("keystore.file"));
         System.setProperty("javax.net.ssl.keyStorePassword", tempProperties.getProperty("keystore.password"));                         System.setProperty("javax.net.ssl.keyStoreType", "jks");
         System.setProperty ( "java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol" );
         Security.addProvider ( new com.sun.net.ssl.internal.ssl.Provider ( ) );
    I bind to the appropriate port and locate the service, etc. using auto-generated methods descendant from Apache Axis. No matter what I try, I get the same results. The client says: main, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
    The server log says: Certificate chain received from <ip address> was incomplete.
    I've even tried implementing a custom SSL handler as described here http://alweb.homeip.net/dw0rm/dblog/?p=38, and I can verify by stepping into my code that everything gets initialized and set up correctly, and that all three certificates in the chain that I need are obtained from my keystore, but I still get the same error on the client and the server. I've enabled ssl handshake debugging on my client and I can see the whole certificate chain being output to the debug console.
    Any idea what I might be doing wrong?

    My guess would be that the server is not able to validate your certificate. Make sure that the CA for your certificate is trusted by WLS.
    I always like to debug something like this by add -Djavax.net.debug=ssl to both the client and server. It should give you a complete picture of what is going on.
    Edited by: joshbregmanoracle on May 20, 2009 8:49 PM

  • Error in consuming RFC Webservice in webdynpro

    Hi,
         I am trying to consume RFC Webservices in webdynpro.For that i created Z- functional module for availability check.But once i am deploying this application ,all the input fields of the corresponding application are disabled.
    The error is like
    Exception on execution of web service on destination 'DEFAULT_WS_EXECUTION_DEST' for operation 'ZwrMaterialAvailability' in interface 'ZWebService'
    Can someone help me to resolve this error?
    Thanks,
    Kundan

    Hi Saravanan ,
                             Thanks for your replay.
    Once i am testing the WSDL URL in netweaver webservice navigator,it showing an error like like
    Cannot download WSDL from http://host name.sap.com:8000/sap/bc/srt/wsdl/sdef_ZWEBSERVICE/wsdl11/ws_policy/document?sap-client=800: It is not allowed to access this service.
    But same URL is working fine in browser.It's displaying the XML file.
    Can you provide the solution to resolve this error?
    Thanks,
    Kundan

  • Error while connecting to HTTPS WebService through Jdev

    I am having issues while trying to connect to a webservice that require SSL. Has anybody seen similar exception below or any suggestion/best practice docs of how to setup the cert?
    WARNING: Unable to connect to URL: https://itsolutions/AppIntegration/org/test/sendRequest.jpd due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    java.rmi.RemoteException: ; nested exception is:
         HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    Dear All,I am getting this error while connecting to ASDM Please help.Your ASA Image has a version number 8.2.1 which is not supported by ASDM 6.1(3)Show Version.....User Access VerificationPassword:
    Type help or '?' for a list of available commands.
    ASA-PT> en
    Password:ASA-PT# show verCisco Adaptive Security Appliance Software Version 8.2(1)
    Device Manager Version 6.1(3)Compiled on Tue 05-May-09 22:45 by builders
    System image file is "disk0:/asa821-k8.bin"
    Config file at boot was "startup-config"ASA-PT up 12 days 0 hoursHardware:   ASA5520, 512 MB RAM, CPU Pentium 4 Celeron 2000 MHz
    Internal ATA Compact Flash, 256MB
    BIOS Flash M50FW080 @ 0xffe00000, 1024KBEncryption hardware device : Cisco ASA-55x0 on-board accelerator (revision 0x0)
                                 Boot microcode   : CN1000-MC-BOOT-2.00
                                 SSL/IKE microcode: CNLite-MC-SSLm-PLUS-2.03
                                 IPSec microcode  : CNlite-MC-IPSECm-MAIN-2.04
    0: Ext: GigabitEthernet0/0  : address is 0024.14d2.1582, irq 9
    1: Ext: GigabitEthernet0/1  : address is 0024.14d2.1583, irq 9
    2: Ext: GigabitEthernet0/2  : address is 0024.14d2.1584, irq 9
    3: Ext: GigabitEthernet0/3  : address is 0024.14d2.1585, irq 9
    4: Ext: Management0/0       : address is 0024.14d2.1581, irq 11
    5: Int: Internal-Data0/0    : address is 0000.0001.0002, irq 11
    6: Int: Internal-Control0/0 : address is 0000.0001.0001, irq 5
    <--- More --->ThanksTabrez
    Hi Tabrez,
    ASA5520 version 8.2.1 is supported with  ASDM 6.2(1 and above). Recommended: 6.2(3).check out the below link hope that c;ear out your query !!
    http://www.cisco.com/en/US/docs/security/asa/compatibility/asamatrx.html
    If helpful do rate the post
    Ganesh.H

  • Code to connect java to LDAP

    Hi,
    I am in urgency to get code to connect LDAP server on Domino server,just tell me where i can find a simple code to connect LDAP server using java.

    You can use the JNDI API for this
    The tutorial contains the basic code examples for connecting to LDAP using this API:
    http://java.sun.com/products/jndi/1.2/javadoc/
    You'll also need to download the JNDI API from:
    http://java.sun.com/products/jndi/

  • Sample code to connect LDAP server using jndi

    Hi,
    can any one help me with sample code to connect LDAP server using jndi,
    like i want to make use of Ldap server for serching Active directoty.
    Thanks in advance,
    Regards
    Muthu

    You can set ldap_auth=none for anonymous user.
    User/password is mandatory otherwise. Please refer to http://docs.oracle.com/cd/E21764_01/integrate.1111/e12644/appendix_ldap_driver.htm#CHDHCABH
    Thansk,

  • Visual C++ code to connect database

    Hi
    I am currently writing a program in visual c++.
    However I need to store image to oracle database.
    Therefore there is a need to connect to the database.
    In other word, I need to connect using ODBC.
    However I am not sure of the code in visual c++ to connect
    and to store jpg image into oracle database.
    Is there any reference or link that i can get the standard code
    to connect to oracle database using visual c++ code?

    You have a lot of options for how you want to connect. You can use OCI, OCCI, ODBC, OLE DB, and OO4O from C++ code without a problem. If you decide on ODBC or OLE DB, you can use the API directly, or, more commonly, you can use one of the API's that are layered on top of those API's, i.e. ADO, RDO, DAO, etc..
    There isn't a single standard way of connecting to the database in C++-- you have lots of options, depending on what you're most comfortable with. If you can give some additional details about exactly which API you're going to be using, I'll try to point you in the right direction for samples.
    Justin

  • How to Connect thru RFC ?

    Hi All,
    We are upgrading from 4.6C to ECC 6.0 and i need to move the data from the Z tables into the New system. I have generated the Table Maint for the table but when i try to connect thru rfc it gives an error.
    Can any body please tell me how to move the data.
    with rgds
    Ranjith Singh

    Hi,
            What error r u getting is it not geeting connected to destination ?
    The RFC call shd be :-
    CALL FUNCTION <FM NAME > DESTINATION rfc_dest
            EXPORTING
            IMPORTING
            EXCEPTIONS
              communication_failure = 1
              system_failure        = 2.

  • Java code to connect to remote windows machine from local machine

    Hi,
    I have developed a code to connecting remote windows M/C from local M/C by using SSH2 (ganymed-ssh2-build209.jar) API. when I run the code its giving below error. Can any one please help me how to resolve it. And also please let me know, is there any other way to connect remote windows system using java code.
    Exception.
    java.io.IOException: There was a problem while talking to <host name>:22
      at ch.ethz.ssh2.Connection.connect(Connection.java:642)
      at ch.ethz.ssh2.Connection.connect(Connection.java:460)
      at Connect.RemoteServer.ConnectWindowsServer.runCommand(ConnectWindowsServer.java:55)
      at Connect.RemoteServer.ConnectWindowsServer.main(ConnectWindowsServer.java:27)
    Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(Unknown Source)
      at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at ch.ethz.ssh2.transport.TransportManager.initialize(TransportManager.java:299)
      at ch.ethz.ssh2.Connection.connect(Connection.java:591)
      ... 3 more
    JAVA Code
    import ch.ethz.ssh2.Connection;
    import ch.ethz.ssh2.Session;
    public void setAuthenticationInfo(String hostname, String username,String password) {
           this.host = hostname;
           this.userid = username;
           this.password = password;      
           this.recentCommand = "";     
           System.out.println("setting authentication info completed for host=" + host );
      public void runCommand() throws Exception {
    try{
            // Setup ssh session with endpoint
           System.out.println("starting connection with " + host);
           Connection connection = new Connection(host);
           System.out.println("connection object created..");
           connection.connect();
           System.out.println("Connect to connection");
           connection.authenticateWithPassword(userid,password);
           System.out.println(connection.isAuthenticationComplete());
           Session session = connection.openSession();
          System.out.println("connected");
      }catch (Exception e) {
      e.printStackTrace();
    Regards,
    Praveen

    Hi baftos,
    I tried to telnet remote windows machine from my local machine on port 23, its not connected and given error message like "Connect failed".
    As your response, if we can telnet to remote windows machine from local machine then we can connect from Java. Is it correct ?.
    Can you please help me to resolve this issue. And also please confirm the port (23) is correct, which I was used to connect remote machine from telnet.
    Regards,
    Praveen

  • VBA code to connect Essbase from Excel

    Hi All,
    I need VBA code to connect & retrive the data from Essbase trough Excel sheet ....Please advise...
    Regards,
    Prabhas

    KVC wrote:
    As gleen advised install essbase excel addin before going to use below script
    create push button to trigger below script
    press Alt F11create module copy the below module and ur done
    Sub main()
    X = EssVConnect("[Book1.xls]Sheet1", "admin", "password", "EssbaseServerName", "Sample", "Basic")
    ‘Replace all the above parameters according to you environment.
    '("[Book1.xls]Sheet1" > Excel filename where this code is written followed by the sheetname
    'admin > username who has access to this application/database
    'EssbaseServerName > essbase analytic server name
    'Sample > application name
    'Basic > database name
    If X = 0 Then
    MsgBox ("Essbase connect is successful.")
    Else
    MsgBox ("Essbase connection failed.")
    End If
    X = EssVRetrieve("[Book1.xls]Sheet1", range("A1:F12"), 1)
    If X = 0 Then
    MsgBox ("Essbase retrieve is successful.")
    Else
    MsgBox ("Essbase retrieval failed.")
    End If
    for Disconnect
    X = EssVDisconnect(Empty)
    If X = 0 Then
    MsgBox ("Essbase disconnect is successful.")
    Else
    MsgBox ("Essbase disconnect failed.")
    End If
    End SubKVC ...Thanks for your Help...

  • ABAP source code to connect to third party systems using web service calls?

    Hi all,
              can any one provide an example ABAP source code to connect to third party systems using web service calls? The base system is CRM.

    Do you want to call a web service in a remote system, or do you want to provide a web service?
    If you want to call a web service you should create a proxy object via SE80. Open your development package, right click on the tree entry and choose: Create -> Enterprise Service / Web Service -> Proxy Object and provide the needed information (including the WSDL description file). You may then use the proxy object to call the web service (if the connection and everything else works right).
    See [http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm]

Maybe you are looking for