Aspects of the Migration Process

Use

This document provides information about migrating Web service provisioning artifacts created in SAP NetWeaver 7.0.x and earlier to Java API for XML Web Services (JAX-WS). JAX-WS is supported in newer SAP NetWeaver releases. Migration in this context means replacing the Web service programming model without changing the architecture or implementing again the business logic of the application.

When migrating Web services you should consider the following:

  • One possible reason to migrate a Web service is to take advantage of the enhanced capabilities offered by newer Web service frameworks.

  • It is also important that the Web service interface (WSDL) should remain unchanged after the migration, in this way ensuring that existing clients of the Web service remain operational.

Migration Aspects

JAX-WS is the successor of the Web service programming model in SAP NetWeaver 7.0.x and earlier releases - JAX-RPC - so no application features would be lost when switching a Web service application to JAX-WS. The following aspects require consideration prior to the migration:

  • Support for RPC-encoded WSDL binding style is discontinued in JAX-WS.

    Web services in SAP NetWeaver 7.0.x and earlier releases expose simultaneously the following WSDL styles: document, RPC, RPC-encoded.

  • The WSDL binding style in JAX-WS is configured at design time and cannot be changed at runtime.

    As opposed to JAX-RPC Web services in SAP NetWeaver 7.0.x and earlier releases, JAX-WS Web services can have only one WSDL style specified at design time by the @javax.jws.soap.SOAPBinding annotation. For outside-in Web services, the style in the @SOAPBinding annotation must be identical to the style of the WSDL used for Web services generation. This text assumes one SAP NetWeaver 7.0.x (and earlier releases) WSDL style is being migrated to JAX-WS.

    JAX-WS Web services can have either document style or RPC style WSDL. In rare cases, it might be necessary to expose both the document and RPC WSDLs (SAP NetWeaver 7.0x and earlier releases) with JAX-WS. For outside-in Web services, changing the WSDL style in the @SOAPBinding annotation in the generated service endpoint interface would have no effect, because the style of the exposed JAX-WS WSDL would be the same as the style of the WSDL in SAP NetWeaver 7.0.x (and earlier releases) used for the Web service generation. For example, if the JAX-WS Web service was generated out of document-style WSDL (SAP NetWeaver 7.0x and earlier releases), it cannot be configured to have RPC-style WSDL. In this example, to migrate the older RPC WSDL to JAX-WS, another Web service must be generated either in a different application or in the same package, but preferably in a different one.

  • The Web service artifacts generated with JAX-WS are different from the JAX-RPC artifacts in SAP NetWeaver 7.0.x and earlier releases. Parts of the application might need to be changed.

Changes

In addition, the following changes will occur after the migration:

Change

Example for SAP NetWeaver 7.0x and earlier releases

Example for newer releases

The URL of the WSDL is different

http://[host]:[port]/GRMGWSTest/service?wsdl&style=document

http://[host]:[port]/GRMGWSTest/GRMGWSTestBeanVIDocumentImplBean?wsdl

The URL of the Web service endpoint is different.

http://[host]:[port]/GRMGWSTest/service?&style=document

http://[host]:[port]/GRMGWSTest/GRMGWSTestBeanVIDocumentImplBean

Preserving the Web Service Interface

The major concern with migration is to preserve the Web service interface unchanged. In SAP NetWeaver 7.0.x and earlier releases the only Web service modeling approach was inside-out, where plain Java classes or EJBs were supplemented with WSD and VI descriptors to make their functionality available to the Web. However, exposing the same implementation class with JAX-WS would not result in the same Web service interface due to differences in the type mapping frameworks. SAP NetWeaver 7.0.x and earlier releases employ JAX-RPC for mapping between XML schema and Java, whereas the mapping framework for JAX-WS in newer releases is JAXB.