You are on page 1of 29

Reference Implementation User Guide

<<Document subtitle if needed / desired>>

Release <<#.#>>
<<Document Number>> <<Version Number>>

Month, Year

TM Forum <<year>>

<Document Title>

Notice
No recipient of this document and code shall in any way interpret this material as representing a position or agreement of TM Forum or its members. This material is draft working material of TM Forum and is provided solely for comments and evaluation. It is not Forum Approved and is solely circulated for the purposes of assisting TM Forum in the preparation of final material in furtherance of the aims and mission of TM Forum. Although it is copyrighted material of TM Forum: Members of TM Forum are only granted the limited copyright waiver to distribute this material within their companies and may not make paper or electronic copies for distribution outside of their companies. Non-members of the TM Forum are not permitted to make copies (paper or electronic) of this draft material other than for their internal use for the sole purpose of making comments thereon directly to TM Forum. If this material forms part of a supply of information in support of an Industry Group Liaison relationship, the document may only be used as part of the work identified in the Liaison and may not be used or further distributed for any other purposes

Any use of this material by the recipient, other than as set forth specifically herein, is at its own risk, and under no circumstances will TM Forum be liable for direct or indirect damages or any costs or losses resulting from the use of this material by the recipient. This material is governed, and all recipients shall be bound, by all of the terms and conditions of the Intellectual Property Rights Policy of the TM Forum (http://www.tmforum.org/Bylaws/1094/home.html) and may involve a claim of patent rights by one or more TM Forum members or by non-members of TM Forum. Direct inquiries to the TM Forum office: 240 Headquarters Plaza, East Tower 10th Floor, Morristown, NJ 07960 USA Tel No. +1 973 944 5100 Fax No. +1 973 944 5110 TM Forum Web Page: www.tmforum.org

<Version #>

TM Forum <year>

Page 2 of 29

<Document Title>

Table of Contents
Notice ..................................................................................................................................................................2 Table of Contents ..............................................................................................................................................3 List of Figures ....................................................................................................................................................4 List of Tables ......................................................................................................................................................4 Executive Summary ..........................................................................................................................................5 1. RI User Guide .................................................................................................................................................6 1.1. Installing JOSIF Tooling...................................................................................................................6 1.2. Building the Model project ...............................................................................................................6 1.3. Looking at the Generated Code ......................................................................................................6 1.3.1. Subsection 1.............................................................................................................................6 1.3.2. Subsection 2.............................................................................................................................6 1.4. Creating your RI Project ................................................................................................................6 1.5. Compiling your RI Project .............................................................................................................7 1.6. Using the Default Mockup Operation Implementations ................................................................7 1.7. Adding your Operation Implementations ........................................................................................7 1.8. Testing your Operation Implementations .......................................................................................7 1.9. Using the Hibernate Persistency Service .......................................................................................7 1.10. Running your RI Project .............................................................................................................8 1.11. Running the TIP WS Notification Service .....................................................................................8 1.12. Testing the TIP WS Notification Service.......................................................................................9 1.13. Adding and Injecting Events to the WS Notification Service .................................................... 12 1.14. Testing Events ............................................................................................................................ 12 1.15. Implementing Iterators ................................................................................................................ 12 1.16. Testing Iterators .......................................................................................................................... 22 1.17. Configuring Heartbeat Events .................................................................................................... 24 1.18. Testing your Implementation ...................................................................................................... 25 1.19. Packaging and distributing the RI Project .............................................................................. 25 2. Summary and Open Issues....................................................................................................................... 26 2.1. Summary ....................................................................................................................................... 26 2.2. Open Issues .................................................................................................................................. 26 3. Appendix A: Terms and Abbreviations Used within this Document ................................................. 27 3.1. Terminology................................................................................................................................... 27 3.2. Abbreviations and Acronyms ....................................................................................................... 27 4. Appendix B: References............................................................................................................................ 28 4.1. References .................................................................................................................................... 28 4.2. Document History ......................................................................................................................... 28 4.2.1. Version History ...................................................................................................................... 28 4.2.2. Release History ..................................................................................................................... 28 4.3. Company Contact Details............................................................................................................. 28 4.4. Acknowledgments......................................................................................................................... 29

<Version #>

TM Forum <year>

Page 3 of 29

<Document Title>

List of Figures
Insert if applicable

List of Tables
Table 1: <<Name>> IIS Term Definitions and Sources Table 2: <<Name>> IIS Abbreviations and Acronyms 27 27

<Version #>

TM Forum <year>

Page 4 of 29

<Document Title>

Executive Summary
[Insert here an executive summary of the document covering not more than two pages of text. This should summarize the main points from the document and highlight the problem statement being addressed, the main results, the conclusions drawn and the next steps as appropriate. The purpose of the Executive Summary is to prepare the reader at an initial glance for what to expect in the document.]

<Version #>

TM Forum <year>

Page 5 of 29

<Document Title>

1. RI User Guide
<< Explain the scope of the user guide Explain that we will be using the RAM Simple Alarm Retrieval as an example. .>>

1.1.

Installing JOSIF Tooling

<<Describe the steps required to install the JOSIF tooling . You can copy the installation instructions from the Wiki Page. We will consolidate later. >>

1.2.

Building the Model project

<<Describe how to build an existing or new project. Assume an existing project is available and use RAM as an example. Explain how to enable the code generation of the RI projects.>>

1.3.

Looking at the Generated Code

<<Describe where to look for the generated code Examples can be found in the RAM build. Look at the generated CTK tests >>

1.3.1. Subsection 1

1.3.2. Subsection 2

1.4.

Creating your RI Project

<<Describe how to create the RI project. We need to create a new project and copy the code to it. Check with Craig to see what is the status on this. For the moment we will use the WIKI pages instructions..>>

<Version #>

TM Forum <year>

Page 6 of 29

<Document Title>

1.5.

Compiling your RI Project

<<Explain how to compile the RI project and check sanity>>

1.6.

Using the Default Mockup Operation Implementations

<<Describe the default mockup operations and how they can be used as a starting point. Describe the execution engine plugin and the Spring configuration>>

1.7.

Adding your Operation Implementations

<<Describe how to add override operation implementations. Explain the Spring wiring of the new operation implementations. Provide an example. >>

1.8.

Testing your Operation Implementations

<<Describe how to test the RI implementation via SOPA UI or generated CTK tests>>

1.9.

Using the Hibernate Persistency Service

<<Describe how to use the generated DAO Entities and add Persistency to your RI>>

<Version #>

TM Forum <year>

Page 7 of 29

<Document Title>

1.10. Running your RI Project


<<Describe how to configure and run the RI. Run jetty Look at the RI Services from Web page>>

1.11. Running the TIP WS Notification Service


<<Describe how to configure and run the WS-Notification Service.>> The RI comes with an implementation of the Web Service Notification called the TIP Web Service Notification or simply TIP WSN. The TIP WSN exposes 4 Web Services: Notification Producer Pausable Subscription Manager Notification Consumer Sinkconsumer

When implementing a TIP interface you need to bind the TIP WSN to your implementation. This done via configuration by providing the following properties; -Topic Name the name of the Topic your support -The URL where the Notification Producer, Pausable Subscription Manager, Notification Consumer and SinkConsumer will run. The SinkConsumer is used by your implementation to inject events in the WSN. To run the Service go into the WS-Notification directory and type jetty:run-war. You should be able to see the WSN Services under http://localhost:9090/RI/services

<Version #>

TM Forum <year>

Page 8 of 29

<Document Title>

1.12. Testing the TIP WS Notification Service


<<Describe how to use the SOAP UI and Client test code to test WS-Notification.>> The following section describe how to use SOAP UI to test the WS Notification Service.

1.12.1. Create a Consumer Mockup Service


From within SOAP UI create a Consumer Mockup Service. You will use this Service to receive Events from the TIP WSN Create a New Project and import the the WSN Consumer Service WSDL For example http://localhost:9090/RI/services/TIPNotificationService/NotificationConsumerService ?wsdl

<Version #>

TM Forum <year>

Page 9 of 29

<Document Title>

Then run the MockConsumerService and check it is running properly. Open a browser on the Web Service name you specified and make sure you can display the WSDL for example at http://pierre-pc:8088/mockTipConsumerService?WSDL From now on we will use the mockconsumerService URL to subscribe for events .

1.12.2. Subscribe for Events


To Subscribe for Events you must send a Subscription request to the NotificationPoducer. Create a New Project using the NotificationProducer WSDL. Send the subscribe request to the Notification Producer URL for example http://localhost:9090/RI/services/TIPNotificationService/NotificationProducerService and use the mockup consumer as the consumer address for example http://pierre-pc:8088/mockTipConsumerService?WSDL

<Version #>

TM Forum <year>

Page 10 of 29

<Document Title>

You should see a response like the following:

The response contains the subscriptionId.

<Version #>

TM Forum <year>

Page 11 of 29

<Document Title>

1.13. Adding and Injecting Events to the WS Notification Service


<<Describe how to inject events to WS Notification. Walkthrough of Event Adapter and JVTEventTransformer>> The RI Framework provides a set of classes than you can use to inject events into WSN. The classes are:

WSNotificationServiceEventPublisher JVTNotificationAdapter JVTEventTransformer

1.14. Testing Events


<<Describe how to use the SOAP UI and Client test code to test eventing.>>

1.15. Implementing Iterators


<<Describe how to use the Query Framework to implement the Iterators.>> The RI comes with an Alarm Retrieval Iterator example. The example provides a sample implementation of the RAM Alarm Retrieval getResourceAlarms operation. The example is located at <<>>

1.15.1. Query Framework


The RI comes with a set of base classes for implementing named queries and in particular the Iterator based queries. The main classes used by org.openoss.tip.iterator package. the Query Framework are found in the

Query
Base Class for Named Query. This object is associated with a named query and contains information about the Query state.

<Version #>

TM Forum <year>

Page 12 of 29

<Document Title>

Subclasses associated with specific types of named queries must be provided. For example QueryRI does provide an implementation of a getAlarms query.

QueryContext
The QueryContext does provide information about the context of a query mainly if the query is completed via the getEndOfSequence() method.

QueryData
The QueryData class represent the results of a Query execution. It does contain methods to extract the data associated with the execution of a Query and its context (see QueryContext

QueryEngine
The engine in charge of executing the application queries. Its main method is executeQuery(query). The Query Engine is an interface that must be implemented by the application. Different Query Engines may be associated with differen Query types or the same Engine may be used for all the named queries. The main methods are o o executeQuery(Query query) a method to execute the Query QueryData getNextQueryData(Query query, int size) extracting the results of the Query.

QueryEngineFactory
A factory for the creation of the Query Engine associated with a type of Query. A single method o QueryEngine makeQueryEngine(String queryType)

Different Query Engines may be associated with different Query types or the same Engine may be used for all the named queries.

QueryManager
The QueryManager class is the core Query Framework class. It is responsible with its associated Query Engine for the execution and management of the queries. The main methods are o o String executeQuery(Query query) returning a Query ID associated with the execution of a Query. Query buildQuery(String queryType) returning a Query object associated with a query type

1.15.2. Using the Query Framework Alarm Retrieval Example


The RI comes with an Alarm Retrieval Iterator example. The example provides a sample implementation of the RAM Alarm Retrieval getResourceAlarms operation.

<Version #>

TM Forum <year>

Page 13 of 29

<Document Title>

The steps involved in using the frameworks are : o o o o the creation of the required Query objects the creation of the QueryEngineFactory the creation of a QueryEngine supporting the execution of the Queries. the wring of the QueryEngineFactory to the QueryManager

The QueryManager uses the QueryEngine implementation for the query execution. The classes used in this Example are the implementations and extensions of the base framework classes mainly:

QueryEngineFactoryRIImpl implements QueryEngineFactory


An Engine factory for the creation of Query Engines associated with the RI query types. The same Engine is used for different query types.

QueryEngineRIImpl implements QueryEngine


Query Engine responsible for the execution of the RI queries and getting the results of the Queries. The main methods are: o o executeQuery(Query query) a method to execute the Query Create an Alarm List of 30 alarms when the Query is executed and store them into the Query entity. QueryData getNextQueryData(Query query, int size) extracting the results of the Query Get Next Batch of Results and removing them for the Query Data Update the endOfSequence associated with the Query Context

QueryRI extends Query


A Query object representing a "getResourceAlarms" query. Stores a set of Resource Alarms

The following illustrates how to use the framework and provides a walk through of the Main class. 1) First we get the QueryManager bean from the Spring context:

ApplicationContext context = new ClassPathXmlApplicationContext("Model_IteratorAppContext.xml"); QueryManager qm=( QueryManager ) context.getBean("queryManager");

2) Then build a Query for the getResourceAlarms query type :

<Version #>

TM Forum <year>

Page 14 of 29

<Document Title>

Query query = null; //Build the Query try { query = qm.buildQuery("getResourceAlarms"); } catch (QueryException e) { // TODO Auto-generated catch block e.printStackTrace(); }

3) Execute the query

String id = null; //Execute the Query try { id = qm.executeQuery(query); } catch (QueryException e) { // TODO Auto-generated catch block e.printStackTrace(); }

This will translate into a call to the RI QueryEngine executing the Query and setting up the Alarms in the associated Query object.

//Create an Alarm List of 30 alarms when the Query is executed //and store them into the Query entity. public void executeQuery(Query query) { // populate Query with list of Alarms org.tmforum.xml.tip.resource.trouble.alarm.ResourceAlarm resourceAlarm = new ResourceAlarm(); ArrayOfResourceAlarm results = new ArrayOfResourceAlarm(); resourceAlarm.setAdditionalText("AdditionalText"); for (int i = 0; i <= 30; i++) results.getItem().add(resourceAlarm); QueryRI qri = (QueryRI) query; qri.setResourceAlarms(results); }

4) Call the QueryManager executeQuery operation to start the execution of the Query

String id = null; //Execute the Query try { id = qm.executeQuery(query); } catch (QueryException e) { // TODO Auto-generated catch block e.printStackTrace();

<Version #>

TM Forum <year>

Page 15 of 29

<Document Title>
}

5) Retrieve the first results of the Query by calling the QueryManager getNextQueryData operation

QueryData qd = null; boolean endOfSequence = false; //Retrieve the Results ArrayOfResourceAlarm results = null; try { qd = qm.getNextQueryData(id, 10); QueryContext qcontext = qd.getQueryContext(); endOfSequence = qd.getQueryContext().getEndOfSequence(); results = (ArrayOfResourceAlarm ) qd.getData(); } catch (QueryException e) { // TODO Auto-generated catch block e.printStackTrace(); } List<ResourceAlarm> resultItems = results.getItem(); ListIterator<ResourceAlarm> iterator = resultItems.listIterator(); while ( iterator.hasNext() ) { ResourceAlarm alarm = iterator.next(); System.out.println("Alarm= " + alarm); }

6) And then extracts the remaining results. Note how the endOfSequence is used to control the iteration

//Check the endOfSequence and Iterate over the next results while( endOfSequence == false ) { try { qd = qm.getNextQueryData(id, 10); } catch (QueryException e) { // TODO Auto-generated catch block e.printStackTrace(); } QueryContext qcontext = qd.getQueryContext(); endOfSequence = qd.getQueryContext().getEndOfSequence(); results = (ArrayOfResourceAlarm ) qd.getData(); resultItems = results.getItem(); iterator = resultItems.listIterator(); while ( iterator.hasNext() ) { ResourceAlarm alarm = iterator.next(); System.out.println("Alarm= " + alarm); } }

<Version #>

TM Forum <year>

Page 16 of 29

<Document Title>

Note that the call to the QueryManager getNextQueryData are delegated to the QueryEngine as follow:
// Get Next Batch of Results and removing them for the Query Data. //Update the endOfSequence associated with the Query Context public QueryData getNextQueryData(Query query, int size) { ArrayOfResourceAlarm results = ((QueryRI) query).getResourceAlarms(); if (results.getItem().size() <= size) { size = results.getItem().size(); query.getQueryContext().setEndOfSequence(true); } else query.getQueryContext().setEndOfSequence(false); Iterator<ResourceAlarm> alarmIterator = results.getItem().iterator(); ArrayOfResourceAlarm returnedResults = new ArrayOfResourceAlarm(); for (int i = 0; i < size; i++) { returnedResults.getItem().add(alarmIterator.next()); alarmIterator.remove(); } QueryData qd = new QueryData(); qd.setQuery(query); qd.setData(returnedResults); if (results.getItem().size() == 0) try { qm.releaseQuery(query.getId()); } catch (QueryException e) { // TODO Auto-generated catch block e.printStackTrace(); } return qd; }

1.15.3. Using the Query Framework with Iterator Web Services


You use the Query Framework when implementing Web Services that are returning Iterators. The steps involved in using the frameworks are : o o o o the creation of the required Query objects the creation of the QueryEngineFactory the creation of a QueryEngine supporting the execution of the Queries. the wring of the QueryEngineFactory to the QueryManager

The association and use of the QueryManager with the Web Service retrieval and iterator implementation classes.

<Version #>

TM Forum <year>

Page 17 of 29

<Document Title>

The following section use the RI sample to illustarate the process.

1.15.4. Web Services Alarm Retrieval Example


You use the Query Framework when implementing Web Services that are returning Iterators. For example the RAM ResourceAlarmRetrievalService Web service provides an operation called org.tmforum.xml.tip.resource.trouble.alarm.GetResourceAlarmsResponse getResourceAlarms( org.tmforum.xml.tip.resource.trouble.alarm.GetResourceAlarmsRequest xmlRequest) This operation returns a response which contains an initial list of alarms and an iterator ID. The Iterator ID is used to retrieve the next results from another Web Service called the ResourceAlarmIterator The ResourceAlarmIterator eposes a method called GetNextResourceAlarmIterationResponse getNextResourceAlarmIteration( GetNextRequest body) That you can use to extract the remaining alarms. When using the Query Framework you: -Associate a QueryManager with your Web Sevices via Spring wiring -Use the initial call to the Retrieval Service to setup a Query , start the execution of the Query and then return the initial results with an Iterator ID being the same than the Query ID. -In the Iterator you lookup the QueryManager for a Query matching the Query ID and then extracts the result by calling getNextQueryData.

The association of the QueryManager with your Web Service implementation classes is done via Spring injection in the associated Spring Configuration files:

<Version #>

TM Forum <year>

Page 18 of 29

<Document Title>

<bean id="resourceAlarmIteratorWsImpl" class="org.openoss.tip.iterator.ri.ResourceAlarmIteratorWsImpl"> <property name="queryManager"> <ref bean="queryManager" /> </property> </bean> <jaxws:endpoint id="resourceAlarmIteratorCXF" implementor="#resourceAlarmIteratorWsImpl" address="/ResourceAlarmIteratorService"> <jaxws:inInterceptors> <ref bean="logInbound" /> </jaxws:inInterceptors> <jaxws:outInterceptors> <ref bean="logOutbound" /> </jaxws:outInterceptors> </jaxws:endpoint> <bean id="queryEngineFactory" class="org.openoss.tip.iterator.QueryEngineFactoryRIImpl"> </bean> <bean id="notificationManager" class="org.openoss.tip.notification.NotificationManager"> </bean> <!-- mapping to consumer bean --> <bean id="queryManager" class="org.openoss.tip.iterator.QueryManager"> <property name="queryEngineFactory"> <ref bean="queryEngineFactory" /> </property> </bean> <!-- apache cxf web service implementation class --> <bean id="resourceAlarmRetrievalServiceWsImpl" class="org.openoss.tip.iterator.ri.ResourceAlarmRetrievalServiceWsImpl"> <property name="log"> <ref bean="tipInterfaceLog" /> </property> <property name="resourceAlarmRetrievalService"> <!-- reference to jvt interface --> <ref bean="resourceAlarmRetrievalServiceRemote" /> </property> <property name="queryManager"> <ref bean="queryManager" /> </property> </bean> <!-- apache cxf web service definition --> <jaxws:endpoint id="resourceAlarmRetrievalServiceCXF" implementor="#resourceAlarmRetrievalServiceWsImpl" address="/ResourceAlarmRetrievalService"> <jaxws:inInterceptors> <ref bean="logInbound" /> </jaxws:inInterceptors> <jaxws:outInterceptors> <ref bean="logOutbound" /> </jaxws:outInterceptors> </jaxws:endpoint>

The following code extract shows how the processing of the initial request in the Web Serviev implementation class. Note how the call is delegated to the QueryManager. Note how the QueryID and the endOfSequence are returned.

<Version #>

TM Forum <year>

Page 19 of 29

<Document Title>
public org.tmforum.xml.tip.resource.trouble.alarm.GetResourceAlarmsResponse getResourceAlarms( org.tmforum.xml.tip.resource.trouble.alarm.GetResourceAlarmsRequest xmlRequest) throws org.tmforum.xml.tip.resource.trouble.alarm.GetResourceAlarmsException_Exception { org.tmforum.tip.org.tmforum.tip.resource.trouble.alarm.ResourceAlarmRetrievalService jvtInterface = getResourceAlarmRetrievalService(); if(jvtInterface==null) { log.error("ERROR: "+this.getClass().getName()+": method getResourceAlarms mapped jvtInterface has not been set"); throw new org.tmforum.xml.tip.resource.trouble.alarm.GetResourceAlarmsException_Exception("ERROR: "+this.getClass().getName()+": method getResourceAlarms mapped jvtInterface has not been set"); } else { try { GetResourceAlarmsResponse getResourceAlarmsResponse = new GetResourceAlarmsResponse(); ResourceAlarmResultWithIterator iterator = new ResourceAlarmResultWithIterator(); QueryManager qm = getQueryManager(); Query query = qm.buildQuery("getResourceAlarms"); String id = qm.executeQuery(query); IteratorInfo iteratorInfo = new IteratorInfo() ; iteratorInfo.setIteratorId(String.valueOf(id)); iterator.setIterator(iteratorInfo); int size = 10; //default if(xmlRequest != null ) if( xmlRequest.getMaxElements() !=null) size = xmlRequest.getMaxElements(); QueryData data = qm.getNextQueryData(id, size); ArrayOfResourceAlarm results = (ArrayOfResourceAlarm ) data.getData(); iterator.setResult(results); QueryContext qcontext = data.getQueryContext(); getResourceAlarmsResponse.setEndOfSequence(qcontext.getEndOfSequence()); getResourceAlarmsResponse.setStartIndex(qcontext.getStartIndex()); getResourceAlarmsResponse.setEndIndex(qcontext.getEndIndex()); getResourceAlarmsResponse.setObjects(iterator); return getResourceAlarmsResponse; } catch (Exception e) { log.error("ERROR: "+this.getClass().getName()+": method getResourceAlarms Exception: ",e); throw new org.tmforum.xml.tip.resource.trouble.alarm.GetResourceAlarmsException_Exception("ERROR: "+this.getClass().getName()+": method getResourceAlarms Exception", e); } } }

<Version #>

TM Forum <year>

Page 20 of 29

<Document Title>

The following code extract shows how the Iterator Web Service implementation class reuse the QueryManager instance to get the next results.
public GetNextResourceAlarmIterationResponse getNextResourceAlarmIteration( GetNextRequest body) throws GetNextResourceAlarmIterationException_Exception { GetNextResourceAlarmIterationResponse resp = new GetNextResourceAlarmIterationResponse(); String id = body.getIteratorId(); int size = body.getMaxElements(); QueryManager qm = getQueryManager(); QueryData qd = null; try { qd = qm.getNextQueryData(id, size); } catch (QueryException e) { // TODO Auto-generated catch block e.printStackTrace(); } ArrayOfResourceAlarm results = (ArrayOfResourceAlarm) qd.getData(); resp.setResult(results); resp.setEndOfSequence(qd.getQueryContext().getEndOfSequence()); return resp; }

Finally how the release iterator call it translated into a QueryManager call.

public ReleaseResponse releaseResourceAlarmIterator(ReleaseRequest body) throws ReleaseResourceAlarmIteratorException_Exception { String id = body.getIteratorId(); QueryManager qm = getQueryManager(); Query query; try { query = qm.qetQuery(id); qm.releaseQuery(id); } catch (QueryException e) { ReleaseResourceAlarmIteratorException_Exception exception = new ReleaseResourceAlarmIteratorException_Exception(); throw exception; } ReleaseResponse resp = new ReleaseResponse(); return resp; }

1.15.5. Implementing your Iterators


The steps involved in using the frameworks are : o the creation of the required Query objects

<Version #>

TM Forum <year>

Page 21 of 29

<Document Title>

o o o

the creation of the QueryEngineFactory the creation of a QueryEngine supporting the execution of the Queries. the wring of the QueryEngineFactory to the QueryManager

The association and use of the QueryManager with the Web Service retrieval and iterator implementation classes.

1.16. Testing Iterators


<<Describe how to test the Iterators using SOAP UI and Client code.>>

1.16.1. Using the Query Framework Alarm Retrieval Example


You can take a look at the org.openoss.tip.iterator.ri.client.Main class for an example client code.

1.16.2. Using the Query Framework Alarm Web Service Retrieval Example

The following are snapshots of the SOAP UI requests and replies running against the RI sample implementation You can also take a look at the org.openoss.tip.iterator.ri.client.Main class for client code.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:alar="http://www.tmforum.org/xml/tip/resource/trouble/alarm" xmlns:iter="http://www.tmforum.org/xml/tip/internal/iterator" xmlns:fil="http://www.tmforum.org/xml/tip/internal/filter" xmlns:prim="http://www.tmforum.org/xml/tip/internal/primitives"> <soapenv:Header/> <soapenv:Body> <alar:getResourceAlarmsRequest> <iter:maxElements>5</iter:maxElements> </alar:getResourceAlarmsRequest> </soapenv:Body> </soapenv:Envelope>

And the response

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<Version #>

TM Forum <year>

Page 22 of 29

<Document Title>
<soap:Body> <ns2:getResourceAlarmsResponse xmlns="http://www.tmforum.org/xml/tip/internal/iterator" xmlns:ns2="http://www.tmforum.org/xml/tip/resource/trouble/alarm" xmlns:ns3="http://www.tmforum.org/xml/tip/internal/filter" xmlns:ns4="http://www.tmforum.org/xml/tip/internal/primitives" xmlns:ns5="http://www.tmforum.org/xml/tip/internal/entity" xmlns:ns6="http://www.tmforum.org/xml/tip/internal/extensibility" xmlns:ns7="http://www.tmforum.org/xml/tip/cbe/root/tip/fmk" xmlns:ns8="http://www.tmforum.org/xml/tip/cbe/problem" xmlns:ns9="http://www.tmforum.org/xml/tip/resource/res/tip/nrb" xmlns:ns10="http://www.tmforum.org/xml/tip/internal/notifications" xmlns:ns11="http://www.tmforum.org/xml/tip/common/notifications" xmlns:ns12="http://www.tmforum.org/xml/tip/internal/exceptions" xmlns:ns13="http://www.tmforum.org/xml/tip/cbe/perf"> <endOfSequence>false</endOfSequence> <ns2:objects> <ns2:result> <ns2:item> <ns2:additionalText>AdditionalText</ns2:additionalText> </ns2:item> <ns2:item> <ns2:additionalText>AdditionalText</ns2:additionalText> </ns2:item> <ns2:item> <ns2:additionalText>AdditionalText</ns2:additionalText> </ns2:item> <ns2:item> <ns2:additionalText>AdditionalText</ns2:additionalText> </ns2:item> <ns2:item> <ns2:additionalText>AdditionalText</ns2:additionalText> </ns2:item> </ns2:result> <ns2:iterator> <endOfSequence>false</endOfSequence> <iteratorId>e25819c1-7948-407a-9ab0-9e649058145a</iteratorId> </ns2:iterator> </ns2:objects> </ns2:getResourceAlarmsResponse> </soap:Body> </soap:Envelope>

Note the <iteratorId>e25819c1-7948-407a-9ab0-9e649058145a</iteratorId> We reuse the same iteratorId to extract the remaining alarms.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:alar="http://www.tmforum.org/xml/tip/resource/trouble/alarm" xmlns:iter="http://www.tmforum.org/xml/tip/internal/iterator"> <soapenv:Header/> <soapenv:Body> <alar:getNextResourceAlarmIterationRequest> <iter:maxElements>5</iter:maxElements> <iter:iteratorId>e25819c1-7948-407a-9ab0-9e649058145a</iter:iteratorId> </alar:getNextResourceAlarmIterationRequest> </soapenv:Body> </soapenv:Envelope>

<Version #>

TM Forum <year>

Page 23 of 29

<Document Title>

A sample of the Iterator response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns4:getNextResourceAlarmIterationResponse xmlns="http://www.tmforum.org/xml/tip/internal/iterator" xmlns:ns2="http://www.tmforum.org/xml/tip/internal/entity" xmlns:ns3="http://www.tmforum.org/xml/tip/internal/extensibility" xmlns:ns4="http://www.tmforum.org/xml/tip/resource/trouble/alarm" xmlns:ns5="http://www.tmforum.org/xml/tip/cbe/root/tip/fmk" xmlns:ns6="http://www.tmforum.org/xml/tip/cbe/problem" xmlns:ns7="http://www.tmforum.org/xml/tip/resource/res/tip/nrb" xmlns:ns8="http://www.tmforum.org/xml/tip/internal/exceptions" xmlns:ns9="http://www.tmforum.org/xml/tip/internal/notifications" xmlns:ns10="http://www.tmforum.org/xml/tip/common/notifications" xmlns:ns11="http://www.tmforum.org/xml/tip/internal/filter" xmlns:ns12="http://www.tmforum.org/xml/tip/internal/primitives" xmlns:ns13="http://www.tmforum.org/xml/tip/cbe/perf"> <endOfSequence>false</endOfSequence> <ns4:result> <ns4:item> <ns4:additionalText>AdditionalText</ns4:additionalText> </ns4:item> <ns4:item> <ns4:additionalText>AdditionalText</ns4:additionalText> </ns4:item> <ns4:item> <ns4:additionalText>AdditionalText</ns4:additionalText> </ns4:item> <ns4:item> <ns4:additionalText>AdditionalText</ns4:additionalText> </ns4:item> <ns4:item> <ns4:additionalText>AdditionalText</ns4:additionalText> . </ns4:item> </ns4:result> </ns4:getNextResourceAlarmIterationResponse> </soap:Body> </soap:Envelope>

1.17. Configuring Heartbeat Events


<<Describe the Heartbeat Events. Describe how to configure the heartbeat period using Spring..>>

<Version #>

TM Forum <year>

Page 24 of 29

<Document Title>

1.18. Testing your Implementation


<<Describe how to test the implementation. SOAP UI and Client Test Code>>

1.19. Packaging and distributing the RI Project


<<Describe how to package and distribute the RI project.>>

<Version #>

TM Forum <year>

Page 25 of 29

<Document Title>

2. Summary and Open Issues


<< Reviews the work of the project and identifies open issues not answered by the project. This section also provides conclusions based on technical lessons learned during the project.>>

2.1.

Summary

<<Brief summary of Business Case work fulfillment of project scope and objectives or notes that the team feels they need to include. >>

2.2.

Open Issues

<<Identify any unresolved issues with next steps and ownership; identify any open issues in regard to the traceability from the business requirements. >>

<Version #>

TM Forum <year>

Page 26 of 29

<Document Title>

3. Appendix A: Terms and Abbreviations Used within this Document


3.1. Terminology
Term <IIS Specific Term 1>> <<IIS Specific Term n>> Definition <<Definition 1>> <<Definition n>> TMF or Outside Source <<Source>> <<Source>>

Table 1: <<Name>> IIS Term Definitions and Sources

3.2.

Abbreviations and Acronyms


Abbreviation/ Acronym Spelled Out <<Expansion of abbreviation/acronym 1>> <<Expansion of abbreviation/acronym n>> Definition <<Definition 1>> TMF or External Source <<Source>>

Abbreviation/ Acronym <<Abbreviation/ Acronym 1>> <<Abbreviation/ Acronym n>>

<<Definition n>>

<<Source>>

Table 2: <<Name>> IIS Abbreviations and Acronyms

<Version #>

TM Forum <year>

Page 27 of 29

<Document Title>

4. Appendix B: References
4.1.
Reference Project Charter

References
Description Brief Use Summary <<PROJECT name>> Project Charter <<summary>>

<<Reference 1>> <<Reference n>>

<<Type, Title, Number, Revision, Date>> << Type, Title, Number, Revision, Date>>

<<summary>> <<summary>>

4.2. Document History


4.2.1. Version History
<This section records the changes between this and the previous document version as it is edited by the team concerned. Note: this is an incremental number which does not have to match the release number>

Version Number <<Version Number >>

Date Modified DD/MMM/YY

Modified by: Pierre Gauthier TM Forum

Description of changes Description e.g. first issue of document

4.2.2. Release History


<This section records the changes between this and the previous Official document release>
Release Number <<Version Number >> Date Modified DD/MMM/YY Modified by: <<name>> Description of changes Description e.g. first issue of document

4.3.

Company Contact Details


Company Team Member

<Version #>

TM Forum <year>

Page 28 of 29

<Document Title>

Representative Include all involved companies adding lines as necessary. Name Title Email Phone Fax Name Title Email Phone Fax

4.4.

Acknowledgments
This document was prepared by the members of the TeleManagement Forum <<team name>> team: Name, Company, Editor Name, Company, position if appropriate (e.g. team leader) Additional input was provided by the following people: Name, Company

<Version #>

TM Forum <year>

Page 29 of 29

You might also like