cancel
Showing results for 
Search instead for 
Did you mean: 

How Web Services support transactions ?

Former Member
0 Kudos

Hello,

I have this questions:

- Web services support statefull?

- There is some specification about 2PhaseCommit for Web Services?

- How Web services handle transactions (commit, rollback)?

- How can I handle commit across multiple systems (using web services)?

There are standards that support this topics?

Best regards,

Luis Carlos

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Web service is based on HTTP protocol which is stateless. Once you send the request and get back response, the connection is terminated, no state is maintained..

Piyush

Oliver_S
Product and Topic Expert
Product and Topic Expert
0 Kudos

Yes and no. <a href="http://www.w3.org/Protocols/rfc2109/rfc2109.txt">rfc2109</a> . This means that cookies provide a kind of session and therefore state, which can be hold on server side.

SAP ABAP ERP holds session:

<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/b7/d7baaf1481a349ab723e3acd7334b3/frameset.htm">Providing and Consuming Web Services</a>

"WSDLs - There are two kinds of WSDLs – Standard and SAP WSDL. The standard WSDL is provided for those users who will use tools from other vendors to create clients. For SAP users, there is an extended SAP WSDL. This is an extended version of WSDL and can be parsed using SAP tools (SAP Proxy Generator), thus providing information about additional Web service requirements such as authentication, session, and so on."

for me is also the technical implementation - how is the webservice session managed on server and on client - not totally clear. If someone can help me to find exaxct technical details. Unfortenately I also always used it (esp. with Web Dynpro) without thinking about details.

Former Member
0 Kudos

Hi Oliver,

I am new To SAP and previously I was working On J2EE technology on Web-Services and EJBs.

I have seen cookie mechanism but only for JSP/servlets for handing WEB Based GUI requests.

I haven't seen it being used for WEB Services.

I went through your sdn link and here I saw some methodology for using sessions.

But how these are maintained and used , I haven't used them. Even In EJBs you can expose them to Web Services but only stateless session beans and not sateful session beans .( And in reason it is clearly mentioned that HTTP protocol doesn't support sessions as it is a stateless protocol.)

If you get some Info abt sessions for web services, please do provide .

Regards,

Piyush

Former Member
0 Kudos

Hi Oliver

One more thing , which is clearly mentioned iy your reference CAF link is that web services doesn't support transactions.

Then wat is the use of maintaining sessions wid web services?

Regards,

Piyush

Oliver_S
Product and Topic Expert
Product and Topic Expert
0 Kudos

If I have some spare time I come back on this more detailled.

In meantime - the webservice itself is stateless as a jsp-response is. If the request is answered, the protocoll doesnt know anymore about the user and session.

But the backend can hold/remember the session, as it can with servlets the ABAP server can if you call via WS a SAP backend transaction. I think in principle this isnt much different from holding a session in servlets.

In ABAP its called "roll area", means that SAP BAPIs and SAP enterprise SOA webservices are calledin "update task", means in standard without "commit" and possible to "rollback".

In the next WS call u decide to commit or rollback for the same user (or sessions?) wit SAP WS commit or rollback.

Currently this is not in WS standards, because it exists so only in SAP backend systems. Probably its our task to drive this standard.

Oliver_S
Product and Topic Expert
Product and Topic Expert
0 Kudos

Good question. In standard webservices are stateless.

However, this does not necessarily mean, that the via WS called enterprise services are also stateless.

Good starter about stateful webservices at SAP:

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/0d/2eac5a56d7e345853fe9c935954ff1/frameset.htm">SAP webservice</a>

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/44/0610a2f48a5922e10000000a155369/frameset.htm">CAF</a>

[url=http://help.sap.com/saphelp_nw2004s/helpdata/en/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm]BAPI[/url]