Hi all,
Did anybody come across this issue?
I have a SAP System - let's call it "TM" - that I want to bind with another non-SAP one - let's call it "FB" - without any PI between them.
The communication is made as a Service Consumer (TM side), the Proxy (see image below) and Proxy-Implementation Class being generated automatically after the ".wsdl" file and the "url" given by the documentation of FB.
Everything looks good! All the Methods (operations) that are available from the service have been added to the Implementing Class.
After the Proxy generation, I also created the Logical Port (in transaction SOAMANAGER - see image below) where the path, host, prefix, and all the necessary stuff were also automatically created after the ".wsdl" document.
So far so good! When I want to test it and to play along with this connection TM -> FB, I am creating the Proxy-Object, I am filling the required User / Pass / and an ID in order to call the first method. As you have probably guessed already: LOGIN.
ls_in_login-login_request-id = '...some ID...'.
ls_in_login-login_request-user = '...some user ...'.
ls_in_login-login_request-password = '...some password'.
TRY.
CREATE OBJECT lo_proxy
EXPORTING
logical_port_name = 'ZAS_PORT_FB'.
CATCH cx_ai_system_fault INTO lo_ref. " Application Integration: Technischer Fehler
...
ENDTRY.
TRY.
CALL METHOD lo_proxy->login
EXPORTING
input = ls_in_login
IMPORTING
output = ls_out_login.
CATCH cx_ai_system_fault INTO lo_ref. " Application Integration: Technischer Fehler
...
CATCH cx_ai_application_fault INTO lo_ref. " Application Integration: Applikations Fehle
...
ENDTRY.
As a response, (meaning that the connection works and that the WebService acknowledges the connection) I get a "SessionID" -> a string of characters.
In the Wiki of the Service is written that from this point on, every other methods (but I mean ALL of them, logout() also...) need to be called along with this SessionID. The problem is, that this SessionID doesn't have a specific place in the "inbound"-structure of the methods, but this mechanism of passing around the SessionID must be made with URL rewriting. Another solution would be to use COOKIES. From my point of view, a so-called URL rewriting would be easier, right?
In the documentation is the following info written:
"
URL rewriting (recommended):
The JSessionId is attached to the URL of the SOAP request, as follows: http://[URL];jsessionid=[jsessionid]
Caused by tecnical reasons, it is necessary to specify the static string “;jsessionid=” in lower case letters.
"
I have turned this "LO_PROXY" object around and around and around... trying to find a solution... a method...anything that would let me rewrite the URL, but nothing...
I have also tried to use ce CL_HTTP_CLIENT class and to create myself the client and the URL and the host and everything manually... but in this case how do I end up in calling a specific "custom" method -> for instance... how do I call the "LOGIN"... or the LOGOUT...where do I put the parameters, etc?
Do you have any suggestions / ideas / hints ?
Thanks a lot in advance!
Warm regards,
Alex