RTS Web Service设计文档.docx
《RTS Web Service设计文档.docx》由会员分享,可在线阅读,更多相关《RTS Web Service设计文档.docx(84页珍藏版)》请在冰豆网上搜索。
RTSWebService设计文档
SchneiderElectricDMSNS
RealTimeSystemWebService
DesignSpecification
泰尔文特实时系统WebServiceService
设计文档
DesignDocument
TableofContents
目录
1.RevisionHistory修订历史
Version
版本
Authors
作者
Date
日期
Comments
备注
<0.1>
TijanaBrcanski
25-Mar-2013
,,etc.
2.Overview概览
RTSWSispartofDMSSystem,responsibleforprovidingWebServiceaccesstoDMSReal-Timeservices.RTSWSprovidesinterfacefordistributionnetworkdata(ReliabilityData,StatusOfSupply,TroubleCal,NetAffected,AllSSM,SSMById,DynamicData,LoadFlowandStateEstimation,DynamicDataHistory,PI/Alarm,EnergyLosses)totheClients.
RTSWS是DMS系统的一部分,负责提供WebService给DMS实时服务,RTSWS为配网数据提供接口(ReliabilityData,StatusOfSupply,TroubleCal,NetAffected,AllSSM,SSMById,DynamicData,LoadFlowandStateEstimation,DynamicDataHistory,PI/Alarm,EnergyLosses)给客户端
3.RTSWSArchitectureRTSWS架构
Figure1.RTSWSArchitecture
图1RTSWS架构
Webserviceisasoftwaresystemdesignedtosupportinteroperablemachine-to-machineinteractionoveranetwork.Ithasaninterfacedescribedinamachine-processableformat(WSDL).OthersystemsinteractwiththewebserviceinamannerprescribedbyitsdescriptionusingSOAPmessages,typicallyconveyedusingHTTPwithanXMLserializationinconjunctionwithotherWeb-relatedstandards.
RTSWSisaWebServiceproxycomponentforDMSReal-Timeservices.ItmeansthatitreceivesrequestfromRTSWSClientforparticulardata,dispatchesrequesttoWebProxyServeroverWPIlibraryandreturnstheresulttotheclient.
ThereisalsopossibilitythattheRTSWSClientsubscribetoobtainsomeresults.RTSWSClientcreatesacallbackobjectandforwardsanEndpointReferencetotheserver.OverEndpointReference,serversendsresultstotheClient.
RTSWSisdeployedandtestedonApache-Tomcatwebapplicationserver.
Foreachfunctionality,methodsandstructuresaredefinedintoWSDL.RTSWS.wsdlisgiveninAppendix.
Note:
RTSWSexpectedfromtheclientUTCtime.
4.RTSWS.war
7.1RTSWS.warclassdiagram(part1)
7.2
RTSWS.warclassdiagram(part2)
7.3RTSWS.warclassdiagram(part3)
RTSWSwebserviceisimplementedusingApacheCXFFramework.
ApacheCXFisanopensourceservicesframework.CXFhelpsyoubuildanddevelopservicesusingfrontendprogrammingAPIs,likeJAX-WSandJAX-RS.TheseservicescanspeakavarietyofprotocolssuchasSOAP,XML/HTTPorCORBAandworkoveravarietyoftransportssuchasHTTP,JMSorJBI.
CXFprovidestoolsforgeneratingcode(wsdl2java,wsdl2jsandjava2js),generatingWSDLs(java2ws,xsd2wsdlandidl2wsdl),addingendpointsandsupportfiles(wsdl2soapandwsdl2corba),validatingWSDLs(wsdlvalidate)andforusingMaven.
wsdl2javatakesaWSDLdocumentandgeneratesfullyannotatedJavacodewhichisusedtoimplementaservice.
Thewsdl2javacommandcanbewrappedinsideanAnttarget.
ThedefaultJAX-WSfrontendcreatedbywsdl2javacanbecustomizedbyusingacustomizationbindingfile.
RTSWSInterfaceRTSWS接口
RTSWS.javadescribesinterfaceofRTSWSWebService.ImplementationoftheRTSWSinterfaceisinRTSWSImpl.javaclass.
RTSWS.java描述了RTSWSWebService的接口,RTSWS接口的实现是在RTSWSImpl.java类中
Reliabilitydata可靠性数据
●ReliabilityDataResponserequestReliabilityData(ReliabilityDataRequestparam)
ReliabilityDataRequeststructureconstainsfollowingattributes:
ReliabilityDataRequest结构包括下面的属性:
-StringelementID–idoneofthefollowingelements:
HV/MVSubstation,MV/LVSubstation,HVTransformer,FeederBayorEntireNetwork.ForEntireNetworkelementIDisemptystring,
字符串elementID–下面元件的ID:
高压变电站,中压变电站,高压变压器,馈线间隔或者整个电网,整个电网的elementID为空字符串
-XMLGregorianCalendarbegDate–forperiodbetweenbegDateandendDatefunctionwillreturnsdesiredresults,
XMLGregorianCalendarbegDate–begDate和endDate间的时间段返回请求结果
-XMLGregorianCalendarendDate–forperiodbetweenbegDateandendDatefunctionwillreturnsdesiredresults,
begDate和endDate之间的时间段返回请求结果
-CalcParamscalcParams–carriesinformationwhichoftheresultsneedtoreturn.
CalcParamscalcParams–含有需要返回的结果信息
CalcParamsstructurecontainsfollowingattributes:
CalcParams结构包括下面的属性:
-ListparamName–carriesinformationwhichoftheresultsneedtoreturn.
EParamNameenumerationcontainsfollowingitems:
CAIDI,CAIFI,SAIDI,SAIFIandENSI.
EParamName枚举包括下面的项:
CAIDI,CAIFI,SAIDI,SAIFI和ENSI.
ReliabilityDataResponsestructureconstainsfollowingattributes:
ReliabilityDataResponse结构包括下面的属性:
-StringelementID–idofelementforwhichtheresultisreturned:
HV/MVSubstation,MV/LVSubstation,HVTransformer,FeederBayorEntireNetwork.ForEntireNetworkelementIDisemptystring,
字符串elementID–返回元件的id结果:
高压变电站,中压变电站,高压变压器,馈线间隔和整个网络,整个电网的elementID为空字符串
-XMLGregorianCalendarbegDate–resultcorrespondstotheperiodbetweenbegDateandendDate,
-XMLGregorianCalendarendDate–resultcorrespondstotheperiodbetweenbegDateandendDate,
-CalcValuescalcValues–resultsofReliabilityDatafunction,containslistofCalcValueobject.
CalcValuesstructurecontainsfollowingattributes:
-ListcalcValue–resultsofReliabilityDatafunction,itemofEParamNameenumerationandcorrespondingvalue.
CalcValuestructurecontainsfollowingattributes:
-EParamNameparamName–oneoffollowingitemCAIDI,CAIFI,SAIDI,SAIFIandENSI,
-doubleparamValue–resultsofReliabilityDatafunction.
Statusofsupply
●StatusOfSupplyResponserequestStatusOfSupply(StatusOfSupplyRequestparam)
StatusOfSupplyRequeststructureconstainsfollowingattributes:
-StringelementID–idoneofthefollowingelements:
Busbar,Section,HVTransformer,MVTransformer,MV/LVSubstation,ConsumerGroup,Generator,MotororCapacitor.
StatusOfSupplyResponsestructurecontainsfollowingattributes:
-StringelementID–idofelementforwhichtheresultisreturned:
Busbar,Section,HVTransformer,MVTransformer,MV/LVSubstation,ConsumerGroup,Generator,MotororCapacitor,
-ECurrentStatuscurrentStatus–resultofStatusOfSupplyfunction.
ECurrentStatusenumerationcontainsfollowingitems:
TA_UNKNOWN,TA_GROUNDED,TA_UNENERGIZED,TA_ENERGIZED,TA_GENERATORandTA_MESHED.
Troubleticket
●ETroubleTicketResponserequestNewTroubleTicket(NewTroubleTicketparam)
NewTroubleTicketstructureconstainsfollowingattributes:
-BigIntegercustomerID–idofcustomer,
-XMLGregorianCalendarcallTime–calltimeofnewtroubleticket,
-TroubleDescriptiontroubleDescription–descriptionofnewtroubleticket.
TroubleDescriptionstructurecontainsfollowingattributes:
-ETroubleManifestationtroubleManifestation–troublemanifestation,
-EFaultCausetroubleCause–troublecause,
-XMLGregorianCalendartroubleTime–timeoftrouble,
-EWeatherConditionweatherCondition–weathercondition,
-Stringlocation–locationoftrouble,
-StringotherInformation–additionalinformationabouttrouble.
ETroubleManifestationenumerationcontainsfollowingitems:
E_NoPower,E_PartialPower,E_HighVoltage,E_LowVoltage,E_FlickeringLightsandE_Other.
EFaultCauseenumerationcontainsfollowingitems:
E_WEATHER_ICE,E_WEATHER_LIGHTNING,E_WILDLIFE_SQUIRREL,E_WILDLIFE_BIRD,E_BURNED_OVERLOAD,E_BURNED_WEATHER,E_WIREDOWN_ACCIDENT,E_WIREDONW_TREE,E_WIREDOWN_VANDALISMandE_UNKNOWN.
EWeatherConditionenumerationcontainsfollowingitems:
E_Sunny,E_Rainy,E_Cloudy,E_Snowly,E_WindyandE_Stormy.
ETroubleTicketResponseenumerationcontainsfollowingitems:
E_UNKNOWN,E_NOT_ACCEPTEDandE_ACCEPTED.
NetAffectedresults
●voidsubscribeNetAffectedResults(W3CEndpointReferenceparam)
W3CEndpointReference-ClientcreatescallbackobjectandforwardsEndpointReferencetotheserver.OverEndpointReference,serversendsresultstotheclient.
●voidunsubscribeNetAffectedResults(W3CEndpointReferenceparam)
W3CEndpointReference-clientforwardsEndpointReferencetotheserver.ServercancelssubscriptionbasedonEndpointReference.
ThroughOnNetAffectedChangedmethod,RTSWSobtainstheresultsfromtheWebProxy.ThencallnetAffectedResultsmethodthatisontheclient.
●voidnetAffectedResults(NetAffectedResultsnetAffectedResults)
NetAffectedResultsstructureconstainsfollowingattributes:
-BigIntegerid–idofelement,
-EElementTypeelementType–elementtype,
-BigIntegernStatus–operationthatwasperformedontheelement
-DoublefTime–clienttime,
-DoublefTimeA–servertime,
-ListaffectedObject–listofaffectedelements.
EElementTypeenumerationcontainsfollowingitems:
SWG,FUS,SUPandCMX.
AffectedObjectstructurecontainsfollowingattributes:
-BigIntegerid–elementid,
-EitemTypeitemType–typeofelement,
-EAffectationTypeaffectationType–affectationtype.
EItemTypeenumerationcontainsfollowingitems:
TSM,JOI,SECandTSH.
EAffectationTypeenumerationcontainsfollowingitems:
E_ENERGIZEDandE_UNENERGIZED.
SSMsequence
●SSMDescriptionsrequestSSMDescriptions()
SSMDescriptionsstructurecontainsfollowingattributes:
-ListssmDescriptionList
SSMDescriptionisstructure.thatcontains:
-java.math.BigIntegerid–idofSSMsequence
-Stringdescription–descriptionofSSMsequence
●SSMResponserequestSSM(BigIntegerparam)
param–idofSSMsequence.
SSMResponsestructurecontainsfollowingattributes:
-XMLDocumentssmSequence–XMLofssmsequence
-XMLDocumentaffectedElemSimulation–XMLodaffectedelementsinsimulation
-XMLDocumentaffectedElemRealTime–XMLofaffectedelementsinrealtime
XMLDocumentisstructure.thatcontains:
-org.w3c.dom.Elementany
Dynamicdata动态数据
Dynamicdataoncallback回调动态数据
●voidsubscribeD