Currently Being Moderated

image

The previous blogs of this series focused on modeling and defining services using the Enterprise Services Builder which is part of the Enterprise Services Repository toolset. Starting with this blog we will show you in the following three blogs how the design time WSDL created during this process may be implemented using different technologies: JEE, .NET and ABAP.

This blog will show you the detailed steps of how to implement the Read Sales Order service using JEE technology on SAP NetWeaver Composition Environment 7.1 EhP 1. The development toolset is provided within SAP NetWeaver Developer Studio.

So continue on your PdES journey and have a look at the screencam:

 

image

 

The detailed storyboard is outlined in the following:

 

Steps in SAP NetWeaver Developer Studio:

 

  • Configure the connection to the Enterprise Services Repository
  • Configure the connection to the SAP NetWeaver Composition Environment 7.1 EhP 1 server
  • Configure web services runtime
  • Create a JEE project
  • Create an EJB project
  • Import WSDL from Enterprise Services Repository into EJB project
  • Generate Java Skeleton for imported WSDL
  • Implement Java Skeleton
  • Build and Deploy JEE application

Steps in SAP NetWeaver Administrator:

 

  • Configure web service endpoint
  • Test web service using Web Services Navigator

 

For more details on providing stateless web services see SAP Help Portal. Navigate to Providing, Discovering and Consuming Services -> Providing Web Services -> Providing Web Services in Java Applications -> Providing Stateless Web Services 

 

Below you find the sample code used in the service implementation implementing the skeleton method readSalesOrder(...):

 

//Creating a sample Sales Order structure:
SalesOrderByIDResponseMessageSync out_MDT = new SalesOrderByIDResponseMessageSync();

SlsOrdByIDRespMsgSyncSlsOrd out_MDT_SlsOrd = new SlsOrdByIDRespMsgSyncSlsOrd();
out_MDT_SlsOrd.setID(salesOrderByIDQuery_sync.getSalesOrderSelectionByID().getID());

XMLGregorianCalendar calendar = new XMLGregorianCalendarImpl(new GregorianCalendar());
out_MDT_SlsOrd.setDate(calendar);

List out_MDT_item= new ArrayList();
SlsOrdByIDRespMsgSyncSlsOrdItm item = new SlsOrdByIDRespMsgSyncSlsOrdItm();
item.setID("10");
out_MDT_item.add(item);
out_MDT_SlsOrd.item = out_MDT_item;

out_MDT.setSalesOrder(out_MDT_SlsOrd);

//Create a log element reflecting successful processing:
//[For documentation see SAP GDT catalog in PDF version on sdn.sap.com]
NOSCLog log = new NOSCLog();

log.setBusinessDocumentProcessingResultCode("3");
log.setMaximumLogItemSeverityCode("1");

List logItemList = new ArrayList();

NOSCLogItem logItem = new NOSCLogItem();
logItem.setSeverityCode("1");
logItem.setNote("Read operation for sales order was successful.");
logItemList.add(logItem);
log.item = logItemList;

out_MDT.setLog(log);

return out_MDT;

 

The correct usage of the Log data type for non-technical error reporting is described in the corresponding section in the SAP Global Data Type catalog in PDF format.

 

Ride in the tube of SOA and learn how to deliver your services based on SAP's modeling and definition methodology. Stay tuned for more information and move on in your PdES journey with the next blog on "Implementing Services in .NET".

In the following the links to all other blogs from the PdES Architecture Series (Not all blogs are published yet):

  1. SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Service - Introduction (Part 1)
  2. SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Service - Outlining the ‘way to deliver' services (Part 2)
  3. SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Service - Modeling Services (Part 3)
  4. SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Services - Defining services (Part 4)
  5. SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Services - Leveraging a wizard to automate Service Creation (Part 5)
  6. Implementing Services in Java (This Blog)
  7. SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Services - Implementing Services in .NET (Part 7 - provided by Nakisa)
  8. SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Services - Implementing services in ABAP (Part 8)
  9. SAP Co-Innovation Lab Architecture Series: Custom Development delivered Custom Enterprise Services (Part 9)
  10. SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Services - Summary (Final Part)

Comments

Actions

Filter Blog

By author: By date:
By tag: