1 / 12

Data Access WebService for W7-AS

Data Access WebService for W7-AS. S. Jakob , T. Bluhm, A. Werner. Unified Data Access Interface. MDS+ Service. MDS+. MDS+. Service Oriented Architecture ( IBM‘s Redbook on SOA Foundation ). WebService Technology. Server Side. User Side. WSDL file. Building the client code:.

finnea
Télécharger la présentation

Data Access WebService for W7-AS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Access WebServicefor W7-AS S. Jakob , T. Bluhm, A. Werner

  2. Unified Data Access Interface MDS+ Service MDS+ MDS+

  3. Service OrientedArchitecture(IBM‘sRedbook on SOA Foundation)

  4. WebService Technology Server Side User Side WSDL file Building the client code: Stub Compiler: WSDL -> Source Code Compiler: Source Code -> Executable Running the client code: Executable: Run Service request: SOAP Message Server Function: Run Service response: SOAP Message

  5. Self Description: WebService Contract WSDL Definitions <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="w7x" <wsdl:types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:complexType name="CoilInfo"> <xsd:sequence> <xsd:element name="name" type="xsd:string"></xsd:element> <xsd:element name="Units" type="xsd:string"></xsd:element> <xsd:element name="minCurrent" type="xsd:double"></xsd:element> <xsd:element name="maxCurrent" type="xsd:double"></xsd:element> <xsd:element name="Windings" type="xsd:int"></xsd:element> </xsd:sequence> </xsd:complexType> ... </wsdl:types> <wsdl:message name="getCoilDescriptionResponse"> <wsdl:part name="parameters" element="tns:CoilDescription"></wsdl:part> </wsdl:message> <wsdl:portType name="FunctionsW7XPortType"> <wsdl:operation name="getCoilDescription"> <wsdl:input message="tns:getCoilDescriptionRequest"></wsdl:input> <wsdl:output message="tns:getCoilDescriptionResponse"></wsdl:output> </wsdl:operation> ... </wsdl:portType> <wsdl:binding name="FunctionsW7X" type="tns:FunctionsW7XPortType"> <binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="getCoilDescription"> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> ... </wsdl:binding> <wsdl:service name="PlainW7XService"> <wsdl:port name="IppHgwPort" binding="tns:FunctionsW7X"> <soap:address location="http://validator1.ipp-hgw.mpg.de:30000/ipp/w7x/mhd"> </soap:address> </wsdl:port> </wsdl:service> </wsdl:definitions> Data Types Messages Operations Protocol: typ. SOAP Service location

  6. Data Access Genericschemefordataretrieval: 1. Data setisdivided in time intervals withconstantconfigurationW7-AS: shots 2. These intervalsaresubdividedinto time intervalswithconstantparameters segments, W7-AS: timerbursts 3. Segments maybesplitintoseveral databoxes W7-AS: onlyonedata box per segment

  7. Client Programming (C#.NET) Add servicereference(menuentry) Retrieve WSDL Generatestubs Usestubfunctions client = newDataAccessClient.codac.DataAccessPortClient("UDAS"); DataAccessClient.codac.Reference w7asdb = client.open();

  8. Diagnostic/Module Selection codac.ParameterSet[] selectors = newDataAccessClient.codac.ParameterSet[1]; selectors[0] = newcodac.ParameterSet(); selectors[0].name = "dataset"; codac.Parameter[] parms = newDataAccessClient.codac.Parameter[3]; parms[0] = newcodac.Parameter(); parms[0].name = "diagnostic"; parms[0].value = "BDOK"; parms[1] = newcodac.Parameter(); parms[1].name = "module"; parms[1].value = "MIR-354"; parms[2] = newcodac.Parameter(); parms[2].name = "channels"; parms[2].value = "1,3"; selectors[0].parameter = parms; client.select(w7asdb, selectors);

  9. Time/ShotSelection & Data Retrieval long from = client.tagToInterval("56358"); longto = from + (long)1e9; DataAccessClient.codac.ConfigurationInterval[] shots = client.getConfigurationIntervals(w7asdb, from, to); foreach (codac.ConfigurationInterval shot in shots) { DataAccessClient.codac.SegmentInterval[] segments = client.getSegmentIntervals(w7asdb, shot.ID, 0); foreach (codac.SegmentInterval segment in segments) { for (int i = 0; i < segment.nslices; i++) { DataAccessClient.codac.TimeBasedDatadata = client.accessData(w7asdb, i, shot.ID, segment.ID, selectors[0],true); System.Console.WriteLine("Data length = " + data.data.Length); } } } client.close(w7asdb); Important, only 5 servicesrunningsimultaneously!

  10. StructureofTimeBasedData Time vector (tobeconvertedfrombyteto int64) Data vectors Units areemptyfor W7-AS Namesare just channelnumbers Endianess, on standard PC noconversionrequired Dimensions: numberofsamples numberofchannels Base type ofdatatobeconvertedto (double, short, …) W7-AS uses double Size ofbase type public partial classTimeBasedData { publicbyte[] timestamps; publicbyte[] data; publicstring[] channelunit; publicstring[] channelname; publicDataDescriptordataDescriptor; } public partial classDataDescriptor { publicboollittleEndian; publicint[] dimension; publicDataDescriptorBaseTypebaseType; publicintbaseTypeSize; } Byte arrayto double arrayconversion tobecodedindividually!

  11. MatLaband IDL via Java Examplebeforehasbeenbuiltusingthe WSDL solely Java clientisavailablefordirectuse in Java codes, MatLaband IDL MatLab %% -------------------------- Defineimports ------------------------------- importde.mpg.ipp.codac.services.commondataaccess.client.*; importde.mpg.ipp.codac.services.commondataaccess.client.selector.*; importde.mpg.ipp.codac.services.datatypes.*; importde.mpg.ipp.codac.util.converter.NanoTime; %% ---------- Initialisationofthewebserviceconnection ------------------ service = DataAccess('UDAS'); service.open; …

  12. Status • Generic WS interfaceworksnowfor W7-X, W7-AS andNetCDF • Interface to MDS+ isunderdevelopment • Service isrunningwithacceptabletransferrates: > 4 MB/s • Itis not accessiblefrom outside yet • Plans • Server setup + helppages in DMZ within 1-2 months • Foraccessplease send an email toandreas.werner@ipp.mpg.dewith IP addressesorsubnetsforfirewallconfiguration • The requestor will be registered astheresponsiblecontactperson • Anypublicationsthatuse W7-AS datahavetobeagreedby IPP

More Related