HTTP POST from SAP to an external server
Experts.
I have a XML file encased in MIME and SOAP format. Essentially it's a .xml file.
I need to post this to an external server (have the IP address and logon credentials) using http post functionality.
Can this be accomplished in SAP using ABAP, Function module? I need to post the entire file.
If anyone has done this, can you please post the steps needed?
Thank you so much.
Raj
Hi Raj,
a good starting point for you would be the SAP Help. [Here|http://help.sap.com/saphelp_nw04/helpdata/en/1f/93163f9959a808e10000000a114084/frameset.htm] is some sample code of how to make a HTTP call from ABAP.
Cheers
Graham Robbo
Edited by: Graham Robinson on Oct 28, 2009 2:44 PM
Similar Messages
-
Remote Connection from SAP to MS-SQL server
Hello Experts,
We have been following 2 options so far and we have come across some issues
The first Option is to call a stored procedure (this is our preferred method) which does the data transfer for us
We have been able to test this scenario successfully from SQL Server side
However, while calling the stored proc via native SQL from ABAP we have come across an issue which is due to SQL 2005 changes (Schema implementation and difference in the security context)
While calling the stored procedure from the ABAP Code we have an error
The program short dumps with runtime error DBIF_DSQL2_SQL_ERROR, exception CX_SY_NATIVE_SQL_ERROR. The database error code is 15274, and the error text is
"Access to the remote server is denied because the current security context is not trusted."
This issue is new after the SQL Server 2005.
We are trying to resolve that.
Secondly we have been trying the DBCON option as well as per OSS Note 323151
We have a few things thatu2019s impacting our scenario:
The remote servers are in a different domain
The remote servers are located in DIZ
Remote server is a named instance
Remote server has been configured with a different port than standard (1565) u2013 All Connection strings will need port in there
The Database name starts with a numeric value
Due a combination of factors as mentioned above the standard approach does not work
Have any of you used this approach while connecting from SAP to MS-SQL server? Do you know of any successful methods to connect to SQL using ABAP (or not) from SAP.
Thanks in advance,Yes,
DBConnect & UDConnect.
Works like a charm.
We write data into a MS-SQL database via DBConnect & an ABAP program (using open sql). -
Http post from an application with file attachment
Hi ! I didn't know where else to post this message...
I'm trying to make a HTTP POST from an application and upload a file with it. I have no problems with the posting, just that I haven't got any ideas how to get the file uploaded as well. I've been reading loads of examples regarding the topic, and searching older posts the forum here, without any help.
Here's the method i'm using:
// open connections
URL url = new URL ("TheURL");
URLConnection urlConn = url.openConnection();
// We do input & output, without caching
urlConn.setDoInput (true);
urlConn.setDoOutput (true);
urlConn.setUseCaches (false);
// multipart/form-data because we want to upload a file
urlConn.setRequestProperty ("Content-Type", "multipart/form-data");
// Open output stream
DataOutputStream printout = new DataOutputStream (urlConn.getOutputStream ());
// Set the actual content
String content = "upfile=" + System.getProperty("user.dir") + "\\file.ext&";
content += "other_key-value_pairs";
// write the data to stream, and flush it.
printout.writeBytes (URLEncoder.encode(content));
printout.flush ();
printout.close ();
// Get the response.
DataInputStream input = new DataInputStream (urlConn.getInputStream());
FileOutputStream fos=new FileOutputStream("postto.txt");
String str;
BufferedReader bufr = new BufferedReader(new InputStreamReader(input));
// Write response to outputfile
while (null != ((str = bufr.readLine()))) {
if (str.length() >0) {
fos.write(str.getBytes());
fos.write(new String("\n").getBytes());
input.close ();Now, the response here I get from the url i'm posting to is "Failure, no data-file". I've tried many diff methods of writing the file to the stream, but always get the same result.
I need to file attached like it would be when using a HTML form's <input type="file">.
Please help ! This is getting really urgent !String content = "upfile=" + System.getProperty("user.dir") + "\\file.ext&";
content += "other_key-value_pairs";
printout.writeBytes (URLEncoder.encode(content));
printout.flush ();
printout.close ();Actually, what this does is create a request like:
GET /path/to/file/script.language?upfile=/home/user/file.ext&other=params HTTP/1.1
Content-Type: multipart/form-data
-- And other HTTP params --
The file is not actually appended to the request.
I really don't know how Java handles the file upload, but you could do it by hand, like so:
public static void doFileUpload(String url, String filename, Hashtable params) throws IOException {
// Construct the request
String boundary = "----------------------mUlTiPaRtBoUnDaRy";
String request_head = "POST " + url + " HTTP/1.0\r\n" +
"Content-type: multipart/form-data; boundary=" + boundary + "\r\n";
String request_body = boundary + "\r\n\r\nContent-disposition: form-data; name=\"upload\"" +
"\r\n\r\n";
BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
int b = -1;
while((b = in.read()) != -1) {
request_body += (char)b;
in.close();
Enumeration keys = params.keys();
while(keys.hasMoreElements()) {
String key = keys.nextElement();
requst_body += "\r\n" + boundary + "\r\n\r\nContent-type: form-data; name=\"key\"\r\n" +
(String)params.get(key);
request_body += "\r\n" + boundary + "--\r\n";
int length = request_head.length() + request_body.length() + "Content-length: \r\n";
String req_length = "Content-length: " + (length + new String("" + length).length()) + "\r\n";
Socket socket = new Socket(url,80);
PrintStream stream = socket.getOutputStream();
stream.print(request_head + req_length + req_body);
// And now an option to read the response, I will omit that...
}Note: I have not tested this code, just wrote it up out of memory. If it does not work, it will propably need some small fixes.
Tuomas Rinta -
Connect from SAP gateway to RFC server failed - Java StandAlone app X SAP RAC System
Dears,
I'm developing a Java application (RFC SERVER) with JCo3 and I need to connect to SAP RAC system.
I have configured the TCP/IP connection via transaction SM59, but when I try to start my server I face the error below (dev_jco_rfc.trc):
==========================================================================================
**** Error file opened at 20140714 112024 Brasilia Time Rel 3.0.10 (2013-08-08) [720.440]
Error: >Mon Jul 14 11:20:24,636< RfcException: [null]
message: Connect from SAP gateway to RFC server failed
Connection parameters: TYPE=A DEST=VSPAGUE ASHOST=cpe1601 SYSNR=01 SAPROUTER=/H/155.56.49.28 PCS=1
LOCATION SAP-Gateway on host ld7624.dmzwdf.sap.corp / sapgw01
ERROR hostname 'cpe1601' unknown
TIME Mon Jul 14 16:20:25 2014
RELEASE 740
COMPONENT NI (network interface)
VERSION 40
RC -2
MODULE /bas/740_REL/src/base/ni/nixxhl.cpp
LINE 193
DETAIL NiHLGetNodeAddr: hostname cached as unknown
COUNTER 3
Return code: RFC_FAILURE(1)
error group: 102
key: RFC_ERROR_COMMUNICATION
==========================================================================================
This problem happens when my app executes the line:
JCoServer myServer = JCoServerFactory.getServer(myServerName);
My system properties:
jco.client.lang=EN
jco.destination.peak_limit=10
jco.client.client=800
jco.client.passwd=********
jco.client.user=********
jco.client.sysnr=01
jco.destination.pool_capacity=3
jco.client.ashost=/H/155.56.49.28/H/cpe1601
jco.server.connection_count=3
jco.server.gwhost=/H/155.56.49.28/H/cpe1601
jco.server.progid=VSPAGUE
jco.server.gwserv=sapgw01
jco.server.repository_destination=VSPAGUE
Using SAP Logon i can connect to server cpe1601 system E16 without problems.
Please, I really need some help, because my knowledge on SAP platform is minimum.Hi Markus,
Changing ASHOST=ld7624.dmzwdf.sap.corp as you have suggested, I got the error message: Connect to SAP gateway failed ...
As you could see, the host I'm connecting is from SAP RAC Service.
Here in our company we have only SAP Logon and my RFC Application, and I can connect to SAP remote system via SAP Logon with this settings:
System Connection Parameters
Description: SAP ECC 6.0
Application Server: cpe1601
Instance Number: 01
System ID: E16
SAProuter String: /H/155.56.49.28/H/
Below the connection information I received from SAP RAC SUPPORT for testing purposes:
E16 System:
SID: E16
Client: 800
System Number: 01
Server: cpe1601
Component Version: SAP ERP Central Component 6.0 Enhancement Pack 6 Suite on HANA
User: ********
Password: ********
SAProuter String:
If you don't plan to use SAPRouter at your end,
/H/155.56.49.28/H/ -
Crystal report- Connect from SAP gateway to RFC server failed
Hi All,
I am trying to connect to a SAP R3 system from crystal reports but it gives me below error.
Please note : Transports have been imported and also the roles CRYSTAL_ENTITLEMENT and CRYSTAL_DESIGNER. My user is a member of these roles which were release along with Best practice reports v1.31
Error :
Logon failed.
Details: CMALLC : rc= 27 > Connect from SAP gateway to RFC server failed
Connect_pm GWHOST=10.10.4.63, gwserv=SAPGW30, SYSNR= 30
Location SAP-gateway on host ply.log.com/sapgw30
Error timeout during allocate
TIME ....
Release 700
Component SAP Gateway
Version 2
RC 242
Module gwr3cpic.c
LINE 1996
Detail no connect of TP sapdb30 from host 10.10.4.63 after 20 sec
Can you please help us solving this error.
Thanks
ChetanHi Stratos,
The SAP Version is ECC 6.0.
The below transports have been imported.
u2022 Open SQL Connectivity transport (K900574.r21 and R900574.r21)
u2022 Info Set Connectivity transport (K900575.r21 and R900575.r21)
u2022 Row-level Security Definition transport (K900576.r21 and R900576.r21)
u2022 Cluster Definition transport (K900585.r21 and R900585.r21)
u2022 Authentication Helpers transport (K900578.r21 and R900578.r21)
Thanks & Regards,
Chetan -
Connect from SAP gateway to RFC server failed
Good day and a happy new year to you all!
I am failing to connect to my SAP BW system from BEx. The logon fails with this message:
>>>>>Start<<<<<<<<<<
Error Group
RFC_ERROR_COMMUNICATION
Message
Connect from SAP gateway to RFC server failed
Connect_PM GWHOST=10.16.64.77, GWSERV=sapgw02, ASHOST=10.16.64.77, SYSNR=02
LOCATION SAP-Gateway on host bwsys / sapgw02
ERROR timeout during allocate
TIME Sat Dec 31 13:16:19 2005
RELEASE 640
COMPONENT SAP-Gateway
VERSION 2
RC 242
MODULE gwr3cpic.c
LINE 1785
DETAIL no connect of TP sapdp02 from host 10.16.64.77 after 22 sec
COUNTER 2
>>>>>>>>>END<<<<<<<<<<<<
I only experience this problem when connecting using any BEx component, but, I can successfully connect to the SAP BW system from SAP gui.
Additionally, I have the service 'sapdp02' defined in the services file, both on the workstation and the server.
What could be wrong or missing in my configuration?
Regards,
Joao.hi Joao,
check if oss note 447882 relevant
you may ask basis for help
Symptom
You want to access the customer system using the BEx Analyzer.The connenction fails:The system displays the error RFC_ERROR_COMMUNICATION.In the detail screen, the system displays message "Partner not reached" (host 192.168.4.2, service sapgw 00).
Other terms
SAP Gateway, RFC_ERROR_COMMUNICATION, partner not reached
Reason and Prerequisites
The SAP gateway host is deactivated or the TCP/IP port 33xx (where xx corresponds to the system number) is not open.
Solution
Issue statement ping <IP address> (In this example:192.168.4.2) No reply: Boot SAP Gateway host required.
An answer:Check whether the TCP/IP port 33xx is open (where xx corresponds to the system number) and start the SAP gateway.
The TCP/IP port is also partially defined in the services file as an sapgw<SID> or sapgwxx entry (where xx corresponds to the system number). The services file is in the Windows directory or in WinNT/System32/drivers/etc. -
Error: Connect from SAP gateway to RFC Server failed
Hi
I am trying to connect SAP server using the java (JCO connection), and getting following error. While I am able to connect to the same sever using SAP Logon pad with the same ipaddress (hostname) and logon credentials.
Please kindly help.
Erro: Connect from SAP gateway to RFC server failed.
Connect_PM GWHOST = hostname, GWSER = sapgw03, ASHOST=hostname, SYSNR=03
LOCATION SAP-Gateway on host hostname / sapgw03
ERROR timeout during allocate
TIME Wed Oct 31 05:31:45 2007
RELEASE 640
COMPONENT SAP-Gateway
VERSION 2
RC 242
MODULE gwr3cpic.c
LINE 1795
DETAIL no connect of TP sapdp03 from host hostname after 22 sec
COUNTER 3Hi K Patil,
Acording to me you are faceing this issue because the entry of your backend System is not in the SLD (System Landscape Directory ) of your server.
to make this work you have to make entry in the SLD of your server
fort that plesae acess this link.
Re: JCo connection Error
Re: wt is SLD.. how to do configure it
Please Reward Points if Helpfull.
Regards
Vinit
Edited by: Vinit Soni on Dec 19, 2007 7:20 AM -
HTTP POST FROM EXTERNAL SYSTEM TO SAP AII 4.0
Hello.
We are using SAP AII 4.0 and trying to post from the device controller to SAP AII. We are not clear about the format of the HTTP POST command. Could someone please provide an example of the HTTP POST command from the device controller to SAP AII. I am looking for the format of the HTTP POST command for all field such as port, IP address, etc.
I am looking for a complete example.
Thanks in advance for your help.
Regards,
Bob BerneckHi Bob,
Please check the following link for help
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/419e11e7-0801-0010-1e8f-9191ba03f1fc .
Please check the help.sap.com link for help
http://help.sap.com/saphelp_autoid40/helpdata/en/index.htm
If you need some latest doc on AII and DC please mail me at [email protected] or let me know you mail ID
Thanks N Regards
Santosh
Reward if helpful !!! -
Dbcon connection from sap db2 to external sql server
Hi ,
I am trying to connect from my sap server which is in unix platform with DB2 database to external SQL server using DBCON as MSSQL_SERVER=<server_name> MSSQL_DBNAME=<db_name>. But while running ADBC_TEST_connection i am getting the error . When i check the error log it says
Loading DB library '/usr/sap/DVL/SYS/exe/run/dbmssslib.so' ...
M *** ERROR => DlLoadLib()==DLENOACCESS - dlopen("/usr/sap/SID/SYS/exe/run/dbmssslib.so") FAILED
"Unable to find library '/usr/sap/DVL/SYS/exe/run/dbmssslib.so'." [dlux.c 445]
M {root-id=002655A9DCD21EE3B89D69F99DF39F0D}_{conn-id=00000000000000000000000000000000}_0
B *** ERROR => Couldn't load library '/usr/sap/SID/SYS/exe/run/dbmssslib.so'
How to resolve this issue. As it was mentioned in few forum we need to download the dbsl library from kernel patches and to load in kernel path. As my db is DB2 can we download dbmssslib.so this library and load in kernel file? Is it will work?
Regards,
RaiHi Rai,
This error indicates that the ABAP stack could not find the SAP DBSL for SQL Server (dbmssslib.dll) in the kernel directory. If you encounter this error on a Unix - based server the root cause is clear: the DBSL does not exist for other platforms than Windows or Linux x84_64. In this case use a Windows-based or a Linux x86_64-based SAP Application Server to establish the connection. If your system does not contain a Windows-based or a Linux x86_64-based Application Server you need to setup a small one as workaround. If you encounter this error on a Windows Application Server or a Linux x86_64 based Application Server make sure that the DBSL is properly installed in the kernel directory as explained in the document below.
For more details on configuration and troubleshooting refer to below SCN document
How to access an external Microsoft SQL Server database
Hope this helps.
Regards,
Deepak Kori -
How to do Handshake with tired party(bank) HTTPS URL from SAP PI server
Dear Expert,
I have developed bunch of scenarios, all are synchronous ABAP proxy to HTTP_AAE with bank on PI 7.4(dual stack). Bank web server is HTTPS enabled server. Our ABAP developments are still in progress also we have few issue in connection from ECC to PI.but that is not the focus of discussion here.
we want to do the handshake to check the connectivity with bank on their HTTPS URL from PI. Bank has provided the privet key for SSL from their server and corresponding public key they have maintained on their server. I have imported the private key under NWA -> Certificates -> Key Storage -> TrustedCA->Import Entry->Entry Type->PKCS#12->select the SSL.p12 file->import , also I have selected the option to "Use SSL" in HTTP_AAE receiver communication channel and selected the corresponding entryin "keystore view" and "keystore entry". All these I have done in our DEV system, and we are trying to connect our PI dev to bank Dev server.
Questions
Is there any specific steps to do the handshake with third party HTTPS(bank in my case) server? if not, how can we just test the HTTPS connectivity by using the SSL private installed on our PI server, without running the complete scenarios. Our PI has been installed on UNIX, and "telnet https url 443" is working, as network team has opened the HTTPS port.
We have not enabled the SSL technically on our PI server, and we have not installed any generated certificate from our PI server. Moreover, we have not made our PI url as "https:hostname:port" as we just need to communicate with bank by using their private key. Do you guys think we should enable the SSL? if yes, please explain why.
What is the best practice to test the connection with third party having HTTPS URL? how can I just assure HTTPS communication is working fine, before testing my actual scenarios.
Thanks for helping always.
Regards,
FarhanHi Farhan,
Some part of the blog is applicable for sending HTTPS request to partners/third party (Receiver SOAP Adapter).
If banks certificates are already in trustedCA, then, can you check if it also imported under user PIISuser under Identity management in NWA. If above 2 steps are done then i think your are good to go. But be careful when you install certificate, it should be in proper order.
As you already mentioned, connectivity is already established and you are able to PIng/telnet from pi server, connectivity looks ok.
While sending request, if you are getting 401 unauthorized, below might be the reason -
1. Certificate not installed correctly or some missing steps
2. Partner or TP is not ready to receive it, some certificate issue in there side.
other than 401 means you are ok (As per certificate and Connectivity) - 403 and 500 errors are next stops.
403 - error because of encoding method.
500 - data issue.
Regards
Aashish Sinha -
Not able to send message - http post from MII 12.1.4.53 to PI 7.1
Hi ,
Question
u2022 Is there any configuration to set up in MII and PI to do posting to PI as a web service? If YES, please guide.
Situation
u2022 We are with MII version 12.1.4.53 and trying to send message through http post to PI 7.1 server.
u2022 We are getting the following error HTTP 500 Internal Error Issue.
u2022 However we are able to post messages from SOAPUI through the same URL and with the MII system which is running on version 12.1.6.91 and 12.1.9.116
u2022 HTTP Response received as below points to PI Configuration issue.
Error
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context>XIAdapter</context>
<code>ADAPTER.JAVA_EXCEPTION</code>
<text><![CDATA[
com.sap.aii.af.service.cpa.CPAObjectNotFoundException: Couldn't retrieve inbound binding for the given P/S/A values: FP=senderService;TP=;FS=null;TS=;AN=null;ANS=null;
thanks
RajeshHi Anudeep,
The question isNOT ABOUT the format of the URL which MII should use.
Using the same URL we are able to post the message from other MII versions with in the landscape( MII version 12.1.6 and MII version12.1.9) and through SOAP UI.
500 Internal server error Problem arises when the message is sent through the same URL from MII 12,1.4 Build(53) to PI 7.1 ( we tried https Post, XI Webservice, WebService action blocks)
Question:
Are thre any configuration settings specific to MII version12.1.4 Build 53 which needds to be set in MII to communicate to PI 7.1.
Thanks
Rajesh -
HTTPs connection from SAP WebAS
Hello,
I have to establish a connection from SAP WebAS to an iSaSiLk server via HTTPS.
The iSaSiLk authentication is based on client certificates.
I've created a SSL client PSE, generated the Certificate Request, imported the certificate response and the chain of certificates associated with no errors. When testing the connection we're getting the following error message:
SAP icm log:
[Thr 1087400256] ->> SapSSLSessionInit(&sssl_hdl=0x2aaaba679980, role=1 (CLIENT), auth_type=3 (USE_CLIENT_CERT))
[Thr 1087400256] <<- SapSSLSessionInit()==SAP_O_K
[Thr 1087400256] in: args = "role=1 (CLIENT), auth_type=3 (USE_CLIENT_CERT)"
[Thr 1087400256] out: sssl_hdl = 0x1a3310c0
[Thr 1087400256] ->> SapSSLSetNiHdl(sssl_hdl=0x1a3310c0, ni_hdl=22)
[Thr 1087400256] NiIBlockMode: set blockmode for hdl 22 TRUE
[Thr 1087400256] <<- SapSSLSetNiHdl(sssl_hdl=0x1a3310c0, ni_hdl=22)==SAP_O_K
[Thr 1087400256] ->> SapSSLSetSessionCredential(sssl_hdl=0x1a3310c0, &cred_name=0x1a49e4e0)
[Thr 1087400256] SapISSLComposeFilename(): Filename = "/usr/sap/XID/DVEBMGS00/sec/SAPSSLSPHTID.pse"
[Thr 1087400256] <<- SapSSLSetSessionCredential(sssl_hdl=0x1a3310c0)==SAP_O_K
[Thr 1087400256] in: cred_name = "/usr/sap/XID/DVEBMGS00/sec/SAPSSLSPHTID.pse"
[Thr 1087400256] ->> SapSSLSetTargetHostname(sssl_hdl=0x1a3310c0, &hostname=0x1a4a09e0)
[Thr 1087400256] <<- SapSSLSetTargetHostname(sssl_hdl=0x1a3310c0)==SAP_O_K
[Thr 1087400256] in: hostname = "<remoteServer_to_be_accessed>"
[Thr 1087400256] ->> SapSSLSessionStart(sssl_hdl=0x1a3310c0)
[Thr 1087400256] SapISSLUseSessionCache(): Creating NEW session (0 cached)
[Thr 1087400256] Tue Jan 13 10:10:22 2009
*[Thr 1087400256] *** ERROR during SecudeSSL_SessionStart() from SSL_connect()==SSL_ERROR_SSL*
[Thr 1087400256] session uses PSE file "/usr/sap/XID/DVEBMGS00/sec/SAPSSLSPHTID.pse"
[Thr 1087400256] SecudeSSL_SessionStart: SSL_connect() failed
secude_error 536871693 (0x2000030d) = "none of the PSEs registered with hSsl can suffice the negotiated SSL cipher suite"
[Thr 1087400256] >> Begin of Secude-SSL Errorstack >>
[Thr 1087400256] ERROR in ssl3_get_certificate_request: (536871693/0x2000030d) none of the PSEs registered with hSsl can suffice
[Thr 1087400256] << End of Secude-SSL Errorstack
[Thr 1087400256] SSL_get_state() returned 0x00002150 "SSLv3 read server certificate request A"
[Thr 1087400256] No certificate request received from Server
[Thr 1087400256] <<- ERROR: SapSSLSessionStart(sssl_hdl=0x1a3310c0)==SSSLERR_SSL_CONNECT
[Thr 1087400256] ->> SapSSLErrorName(rc=-57)
[Thr 1087400256] <<- SapSSLErrorName()==SSSLERR_SSL_CONNECT
[Thr 1087400256] *** ERROR => IcmConnInitClientSSL: SapSSLSessionStart failed (-57): SSSLERR_SSL_CONNECT [icxxconn_mt
On the iSaSiLk server we're getting:
ssl_debug(2): Starting handshake (iSaSiLk 3.06)...
ssl_debug(2): Received v3 client_hello handshake message.
ssl_debug(2): Client requested SSL version 3.0, selecting version 3.0.
ssl_debug(2): Creating new session 11:5F:04:C9:0D:32:15:B9...
ssl_debug(2): CipherSuites supported by the client:
ssl_debug(2): SSL_RSA_WITH_RC4_128_SHA
ssl_debug(2): SSL_RSA_WITH_RC4_128_MD5
ssl_debug(2): SSL_RSA_WITH_3DES_EDE_CBC_SHA
ssl_debug(2): SSL_RSA_WITH_DES_CBC_SHA
ssl_debug(2): SSL_RSA_EXPORT_WITH_DES40_CBC_SHA
ssl_debug(2): SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5
ssl_debug(2): SSL_RSA_EXPORT_WITH_RC4_40_MD5
ssl_debug(2): CompressionMethods supported by the client:
ssl_debug(2): NULL
ssl_debug(2): Sending server_hello handshake message.
ssl_debug(2): Selecting CipherSuite: SSL_RSA_WITH_RC4_128_SHA
ssl_debug(2): Selecting CompressionMethod: NULL
ssl_debug(2): Sending certificate handshake message with server certificate...
ssl_debug(2): Sending certificate_request handshake message...
ssl_debug(2): Sending server_hello_done handshake message...
ssl_debug(2): IOException while handshaking: Connection closed by remote host.
ssl_debug(2): Sending alert: Alert Fatal: handshake failure
ssl_debug(2): Shutting down SSL layer...
ssl_debug(2): Closing transport...
From the iSaSiLk everything seems to be OK, but on the SAP WebAS the error "none of the PSEs registered with hSsl can suffice the negotiated SSL cipher suite" is really unclear, since the cipher chosen by the iSaSiLk is one of the ciphers sent by SAP WebAS...
Can anyone give me any suggestion?Hello Olivier,
Thanks for your answer.
I've implemented note 800240 which facilitates the PSE analysis by implementing the report ZSSF_TEST_PSE. With this report I'm able to check all the PSE content, which are:
Filename SAPSSLSPHTID.pse
PIN <no>
Signature X
Encryption X
Profile Parameter
DIR_INSTANCE /usr/sap/XID/DVEBMGS00 /usr/sap/XID/D00
sec/dsakeylengthdefault 1024
sec/libsapsecu /usr/sap/XID/SYS/exe/run/libsapcrypto.so
sec/rsakeylengthdefault 1024
ssf/name SAPSECULIB
ssf/ssf_md_alg SHA1
ssf/ssf_symencr_alg DES-CBC
ssf/ssfapi_lib /usr/sap/XID/SYS/exe/run/libsapcrypto.so
ssf2/name
ssf2/ssf_md_alg SHA1
ssf2/ssf_symencr_alg DES-CBC
ssf2/ssfapi_lib
ssf3/name
ssf3/ssf_md_alg SHA1
ssf3/ssf_symencr_alg DES-CBC
ssf3/ssfapi_lib
Environment variables
USER xidadm
SECUDIR /usr/sap/XID/DVEBMGS00/sec
PSE
Validity 18.12.2008 19:47:04 18.12.2009 19:47:04
Algorithm RSA (OID 1.2.840.113549.1.1.1)
Test signature
Signature OK
Verification OK
Test encryption
Encryption OK
Decryption OK
As you can see, the cipher algorithm used is RSA. Any suggestion... ?
An iSaSiLk server "is a Java programming language implementation of the SSLv2 (client-side), SSLv3, TLS 1.0 and TLS 1.1 protocols. It supports all defined cipher suites (except for Fortezza), including all AES and PSK cipher suites. iSaSiLk implements all standard TLS extensions, comes with an easy to use API and operates on top of the IAIK-JCE Javau2122 Cryptography Extension. iSaSiLk is highly configurable and will work with any alternative JCE implementation supported by a proper provider for supplying the required cryptographic algorithms".
Once again thanks for your answer. -
HTTP POST from ECC 6.0 to XI
On ECC 6.0, I have an XMLstring that I need to post to an external URL. I need this to go through XI. It is actually an HTTPS post. How can this be accomplished? Can anyone point me in the right direction as far as how this would work in XI? Here is a smippet of code on ECC
CALL METHOD cl_http_client=>create
EXPORTING
host = POST_HOST
service = '443'
scheme = '2'
ssl_id = 'ANONYM'
proxy_host = wf_proxy
proxy_service = wf_port
IMPORTING
client = http_client.
http_client->propertytype_logon_popup = http_client->co_disabled.
wf_user = '' .
wf_password = '' .
proxy server authentication
CALL METHOD http_client->authenticate
EXPORTING
proxy_authentication = 'X'
username = wf_user
password = wf_password.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = '~request_method'
value = 'POST'.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = '~request_protocol'
value = 'HTTPS/1.0'.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = 'HOST'
value = POST_HOST.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = '~request_uri'
value = L_POST_URI.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = 'Content-Type'
value = 'text/xml; charset=utf-8'.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = 'Content-Length'
value = txlen.Hi Tony,
You need to go through multiple steps.
1) Creation of Scenario in XI ( Integration Repository)
First create datatype which will represent the data that is to be passed to URL. Then message type, message interface, message mapping, Interface mapping.
2) Creation of Directory scenario ( Integration Directory)
Need to create Communication channel using either SOAP adapter or HTTP adapter as you need to pass the data to url.
3) Proxy:
Once you create first step then structure will be available in proxy ( SPROXY transaction) . There you will need to call method for outbound proxy.
For above mentioned steps you can search in SDN which will guide you to multiple helping thread. -
I'm trying to use a kind of botched web service implementation that doesn't come with a WSDL file - so, no generated proxy for me to use. It also needs me to send an XML file via an HTTP POST - not in a SOAP envelope. This presents a problem for me - understandably, this isn't part of WebAS 6.40's web services stuff.
Does anyone know of a way of manually posting something via HTTP in ABAP? I'm sure there must be some function module or class that exposes that functionality - I just can't find it! Any ideas anyone?Hi,
You can get some idea from following code for your requirment
DATA: WA_DATA TYPE TSRCLIN,
WA_RESULT TYPE TY_XML,
WA_INV_REP TYPE TY_INV_REP,
T_INV_REP TYPE TABLE OF TY_INV_REP,
WA_ICA_REC_REP TYPE TY_ICA_REC_REP,
T_ICA_REC_REP TYPE TABLE OF TY_ICA_REC_REP,
T_RESULT TYPE T_XML,
SOURCE_ITAB TYPE ABAP_TRANS_SRCBIND_TAB,
SOURCE_WA TYPE ABAP_TRANS_SRCBIND,
WA_ZTICAUSER TYPE ZTICAUSER.
DATA: XSLTP TYPE REF TO CL_XSLT_PROCESSOR,
G_IXML TYPE REF TO IF_IXML,
G_STREAM_FACTORY TYPE REF TO IF_IXML_STREAM_FACTORY,
G_ENCODING TYPE REF TO IF_IXML_ENCODING,
RESSTR TYPE REF TO IF_IXML_OSTREAM,
HTTP_CLIENT TYPE REF TO IF_HTTP_CLIENT .
DATA: SURL TYPE STRING.
DATA: WF_PROXY TYPE STRING ,
WF_PORT TYPE STRING,
WF_USER TYPE STRING,
WF_PASSWORD TYPE STRING,
RLENGTH TYPE I,
R_CODE TYPE SY-SUBRC,
USERID1 TYPE CHAR32.
CONSTANTS: ENCODING TYPE STRING VALUE 'UTF-8',
C_COMMA(1) VALUE ',',
C_AP(2) VALUE 'AP',
C_AR(2) VALUE 'AR',
C_CF(2) VALUE 'CF',
CONV->READ( IMPORTING DATA = XMLSTRING LEN = LEN ).
SPLIT XMLSTRING AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE T_DATA.
* Read Header Information
READ TABLE T_DATA INDEX 1 INTO WA_DATA.
SPLIT WA_DATA AT C_COMMA INTO DUMMY SOURCE_SYSTEM_ID DUMMY1.
TRANSLATE DUMMY TO UPPER CASE.
CONDENSE DUMMY.
IF DUMMY <> 'SOURCE SYSTEM ID' OR SOURCE_SYSTEM_ID IS INITIAL.
STRERROR = C_ERROR6.
ELSE.
DELETE T_DATA INDEX 1.
ENDIF.
CHECK STRERROR IS INITIAL.
READ TABLE T_DATA INDEX 1 INTO WA_DATA.
SPLIT WA_DATA AT C_COMMA INTO DUMMY DATE DUMMY1.
TRANSLATE DUMMY TO UPPER CASE.
CONDENSE DUMMY.
IF DUMMY <> 'DATE' OR DATE IS INITIAL.
STRERROR = C_ERROR6.
ELSE.
DELETE T_DATA INDEX 1.
ENDIF.
CHECK STRERROR IS INITIAL.
READ TABLE T_DATA INDEX 1 INTO WA_DATA.
SPLIT WA_DATA AT C_COMMA INTO DUMMY TIME DUMMY1.
TRANSLATE DUMMY TO UPPER CASE.
CONDENSE DUMMY.
IF DUMMY <> 'TIME' OR TIME IS INITIAL.
STRERROR = C_ERROR6.
ELSE.
DELETE T_DATA INDEX 1.
ENDIF.
CHECK STRERROR IS INITIAL.
READ TABLE T_DATA INDEX 1 INTO WA_DATA.
SPLIT WA_DATA AT C_COMMA INTO DUMMY CREATED_BY DUMMY1.
TRANSLATE DUMMY TO UPPER CASE.
CONDENSE DUMMY.
IF DUMMY <> 'CREATED BY' OR CREATED_BY IS INITIAL.
STRERROR = C_ERROR6.
ELSE.
DELETE T_DATA INDEX 1.
ENDIF.
CHECK STRERROR IS INITIAL.
READ TABLE T_DATA INDEX 1 INTO WA_DATA.
SPLIT WA_DATA AT C_COMMA INTO DUMMY TYPE DUMMY1.
TRANSLATE DUMMY TO UPPER CASE.
CONDENSE DUMMY.
IF DUMMY <> 'TYPE' OR TYPE IS INITIAL.
STRERROR = C_ERROR6.
ELSE.
CONDENSE TYPE.
L_TYPE1 = REPGRP.
L_TYPE2 = TYPE.
TRANSLATE L_TYPE1 TO UPPER CASE.
CONDENSE L_TYPE1.
TRANSLATE L_TYPE2 TO UPPER CASE.
CONDENSE L_TYPE2.
IF L_TYPE1 NE L_TYPE2.
IF L_TYPE2 = C_AP.
CONCATENATE C_ERROR1_AP C_ERROR1
INTO STRERROR SEPARATED BY SPACE.
ELSEIF L_TYPE2 = C_AR.
CONCATENATE C_ERROR1_AR C_ERROR1
INTO STRERROR SEPARATED BY SPACE.
ELSEIF L_TYPE2 = C_CF.
CONCATENATE C_ERROR1_CF C_ERROR1
INTO STRERROR SEPARATED BY SPACE.
ENDIF.
ENDIF.
DELETE T_DATA INDEX 1.
ENDIF.
CHECK STRERROR IS INITIAL.
DELETE T_DATA INDEX 1.
LOOP AT T_DATA INTO WA_DATA.
SPLIT WA_DATA AT ',' INTO WA_RESULT-FITF
WA_RESULT-COUNTERPARTYFITF
WA_RESULT-FUCA
WA_RESULT-COUNTERPARTYFUCA
WA_RESULT-RECONCILIATIONACCOUNT
WA_RESULT-INDICATORCUSTOMERVENDOR
WA_RESULT-INVOICENUMBER
WA_RESULT-DOCUMENTDATE
WA_RESULT-POSTINGDATE
WA_RESULT-DUEDATE
WA_RESULT-INVOICEAMOUNT
WA_RESULT-INVOICECURRENCY
WA_RESULT-REPORTINGAMOUNT
WA_RESULT-REPORTINGCURRENCY
WA_RESULT-INDICATOR
WA_RESULT-CREATIONDATE
WA_RESULT-CLEARINGDATE.
* Validation of the Structure.
WA_RESULT-SOURCESYSTEM = SOURCE_SYSTEM_ID.
APPEND WA_RESULT TO T_RESULT.
WA_INV_REP-INVOICEREPORT = WA_RESULT.
WA_ICA_REC_REP-ICARECONCILIATIONREPORT = WA_INV_REP.
WA_ICA_REC_REP-REPGRP = REPGRP.
WA_ICA_REC_REP-NAMESPACE = C_STR.
APPEND WA_ICA_REC_REP TO T_ICA_REC_REP.
ENDLOOP.
TRY.
CREATE OBJECT XSLTP.
CATCH CX_XSLT_EXCEPTION.
ENDTRY.
G_IXML = CL_IXML=>CREATE( ).
G_STREAM_FACTORY = G_IXML->CREATE_STREAM_FACTORY( ).
****Create an Endcoding and Byte Order
G_ENCODING = G_IXML->CREATE_ENCODING( CHARACTER_SET = ENCODING
BYTE_ORDER = 0 ).
*****Create Output Stream
RESSTR =
G_STREAM_FACTORY->CREATE_OSTREAM_XSTRING( CONTENT ).
****Set the Encoding into a stream
RESSTR->SET_ENCODING( ENCODING = G_ENCODING ).
* Prepare for Transformation
SOURCE_WA-NAME = 'BSPXML'.
GET REFERENCE OF T_ICA_REC_REP INTO SOURCE_WA-VALUE.
APPEND SOURCE_WA TO SOURCE_ITAB.
CLEAR XMLSTRING.
CALL TRANSFORMATION Z_BSP_XSLT
SOURCE (SOURCE_ITAB)
RESULT XML XMLSTRING.
IF SY-SUBRC <> 0.
STRERROR = C_ERROR3.
ENDIF.
DATA: X1 TYPE STRING,
X2 TYPE STRING.
* Change encoding from UTF-16 to UTF-8
SPLIT XMLSTRING AT 'utf-16' INTO X1 X2.
CLEAR XMLSTRING.
CONCATENATE X1 'UTF-8' X2 INTO XMLSTRING.
select single * into WA_ZTICAUSER
from ZTICAUSER.
if sy-subrc <> 0.
clear WA_ZTICAUSER.
endif.
SURL = 'http://XXXXXYYYYY:8050/sap/xi/adapter_plain?'.
CONCATENATE SURL
'namespace=' 'http%3A//XXXX.com/corp/sapbw/fi/ica/xi111fn1'
'&interface=' 'IOA_ICA_ReconciliationReport'
'&service=' 'Send_ICA_ReconciliationReport'
'&party=' 'ICA_ManualUpload'
'&agency='
'&scheme='
'&QOS=EO&sap-user=' WA_ZTICAUSER-USERID
'&sap-password=' WA_ZTICAUSER-PTEXT
'&sap-client=' '060'
'&sap-language=EN'
INTO SURL.
* Test of XML file.
* navigation->set_parameter( name = 'xmlstring'
* value = xmlstring ).
* navigation->goto_page( 'XMLTest.xml' ).
* Navigation Code
RLENGTH = STRLEN( XMLSTRING ).
CL_HTTP_CLIENT=>CREATE_BY_URL( EXPORTING URL = SURL
IMPORTING CLIENT = HTTP_CLIENT ).
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = 'Content-Type'
VALUE = 'text/xml; charset=utf-8'.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = '~request_method'
VALUE = 'POST'.
CALL METHOD HTTP_CLIENT->REQUEST->SET_CDATA
EXPORTING
DATA = XMLSTRING
OFFSET = 0
LENGTH = RLENGTH.
HTTP_CLIENT->SEND( ).
HTTP_CLIENT->RECEIVE( ).
HTTP_CLIENT->RESPONSE->GET_STATUS( IMPORTING CODE = RLENGTH ).
XMLSTRING = HTTP_CLIENT->RESPONSE->GET_CDATA( ).
HTTP_CLIENT->CLOSE( ).
IF RLENGTH = '200'.
STRERROR = C_SUCCESS.
* Update the information into the Table
TRANSLATE SOURCE_SYSTEM_ID TO UPPER CASE.
CONDENSE SOURCE_SYSTEM_ID.
USERID1 = USERID.
TRANSLATE USERID1 TO UPPER CASE.
CONDENSE USERID1.
CALL FUNCTION 'ZFM_BSP_ICA_UPLOAD'
EXPORTING
IV_SOURCE = SOURCE_SYSTEM_ID
IV_USERID = USERID1
IV_TYPE = TYPE
* IV_UPLOAD_DATE = SY-DATUM
* IV_UPLOAD_TIME = SY-UZEIT
IMPORTING
R_CODE = R_CODE.
ELSE.
STRERROR = C_ERROR4.
ENDIF.
ENDIF.
ENDIF.
Message was edited by: Mandar Shete -
Transfer files from SAP R/3(unix server) to windows
Hi TechGurus,
We have a requirement where in , we are extracting data from SAP table into a text file using OPEN DATASET in TEXT MODE.
Then using a third party tool (Connect-direct), we are transferring text files to windows server using unix script, in binary mode.
The problem is that that the data is being transferred in blocks,each time beginning transfer from a new line.That is, after say transferring 25KB data it transfers next 25KB data from a new line. What happens as a result is that records
after particular amount of data is broken and remaining data transfer begins from new line.
The file size is around 25 MB.There is no such problem while transferring file of size 10 KB.
We are uploading the data from text file on windows server into MSAccess.
And error occurs during this process.
Assured points for helpful answers
Thanks in advance!!Hi,
If you want to transfer file between different SAP servers then you can use the function module EPS_FTP_PUT. You need to have a RFC destination (with sufficient authorizations for the RFC user). The meaning of the importing parameters of the function module are quite obvious. Of course, SAP offers us more than this function module:
- EPS_FTP_GET
- EPS_FTP_MPUT
- EPS_FTP_MGET
Kishi.
Maybe you are looking for
-
Create sample output by running generic payment medium program in se38/80
Hi, I'm trying to configure a 4.6c system to utilise the PMW to generate payment media but first of all I'll like to see a sample output using the generic payment program, SAPFPAYM, in se38/80 to generate a sample output from an already posted payme
-
How to accept certificate authority in HP PPM
How can we accept the Certificate Authority (similar to VeriSign) of any organization specific instead of just accepting the individual certificate in HP PPM.This enables to be able to accept any cert from that organization specific instead of havin
-
Determining the ODBC data source from a Subreport - VB6, CR8.5 OCX
I am using Crystal 8.5 OCX and VB6 to run some reports. Users run reports on different databases with the same table structures. All run from ODBC sources that change in name also. The reports are just rpt files on the hard drive that are run when
-
Hi All, This is a question posted before and havent got an answer, but I'm trying my luck again, bringing it to everyones attention. I have a WD component used to several other component to show Error,Warning, Info messages on a Pop up window. The cl
-
Accessing built in functions through javascript
Hi everyone, Is there a way to call one of the built-in functions using javascript? For example, I added a click_box, and the on-success events I can choose to continue, go to a different slide, open a file/url etc. I can also choose to execute a jav