Home
PUPPET - User Manual - LabSEDC Wiki
Contents
1. 7 string Ja IX restricts xs anySimpleType JE t 7 NumericOperatorConfr Ja IX restricts xs string JE Sgt amp lt Egti al a jaj ja jaj a amp lt whiteSpace preserve 7 string Ja M restricts xs anySimpletype JE H 7 StringOperator ja M restricts xs string Ja 4 equal 4 different 7 string JB IM restricts xs anySimpleType E j whiteSpace preserve HAY StringBinaryOperator Ja IXI restricts xs string ja 4 tail 4 head IZ string EM restricts xs anySimpleType JE t 7 NumericBooleanOperator Ja x restricts xs string JE Variable StringType PALA 4 gt 4 alt 4 amp gti 4 alt I7 string JH IX restricts xs anySimpleType JE puppetQC Stri ingBinaryexpression Je StringBinaryExpression PAD ee puppetQc tring ype JE 2 2 op StringExpression B Jo m pupp etQC Stringype Variable E NumericType PAD 4 Value 2 2 opConfr El puppetQC NumericBinaryExpression Num
2. Now the Simulator is ready Listing 2 Code Included Into the Default Class Constructor For each operation exported by the Web Service PUPPET include in the correspondent method body the code emulating the functional behavior Listing 3 shows the code line instantiating the local variables used in order to interact with the simulator Note that both the name and the type of the operation match with the parameters generated at line 279 public void orderShipment int ref services Address adr throws java rmi RemoteException long aMbItIoNinvocationTime 0 try aMbItloNinvocationTime Svstem currentTimeMillis Code Generated for Integration with Ambition info frantzen testing ssmsimulator ssm Operation aMbItloNoperation new info frantzen testing ssmsimulator ssm Operation orderShipment info frantzen testing ssmsimulator ssm OperationKind ONEWAY info frantzen testing ssmsimulator ssm Message aMbItIoNmessage aMbItIoNfindSSMMessage aMbItIoNssm info frantzen testing ssmsimulator ssm MessageKind INPUT aMbItIoNoperation info frantzen testing ssmsimulator ssm Valuation aMbItIoNvaluation new info frantzen testing ssmsimulator ssm Valuation java util ArrayList lt info frantzen testing ssmsimulator ssm InteractionVariable gt aMbItIoNmessageType aMbItloNmessage getType java util Iterator aMbItIoNit aMbItIoNmessageType iterator info frantzen testing ssmsimulator ssm InteractionVariable aM
3. Listing 4 The Generation of the Operation s Parameters In the end the last piece of code that Listing 5 shows concerns the interrogation to the functional simulator Note that here the simulator can potentially spot a failure namely when this message is not specified in the SSM Here the generated stub is thus able to do also functional testing The valuation is ready we can construct an instantiated message info frantzen testing ssmsimulator ssm InstantiatedMessage aMbItIoNim new info frantzen testing ssmsimulator ssm InstantiatedMessage aMbItIoNmessage aMbItIoNvaluation This instantiated message can now be given to the simulator Note that here the simulator can potentially spot a failure namely when this message is not specified in the SSM In that sense here we do testing aMbItIoNsim processInstantiatedMessage aMbItIoNim catch Exception genericException throw new java rmi RemoteException genericException getMessage Listing 5 The Generation of the Operation s Parameters In case the operation has to return a meaningful value an additional set of code lines is added to the body of the operation Specifically when the simulator knows the input it is possible to query it for a correct response First we ask the simulator for all currently activated output transitions line 158 at Listing 6 Out of all possible output switches we randomly choose one and check if it
4. nextOutput Before we send this output to the Service out there 12 186 187 189 190 191 192 193 194 195 196 197 198 199 200 201 202 we tell so to the simulator aMbItIoNsim processInstantiatedMessageNoBackup aMbItIoNnextOutput x What is left to do is to map this instantiated message back to a real returnValue info frantzen testing ssmsimulator ssm Message aMbItloNreturnMessage aMbItIoNnextOutput getMessage String aMbItloNreturnVarName info frantzen testing ssmsimulator ssm InteractionVariable aMbitIoNreturnMessage getTvpe iterator next getName info frantzen testing ssmsimulator ssm Valuation aMbItloNreturnValuation aMbItIoNnextOutput getValuation info frantzen testing ssmsimulator types Typelnstance aMbItIoNreturnInstance aMbItIoNreturnValuation getSingleInstance aMbItIoNreturnVarName String aMbItIoNarrayRepresentation aMbItIoNreturnInstance toString split aMbItIoNreturnValue new services Quote Double valueOf aMbItIoNarrayRepresentation 0 doubleValue aMbItIoNarrayRepresentation 1 Integer valueOf aMbItIoNarrayRepresentation 2 intValue Integer value0f aMbItIoNarrayRepresentation 3 intValue x x Now send the returnValue back to the calling service That s it Listing 6 The Generation of the Meaningful Return Value Once a feasible and functionally correct output is found before sending it t
5. lt wsag ServiceScope gt lt wsag QualifyingCondition gt lt puppetQC Puppetoc gt lt puppetQC StringBinaryExpression gt lt puppetQC StringType gt lt Variable gt idMedicalDevice lt Variable gt lt puppetQC StringType gt lt op gt equal lt op gt lt puppetQC StringType gt lt Value gt device_1 lt Value gt lt puppetQC StringType gt lt puppetOC StringBinaryExpression gt lt puppetoOC Puppetoc gt lt wsag QualifyingCondition gt lt wsag ServiceLevelObjective gt lt puppetSLO Puppet SLO gt lt puppetSLO Latency gt lt value gt 3000 lt value gt lt puppetSLO Distribution gt lt Gaussian gt 10 lt Gaussian gt lt puppetSLO Distribution gt lt puppetSLO Latency gt lt puppetSLO Puppet SLO gt lt wsag ServiceLevelObjective gt lt wsag BusinessValueList gt lt wsag Penalty gt lt wsag AssessmentInterval gt lt wsag Count gt lt wsag AssessmentInterval gt lt wsag ValueExpression gt 2 lt wsag ValueExpression gt lt wsag Penalty gt 30 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 ONOAARWND 11 12 13 14 15 16 17 18 19 20 21 22 lt wsag BusinessValueList gt lt wsag GuaranteeTerm gt lt wsag GuaranteeTerm wsag Name MedicalDevice
6. private info frantzen testing ssmsimulator ssm ServiceStateMachine aMbItIoNssm x x The simulator is generated private info frantzen testing ssmsimulator SSMSimulator aMbItIoNsim private info frantzen testing ssmsimulator ssm Message aMbItloNfindSSMMessage info frantzen testing ssmsimulator ssm ServiceStateMachine ssm info frantzen testing ssmsimulator ssm MessageKind kind info frantzen testing ssmsimulator ssm Operation op throws Exception java util HashSet lt info frantzen testing ssmsimulator ssm Message gt messages ssm getMessages for java util Iterator it messages iterator it hasNext 4 info frantzen testing ssmsimulator ssm Message m info frantzen testing ssmsimulator ssm Message it next if m getKind info frantzen testing ssmsimulator ssm MessageKind UNOBSERVABLE if m getKind kind amp amp m getOperation equals op return m throw new Exception Cannot find the input SSM message belonging to the Operation op getName Listing 1 Attributes and Local operation included in the code For each stub the body of a default constructor is generated In addition those line required in order to instantiate and to initialize both the simulator and the SSM object are generated Please note that once the stub is generated some parameters required by the simulator have to be manually set by the user Referring to Listing 2 e at line 49 set the URL
7. 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 4 x This instantiated message can now be given to the simulator Note that here the simulator can potentially spot a failure namely when this message is not specified in the SSM In that sense here we do testing aMbItIoNsim processInstantiatedMessage aMbItIoNim catch Exception genericException throw new java rmi RemoteException genericException getMessage static long startWinTimeStamp Svstem currentTimeMillis static ArrayList lt Long gt faultBuffer new ArrayList lt Long gt static int executedFault 0 public void orderShipment int ref services Address adr throws java rmi RemoteException long aMbItIoNinvocationTime 0 try aMbItIoNinvocationTime Svstem currentTimeMillis Code Generated for Integration with Ambition TA info frantzen testing ssmsimulator ssm Operation aMbItloNoperation new info frantzen testing ssmsimulator ssm Operation orderShipment info frantzen testing ssmsimulator ssm OperationKind ONEWAY info frantzen testing ssmsimulator ssm Message aMbitloNmessage aMbItIoNfindSSMMessa
8. 59 60 61 62 63 64 65 lt wsdl port binding impl WSDoctorSoapBinding name WSDoctor gt lt wsdlsoap address location http localhost 8080 axis services WSDoctor gt lt wsdl port gt lt wsdl service gt lt wsdl definitions gt 5 2 Abstract WSDL WSCalendar lt xml version 1 0 encoding UTF 8 gt lt wsdl definitions targetNamespace http localhost 8080 axis services WSCalendar xmlns apachesoap http xml apache org xml soap xmlns impl http localhost 8080 axis services WSCalendar xmlns intf http localhost 8080 axis services WSCalendar xmlns soapenc http schemas xmlsoap org soap encoding xmlns wsdl http schemas xmlsoap org wsdl xmlns wsdlsoap http schemas xmlsoap org wsdl soap xmlns xsd http www w3 org 2001 XMLSchema gt lt WSDL created by Apache Axis version 1 4 BULLE On Apr 247 2006 T06 en lt wsdl types gt lt schema targetNamespace http localhost 8080 axis services WSCalendar xmlns http www w3 org 2001 XMLSchema gt lt import namespace http xml apache org xml soap gt lt import namespace http schemas xmlsoap org soap encoding gt lt complexType name ArrayOf_xsd_anyType gt lt complexContent gt lt restriction base soapenc Array gt lt attribute ref soapenc arrayType wsdl arrayType xsd anyType gt lt restriction gt lt complexContent gt lt complexType gt lt schema gt lt schema targetNamespace http xml apache org xml soa
9. No Confirmation loo receiveAlarm residencial Alarm Not Received Figure 9 Scenario 3 Sequence Diagram 16 4 6 2 Actors Interactions in the Scenario This section provides a brief description on how the Web Services described in Section 4 6 1 interact Figure 9 reports a UML Sequence Diagram describing these interactions When a alarm is notified to WSPlastic as first step it forwards the event to WSSequitelService invoking the notifyAlarm method The Plastic Web Service also invokes getResidentialGatewaviP obtaining the IP address of the Residential Gateway where the alarm was raised Thus it gets the list of the IP addresses that must be contacted invoking getContactDecivelP on WSSequitelService The obtained list depends on the kind of the received alarm Due to the kind of contact list the WSPlastic starts to invoke the appropriate Web Service The Web Services to invoke are supposed to be deployed and reachable by means of the address list This phase will continue until any confirmation of the handled alarm is obtained either by the doctor or the supervisor In the following the case where the alarm kind is an emergency i e EMERGENCY is described WSPlastic extracts an IP address from the address list Then it invokes receiveAlarm on WSDoctor using the IP address as endpoint If the target Web Service decides to accept the alarm handling WSPlastic ends considering the problem solved On the o
10. 110 272 273 274 275 276 277 278 279 280 281 282 283 284 286 287 288 289 290 aMbItIONWSDLUrl aMbItIoNSSMUrl aMbItIoNservice aMbItIoNport Before we can use the SSM in the simulator the parsers have to be attached to the switches aMbItIoNssm attachParsersToSwitches Next we generate the socket to the treeSolver String aMbItIoNsS lvsrHost Pub here Ehe URL Of the Sorivert int aMbItIoNsolverPort Put here the Port the Solver java net Socket aMbItIoNsolverSocket new java net Socket aMbItIoNsolverHost aMbItIoNsolverPort The treeSolver sends a welcome message we remove it from the stream new java io BufferedReader new java io InputStreamReader aMbItIoNsolverSocket getInputStream readLine The simulator can use an external tool to display sequence diagrams of the messages exchanged I skip this here since this takes extra ressources x x The simulator needs a logger to log to java util logging Logger aMbItIoNlogger java util logging Logger getLogger The simulator is generated 4 aMbItIoNsim new info frantzen testing ssmsimulator SSMSimulator aMbItIoNssm aMbItIoNsolverSocket aMbItIoNlogger If Double variables are used we assume this models money experimental In any case do this info frantzen testing ssmsimulator types ST_PseudoPosDouble postPointLength 2
11. 117 118 119 120 121 122 lt wsdl input name getMeasureRequest gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http wsScenario use encoded gt lt wsdl input gt lt wsdl output name getMeasureResponse gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http localhost 8080 axis services WSMedicalDevice use encoded gt lt wsdl output gt lt wsdl operation gt lt wsdl binding gt lt wsdl service name WSMedicalDeviceService gt lt wsdl port binding impl WSMedicalDeviceSoapBinding name WSMedicalDevice gt lt wsdlsoap address location http localhost 8080 axis services WSMedicalDevice gt lt wsdl port gt lt wsdl service gt lt wsdl definitions gt 5 7 WS Agreement lt xml version 1 0 encoding UTF 8 gt lt wsag AgreementOffer xsi schemaLocation http www ggf org namespaces ws agreement xmlns xsi http www w3 org 2001 XMLSchema instance xmlns xs http www w3 org 2001 XMLSchema xmlns wsag http schemas ggf org graap 2005 09 ws agreement xmlns puppetScope http setest0 isti cnr it puppetScope xmlns puppetSLO http setest0 isti cnr it puppetSLo xmlns puppetoc http setest0 isti cnr it puppetoc xmlns ns http setest0 isti cnr it puppet gt lt wsag Name gt Telefonica_Example_Scenario_3 lt wsag Name gt lt wsag Context gt lt wsag Terms gt lt wsag All gt lt
12. 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 10 11 12 13 lt wsdl output name notifyAlarmResponse gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http localhost 8080 axis services WSSeguitelService use encoded gt lt wsdl output gt lt wsdl operation gt lt wsdl operation name getConnectedDeviceIP gt lt wsdlsoap operation soapAction gt lt wsdl input name getConnectedDeviceIPRequest gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http wsScenario use encoded gt lt wsdl input gt lt wsdl output name getConnectedDeviceIPResponse gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http localhost 8080 ax1s services WSSeguitelService use encoded gt lt wsdl output gt lt wsdl operation gt lt wsdl operation name getResidencialGatewayIP gt lt wsdlsoap operation soapAction gt lt wsdl input name getResidencialGatewayIPRequest gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http wsScenario use encoded gt lt wsdl input gt lt wsdl output name getResidencialGatewayIPResponse gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http localhost 8080 axis services WSSeguitel
13. 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 Io 0 11 12 13 14 15 16 17 18 19 20 21 lt wsdl part name residencialGatewayIP type soapenc string gt lt wsdl part name alarmGender type soapenc string gt lt wsdl message gt lt wsdl portType name WSSupervisor gt lt wsdl operation name receiveAlarm parameterOrder residencialGatewayIP_alarmGender gt lt wsdl input message impl receiveAlarmRequest name receiveAlarmRequest gt lt wsdl output message impl receiveAlarmResponse name receiveAlarmResponse gt lt wsdl operation gt lt wsdl portType gt lt wsdl binding name WSSupervisorSoapBinding type impl WSSupervisor gt lt wsdlsoap binding style rpc transport http schemas xmlsoap org soap http gt lt wsdl operation name receiveAlarm gt lt wsdlsoap operation soapAction gt lt wsdl input name receiveAlarmRequest gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http wsScenario use encoded gt lt wsdl input gt lt wsdl output name receiveAlarmResponse gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http localhost 8080 axis services WSSupervisor use encoded gt lt wsdl output gt lt wsdl operation gt lt wsdl binding gt lt wsdl service name WSSupervisorService gt lt wsdl port binding i
14. 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 200000420 lt wsdl input message impl getAppointmentRequest name getAppointmentRequest gt lt wsdl output message impl getAppointmentResponse name getAppointmentResponse gt lt wsdl operation gt lt wsdl portType gt lt wsdl binding name WSCalendarSoapBinding type impl WSCalendar gt lt wsdlsoap binding style rpc transport http schemas xmlsoap org soap http gt lt wsdl operation name getAppointmentByMonth gt lt wsdlsoap operation soapAction gt lt wsdl input name getAppointmentByMonthRequest gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http wsScenario use encoded gt lt wsdl input gt lt wsdl output name getAppointmentByMonthResponse gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http localhost 8080 axis services WSCalendar use encoded gt lt wsdl output gt lt wsdl operation gt lt wsdl operation name getAppointment gt lt wsdlsoap operation soapAction gt lt wsdl input name getAppointmentRequest gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http
15. frantzen testing ssmsimulator types ST PosIntInstance r getQuantity info frantzen testing ssmsimulator types Typelnstance rInstance new info frantzen testing ssmsimulator types ComplexTypelnstance aMbItloNparameterValues aMbItIoNvaluation addSingleValuation aMbItIoNvar getName rInstance The valuation is ready we can construct an instantiated message info frantzen testing ssmsimulator ssm InstantiatedMessage aMbItIoNim new info frantzen testing ssmsimulator ssm InstantiatedMessage aMbItIoNmessage aMbItIoNvaluation This instantiated message can now be given to the simulator Note that here the simulator can potentially spot a failure namely when this message is not specified in the SSM In that sense here we do testing aMbItIoNsim processInstantiatedMessage aMbItIoNim Ok the simulator knows the input Now we need a functionally correct response to this call We first ask the simulator for all currently activated output transitions java util ArravList aMbItIoNoutputs new java util ArrayList aMbItIoNsim getCurrentOutputSwitches Out of all possible output switches we randomly choose one and Check if it has a solution If yes we take it If not we choose randomly the next one boolean aMbItIoNnoSolutionFound true info frantzen testing ssmsimulator ssm InstantiatedMessage aMbItIoNnextOutput null java util Random aMbItIoNr
16. http www stringtemplate org INI4J Libs ini4j jar ini4j compat jar availabe at http ini4j sourceforge net Jambition Libs SSMSimulator jar minerva jar see http plastic isti cnr it wiki tools Other Libs antir 2 7 7 jar xerceslmpl jar xmlsec jar mail jar activation jar java getopt 1 0 13 jar Please note that PuppetD4 4 tgz archive does not include these libraries Launching PUP PET you have to download them separatelv Thus you can either include such libraries in the Java Classpath or copy them in the directory PuppetD4 4 externalLibs and use the scripts puppet sh Linux runPuppet bat Windows XP Platform Java jdk1 6 or later Download Download the official version of PUPPET in PLASTIC at http plastic isti cnr it download tools Documents Related documents on the approach the architectural description and the implementation of PUPPET are 4 3 2 6 7 Tasks N A Bugs This version is affected by the following known bugs We are keep working on PUPPET in order to completely remove them e Using PUPPET please do not refer to any path that includes any blank For example you should not use the path c Documents and Settings e Occasionally the generation process may end with the message parsing done even though the executions failed This is due to some exceptions that was not correctely caught Patches N A Contact guglielmo deangelis isti cnr it andrea polini isti cnr
17. nodes Two nodes will be visible if and only if their relative distance is below a given threshold Also the damping index inuencing the QoS agreed by the services will increase linear to the euclidean distance of the nodes For the sake of completeness we note that in this version of PUPPET one only instance of the mobility oracle is shared among all the stubs of a testing scenario 4 5 1 The Congifuration of the Mobility Oracle The Mobility Oracle implemented in puppet jar as AbstractTraceReader and TraceReader can be configured by meas of a INI Configuration file In such file the mobility oracle looks for a section named mobilityConfiguration The parameters that could be specified into the input configuration file are nodes It is the number of nodes which movment is listed in a NS 2 trace file and it is emulated by the mobility oracle By default it is set to 1 Optional maxRadius Given a metric defining the visibility among two nodes this index define the bound maximum for such metric By default it is set to 400d Optional traceFilename ltis the path to the NS 2 trace file that describe the mobility of the nodes in the scenario Bu default it is set to mobilityConfiguration ini Optional 4 6 Example In this section an example scenario on how to describe a WS Agreement specification for the eHealth ap plication domain is presented The scenario is inspired to the eHealth scenarios proposed
18. the consortium presents a tool support for SLAng It is an Eclipse based editor for SLAng in the form of an Eclipse plugin The joint work between WP2 and WP4 developed an extension to the SLAng editor including a syntactic translation engine that generates WS Agreement specification The output produced by the plugin extension of the SLAng editor could be used as input for PUPPET 4 4 Functional Behavior with Jambition The integrated work of the team developing PUPPET and the team developing Jambition see Chapter 4 7 in WP4 included in PUPPET version PuppetD4 3 the features to generate stubs whose behavior conforms to both extra functional contracts and a functional specifications As reported in Chapter 4 7 the functional behavior of a service in Jambition is modeled using a state machine called Service State Machine SSM Enabling the ambitionMode in the INI configuration as specified in Section 3 2 PUPPET would include in the generated stubs the code emulating the functional behavior Specifically the ambitionMode flag enables the inclusion in the source code of the stub of facilities used for the emulation of the functional behavior in Jambition Listing 1 shows the definition of the Service State Machine SSM line 4 the simulator that browses the SSM in order to emulates the correct functional behavior line 9 and a private utility method lines 11 30 HA 7 NumericOperator Ja x restricts xs string JE
19. wsag GuaranteeTerm wsag Name ContactDecivelP Terml wsag Obligated ServiceProvider gt lt wsag ServiceScope wsag ServiceName WSSeguitelService gt lt puppetScope PuppetScope gt lt puppetScope Method gt Rb lt NameMethod gt getContactDecivelP lt NameMethod gt gt lt NameMethod gt getConnectedDevicelP lt NameMethod gt lt puppetScope Method gt lt puppetScope PuppetScope gt lt wsag ServiceScope gt lt wsag QualifyingCondition gt lt puppetQC PuppetQC gt lt puppetQC StringBinaryExpression gt lt puppetQC StringType gt lt Variable gt alarmGender lt Variable gt lt puppetQC StringType gt lt op gt equal lt op gt lt puppetQC StringType gt lt Value gt Emergency lt Value gt lt puppetQC StringType gt lt puppetOC StringBinaryExpression gt lt puppetQC PuppetQC gt lt wsag QualifyingCondition gt lt wsag ServiceLevelObjective gt lt puppetSLO Puppet SLO gt lt puppetSLO Latency gt lt value gt 2000 lt value gt lt puppetSLO Distribution gt lt Gaussian gt 10 lt Gaussian gt lt puppetSLO Distribution gt lt puppetSLO Latency gt 26 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 13
20. xmlns impl http localhost 8080 axis services WSSeguitelService xmins intf http localhost 8080 axis services WSSeguitelService xmlns soapenc http schemas xmlsoap org soap encoding xmlns wsdl http schemas xmlsoap org wsdl xmlns wsdlsoap http schemas xmlsoap org wsdl soap xmlns xsd http www w3 org 2001 XMLSchema gt lt WSDL created by Apache Axis version 1 4 BULLE On Apr ones SAS Di lt wsdl types gt lt schema targetNamespace http localhost 8080 axis services WSSeguitelService xmlns http www w3 org 2001 XMLSchema gt lt import namespace http xml apache org xml soap gt lt import namespace http schemas xmlsoap org soap encoding gt lt complexType name ArrayOf_xsd_anyType gt lt complexContent gt lt restriction base soapenc Array gt lt attribute ref soapenc arrayType wsdl arrayType xsd anyType gt lt restriction gt lt complexContent gt lt complexType gt lt schema gt lt schema targetNamespace http xml apache org xml soap xmlns http www w3 org 2001 XMLSchema gt lt import namespace http localhost 8080 axis services WSSeguitelService gt lt import namespace http schemas xmlsoap org soap encoding gt lt complexType name Vector gt lt sequence gt lt element maxOccurs unbounded minOccurs 0 name item type xsd anyType gt lt sequence gt lt complexType gt lt schema gt lt wsdl types gt lt wsdl message name getResidencialG
21. 0 131 132 133 134 135 lt puppetSLO PuppetSLO gt lt wsag ServiceLevelObjective gt lt wsag BusinessValueList gt lt wsag Penalty gt lt wsag AssessmentInterval gt lt wsag Count gt lt wsag AssessmentInterval gt lt wsag ValueExpression gt 2 lt wsag ValueExpression gt lt wsag Penalty gt lt wsag BusinessValueList gt lt wsag GuaranteeTerm gt lt wsag GuaranteeTerm wsag Name ContactDeciveIP Term2 wsag Obligated ServiceProvider gt lt wsag ServiceScope wsag ServiceName WSSeguitelService gt lt puppet Scope PuppetScope gt lt puppet Scope Method lt NameMethod gt getContactDecivelP lt NameMethod gt gt lt NameMethod gt get ConnectedDeviceIP lt NameMethod gt lt puppetScope Method gt lt puppet Scope Puppet Scope gt lt wsag ServiceScope gt lt wsag QualifyingCondition gt lt puppetQC Puppetoc gt lt puppetQC StringBinaryExpression gt lt puppetQC StringType gt lt Variable gt alarmGender lt Variable gt lt puppetQC StringType gt lt op gt equal lt op gt lt puppetQC StringType gt lt Value gt No Confirmation lt Value gt lt puppetQC StringType gt lt puppetOC StringBinaryExpression gt lt puppetQC PuppetOC lt wsag QualifyingCondition gt lt wsag ServiceLevelObjective gt lt puppetSLO PuppetSLO gt lt puppetSLO Latency gt lt value gt 1000 lt value gt lt puppetSLO Distribution gt lt Gaussian gt 10 lt Gaussian gt lt puppetSLO D
22. 1 292 293 294 295 296 297 298 299 300 301 302 303 lt wsag ValueExpression gt 2 lt wsag ValueExpression gt lt wsag Penalty gt lt wsag BusinessValueList gt lt wsag GuaranteeTerm gt lt wsag ExactlyOne gt lt wsag ExactlyOne gt lt wsag GuaranteeTerm wsag Name AlarmSupervisor Terml wsag Obligated ServiceProvider gt lt wsag ServiceScope wsag ServiceName WSSupervisor gt lt puppet Scope PuppetScope gt lt puppet Scope Method gt lt NameMet hod gt receiveAlarm lt NameMet hod gt lt puppet Scope Method gt lt puppet Scope Puppet Scope gt lt wsag ServiceScope gt lt wsag QualifyingCondition gt lt puppetQC PuppetQC gt lt puppetQC StringBinaryExpression gt lt puppetQC StringType gt lt Variable gt deployedOn lt Variable gt lt puppetQC StringType gt lt op gt equal lt op gt lt puppetQC StringType gt lt Value gt MobileNode lt Value gt lt puppetQC StringType gt lt puppetOC StringBinaryExpression gt lt puppetOC PuppetOC gt lt wsag QualifyingCondition gt lt wsag ServiceLevelObjective gt lt puppetSLO Puppet SLO gt lt puppetSLO Latency gt lt value gt 10000 lt value gt lt puppetSLO Distribution gt lt Gaussian gt 10 lt Gaussian gt lt puppetSLO Distribution gt lt puppetSLO Latency gt lt puppetSLO Reliability gt lt Reliabilitywindow gt 30000 lt Reliabilitywindow gt lt ReliabilityPerc gt 5 lt ReliabilityPerc gt lt puppet
23. 13 214 215 216 217 218 219 lt puppetQC StringType gt lt puppetOC StringBinaryExpression gt lt puppetQC PuppetQCc gt lt wsag QualifyingCondition gt lt wsag ServiceLevelObjective gt lt puppetSLO Puppet SLO gt lt puppetSLO Latency gt lt value gt 6000 lt value gt lt puppetSLO Distribution gt lt Gaussian gt 10 lt Gaussian gt lt puppetSLO Distribution gt lt puppetSLO Latency gt lt puppetSLO Reliability gt lt Reliabilitywindow gt 30000 lt Reliabilitywindow gt lt ReliabilityPerc gt 5 lt ReliabilityPerc gt lt puppetSLO Distribution gt lt Gaussian gt 100 lt Gaussian gt lt puppetSLO Distribution gt lt puppetSLO Reliability gt lt puppetSLO Puppet SLO gt lt wsag ServiceLevelObjective gt lt wsag BusinessValueList gt lt wsag Penalty gt lt wsag AssessmentInterval gt lt wsag Count gt lt wsag AssessmentInterval gt lt wsag ValueExpression gt 2 lt wsag ValueExpression gt lt wsag Penalty gt lt wsag BusinessValueList gt lt wsag GuaranteeTerm gt lt wsag GuaranteeTerm wsag Name AlarmDoctor Term2 wsag Obligated ServiceProvider gt lt wsag ServiceScope wsag ServiceName WSDoctor gt lt puppet Scope PuppetScope gt lt puppet Scope Method gt lt NameMet hod gt receiveAlarm lt NameMet hod gt lt puppet Scope Method gt lt puppet Scope Puppet Scope gt lt wsag ServiceScope gt lt wsag QualifyingCondition gt lt puppetQC PuppetQC gt l
24. 78 379 380 381 382 383 384 385 386 387 lt Value gt WiredServer lt Value gt lt puppetQC StringType gt lt puppetOC StringBinaryExpression gt lt puppetOC PuppetOC gt lt wsag QualifyingCondition gt lt wsag ServiceLevelObjective gt lt puppetSLO Puppet SLO gt lt puppetSLO Latency gt lt value gt 6000 lt value gt lt puppetSLO Distribution gt lt Gaussian gt 10 lt Gaussian gt lt puppetSLO Distribution gt lt puppetSLO Latency gt lt puppetSLO Reliability gt lt Reliabilitywindow gt 30000 lt Reliabilitywindow gt lt ReliabilityPerc gt 1 lt ReliabilityPerc gt lt puppetSLO Distribution gt lt Gaussian gt 100 lt Gaussian gt lt puppetSLO Distribution gt lt puppetSLO Reliability gt lt puppetSLO Puppet SLO gt lt wsag ServiceLevelObjective gt lt wsag BusinessValueList gt lt wsag Penalty gt lt wsag AssessmentInterval gt lt wsag Count gt lt wsag AssessmentInterval gt lt wsag ValueExpression gt 2 lt wsag ValueExpression gt lt wsag Penalty gt lt wsag BusinessValueList gt lt wsag GuaranteeTerm gt lt wsag ExactlyOne gt lt wsag GuaranteeTerm wsag Name MedicalDevice Terml wsag Obligated ServiceProvider gt lt wsag ServiceScope wsag ServiceName WSMedicalDevice gt lt puppet Scope PuppetScope gt lt puppet Scope Method gt lt NameMet hod gt getMeasure lt NameMethod gt lt puppet Scope Method gt lt puppet Scope Puppet Scope gt
25. 9 180 Now the Simulator is ready public services Quote checkAvail services QuoteRequest r throws java rmi RemoteException long aMbItIoNinvocationTime 0 ser vices Quote aMbItIoNreturnValue try aMbItIoNinvocationTime Svstem currentTimeMillis Code Generated for Integration with Ambition info frantzen testing ssmsimulator ssm Operation aMbItloNoperation new info frantzen testing ssmsimulator ssm Operation checkAvail info frantzen testing ssmsimulator ssm OperationKind REQUESTRESPONSE info frantzen testing ssmsimulator ssm Message aMbItIoNmessage aMbItloNfindSSMMessage aMbItIoNssm info frantzen testing ssmsimulator ssm MessageKind INPUT aMbItIoNoperation info frantzen testing ssmsimulator ssm Valuation aMbItIoNvaluation new info frantzen testing ssmsimulator ssm Valuation java util ArrayList lt info frantzen testing ssmsimulator ssm InteractionVariable gt aMbItIoNmessageType aMbItloNmessage getType java util Iterator aMbItIoNit aMbItIoNmessageType iterator info frantzen testing ssmsimulator ssm InteractionVariable aMbItIoNvar Generated Parameter 0 aMbItIoNvar info frantzen testing ssmsimulator ssm InteractionVariable aMbItIoNit next Object aMbItIoNparameterValues new Object 2 aMbItIoNparameterValues 0 new info frantzen testing ssmsimulator tvpes ST StringInstance r getProduct aMbItIoNparameterValues 1 new info
26. Abstract WSDL WSSupervisor o 5 4 Abstract WSDL WSPlastic a 5 5 Abstract WSDL WSSeguitelService 0 o e m4 e 5 6 Abstract WSDL WSMedicalDevice 5 7 WS Agreement 5 8 Warehouse ee References 1 Puppet Overview To ensure consistent cooperation for business critical services with contractually agreed levels of Quality of Service SLA specifications as well as techniques for their evaluation are nowadays irremissible assets Puppet Pick UP Performance Evaluation Test bed is an original approach developed within PLASTIC for the automatic generation of test beds to empirically evaluate the QoS features of a Web Service under development Specifically the generation exploits the information about the coordinating scenario the service description WSDL and the specification of the agreements WS Agreement As described in 4 3 2 PUPPET was originally designed in order to automatically generate stubs conforming only to SLA behaviors ignoring functional aspects In other words if invoked the stub were able to provided good QoS values but the responses were not built to be semantically meaningful i e always returning constant values However in the general case extra functional aspects are tightly coupled with functional characteristics The current version of PUPPET integrates the emulation of the functional specifications as part of the generated testbed The obt
27. Generated for Integration with Ambition info frantzen testing ssmsimulator ssm Operation aMbItloNoperation new info frantzen testing ssmsimulator ssm Operation cancelTransact info frantzen testing ssmsimulator ssm OperationKind ONEWAY info frantzen testing ssmsimulator ssm Message aMbItIoNmessage aMbItIoNfindSSMMessage aMbItIoNssm info frantzen testing ssmsimulator ssm MessageKind INPUT aMbItloNoperation info frantzen testing ssmsimulator ssm Valuation aMbItIoNvaluation new info frantzen testing ssmsimulator ssm Valuation java util ArrayList lt info frantzen testing ssmsimulator ssm InteractionVariable gt aMbItIoNmessageType aMbIt IoNmessage getType java util Iterator aMbItIoNit aMbItIoNmessageType iterator info frantzen testing ssmsimulator ssm InteractionVariable aMbItIoNvar 4 Generated Parameter 0 aMbItloNvar info frantzen testing ssmsimulator ssm InteractionVariable aMbItIoNit next info frantzen testing ssmsimulator types TypeInstance refInstance New info frantzen testing ssmsimulator types ST_PosIntInstance ref aMbItloNvaluation addSingleValuation aMbItloNvar getName refInstance The valuation is ready we can construct an instantiated message info frantzen testing ssmsimulator ssm InstantiatedMessage aMbItIoNim new info frantzen testing ssmsimulator ssm InstantiatedMessage aMbItIoNmessage aMbItIoNvaluation 34 254 255 256
28. PUPPET User Manual Guglielmo De Angelis August 5 2008 Abstract This article is the user s guide for PUPPET Please refer to 4 for the detailed description of the whole approach the architectural description of the proposed implementation the tools and the standard that have been used or for any kind of motivation of the work Contents _ Puppet Overview 2 Technical info 3 Deployment 8 1 Install o cor esc es pa jn RR u u A RR RARA e REE EERE OOS 3 2 COontigure ss saae eae AAA Ree ea ee bee eee 3 3 Usage s os be by aA AA AMM a DD ea RE Ee OE 4 Tutorial 4 1 Terms in the Agreement and Generation Process 0 o e 4 2 The Syntax for the Terms in the WS Agreement Contracts 004 4 2 1 Qualifying Conditions o e 4 2 2 Service Level Objective o o e a 42 3 SCOPE RA A e ARA 4 3 Writing an Agreement a 4 4 Functional Behavior with Jambition o e ee ao 4 5 The Emulation of the Mobility with PUPPET 0 e a 4 5 1 The Congifuration of the Mobility Oracle o o AS A 4 6 1 Scenario Description ooa 4 6 2 Actors Interactions in the Scenario o o e e eee 4 6 3 QoS Properties Definition o o e 4 7 Reference To Jambition 000 5 Appendix 5 1 Abstract WSDL WSDoctor a 5 2 Abstract WSDL WSCalendar a a 5 3
29. SLO Distribution gt lt Gaussian gt 100 lt Gaussian gt lt puppetSLO Distribution gt lt puppetSLO Reliability gt lt puppetSLO PuppetSLO gt lt wsag ServiceLevelObjective gt lt wsag BusinessValueList gt lt wsag Penalty gt lt wsag AssessmentInterval gt lt wsag Count gt lt wsag AssessmentInterval gt lt wsag ValueExpression gt 2 lt wsag ValueExpression gt lt wsag Penalty gt lt wsag BusinessValueList gt lt wsag GuaranteeTerm gt lt wsag GuaranteeTerm wsag Name AlarmSupervisor Term2 wsag Obligated ServiceProvider gt lt wsag ServiceScope wsag ServiceName WSSupervisor gt lt puppet Scope PuppetScope gt lt puppet Scope Method gt lt NameMethod gt receiveAlarm lt NameMethod gt lt puppetScope Method gt lt puppetScope PuppetScope gt lt wsag ServiceScope gt lt wsag QualifyingCondition gt lt puppetQC PuppetQC gt lt puppetQC StringBinaryExpression gt lt puppetQC StringType gt lt Variable gt deployedOn lt Variable gt lt puppetQC StringType gt lt op gt equal lt op gt lt puppetQC StringType gt 29 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 3
30. Service use encoded gt lt wsdl output gt lt wsdl operation gt lt wsdl binding gt lt wsdl service name WSSeguitelServiceService gt lt wsdl port binding impl WSSeguitelServiceSoapBinding name WSSeguitelService gt lt wsdlsoap address location http localhost 8080 axis services WSSeguitelService gt lt wsdl port gt lt wsdl service gt lt wsdl definitions gt 5 6 Abstract WSDL WSMedicalDevice lt xml version 1 0 encoding UTF 8 gt lt wsdl definitions targetNamespace http localhost 8080 axis services WSMedicalDevice xmlns apachesoap http xml apache org xml soap xmlns impl http localhost 8080 axis services WSMedicalDevice xmlns intf http localhost 8080 axis services WSMedicalDevice xmlns soapenc http schemas xmlsoap org soap encoding xmlns wsdl http schemas xmlsoap org wsdl xmlns wsdlsoap http schemas xmlsoap org wsdl soap xmlns xsd http www w3 org 2001 XMLSchema gt lt WSDL created by Apache Axis version 1 4 Valde rola API Aap ANOS IIS TS PDT gt lt wsdl types gt lt schema targetNamespace http localhost 8080 axis services WSMedicalDevice xmlns http www w3 org 2001 XMLSchema gt lt import namespace http xml apache org xml soap gt lt import namespace http schemas xmlsoap org soap encoding gt lt complexType name ArrayOf_xsd_anyType gt lt complexContent gt lt restriction base soapenc Array gt lt attribute ref soapenc a
31. Term2 wsag Obligated ServiceProvider gt lt wsag ServiceScope wsag ServiceName WSMedicalDevice gt lt puppetScope PuppetScope gt lt puppet Scope Method gt lt NameMet hod gt getMeasure lt NameMethod gt lt puppet Scope Method gt lt puppet Scope Puppet Scope gt lt wsag ServiceScope gt lt wsag QualifyingCondition gt lt puppetQC Puppetoc gt lt puppetQC StringBinaryExpression gt lt puppetQC StringType gt lt Variable gt idMedicalDevice lt Variable gt lt puppetQC StringType gt lt op gt equal lt op gt lt puppetOC StringType gt lt Value gt device 2 lt Value gt lt puppetQC StringType gt lt puppetOC StringBinaryExpression gt lt puppetoOC PuppetQc gt lt wsag QualifyingCondition gt lt wsag ServiceLevelObjective gt lt puppetSLO Puppet SLO gt lt puppetSLO Latency gt lt value gt 10000 lt value gt lt puppetSLO Distribution gt lt Gaussian gt 10 lt Gaussian gt lt puppetSLO Distribution gt lt puppetSLO Latency gt lt puppetSLO PuppetSLO gt lt wsag ServiceLevelObjective gt lt wsag BusinessValueList gt lt wsag Penalty gt lt wsag AssessmentInterval gt lt wsag Count gt lt wsag AssessmentInterval gt lt wsag ValueExpression gt 2 lt wsag ValueExpression gt lt wsag Penalty gt lt wsag BusinessValueList gt lt wsag GuaranteeTerm gt lt wsag A11 gt lt wsag Terms gt lt wsag AgreementOffer gt 5 8 Warehouse In the foll
32. affected by a specific Term as depicted in Figure 7 If a Term does not specify any scope PUPPET would generate the emulation of the extra functional property in all the operations exported by the service the Term refers to 4 3 Writing an Agreement In PLASTIC there are two possible way to write WS Agreement specification for PUPPET The former is to write it directly according to the indications given in 4 The latter is to exploit the PLASTIC s editor of SLA as explained in the following The PLASTIC conceptual model 10 defines the reference SLA concepts adopted the in the project This means that the specific implementations of the various environments should consider to manage at least the QoS annotations expressed in 10 and then refined in D1 2 9 According to the conceptual model 8 defines with SLAng 12 an abstract syntax for the agreements Such syntax would be instantiated in several concrete syntax Each concrete syntax refers to a given kind of specification For example in 8 the SLAng concepts were expressed using the HUTN Human Usable Textual Notation as a concrete syntax The concrete syntax of SLAng could also refer to other languages for SLA specification In that sense a WS Agreement specification could be seen as a concrete instantiation of the SLAng s abstract syntax Note that such association is valid under the assumption that the two specifications predicate on the same kind of concepts In deliverable D2 2
33. ained environment can expose not only the specified extra functional parameters but also meaningful functional behavior Specifically PUPPET generates stubs for Web Services which respect both an extra functional contract expressed via a Service Level Agreement SLA and a functional contract modeled via a Service State Machine SSM see Chapter 4 7 2 Technical info Provider CNR Introduction PUPPET is a tool for the automatic generation of test beds to empirically evaluate the QoS features of a Web Service under development The stubs generated with PUPPET conform both the extra functional contract expressed via a Service Level Agreement SLA and to the functional contract modeled via a state machine Development status Version PuppetD4 3 Intended audience Developers who intend to test a PLASTIC service in composition with 3rd party Web Services License Open source under GPLv3 Language Java XML Environment set up In the following the required software and hardware Hardware No specific hardware is required Software The following JAR library are required in order to to launch PUPPET Apache Axis 1 4 Libs axis ant jar axis jar commons discovery jar commons logging jar jaxrpc jar jsr173_1 0_api jar log4j 1 2 8 jar wsdl4j jar saaj jar availabe at http ws apache or axis Apache XMLBeans Libs xbean jar availabe at http xmlbeans apache org String Template Libs stringtemplate jar availabe at
34. andom new java util Random while aMbItIoNoutputs isEmpty amp amp aMbItIoNnoSolutionFound info frantzen testing ssmsimulator ssm Switch aMbItIoNcandidate info frantzen testing ssmsimulator ssm Switch aMbItIoNoutputs get aMbItIoNrandom nextInt aMbItIoNoutputs size try to find a solution if yes fine if not remove the x candidate aMbItIoNnextOutput aMbItIoNsim findSolution aMbItIoNcandidate if aMbItIoNnextOutput null aMbItIoNoutputs remove aMbIt IoNcandidate else aMbItIoNnoSolutionFound false 33 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 if aMbItIoNnextOutput null throw new Exception Failure_in SSM No output for svnchronous input specified Ok we have now a feasible and functionally correct output nextOutput Before we send this output to the Service out there we tell so to the simulator aMbItIoNsim processInstantiatedMessageNoBackup aMbItIoNnextOutput What is left to do is to map this instantiated message back to a real returnValue info frantzen testing ssmsimulator ssm Message aMbItIoNreturnMessag
35. atewayIPResponse gt 22 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 lt wsdl part name getResidencialGatewayIPReturn type soapenc string gt lt wsdl message gt lt wsdl message name getResidencialGatewayIPRequest gt lt wsdl part name aliasRG type soapenc string gt lt wsdl message gt lt wsdl message name notifyAlarmRequest gt lt wsdl part name aliasRG type soapenc string gt lt wsdl part name alarmGender type soapenc string gt lt wsdl part name date type xsd dateTime gt lt wsdl message gt lt wsdl message name getConnectedDeviceIPRequest gt lt wsdl part name aliasRG type soapenc string gt lt wsdl part name alarmGender type soapenc string gt lt wsdl message gt lt wsdl message name notifyAlarmResponse gt lt wsdl part name notifyAlarmReturn type xsd boolean gt lt wsdl message gt lt wsdl message name getConnectedDevicelPResponse gt lt wsdl part name getConnectedDeviceIPReturn type impl Array0f xsd anyType gt lt wsdl message gt lt wsdl portType name WSSeguitelService gt lt wsdl operation name notifyAlarm parameterOrder aliasRG alarmGender da
36. bItIoNsolverHost Put here the URL of the Solver int aMbItIoNsolverPort Put here the Port the Solver java net Socket aMbItIoNsolverSocket new java net Socket aMbItIoNsolverHost aMbItIoNsolverPort The treeSolver sends a welcome message we remove it from the stream new java io BufferedReader new java io InputStreamReader aMbItIoNsolverSocket getInputStream readLine The simulator can use an external tool to display sequence diagrams of the messages exchanged I skip this here since this takes extra ressources 4 x The simulator needs a logger to log to java util logging Logger aMbitloNlogger java util logging Logger etlog er The simulator is generated 4 aMbItIoNsim new info frantzen testing ssmsimulator SSMSimulator aMbItIoNssm aMbItIoNsolverSocket aMbItIoNlogger If Double variables are used we assume this models money experimental In any case do this info frantzen testing ssmsimulator types ST_PseudoPosDouble postPointLength 2 32 ao 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 17
37. bItIoNvar Listing 3 Local Variables Configuration Listings 4 shows an example of the set of lines generated for each parameter that any operation exports Generated Parameter 0 aMbItloNvar info frantzen testing ssmsimulator ssm InteractionVariable aMbItIoNit next info frantzen testing ssmsimulator types Typelnstance refInstance new info frantzen testing ssmsimulator tvpes ST PosIntInstance ref 11 291 292 293 294 295 296 297 298 299 300 301 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 aMbItIoNvaluation addSingleValuation aMbItIoNvar getName refInstance Generated Parameter 1 aMbItIoNvar info frantzen testing ssmsimulator ssm InteractionVariable aMbItloNit next Object aMbItloNparameterValues new Object 2 aMbItIoNparameterValues 0 new info frantzen testing ssmsimulator types ST StringInstance adr getFirstName aMbItIoNparameterValues 1 new info frantzen testing ssmsimulator tvpes ST Stringinstance adr getLastName info frantzen testing ssmsimulator types TypeInstance adrInstance new info frantzen testing ssmsimulator types ComplexTypeInstance aMbItIoNparameterValues aMbItIoNvaluation addSingleValuation aMbIt IoNvar getName adrInstance
38. bility model that can be used during the design and analysis phases In this version PUPPET uses NS 2 1 in order to generate the mobility model for the network nodes The movement of the nodes are definded by means of NS 2 s set dest tool The results of an NS 2 simulations with the movement specifications can shown in a tabular form by means of trace files In a trace file a timestamped line is produced for each data packet that travels on the network The trace file reports the location of each node at a given time interval for example each second Thus specifying for each node the initial position and its speed it is possible to trace the movement of the node during the whole simulation PUPPET emulates the mobility of the remote services equipping the generated stub with a hook able to interact with a mobility oracle A mobility oracle is a service that takes in input a mobility model produced by the NS 2 simulator This service exports an operation that taking in input the name of the nodes where two service are deploved returns an index in 0 1 measuring the damping factor in the QoS levels due to their relative distance The index is 0 if the nodes are in the same position else it is 1 if the two nodes and the services deploved on them are not visible each other Values in 0 1 give indications on their relative distance PUPPET injects into the generated stub a portion of Java code that interprets the damp index received from the m
39. by the PLASTIC industrial partners We remind that the WS Agreement file could also be automatically generated by means of the SlangMon editor provided by the Plastic Platform see 8 for details 4 6 1 Scenario Description The scenario is structured as depicted in Figure 8 Five web services are involved in this example WSPlastic Is the Web Service that interfaces the current eHealth system with the new Plastic environment In this scenario description we only refer to one of the possible operations and feature that it exports Specifically the operation notify Alarm is aimed at both collect and process the alarm messages coming from the eHealth part of the application that runs on Plastic It is invoked when an alarm is raised It takes as input the name of the Residential Gateway where the alarm comes from the kind of the alarm and the date when it was raised In the scenario WSPlastic represents the new service that have to be tested Puppet here is used to automatically build the portion of the system that interacts with the service under test i e WSPlastic WSSeguitelService This Web Service represents the current eHealth application lt exports the following operations notifyAlarm getResidentialGatewaylP getContactDecivelP notifyAlarm takes as input the name of the Residential Gateway where the alarm comes from the kind of the alarm and the date 2Note that the visibility metric in TraceReader is implemented as euclidean d
40. du nsnam ns A Bertolino G D Angelis and A Polini A QoS Test bed Generator for Web Services In Proc of the 7th International Conference on Web Engineering 2007 ICWE 2007 volume LNCS series Como Italy 2007 Springer Verlag A Bertolino G D Angelis and A Polini Automatic Generation of Test beds for Pre Deployment QoS Evaluation of Web Services In Proc of the 6th International Workshop on Software and Performance WOSP 2007 Buenos Aires Argentina 2007 ACM A Bertolino D Bianculli A Carzaniga G De Angelis Forgacs L Frantzen Z Gere C Ghezzi A Polini F Raimondi A Sabetta and A Wolf Test Framework Specification and Architecture Tech nical Report Deliverable D4 1 PLASTIC Consortium March 2007 IST STREP Project A Bertolino D Bianculli A Carzaniga G De Angelis Forgacs L Frantzen Z Gere C Ghezzi A Polini F Raimondi A Sabetta and A Wolf Test Framework Specification and Architecture Tech nical Report Deliverable D4 3 PLASTIC Consortium March 2008 IST STREP Project A Bertolino G De Angelis L Frantzen and A Polini Model based Generation of Testbeds for Web Services In Proc of the 20th IFIP Int Conference on Testing of Communicating Systems TESTCOM 2008 volume 5047 of LNCS pages 266 282 Tokio Japan June 2008 Springer Verlag A Bertolino G De Angelis F Lonetti and A Sabetta Let the puppets move automated testbed generation for service oriented
41. e aMbItIoNnextOutput getMessage String aMbItIoNreturnVarName info frantzen testing ssmsimulator ssm InteractionVariable aMbItIoNreturnMessage getType iterator next getName info frantzen testing ssmsimulator ssm Valuation aMbItIoNreturnValuation aMbItIoNnextOutput getValuation info frantzen testing ssmsimulator types Typelnstance aMbItIoNreturnInstance aMbItIoNreturnValuation getSingleInstance aMbIt IoNreturnVarName String aMbItIoNarrayRepresentation aMbItIoNreturnInstance toString split aMbItIoNreturnValue new services Quote Double valueOf aMbItIoNarrayRepresentation 0 doubleValue aMbItIoNarrayRepresentation 1 Integer valueOf aMbItIoNarrayRepresentation 2 intValue Integer valueOf aMbItloNarrayRepresentation 3 intValue Now send the returnValue back to the calling service That s it catch Exception genericException throw new java rmi RemoteException genericException getMessage Density D neW Density Double sleepValue D gaussian 25000 puppet ambition Naturals asNatural aMbItIoNinvocationTime System currentTimeMillis try Thread sleep sleepValue longValue catch InterruptedException e return aMbItIoNreturnValue public void cancelTransact int ref throws java rmi RemoteException long aMbItIoNinvocationTime 0 try aMbItIoNinvocationTime Svstem currentTimeMillis Code
42. eceiveAlarmResponse gt lt wsdl message gt lt wsdl portType name WSDoctor gt lt wsdl operation name receiveAlarm parameterOrder residencialGatewayIP_alarmGender gt lt wsdl input message impl receiveAlarmRequest name receiveAlarmRequest gt lt wsdl output message impl receiveAlarmResponse name receiveAlarmResponse gt lt wsdl operation gt lt wsdl portType gt lt wsdl binding name WSDoctorSoapBinding type impl WSDoctor gt lt wsdlsoap binding style rpc transport http schemas xmlsoap org soap http gt lt wsdl operation name receiveAlarm gt lt wsdlsoap operation soapAction gt lt wsdl input name receiveAlarmRequest gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http wsScenario use encoded gt lt wsdl input gt lt wsdl output name receiveAlarmResponse gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http localhost 8080 axis services WSDoctor use encoded gt lt wsdl output gt lt wsdl operation gt lt wsdl binding gt lt wsdl service name WSDoctorService gt 3The values in this table has to be considered just as an example 18 55 56 57 58 59 60 61 62 63 64 Du sw 10 1 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 58 54 55 56 57 58
43. eployed on different machines In particular both WSDoctor and WSSupervisor could be deployed on a usual wired device as a PC or a mobile and wireless device such as a smart phone Latency msec Reliability Conditions WSSeguitelService getContactDecivelP 2000 alarmKind Emergency WSSeguitelService getContactDecivelP 1000 alarmKind No Confirmation B WinSize 30000 A E WSDoctor receiveAlarm 6000 Max Fails in Win 5 deployedOn MobileNode l WinSize 30000 nh z WSDoctor receiveAlarm 2000 Max Fails in Win 4 deployedOn WiredServer RRID x WinSize 30000 a WSSupervisor receiveAlarm 10000 Max Fails in Win 5 deployedOn MobileNode ae WinSize 30000 ani w WSSupervisor receiveAlarm 6000 Max Fails in Win 1 deployedOn WiredServer WSMedicalDevice getMeasure 3000 idMedicalDevice device_1 WSMedicalDevice getMeasure 10000 idMedicalDevice device_2 Table 2 QoS Properties Is it clear that the QoS properties of the service could depend on where the service in actually deployed For example if a the Web Service is deployed on a wireless node it is not always given that it is possible to reach it On the other hand if a Web Service is deployed on a standard PC it operates at higher performances than one deployed on a smart phone Moreover a method can behave differently depending on the parameters it receives For example the processing time of getMeasure on WSMedicalDevice directly depends on
44. ericBinaryExpression ED Jan op NumericBooleanExpression JE O Ju puppetQC NumericType 2 2 opConfr 7 Booleanvalue jse ki restricts xs string 4 true 4 false 7 string Ja M4 restricts xs anySimpleType JE 0 7_BooleanOperator a M restricts xs string E ajja Li LI whiteSpace preserve 7 string amp XI restricts xs anySimpleType JE whiteSpace preserve BooleanExpression a p Variable Value E Operator 5 Figure 5 Operators in the Qualifying Condition 8 whiteSpace preserve whiteSpace preserve whiteSpace preserve schema JEH PuppetsLo ED Jaro puppetsLO Latency puppetsSLo Reliability 0 1 ED Pp roses JD Eo aj H Latencv ED e puppetSLO Distribution Reliabilitvwindow ReliabilityPerc puppetSLO Distribution A 0 1 De E Figure 6 Extra Functional Properties in the Service Level Objective Parameters 0 00 Figure 7 Defining the Scope of a Term 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 The SSM object
45. ge aMbItIoNssm info frantzen testing ssmsimulator ssm MessageKind INPUT aMbItIoNoperation info frantzen testing ssmsimulator ssm Valuation aMbItIoNvaluation new info frantzen testing ssmsimulator ssm Valuation java util ArrayList lt info frantzen testing ssmsimulator ssm InteractionVariable gt aMbItIoNmessageType aMbItloNmessage getType java util Iterator aMbItIoNit aMbItIoNmessageType iterator info frantzen testing ssmsimulator ssm InteractionVariable aMbItIoNvar Generated Parameter 0 aMbItIoNvar info frantzen testing ssmsimulator ssm InteractionVariable aMbItIoNit next info frantzen testing ssmsimulator types Typelnstance refInstance new info frantzen testing ssmsimulator types ST PosIntInstance ref aMbItIoNvaluation addSingleValuation aMbItIoNvar getName refInstance Generated Parameter 1 aMbItIoNvar info frantzen testing ssmsimulator ssm InteractionVariable aMbItIoNit next Object aMbItIoNparameterValues new Object 2 aMbItIoNparameterValues 0 new info frantzen testing ssmsimulator tvpes ST StringInstance adr getFirstName aMbItIoNparameterValues 1 new info frantzen testing ssmsimulator tvpes ST Stringinstance adr getLastName info frantzen testing ssmsimulator types Typelnstance adrInstance new info frantzen testing ssmsimulator types ComplexTypelnstance aMbItloNparameterValues aMbItIoNvaluation addSingleValuation aMbIt IoNva
46. gure 8 Scenario 3 Deplovment Diagram when it was raised Both the other two exported operations take as input the logic name of a Resi dential Gateway Thus getResidentialGatewaviP returns the IP address associated with the input label while getContactDecivelP the list of IP addresses that should be contacted in case of alarm WSDoctor It is the service deployed on the device that the doctor uses to interface with the eHealth system The hosting device could be either a usual wired device as a PC or a mobile and wireless device such as a smart phone The Web Service exports the receiveAlarm operation Such operation takes as input both the IP address of the Residential Gateway where the alarm was raised and the kind of the alarm WSSupervisor It is a service deployed on the device that a supervisor uses to interface with the eHealth system The supervisor of a patient is the person that could assist the patient for non critical situa tion In those cases that are classified as non critical some kind of alarm could be forwarded to the supervisor instead of the doctor As for the doctor also here the hosting device could be either a usual wired device as a PC or a mobile and wireless device such as a smart phone The Web Service exports the receiveAlarm operation Such operation takes as input both the IP address of the Residential Gateway where the alarm was raised and the kind of the alarm WSMedicalDevice Each Residential Gateway control
47. has a solution If yes we take it If not we choose randomly the next one lines 165 180 at Listing 6 Ok the simulator knows the input Now we need a functionally correct response to this call We first ask the simulator for all currently activated output transitions java util ArrayList aMbItIoNoutputs new java util ArrayList aMbItIoNsim getCurrentOutputSwitches Out of all possible output switches we randomly choose one and Check if it has a solution If yes we take it If not we choose randomly the next one boolean aMbItIoNnoSolutionFound true info frantzen testing ssmsimulator ssm InstantiatedMessage aMbItIoNnextOutput null java util Random aMbItIoNrandom new java util Random while aMbItIoNoutputs isEmpty amp amp aMbItIoNnoSolutionFound info frantzen testing ssmsimulator ssm Switch aMbItIoNcandidate info frantzen testing ssmsimulator ssm Switch aMbItIoNoutputs get aMbItIoNrandom nextInt aMbItIoNoutputs size try to find a solution if yes fine if not remove the x candidate aMbIt IoNnextOutput aMbItIoNsim findSolution aMbItIoNcandidate if aMbItIoNnextOutput null aMbIt IoNoutputs remove aMbIt IoNcandidate else aMbItIoNnoSolutionFound false i if aMbItIoNnextOutput null throw new Exception Failure in SSM No output for svnchronous input specified 8 x Ok we have now a feasible and functionallv correct output
48. he file storing the template mapping of the Service Level Objectives in WS Agreement on to the Java code that will be generated PUPPET already includes a predefined mapping file Even though it is possible to change this mapping we strongly discourage from changing it Optional ambitionMode If it is set to on enables the emulation of the functional behavior with Jambition By default it is set to off Optional mobilityMode If it is set to on enables the emulation of the mobility of the nodes that are supposed to deploy the services emulated by means of the stubs By default this flag is set to off Optional 3 3 Usage Let us assume that the variable CLASSPATH of the JVM you are executing includes both the JAR files listed in the item Tools above and those contained in PuppetD4 3 puppetLibs PUPPET usage is java cp CLASSPATH puppet jar puppet Puppet lt IniConfigurationFile gt An alternative way to run PUPPET is executing the batch scripts PuppetD4 3 puppet sh and PuppetD4 3 runPuppet bat 1 on a given lt IniConfigurationFile gt TRespectivelly under Unix like and Windows operating systems IS o E uUNI lt wsag AgreementOffer xsi schemaLocation xmlns wsag gt g Ag lt wsag GuaranteeTerm wsag Name WarehouseGT wsag Obligated ServiceProvider gt lt wsag GuaranteeTerm gt lt wsag AgreementOffer gt lt tns TrueGihast xmins tns 1 T1 xmins xsi 7 1 xsi schemaloca
49. ice gt lt wsdl operation name getMedicalDevices gt lt wsdl input message impl getMedicalDevicesRequest name getMedicalDevicesRequest gt lt wsdl output message impl getMedicalDevicesResponse name getMedicalDevicesResponse gt lt wsdl operation gt lt wsdl operation name getMeasure parameterOrder idMedicalDevice gt lt wsdl input message impl getMeasureRequest name getMeasureRequest gt lt wsdl output message impl getMeasureResponse name getMeasureResponse gt lt wsdl operation gt lt wsdl portType gt lt wsdl binding name WSMedicalDeviceSoapBinding type impl WSMedicalDevice gt lt wsdlsoap binding style rpc transport http schemas xmlsoap org soap http gt lt wsdl operation name getMedicalDevices gt lt wsdlsoap operation soapAction gt lt wsdl input name getMedicalDevicesRequest gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http wsScenario use encoded gt lt wsdl input gt lt wsdl output name getMedicalDevicesResponse gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http localhost 8080 axis services WSMedicalDevice use encoded gt lt wsdl output gt lt wsdl operation gt lt wsdl operation name getMeasure gt lt wsdlsoap operation soapAction gt 25 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
50. ing ssmsimulator ssm Message m info frantzen testing ssmsimulator ssm Message next if m getKind info frantzen testing ssmsimulator ssm MessageKind UNOBSERVABLE if m getKind kind amp amp m getOperation equals op return m throw new Exception Cannot find the input SSM message belonging to the Operation op getName public WarehousePortBindingImpl1 throws Exception 4 x To initialise the Simulator the following items are needed The URL of the WSDL file java net URL aMbItIoNWSDLUrl new java net URL Put here the URL of the Service s WSDL The name of the WSDL Service EVA String aMbitloNservice Put here the name of the Service as in the WSDL The name of the WSDL Port String aMbltIoNport Put here the port of the Service as in the WSDL The URL of the SSM Schema Instance java net URL aMbIt IONSSMUrl new java net URL Put here the URL of the SSM Schema Instance Now we can generate the SSM object To do so we use Zsolt s Minerva library aMbItIoNssm hu soft4d jessi ssm SSMHandler generateSSM aMbItIoNWSDLUrl aMbItIoNSSMUrl aMbItIoNservice aMbItIoNport Before we can use the SSM in the simulator the parsers have to be attached to the switches aMbItIoNssm attachParsersToSwitches Next we generate the socket to the treeSolver String aM
51. istance 14 package Datal ScenairoTID J lt lt artifact gt gt ii pes WS Seguitel Service lt lt artifact gt gt 4 WS Plastic D lt lt deploy gt gt Plastic Server notifyAlarm aliasRG String alarmKind String date date boolean E getContactDecivelP aliasRG String alarmKind String Collection getResidencialGatewaylP aliasRG String String notifyAlarm aliasRG String alarmKind String date date gt jif T lt lt deploy gt gt B Server y Physician Host i lt lt artifact gt gt E 4 Supervisor Host sor e Vo a AO gt unnamed Plastic Server lt lt deploy gt gt _ 7 lt lt deploy gt gt unnamed2 Plastic Server receiveAlarm residencialGatewaylP String alarmKind String de lt lt artifact gt gt D WS Physician receiveAlarm redidencialGatewaylP String alarm Kind String lt lt artifact gt gt Hl WS Medical Devices L lt lt artifact gt gt D Residencial Gateway WS Calendar getMedicalDevicesQ Collection A Mia getMesure idMedicalDevice String String lt lt deploy gt gt getAppointmentByMonth mounth String year String Collection a k lt deploy gt gt A getAppointment appointmentiD String String Fi
52. istribution gt lt puppetSLO Latency gt lt puppetSLO Puppet SLO gt lt wsag ServiceLevelObjective gt lt wsag BusinessValueList gt lt wsag Penalty gt lt wsag AssessmentInterval gt lt wsag Count gt lt wsag AssessmentInterval gt lt wsag ValueExpression gt 2 lt wsag ValueExpression gt lt wsag Penalty gt lt wsag BusinessValueList gt lt wsag GuaranteeTerm gt lt wsag ExactlyOne gt lt wsag GuaranteeTerm wsag Name AlarmDoctor Terml wsag Obligated ServiceProvider gt lt wsag ServiceScope wsag ServiceName WSDoctor gt lt puppet Scope PuppetScope gt lt puppet Scope Method gt lt NameMet hod gt receiveAlarm lt NameMet hod gt lt puppet Scope Method gt lt puppet Scope Puppet Scope gt lt wsag ServiceScope gt lt wsag QualifyingCondition gt lt puppetQC PuppetQC gt lt puppetQC StringBinaryExpression gt lt puppetQC StringType gt lt Variable gt deployedOn lt Variable gt lt puppetQC StringType gt lt op gt equal lt op gt lt puppetQC StringType gt lt Value gt MobileNode lt Value gt 27 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 2
53. it 3 Deployment 3 1 Install Unzip the archive PuppetD4 4 tgz and configure the environmental CLASSPATH with the required libs indi cated above The directory structure is the following e PuppetD4 3 doc example externalLibs puppet jar puppetLibs puppet sh runPuppet bat src xml The directory PuppetD4 4 doc contains this manual The directory PuppetD4 4 xml contains the defini tions mapping of the WS Agreement statements into the Java code The directory PuppetD4 4 puppetLibs contains the libraries required by PUPPET in order to run As your preference you would append the name of the jar files in PuppetD4 3 puppetLibs and the external library to the Java CLASSPATH variable PuppetD4 3 puppet sh and PuppetD4 3 runPuppet bat are exacutable batch scripts that set the Java CLASS PATH variable and run PUPPET on a given input file When you use such scripts please copy the external libraries into the directory PuppetD4 4 externalLibs 3 2 Configure PUPPET generates stubs for web services according to what defined in a given configuration file The configuration file is supposed to compile with the standard INI File Format In such file PUPPET looks for the section named mainSection PUPPET loads its parameters as specified in the configuration held by this section The parameters that could be specified into the input configuration file are wsdIPath It is the path to the directory stori
54. mobile applications In Proc of the 34th EUROMICRO CONFERENCE on Software Engineering and Advanced Applications u SEAA 2008 Parma Italy September 2008 IEEE to appear W Emmerich F Raimondi J Skene V Cortellessa P Inverardi M Tivoli D D Ruscio M Autili R Mirandola V Grassi A Sabetta J Gonzales P Mazzoleni and S Tai SLA language and anal ysis techniques for adaptable and resource aware components Technical Report Deliverable D2 1 PLASTIC Consortium March 2007 IST STREP Project P Inverardi V Cortellessa A Di Marco M Autili et al Formal description of the PLASTIC conceptual model and of its relationship with the PLASTIC platform toolset Technical Report Deliverable D1 2 PLASTIC Consortium March 2008 IST STREP Project F Liotopoulos S Tai J Sairamesh H Eikerling J Gonzalez J Barra M Jazayeri J Wuttke P Inver ardi V Cortellessa A Di Marco and M Autili Scenarios Requirements and initial Conceptual Model Technical Report Deliverable D1 1 PLASTIC Consortium June 2006 IST STREP Project H Ludwig WS Agreement Concepts and Use Agreement Based Service Oriented Architectures Technical Report RC23949 IBM May 2006 J Skene and W Emmerich Engineering runtime requirements monitoring systems using MDA tech nologies 2005 36
55. mpl WSSupervisorSoapBinding name WSSupervisor gt lt wsdlsoap address location http localhost 8080 axis services WSSupervisor gt lt wsdl port gt lt wsdl service gt lt wsdl definitions gt 5 4 Abstract WSDL WSPlastic lt xml version 1 0 encoding UTF 8 gt lt wsdl definitions targetNamespace http localhost 8080 axis services WSPlastic xmlns apachesoap http xml apache org xml soap xmlns impl http localhost 8080 axis services WSPlastic xmlns intf http localhost 8080 ax1s services WSPlastic xmlns soapenc http schemas xmlsoap org soap encoding xmlns wsdl http schemas xmlsoap org wsdl xmlns wsdlsoap http schemas xmlsoap org wsdl soap xmlns xsd http www w3 org 2001 XMLSchema gt lt WSDL created by Apache Axis version 1 4 BUE On Apr 2000 OO NS SE lt wsdl message name notifyAlarmRequest gt lt wsdl part name aliasRG type soapenc string gt lt wsdl part name alarmGender type soapenc string gt lt wsdl part name date type xsd dateTime gt lt wsdl message gt lt wsdl message name notifyAlarmResponse gt lt wsdl message gt lt wsdl portType name WSPlastic gt 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 lt wsdl operation name notifyAla
56. ng the WSDL specifications of all the services whose emula tors would be generated by means of PUPPET Required targetPath It is the path to the directory where PUPPET will dump the generated stubs Required wsaFilename It is the name of the WS Agreement file describing the agreements among the considered services If it is not specified PUPPET would look for a file named agreement xml Optional trueTermsFilename It is the name of the file storing the terms of the agreement that have to be consid ered as fulfilled As described in Sec 4 1 for each term in the agreement PUPPET will generate code that emulates an extra functional behavior if and only if the term is fulfilled If this file name is not specified PUPPET would look for a file named gtTrueltemList xml Optional wsaPath It is the path to the directory storing the WS Agreement file Required trueTermsPath It is the path to the directory storing the true TermsFilename lf it is not specified PUPPET would assign to this parameter the path to the directory storing the WS Agreement file wsaPath Optional qcMappingFilename It is the path to the file storing the template mapping of the Qualifying Conditions in WS Agreement on to the the Java code that will be generated PUPPET already includes a predefined mapping file Even though it is possible to change this mapping we strongly discourage from changing it Optional sloMappingFilename It is the path to t
57. o the calling Service the simulator has to store the output we choose line 188 at Listing 6 Thus what is left to do is to map the output message back to a real return value line 194 199 at Listing 6 For the sake of completeness in the appendix is reported the Java source code emulating a Warehouse Web Service see the example in Chapter 4 7 The whole code of the stub was automatically generated by Puppet with the ambitionMode enabled 4 5 The Emulation of the Mobility with PUPPET PUPPET supports the validation of service oriented applications aiming at evaluating the desired QoS characteristics for a specific service under development before it is deployed In 7 PuPPET was equipped with the capability to simulate the runtime movement of the nodes that host the generated stubs Indeed the QoS properties of each testing environment that PUPPET generates could depend on the mobility models of the devices where the services of the testbed are deployed The benefit of introducing a mobility model in PUPPET is twofold On the one hand the proposed approach is able to validate the QoS features of the Service Under Test SUT by taking into account the availability of the other interacting services In this sense PUPPET assumes that a service is available in a network scenario if according to the used mobility model the node where this service is deployed is reachable On the other hand PUPPET permits to use in the testing phase the same mo
58. obility oracle If the returned damp index is 1 a failure is generated as an exception raised by the platform hosting the Web Service stub In this manner the reliability of the SUT will depend not only on the reliability exposed in the QoS agreements by the composed services but also on the availability of the 13 services it composes as simulated by the mobility model of a given scenario When the damp index returned by the mobility oracle is included in 0 1 the Java code injected into the stub behaves emulating an additional latency that is function of the damp index In this manner the interactions between services deployed on different nodes that can move in a space will affect the response time The delta introduced in the latency is function of the damp index Finally the mobility oracle returns a 0 damp index when two mobile devices are in the same location In this case the extra functional behavior defined in the agreement is not modified Note that both the functions computing the metric for the visibility and the damping factor can be specifi cally defined for each scenario PUPPET provides an abstract specification of the mobility oracle that can be extended instantiating both the metric for the mobility and the damping factor according to the requiremnets of each scenario PUPPET includes a defaul implementation for the mobility oracle where the visibility function is ex pressed in terms of euclidean distance between the two
59. of the WSDL the Web Service that is going to be emulated exports e at line 53 set the name of the Web Service that is going to be emulated as reported on the WSDL e at line 57 set the port of the Web Service that is going to be emulated as reported on the WSDL e atline 61 setthe URL of the file with the specification of the SSM e at line 76 set the URL of the treeSolver that the simulator uses in order to generate meaningful functional values e atline 77 set the port of the treeSolver that the simulator uses in order to generate meaningful func tional values To initialise the Simulator the following items are needed The URL of the WSDL file java net URL aMbItIONWSDLUrl new Java net URL Put here the URL of the Service s WSDL The name of the WSDL Service String aMbItIoNservice Put here the name of the Service as in the WSDL The name of the WSDL Port String aMbItIoNport Put here the port of the Service as in the WSDL The URL of the SSM Schema Instance java net URL aMbIt IoNSSMUrl new java net URL Put here the URL of the SSM Schema Instance Now we can generate the SSM object To do so we use Zsolt s Minerva library aMbItIoNssm hu soft4d jessi ssm SSMHandler generateSSM 10 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
60. owing we report the Java source code emulating a Warehouse Web Service The whole code of the stub was automatically generated by Puppet with the ambitionMode enabled The specification of the warehouse we used in this example is the one given in Chapter 4 7 package services import java math BigInteger import java util ArrayList import java util Iterator import density Density public class WarehousePortBindingImpl The SSM object private info frantzen testing ssmsimulator ssm ServiceStateMachine aMbItIoNssm The simulator is generated private info frantzen testing ssmsimulator SSMSimulator aMbItIoNsim private info frantzen testing ssmsimulator ssm Message aMbItIoNfindSSMMessage info frantzen testing ssmsimulator ssm ServiceStateMachine ssm info frantzen testing ssmsimulator ssm MessageKind kind 31 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 info frantzen testing ssmsimulator ssm Operation op throws Exception java util HashSet lt info frantzen testing ssmsimulator ssm Message gt messages ssm getMessages for java util Iterator it messages iterator it hasNext 4 info frantzen test
61. p xmlns http www w3 org 2001 XMLSchema gt lt import namespace http localhost 8080 axis services WSCalendar gt lt import namespace http schemas xmlsoap org soap encoding gt lt complexType name Vector gt lt sequence gt lt element maxOccurs unbounded minOccurs 0 name item type xsd anyType gt lt sequence gt lt complexType gt lt schema gt lt wsdl types gt lt wsdl message name getAppointmentByMonthRequest gt lt wsdl part name month type soapenc string gt lt wsdl part name year type soapenc string gt lt wsdl message gt lt wsdl message name getAppointmentRequest gt lt wsdl part name apointmentID type soapenc string gt lt wsdl message gt lt wsdl message name getAppointmentByMonthResponse gt lt wsdl part name getAppointmentByMonthReturn tvpe impl Arravof xsd anyType gt lt wsdl message gt lt wsdl message name getAppointmentResponse gt lt wsdl part name getAppointmentReturn type soapenc string gt lt wsdl message gt lt wsdl portType name WSCalendar gt lt wsdl operation name getAppointmentByMonth parameterOrder month year gt lt wsdl input message impl getAppointmentByMonthRequest name getAppointmentByMonthRequest gt lt wsdl output message impl getAppointmentByMonthResponse name getAppointmentByMonthResponse gt lt wsdl operation gt lt wsdl operation name getAppointment parameterOrder apointmentID gt 19
62. r getName adrInstance The valuation is ready we can construct an instantiated message info frantzen testing ssmsimulator ssm InstantiatedMessage aMbItIoNim new info frantzen testing ssmsimulator ssm InstantiatedMessage aMbItIoNmessage aMbItIoNvaluation This instantiated message can now be given to the simulator Note that here the simulator can potentially spot a failure namely when this message is not specified in the SSM In that sense here we do testing aMbItIoNsim processInstantiatedMessage aMbItIoNim catch Exception genericException throw new java rmi RemoteException genericException getMessage long winSize 120000 int maxFault 3 long currentTimeStamp Svstem currentTimeMillis for int i 0 i lt faultBuffer size i if currentTimeStamp faultBuffer get i gt winSize faultBuffer remove i if faultBuffer size lt maxFault Density d new Density 35 double dv d gaussian 100 li E gt 50 d String fCode Server Noservice String string PUPPET No target Service to invoke gt org apache axis AxisFault fault new org apache axis AxisFault fCode fString null aMbItloNsim undo faultBuffer add currentTimeStamp throw fault References 1 2 3 4 5 6 7 8 9 10 11 12 The network simulator NS 2 homepage http www isi e
63. rm parameterOrder aliasRG_alarmGender_date gt lt wsdl input message impl notifyAlarmRequest name notifyAlarmRequest gt lt wsdl output message impl notifyAlarmResponse name notifyAlarmResponse gt lt wsdl operation gt lt wsdl portType gt lt wsdl binding name WSPlasticSoapBinding type impl WSPlastic gt lt wsdlsoap binding style rpc transport http schemas xmlsoap org soap http gt lt wsdl operation name notifyAlarm gt lt wsdlsoap operation soapAction gt lt wsdl input name notifyAlarmRequest gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http wsScenario use encoded gt lt wsdl input gt lt wsdl output name notifyAlarmResponse gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http localhost 8080 axis services WSPlastic use encoded gt lt wsdl output gt lt wsdl operation gt lt wsdl binding gt lt wsdl service name WSPlasticService gt lt wsdl port binding impl WSPlasticSoapBinding name WSPlastic gt lt wsdlsoap address location http localhost 8080 axis services WSPlastic gt lt wsdl port gt lt wsdl service gt lt wsdl definitions gt 5 5 Abstract WSDL WSSeguitelService lt xml version 1 0 encoding UTF 8 gt lt wsdl definitions targetNamespace http localhost 8080 axis services WSSeguitelService xmlns apachesoap http xml apache org xml soap
64. rrayType wsdl arrayType xsd anyType gt lt restriction gt 24 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 lt complexContent gt lt complexType gt lt schema gt lt schema targetNamespace http xml apache org xml soap xmlns http www w3 org 2001 XMLSchema gt lt import namespace http localhost 8080 axis services WSMedicalDevice gt lt import namespace http schemas xmlsoap org soap encoding gt lt complexType name Vector gt lt sequence gt lt element maxOccurs unbounded minOccurs 0 name item type xsd anyType gt lt sequence gt lt complexType gt lt schema gt lt wsdl types gt lt wsdl message name getMedicalDevicesRequest gt lt wsdl message gt lt wsdl message name getMedicalDevicesResponse gt lt wsdl part name getMedicalDevicesReturn tvpe impl Arravof xsd anyType gt lt wsdl message gt lt wsdl message name getMeasureRequest gt lt wsdl part name idMedicalDevice type soapenc string gt lt wsdl message gt lt wsdl message name getMeasureResponse gt lt wsdl part name getMeasureReturn type soapenc string gt lt wsdl message gt lt wsdl portType name WSMedicalDev
65. s several hardware medical devices Each medical device is identified on the Residential Gateway by means of a unique identification code This Web Service interfaces the medical devices hosted by the Residential Gateway on the Plastic Network It exports two operations getMedicalDevices returns a collection of the controlled medical devices To control an eHealth parameter monitored by a medical device the web service has to be invoked on the getMeasure operation providing the id code of the medical device as input WSCalendar Each Residential Gateway holds the lists of the periodic appointments that a supervisor plans with the patient This Web Service interfaces the Plastic Network to this feature exporting the methods getAppointmentByMonth and getAppointment The former gives information on the appointments already scheduled in a given month of a year The latter is used to create a new one In this scenario the Web Services described above are supposed to be deployed on different and distributed platforms Specifically WSPlastic is deployed on a PlasticServer while the WSSeguitelService is supposed to run on the eHealthServer Nevertheless in principle the two server could be also the same 15 interaction SequenceTID et SequenceTID 7 Alarm Not Received Alarm Received T getMelicalDevices l idMedicalDevicez ki T alarmKind
66. t puppetQC StringBinaryExpression gt lt puppetQC StringType gt lt Variable gt deployedOn lt Variable gt lt puppetQOC StringType gt lt op gt equal lt op gt lt puppetQC StringType gt lt Value gt WiredServer lt Value gt lt puppetQC StringType gt lt puppetOC StringBinaryExpression gt lt puppetQC PuppetQC gt lt wsag QualifyingCondition gt lt wsag ServiceLevelObjective gt lt puppetSLO Puppet SLO gt lt puppetSLO Latency gt lt value gt 2000 lt value gt lt puppetSLO Distribution gt lt Gaussian gt 10 lt Gaussian gt lt puppetSLO Distribution gt lt puppetSLO Latency gt lt puppetSLO Reliability gt lt Reliabilitywindow gt 30000 lt Reliabilitywindow gt lt ReliabilityPerc gt 1 lt ReliabilityPerc gt lt puppetSLO Distribution gt lt Gaussian gt 100 lt Gaussian gt lt puppetSLO Distribution gt lt puppetSLO Reliability gt lt puppetSLO Puppet SLO gt lt wsag ServiceLevelObjective gt lt wsag BusinessValueList gt lt wsag Penalty gt lt wsag AssessmentInterval gt lt wsag Count gt lt wsag AssessmentInterval gt 28 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 29
67. te gt lt wsdl input message impl notifyAlarmRequest name notifyAlarmRequest gt lt wsdl output message impl notifyAlarmResponse name notifyAlarmResponse gt lt wsdl operation gt lt wsdl operation name getConnectedDeviceIP parameterOrder aliasRG_alarmGender gt lt wsdl input message impl getConnectedDeviceIPRequest name getConnectedDeviceIPRequest gt lt wsdl output message impl getConnectedDeviceIPResponse name getConnectedDeviceIPResponse gt lt wsdl operation gt lt wsdl operation name getResidencialGatewayIP parameterOrder aliasRG gt lt wsdl input message impl getResidencialGatewayIPRequest name getResidencialGatewayIPRequest gt lt wsdl output message impl getResidencialGatewayIPResponse name getResidencialGatewayIPResponse gt lt wsdl operation gt lt wsdl portType gt lt wsdl binding name WSSeguitelServiceSoapBinding type impl WSSeguitelService gt lt wsdlsoap binding style rpc transport http schemas xmlsoap org soap http gt lt wsdl operation name notifyAlarm gt lt wsdlsoap operation soapAction gt lt wsdl input name notifyAlarmRequest gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http wsScenario use encoded gt lt wsdl input gt 23 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
68. the kind of measurement that is 17 41 42 43 44 45 46 47 48 49 50 51 52 53 54 performed and the medical device that is used The QoS levels admitted in the scenario here considered are formalized in an agreement Table 25 reports a short version of the extra functional properties that are supposed to be respected in the scenario Time are given in milliseconds In the appendix below the listings reporting the complete version of the XML document expressing the agreement are reported 4 7 Reference To Jambition For any reference to Jambition in this document please refer to 5 5 Appendix 5 1 Abstract WSDL WSDoctor lt xml version 1 0 encoding UTF 8 gt lt wsdl definitions targetNamespace http localhost 8080 axis services WSDoctor xmlns apachesoap http xml apache org xml soap xmlns impl http localhost 8080 axis services WSDoctor xmlns intf http localhost 8080 axis services WSDoctor xmlns soapenc http schemas xmlsoap org soap encoding xmlns wsdl http schemas xmlsoap org wsdl xmlns wsdlsoap http schemas xmlsoap org wsdl soap xmlns xsd http www w3 org 2001 XMLSchema gt lt WSDL created by Apache Axis version 1 4 BULIC on Apr 22 1020 0 G A DOS gt lt wsdl message name receiveAlarmRequest gt lt wsdl part name residencialGatewayIP type soapenc string gt lt wsdl part name alarmGender type soapenc string gt lt wsdl message gt lt wsdl message name r
69. the syntax that PUPPET uses in order to limit the scope of a Term only to some operations among all the ones that a Service exports 4 2 1 Qualifying Conditions In WS Agreement the Qualifying Conditions of a Term may appear to express a precondition under which a Term holds 11 In PUPPET a Qualifying Condition can be formulated in terms of atomic expressions typed as Numeric Boolean or String see Figure 1 The atomic expressions can be combined by means of the Boolean operators AND see 2 OR see 3 and NOT see 4 Figure 5 depicts the elements that can be used in order to construct an atomic expressions Also for each operation type it shows the operators supported in this release 4 2 2 Service Level Objective The specification of WS Agreement defines the Service Level Objective of type xsd any Type as the ele ment expressing the condition that must be met to satisfy the guarantee Term 11 This version of PUPPET handles constraints on the maximum admissible response time i e service latency and constraints on reliability see Figure 6 The time elapsed by a service when invoked latency is defined specifying the maximum admissible response time and a probability function describing how the delays are distributed In this version is it possible to define delays that are normally distributed or that follow the Poisson s law The constraints on the reliability of a Service are defined in terms of the maximum number of fail
70. ther hand if WSDoctor does not accept to handle the notification or due to a QoS agreement violation see Section 5 7 WSPlastic proceeds by extracting the next endpoint of the target Web Service When the doctor agrees on handle the alarm he she contacts WSMedicalDevices deployed on the re ferred Residential Gateway Then WSDoctor collects the list of the medical devices controlled by the Res idential Gateway The monitoring of the patient parameters is performed invoking the getMeasure method on those devices that are considered important for the clinical status In the following the case where the alarm kind is not critical i e NOT CONFIRMATION WSPlastic extracts an IP address from the address list Then it invokes receiveAlarm on WSSupervisor using the IP address as endpoint If the target Web Service decides to accept the alarm handling WSPlastic ends con sidering the problem solved On the other hand if WSSupervisor does not accept to handle the notification or due to a QoS agreement violation see Section 5 7 WSPlastic proceeds extracting the next endpoint of the target Web Service When the supervisor agrees on handle the alarm he she contacts WSCalendar deployed on the re ferred Residential Gateway In the end the WSSupervisor queries the Residential Gateway to schedule an appointment with the patient 4 6 3 QoS Properties Definition As described in Section 4 6 1 the Web Services considered in this scenario could be d
71. tion gt lt tns GTItemName gt WarehouseGT lt tns GTItemName gt lt tns TrueGTList gt Table 1 Enabling the code generation in PUPPET 4 Tutorial 4 1 Terms in the Agreement and Generation Process In WS Agreement 11 an agreement specification is composed by one or more terms These terms are grouped in a logic formula by means logic connectors All logic AND OneOrMore logic OR and ExactlyOne logic XOR Different scenarios could be considered defining a set of terms in the agreement that are assumed fulfilled This set of terms enables in PUPPET the generation of the Java code emulating the extra functional behavior PUPPET loads the list of these terms parsing an XML file The value of each element in the XML file refers to the name of a term in the WS Agreement specification The example in Table 1 shows how to enable the code generation for the term named WarehouseGT in the agreement specification 4 2 The Syntax for the Terms in the WS Agreement Contracts This section describes the domain specific syntax adopted in order to instantiate the generic contents de fined by the Terms in WS Agreement The section is organized in tree main parts Section 4 2 1 introduces the syntax that PUPPET uses in order to specify under which conditions a Term is applicable Section 4 2 2 introduces the syntax that PUPPET uses in order to specify the extra functional property the Term predi cates about Section 4 2 3 introduces
72. ure ReliabilityPerc in Figure 6 in a given window of time Also in this case this release offer to describe the distribution of the failures in the window either as normal or as Poisson s 7 Je schema PuppetQc e 0 a 0 E StringExpression Em puppetQC AND JH puppetQC OR JE ll u puppetQC NOT JE Figure 1 Expressions in the Qualifying Condition a Jo Oe Des 0 o puppetQC NumericBooleanExpression At 0 00 puppetQC BooleanExpression Af 0 00 puppetQC NOT J F puppetQC OR JE Figure 2 AND in the Qualifying Condition for Joe ai 0 puppetQC NumericBooleanExpression A 0 puppetQC BooleanExpression j E 0 00 puppetQC AND JE puppetQC NOT JE Figure 3 OR in the Qualifying Condition MPAA 4 puppetQC StringBinaryExpression JE puppetQC NumericBooleanExpression JE puppetQC BooleanExpression a puppetQC AND El N puppetQC OR JE Figure 4 NOT in the Qualifving Condition 4 2 3 Scope The scope of a Term describes to what service element specificallv a term applies For example a term might only apply to one operation of a Web service at a particular end point According to the specification of WS Agreement 11 the scope of a Term contains a ServiceName attribute and any other XML structure describing a sub structure of a service to which the scope applies In this version of PUPPET itis possible to define the list of the operations
73. wsScenario use encoded gt lt wsdl input gt lt wsdl output name getAppointmentResponse gt lt wsdlsoap body encodingStyle http schemas xmlsoap org soap encoding namespace http localhost 8080 axis services WSCalendar use encoded gt lt wsdl output gt lt wsdl operation gt lt wsdl binding gt lt wsdl service name WSCalendarService gt lt wsdl port binding impl WSCalendarSoapBinding name WSCalendar gt lt wsdlsoap address location http localhost 8080 axis services WSCalendar gt lt wsdl port gt lt wsdl service gt lt wsdl definitions gt 5 3 Abstract WSDL WSSupervisor lt xml version 1 0 encoding UTF 8 gt lt wsdl definitions targetNamespace http localhost 8080 axis services WSSupervisor xmlns apachesoap http xml apache org xml soap xmlns impl http localhost 8080 axis services WSSupervisor xmlns intf http localhost 8080 axis services WSSupervisor xmlns soapenc http schemas xmlsoap org soap encoding xmlns wsdl http schemas xmlsoap org wsdl xmlns wsdlsoap http schemas xmlsoap org wsdl soap xmlns xsd http www w3 org 2001 XMLSchema gt lt WSDL created by Apache Axis version 1 4 Vide coja Apr 22 200E O06 S ASen lt wsdl message name receiveAlarmResponse gt lt wsdl message gt lt wsdl message name receiveAlarmRequest gt 20 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Download Pdf Manuals
Related Search
Related Contents
FVC05への移行ガイド Hercules Chiller User Manual MULTICAL® 601 - GWF Messsysteme AG Guitare, hasard, alchimie, élixir S082854z Contents Guida introduttiva al software Copyright © All rights reserved.
Failed to retrieve file