Quantcast
Channel: SCN : Discussion List - SAP NetWeaver Technology Platform
Viewing all articles
Browse latest Browse all 1520

Close session related to ABAP stateful web service

$
0
0

Web
Services
we are using toinsert datain SAPare
stateful. The reasonis thatwe have to performa distributed transactionin which theclientdecideswhen to
commit.SAP WebAS
allows you to assignservicesthe property to bestatefuland exposethe methodscommit
/ rollbackthatthe
client can use
at the appropriate time. This obviouslyimplies creating
sessions on the WebServerSAPand as consequenceallocated
memory
. We observedthat the
session
hasanexpiration timethan equalto the value setforall
types of
sessionofSAPandtherefore equal
to
about 35 minutes.

 

 

Thiscircumstance does notgo very wellbecause itdoes not allowthe applicationto scale, in fact the memory allocation, due to multiplecalls, may run the server out of memory.

Fortunatelyexits alreadyaSAPLibrarythatprovides APIsto
close
open sessions

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

 

 

We usedthese APIsand the session isactuallyclosed andalso
the transactionis successful. The strange thingis thatsimultaneouslyan exceptionis thrownwith a "dump" on the server thatwe 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:Envelopexmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

 

 

  <soap:Body>

 

 

    <soap:Fault>

 

 

      <faultcode> soap:Server </faultcode>

 

 

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

 

 

      <detail>

 

 

        <sap:Rabaxxmlns: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>

 

 

 

 

 

TheClientinstead(Java
application):

sessionInterfacecannot beresolved

com.sap.engine.services.webservices.espbase.client.bindings.exceptions.TransportBindingException:
Clientprotocolhas
thrownanexception.
Protocolname is[Unknown].
Seenestedexception
for details.

 

 

 

 

 

I did severaltestswith more than oneWeb Serviceand environments: bothSAPNetWeaver
Developer Studio(NWDS) andEclipse importingproxies
generated byNWDSbutI get the sameresult
(
successful transaction, closed sessionbutexceptionand
dumpon the server).



Of courseI triedthe suggestionofSAP
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:Envelopexmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">

 

 

       <soap-env:Header>

 

 

            
<
n0:Sessionxmlns: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 notas
trivialas it soundsbecause itis not enoughto send theshort messagebecauseyou have to putthe session cookieandthe
user /passwordin
the header
of theHTTP post
that holds the messageand send it
by openinga socket on theURL of theservice. However
I have
written a programin Eclipsewho writes thecorrecthttpPOST.
The errorgeneratedis identicalto the previous case.

Reading thedump fileI realized thatSAPreceives
this message
when callingSOAP
library APIsmentioned above.So in practicelast experimentI did nothingbut writethe codeimplemented bytheAPIor at least
an equivalent codeso do notbe surprisedthat generatesthe same error.

 

 

 

 

 

Any ideas onhow to solve theproblem?

 

 

 


Viewing all articles
Browse latest Browse all 1520

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>