Skip to Content
If you have been working with Web Dynpro Java for a while, you will know that the “old” Web Service Model in Web Dynpro has been replaced by a new one, called “Adaptive Web Service Model”. If you have ever used the Web Service Model in a productive environment, I’m sure you were glad to here about the Adaptive Web Service Model and its improvements.

But if you are new to Web Dynpro or you are hesitating to migrate to the Adaptive Web Service Model, because you don’t want to touch your running system, you definitely should read on… 

There are many advantages to the Adaptive Web Service Model, but what I really want to point out are the following improvements:

Logical Destinations

http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f07de95b-d81c-2a10-3daf-96172e846d00

logical destinations

As you can see in the picture above, it’s now up to an administrator to maintain the destinations. You don’t have to change your code each time your application moves to another server and you don’t have to adapt the destination. You just maintain the destination once and you’re done. Your application is configurable. This includes not only the destinations but also global configuration settings e. g. proxy settings.  

What does that mean? This means if you want your application to be used in a productive environment, take the Adaptive Web Service Model.

Working with Authenticated Users
  • Do you want to use non-SAP SSO tickets?
  • Do you want to work with web services that require authentication? 

The Web Service Model cannot fulfill these requirements. What does that mean? This means if you want your application to be used in a secure environment, use the Adaptive Web Service Model.

Error Tracing

You want to track the communication between client and server? Use this code and find the errors:

Request_NumberToWords requestMO = wdContext.currentRequest_NumberToWordsElement().modelObject();
if (logger.beDebug()) { 
  requestMO.wdSetInvocationLogEnabled(true);
}
try {
  requestMO.execute();
  wdContext.nodeResponse().invalidate(); //update context from model
} catch(Exception ce) {
    wdComponentAPI.getMessageManager().reportException(ce.getMessage(), false);
}
logger.debugT(requestMO.wdGetRequestLog()); //request log (header + SOAP request)
logger.debugT(requestMO.wdGetResponseLog()); //response log (header + SOAP response)
logger.debugT(requestMO.associatedModelClassInfo().getModelInfo().toString()); //model metadata in XML format
logger.debugT(requestMO.toString()); //model object tree in XML format

What does this mean? This means if you want to be able to find errors during communication use the Adaptive Web Service Model.

Other Improvements

You are working with nested structures and are bored of binding them manually? You need support for anonymous types? …

You will find a lot of additional reasons to use the Adaptive Web Service Model here:   

Migration Guide: Web Service Model to Adaptive Web Service Model

So finally: Try it out, it’s worth it! 

Additional Information:

Wiki page: FAQ – Models – Adaptive Web Service

NWDI-tutorial using the Adaptive Web Service Model

SDN page Web Dynpro Java: Back-end Access – Model

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply