110 likes | 339 Views
IFC Model Server Outline of SOAP based API Data Access Layer Component. Development Plan 2001-SEP-27 Yohinobu.Adachi@vtt.fi http://cic.vtt.fi/projects/ifcsvr/. Overview. Strategy for IMS Web Service: Outline of SOAP and IMS SOAP Frameworks Web Service API Overview SOAP Client Examples:
E N D
IFC Model ServerOutline of SOAP based APIData Access Layer Component Development Plan 2001-SEP-27 Yohinobu.Adachi@vtt.fi http://cic.vtt.fi/projects/ifcsvr/
Overview • Strategy for IMS Web Service: • Outline of SOAP and IMS • SOAP Frameworks • Web Service API Overview • SOAP Client Examples: • Java Script • Excel 2000 VBA
Outline of SOAP and IMS Application IMS DALC SOAP Client SOAP Message SOAP Server Including Web Service Layer SOAP Framework
SOAP Frameworks • Microsoft .NET (Microsoft) • SOAP Toolkit SDK (Microsoft) • Apache-SOAP (Java) • SOAP::LITE for Perl • Others • Many SOAP toolkits evaluation at: http://www.xmethods.net/ilab/
Web Service API Overview • Data Types: • string • boolean • int, float • IXMLDOMNodeList • etc. • Functions: • IFC model data query • IFC model data update • IFC model data create • etc.
Web Service API Overview • Example of IMS API • domNodeList2 = QueryByXML(domNodeList1) • domNodeList1: Query for IFC model • domNodeList2: Result SOAP Client IMS DALC QueryByXML XML Query ML Database Query Engine domNodeList1 SOAP domNodeList1 BLIS-XML domNodeList2 domNodeList2
SOAP Client Examples: Java Script var WSDL_URL = "http://rte2e155/IMSws/IMStest.wsdl" WScript.echo("Connecting: " + WSDL_URL) var sc = WScript.CreateObject("MSSOAP.SoapClient") sc.mssoapinit(WSDL_URL, "", "", "") var domdoc1 = WScript.CreateObject("MSXML2.DOMDocument") domdoc1.async = false domdoc1.loadXML("<root xmlns:sql='urn:schemas-microsoft-com:xml-sql'><sql:query>SELECT * FROM IfcBuildingStorey FOR XML AUTO;</sql:query></root>") var objNodes objNodes = sc.QueryByXML(domdoc1.documentElement.childNodes) WScript.Echo("IfcBuildginStorey: " + objNodes.length)
VBA Code • Public Sub proc_XMLQuery() • Dim sc As MSSOAPLib.SoapClient • Dim domDoc As New MSXML2.FreeThreadedDOMDocument30 • domDoc.async = False • domDoc.loadXML ActiveSheet.Range("D5").Value • Set sc = New MSSOAPLib.SoapClient • sc.mssoapinit ActiveSheet.Range("D3").Value • sc.OpenDatabase ActiveSheet.Range("D4").Value • Debug.Print domDoc.xml • Dim objNodes As MSXML2.IXMLDOMNodeList • Set objNodes = sc.QueryByXML(domDoc.documentElement.childNodes) • Dim domDoc2 As New MSXML2.FreeThreadedDOMDocument30 • domDoc2.async = False • domDoc2.preserveWhiteSpace = True • Dim strResult As String • Dim domRootElement As MSXML2.IXMLDOMElement • Dim domElement As MSXML2.IXMLDOMElement • Set domElement = domDoc2.createElement("ROOT") • Dim objNode As MSXML2.IXMLDOMNode • For Each objNode In objNodes • domElement.appendChild objNode • Next objNode • Set domDoc2.documentElement = domElement • strResult = domDoc2.xml • ActiveSheet.Range("D6").Value = strResult • Exit Sub • ErrHdl: • sc.CloseDatabase • MsgBox "Error:" & sc.detail • End Sub
Comments • IMS Web Service Prototype • Microsoft SOAP Toolkit 2.0 • QueryByXML function • Sending a query data to IMS by XML • Receiving a result by XML • Client test • Jscript • Excel 2000 VBA • IMS Database, DALC components are still prototype version. • Query Markup Language • Concidering about existing XML query language • IFC Implementation View definition