Skip navigation links
SAP NetWeaver 7.50 SP 13 KMC

Package com.sapportals.wcm.protocol.ice.protocol

ICE protocol helper.

See: Description

Package com.sapportals.wcm.protocol.ice.protocol Description

ICE protocol helper.

Package Specification

Purpose

This package is a collection of helper classes that make the assembly and dissembly of and ICE package (resp. an ICE payload) easiery. The ICE server implementation as well as any ICE client should use the functionality of this package.

Usage (Example)

The following code example should be used to process an ICE payload:

  ICEOutput output = new ICEOutput(<OutputStream that received the ICE responses>);
  
  output.setSender(<An ICESender containing the sender informations>);
  
  ICEInput input = new ICEInput(<InputStream of the ICE payload>, output);
  
  input.setSynRequestHandler(<An implementation of IICESynRequestHandler>); // optional
  input.setSubRequestHandler(<An implementation of IICESubRequestHandler>); // optional
  input.setComRequestHandler(<An implementation of IICEComRequestHandler>); // optional
  input.setResponseHandler(<An implementation of IICEResponseHandler>); // optional
  
  input.handle(); // start the processing

Implementation notes (Disassembly)

Since ICE payloads could be quite big chunks of XML-data the processing is completly handler-/event-based. Inside the ICEInput an incomming payload is parsed with a SAX parser, the SAX events are then maped onto the difference ICE events that are defined in the handler package.

To speed up the processing of (probably very large) chunks of base-64 data in an incoming ICE payload is prepared by an XML preparser before transfered to the real SAX parser. So the usual processing chain looks like this:

                              ICE payload
                                   |
                                   |  Raw data stream
                                   V
                             XML preparser
                                   |
                                   | Preparsed XML stream with processing instructions
                                   V
                             SAX parser (created with the javax.xml.parsers.SAXParserFactory)
                                   |
                                   | SAX events
                                   V
                               ICEInput
                                   |
                                   | ICE events
      +---------------------+------+-----------------+------------------------+
      |                     |                        |                        |
      V                     V                        V                        V
   IICESynRequestHandler  IICESubRequestHandler   IICEComRequestHandler    IICEResponseHandler

The XML preparser enables an implementation of the different handler interface to bypass this processing chain and obtain an InputStream on the raw data of the payload (this is especially useful when handling ICE items with large chunks of base64 data).

References

ICE 1.1 Specification
Skip navigation links
SAP NetWeaver 7.50 SP 13 KMC

Copyright 2018 SAP AG Complete Copyright Notice