TIP JOSIF Main Page | Developers Sandbox | cgallen Sandbox
...
CXFMavenMtosi_1.1Alarm_retrieval
Code Block |
---|
svn co https://openoss.svn.sourceforge.net/svnroot/openoss/tip/sandbox/cgallen/experimental/CXFMavenMtosi_1.1Alarm_retrieval/
|
CXFMavenMtosi_1.1Code_gen
Code Block |
---|
svn co https://openoss.svn.sourceforge.net/svnroot/openoss/tip/sandbox/cgallen/experimental/CXFMavenMtosi_1.1Code_gen/
|
...
CXFMavenMtosi_2.0Code_gen
Code Block |
---|
svn co https://openoss.svn.sourceforge.net/svnroot/openoss/tip/sandbox/cgallen/experimental/CXFMavenMtosi_2.0Code_gen/
|
...
Note there was a class path problem with Maven 2.1.x which has now been fixed in the CXFMavenMtosi_2.0Code_gen example. To fix the other examples you should change the order of the dependencies in the pom.xml under the maven-antrun-plugin so that ant is declared first as below. (I have not had time to fix all the examples)
Code Block |
---|
<artifactId>maven-antrun-plugin</artifactId>
etc.
<dependencies>
<!-- Note Ant dependency MUST be declared before ant-contrib -->
<!-- since ant-contrib pom pulls Ant 1.5 into classpath -->
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b2</version>
</dependency>
|
2. Check out the example into an Eclipse workspace
Code Block |
---|
svn co https://openoss.svn.sourceforge.net/svnroot/openoss/tip/sandbox/cgallen/experimental/CXFMavenMtosi_2.0Code_gen/
|
3. Run Maven to compile the code and run the simple tests. This will download all the dependencies and run the example.
Code Block |
---|
mvn install
|
If all works, the install script will run the tests which will provide this sort of output:
Code Block |
---|
INFO: Started SelectChannelConnector@0.0.0.0:9091
INFO - TEST: ServerClientTest Server ready...
INFO - TEST: ServerClientTest testing client
INFO - TEST: URL wsdl = http://localhost:9091/mtosi/v2/AlarmRetrieval?wsdl
03-Aug-2009 10:12:28 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
INFO: Creating Service {http://www.tmforum.org/mtop/rtm/wsdl/ar/v1-0}AlarmRetrievalHttp from WSDL: http://localhost:9091/mtosi/v2/AlarmRetrieval?wsdl
Invoking getActiveAlarmsCountAsync using polling.
waiting for operation response...
waiting for operation response...
getActiveAlarmsCount() called.
03-Aug-2009 10:12:29 org.openoss.mtosi.experimental.alarm_retrieval.server.AlarmRetrievalImpl getActiveAlarmsCount
INFO: Executing operation getActiveAlarmsCount
waiting for operation response...
Active Alarms Count: 3
Invoking getActiveAlarmsAsync using callback.
waiting for handler to receive response...
03-Aug-2009 10:12:29 org.openoss.mtosi.experimental.alarm_retrieval.server.AlarmRetrievalImpl getActiveAlarms
INFO: Executing operation getActiveAlarms
getActiveAlarms() called.
03-Aug-2009 10:12:29 org.openoss.mtosi.experimental.alarm_retrieval.server.AlarmRetrievalImpl getActiveAlarms
INFO: Executing operation getActiveAlarms
getActiveAlarms() called.
handling asynchronous response...
getActiveAlarmsAsync operation completed.
Displaying details for 2 alarms:
Alarm #0:
Additional Text: null
Native Probable Cause: null
NotificationId: null
ObjectType: null
X733BackedUpStatus: null
X733EventType: null
X733TrendIndication: null
AcknowledgeIndication: null
AffectedPtpRefList: null
AliasNameList: null
LayerRate(: org.tmforum.mtop.nrb.xsd.lay.v1.LayerRateType@598d00
ObjectName: null
OsTime: null
PerceivedSeverity: PS_CLEARED
ProbableCause: org.tmforum.mtop.nra.xsd.prc.v1.ProbableCauseType@13816e0
SourceTime: null
VendorExtensions: null
X733AdditionalInformation: null
X733BackUpObjectRef: null
X733CorrelatedNotificationList: null
X733MonitoredAttributeList: null
X733ProposedRepairActionList: null
X733SpecificProblems: null
Alarm #1:
Additional Text: null
Native Probable Cause: null
NotificationId: null
ObjectType: null
X733BackedUpStatus: null
X733EventType: null
X733TrendIndication: null
AcknowledgeIndication: null
AffectedPtpRefList: null
AliasNameList: null
LayerRate(: org.tmforum.mtop.nrb.xsd.lay.v1.LayerRateType@165e55e
ObjectName: null
OsTime: null
PerceivedSeverity: PS_CLEARED
ProbableCause: org.tmforum.mtop.nra.xsd.prc.v1.ProbableCauseType@b5ac2c
SourceTime: null
VendorExtensions: null
X733AdditionalInformation: null
X733BackUpObjectRef: null
X733CorrelatedNotificationList: null
X733MonitoredAttributeList: null
X733ProposedRepairActionList: null
X733SpecificProblems: null
INFO - TEST: ServerClientTest End of ClientTest
INFO - TEST: ServerClientTest finished testing client
INFO - TEST: ServerClientTest Server exiting
|
3. To work with the code in Eclipse you should use the Maven eclipse plugin to create an eclipse project with dependencies. To do this use;
Code Block |
---|
mvn eclipse:eclipse
|
4. Open Eclipse and point at the workspace with the new project in it. Right click on the project explorer panel and select
import > import existing project into workspace. Import the <your workspace>CXFMavenMtosi_2.0Code_gen project. The project should import with no problems into your workspace
...