Skip to Content
avatar image
Former Member

Close session related to ABAP stateful web service

Web
Services we are using to insert data in SAP are
stateful. The reason is that we have to perform a distributed transaction in which the client decides when to
commit. SAP Web AS
allows you to assign services the property to be stateful and expose the methods commit
/ rollback that the
client can use at the appropriate time. This obviously implies creating
sessions on the Web Server SAP and as consequence allocated
memory. We observed that the
session has an expiration time than equal to the value set for all
types of session of SAP and therefore equal
to about 35 minutes.

This circumstance does not go very well because it does not allow the application to scale, in fact the memory allocation, due to multiple calls, may run the server out of memory.

Fortunately exits already a SAP Library that provides APIs to
close open sessions

(http://help.sap.com/saphelp_nwesrce/helpdata/en/43/d717284094087ae10000000a1553f6/content.htm).

We used these APIs and the session is actually closed and also
the transaction is successful. The strange thing is that simultaneously an exception is thrown with a "dump" on the server that we do not understand.

Server error message :

"UNCAUGHT_EXCEPTION"
"CX_SOAP_CORE"   |  
"CL_SOAP_RUNTIME_SERVER========CP" or
"CL_SOAP_RUNTIME_SERVER========CM00D"  
|    "FINALIZE_TX"

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <soap:Fault>

      <faultcode> soap:Server </faultcode>

      <faultstring xml:lang="en"> RABAX occurred on server side </faultstring>

      <detail>

        <sap:Rabax xmlns:sap="http://www.sap.com/webas/710/soap/runtime/abap/fault/generic">

          <MESSAGE>Error when calling SOAP Runtime
functions: SRT: ASSERT failed: field values are not
equal                                                                                                 
                                                                                                         </MESSAGE>

          <SYMSGID></SYMSGID>

          <SYMSGTY></SYMSGTY>

          <SYMSGNO></SYMSGNO>

          <SYMSGV1></SYMSGV1>

          <SYMSGV2></SYMSGV2>

          <SYMSGV3></SYMSGV3>

          <SYMSGV4></SYMSGV4>

          <SYREPID>CL_SOAP_RUNTIME_SERVER========CP</SYREPID>

          <SYTCODE>                  
</SYTCODE>

          <SYDYNNR>0010</SYDYNNR>

          <SYUNAME>SMARCHI</SYUNAME>

          <SYMANDT>500</SYMANDT>

          <SYLANGU>E</SYLANGU>

          <SYECODE>558</SYECODE>

          <SYHOST>erpdev01</SYHOST>

          <SYSYSID>D01</SYSYSID>

          <SYOPSYS>AIX</SYOPSYS>

          <SYDBSYS>ORACLE</SYDBSYS>

          <SYSAPRL>701</SYSAPRL>

          <SYXPROG>SAPLBPFC</SYXPROG>

          <SYXFORM>GET_PARAMETER</SYXFORM>

          <SYDATUM>20130510</SYDATUM>

          <SYUZEIT>145921</SYUZEIT>

          <SYETEXT>RABAX_STATE</SYETEXT>

          <ERRORCODE>UNCAUGHT_EXCEPTION</ERRORCODE>

          <PATHTRANS>/sap/bc/srt/rfc/sap/zhr_ws4/500/zhr_ws4/zhr_ws4</PATHTRANS>

          <MESSAGE>Error when calling SOAP Runtime
functions: SRT: ASSERT failed: field values are not
equal                                                                
                                                                                                                                          </MESSAGE>

          <ERRORCODE>UNCAUGHT_EXCEPTION</ERRORCODE>

        </sap:Rabax>

      </detail>

    </soap:Fault>

  </soap:Body>

</soap:Envelope>

The Client instead (Java
application):

sessionInterface cannot be resolved

com.sap.engine.services.webservices.espbase.client.bindings.exceptions.TransportBindingException:
Client protocol has
thrown an exception.
Protocol name is [Unknown].
See nested exception
for details.

I did several tests with more than one Web Service and environments: both SAP NetWeaver
Developer Studio (NWDS) and Eclipse importing proxies
generated by NWDS but I get the same result
(successful transaction, closed session but exception and
dump on the server).



Of course I tried the suggestion of SAP
support that says (exact words):

The standard SAP solution to
terminate the session is to send a

technical Web Service message with the following content:

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">

       <soap-env:Header>

            
<n0:Session xmlns:n0="http://www.sap.com/webas/630/soap/features/session/">

                   
<enableSession>false</enableSession>

            
</n0:Session>

       </soap-env:Header>

       <soap-env:Body/>

</soap-env:Envelope>

It is not as
trivial as it sounds because it is not enough to send the short message because you have to put the session cookie and the
user / password in
the header of the HTTP post
that holds the message and send it
by opening a socket on the URL of the service. However
I have written a program in Eclipse who writes the correct http POST.
The error generated is identical to the previous case.

Reading the dump file I realized that SAP receives
this message when calling SOAP
library APIs mentioned above. So in practice last experiment I did nothing but write the code implemented by the API or at least
an equivalent code so do not be surprised that generates the same error.

Any ideas on how to solve the problem?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 26, 2014 at 03:23 PM

    Hi Giuseppe,


    Have you resolved your problems? We have the similar errors when we are using the NW 7.3 webservice calls, but we don't know how to identify the root cause and resolve it.


    Thanks a lot if you can share something to me.


    Best regards,

    Leon

    Add comment
    10|10000 characters needed characters exceeded