CN101807204B - Dynamic creation method of processing Web service with remote sensing image - Google Patents
Dynamic creation method of processing Web service with remote sensing image Download PDFInfo
- Publication number
- CN101807204B CN101807204B CN2010101199334A CN201010119933A CN101807204B CN 101807204 B CN101807204 B CN 101807204B CN 2010101199334 A CN2010101199334 A CN 2010101199334A CN 201010119933 A CN201010119933 A CN 201010119933A CN 101807204 B CN101807204 B CN 101807204B
- Authority
- CN
- China
- Prior art keywords
- web service
- service
- web
- name
- services
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000012545 processing Methods 0.000 title claims abstract description 28
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000011161 development Methods 0.000 claims description 26
- 230000000007 visual effect Effects 0.000 claims description 8
- 230000006870 function Effects 0.000 claims description 6
- 239000000463 material Substances 0.000 abstract description 3
- 230000018109 developmental process Effects 0.000 description 22
- 238000005516 engineering process Methods 0.000 description 11
- 230000010354 integration Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000033772 system development Effects 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明提供了一种遥感图像处理Web服务动态生成方法,当服务提供者首次要求发布Web服务时,根据服务提供者所要发布Web服务的应用程序编程接口,获取Web服务名称和Web服务相关信息,生成Web服务源代码,编译生成Web服务的网络服务描述语言文档,即生成服务提供者所要发布的Web服务。更新时,只需重新读取Web服务的API,与当前Web服务API读取的服务名称和相关信息进行比较,判断Web服务名称和相关信息是否发生了变化,如果发生了变化,则重新生成Web服务源代码,然后根据该源代码重新生成Web服务。本发明能够自动地动态生成Web服务,在大量生成Web服务的时候,减少了服务生成的时间、人力和物力,提高了效率。
The present invention provides a method for dynamically generating web services for remote sensing image processing. When a service provider requests to publish a web service for the first time, the name of the web service and relevant information about the web service are obtained according to the application programming interface of the web service to be published by the service provider. Generate the source code of the Web service, compile and generate the Web service description language document of the Web service, that is, generate the Web service to be published by the service provider. When updating, you only need to re-read the API of the Web service, compare it with the service name and related information read by the current Web service API, and judge whether the Web service name and related information have changed, and if so, regenerate the Web service service source code, and then regenerate the web service from that source code. The invention can automatically and dynamically generate Web services, and reduces the time, manpower and material resources for service generation when a large number of Web services are generated, and improves efficiency.
Description
技术领域 technical field
本发明属于遥感图像处理服务技术领域,特别涉及一种遥感图像处理Web服务动态生成方法。The invention belongs to the technical field of remote sensing image processing services, in particular to a method for dynamically generating remote sensing image processing Web services.
背景技术 Background technique
Web服务是一种新的Web应用程序类型,一种自包含、自解释、模块化的应用,能够被发布、定位,并且可以从Web上的任何位置进行调用。服务提供者运用Web服务描述语言(Webservices description language,WSDL)来描述他们提供的服务以及如何调用服务,然后运用统一描述、发现和集成(Universal description discovery integration,UDDI)将服务注册到公共注册表内。服务使用者或者应用程序在注册表内发现服务并获得描述服务的WSDL,然后通过简单对象访问协议(Simple object access protocol,SOAP)在异步消息或者远程调用模式下调用服务。Web服务与平台无关,编程语言无关,具有完好的封装性、高度可集成能力,且具有松散耦合的特性。所以Web服务受到了各方面的重视和应用。Web service is a new type of Web application, a self-contained, self-explanatory, modular application that can be published, located, and invoked from anywhere on the Web. Service providers use Web service description language (Webservices description language, WSDL) to describe the services they provide and how to call the services, and then use the unified description, discovery and integration (Universal description discovery integration, UDDI) to register the services in the public registry . The service user or application program discovers the service in the registry and obtains the WSDL describing the service, and then invokes the service in an asynchronous message or remote call mode through the Simple Object Access Protocol (SOAP). Web service has nothing to do with the platform and programming language, it has complete encapsulation, high integration capability, and loose coupling. Therefore, Web services have been valued and applied by all aspects.
现有的Web服务一般都是静态的,如ArcGIS Server是在ArcObject组件的基础上开发的服务产品,主要包括两个部分:GIS服务器和基于.NET和Java开发的ADF(ArcGIS JavaWeb Application Developer Framework,ADF)。其中,GIS服务器是许多服务器对象的集合,这些服务器对象包含了连接到G1S服务器和使用GIS服务器对象所必需的ArcObjects;ADF为.Net和Java开发者分别提供了采用GIS服务器端的ArcObjects来构建网络应用程序和网络服务的框架,其中的网络控件封装了底层ArcObjects的细节,可嵌人到Visual Studio.net环境中开发。有了上述平台,就可以在一定编译环境下编程开发实现Web服务,进行发布。ArcGIS Server的不同Web服务均需手动编程实现,生成的Web服务是固定的,实现的Web服务的接口参数也是固定的。这是典型的静态Web服务,生成效率低下,特别是在海量地图服务生成的情况下。相关文献:康玲,傅俊锋,王怀清,蔡劲松,基于ArcGIS Server的WebGIS应用系统开发,水电能源科学,2007 Vol.25 No.1.Existing web services are generally static. For example, ArcGIS Server is a service product developed on the basis of ArcObject components. It mainly includes two parts: GIS server and ADF (ArcGIS JavaWeb Application Developer Framework, ADF). Among them, the GIS server is a collection of many server objects, and these server objects include the ArcObjects necessary to connect to the GIS server and use the GIS server objects; ADF provides .Net and Java developers respectively with ArcObjects on the GIS server side to build network applications The framework of programs and network services, in which the network controls encapsulate the details of the underlying ArcObjects, and can be embedded into the Visual Studio.net environment for development. With the above platform, it is possible to program, develop and implement Web services in a certain compilation environment, and publish them. Different web services of ArcGIS Server need to be implemented by manual programming, the generated web services are fixed, and the interface parameters of the implemented web services are also fixed. This is a typical static web service, and the generation efficiency is low, especially in the case of massive map service generation. Related literature: Kang Ling, Fu Junfeng, Wang Huaiqing, Cai Jinsong, WebGIS Application System Development Based on ArcGIS Server, Hydropower Energy Science, 2007 Vol.25 No.1.
早期的Web服务的动态开发主要是通过动态生成网页的方式来实现,即客户端浏览器向服务器发出HTTP请求,服务器通过执行、解释某个应用程序,并将运行结果以HTML的格式传输到客户端,客户端接受、解释并显示生成的HTML。上述的开发方式中成熟的有JSP(JavaServer Page,JSP)和Java Servlet技术以及微软公司的ASP和ASP.NET。The early dynamic development of Web services was mainly realized by dynamically generating web pages, that is, the client browser sends an HTTP request to the server, and the server executes and interprets an application program, and transmits the running results to the client in HTML format. On the client side, the client accepts, interprets and displays the generated HTML. The mature ones in the above-mentioned development methods include JSP (JavaServer Page, JSP) and Java Servlet technology, as well as Microsoft's ASP and ASP.NET.
Java Servlet是基于Java编写的服务端程序,主要用于交互式地浏览和修改数据,生成Web内容。其生成过程:(1)客户端发送请求至服务器端;(2)服务器将请求信息发送至Servlet;(3)Servlet生成响应内容并将其传给服务器(响应内容动态生成,通常取决于客户端的请求);(4)服务器将响应返回给客户端。相关文献:阳正全,黎艳,用Java Servlet技术实现动态网页的方法[J],Experiment Science&Technology,2003 Vol.12 No.03。Java Servlet is a server-side program written based on Java, which is mainly used to browse and modify data interactively and generate web content. Its generation process: (1) the client sends a request to the server; (2) the server sends the request information to the Servlet; (3) the Servlet generates the response content and sends it to the server (the response content is dynamically generated, usually depending on the client's request); (4) The server returns the response to the client. Related literature: Yang Zhengquan, Li Yan, Method of Realizing Dynamic Web Pages with Java Servlet Technology [J], Experiment Science&Technology, 2003 Vol.12 No.03.
JSP页面的内置脚本语言是基于Java的,且都被编译为Java Servlet,所以JSP页面具有Java技术的所有好处,包括健壮的存储管理和安全性,“一次编写,各处运行”以及JavaServlet的优点。WEB服务器在遇到访问JSP网页的请求时,首先执行其中的程序片段,然后将执行结果以HTML或XML格式返回客户,程序片段可以操作数据库、重新定向网页以及发送e-mail等。相关文献:李磊,找康杉,Java Server Pages技术简介,科技信息(Science &Technology Information),2008No.20。The built-in scripting language of JSP pages is based on Java and is compiled into Java Servlet, so JSP pages have all the benefits of Java technology, including robust storage management and security, "write once, run everywhere" and the advantages of JavaServlet . When the WEB server encounters a request to access a JSP web page, it first executes the program fragment, and then returns the execution result to the client in HTML or XML format. The program fragment can operate the database, redirect the web page, and send e-mail, etc. Related literature: Li Lei, looking for Kang Shan, Introduction to Java Server Pages Technology, Science & Technology Information, 2008No.20.
微软公司的Active Server Pages(动态服务器主页,ASP)嵌于Internet InformationServer(IIS)之中,能交互式、高效率地产生和执行动态站点服务器的应用程序,也是当前动态网页主要的生成方式之一。ASP主要是通过将WWW(World Wide Web,万维网)发布与数据库结合来实现动态地生成HTML主页,其中往往与XML技术以及ASP内置的数据访问组件ActiveX数据对象(ActiveX Data Objects,ADO)技术相结合来建立数据库信息的页面,根据用户请求,在ASP中向数据库提交SQL语句,由特定的接口接收查询结果并处理数据显示最终结果。相关文献:刘广钟,王强兵,利用ASP的动态网页生成技术,计算机应用于软件,2001Vol.18 No.4;杨竞菁,利用XML和ASP技术进行Web数据动态显示,福建电脑,2004 No.9。Microsoft's Active Server Pages (dynamic server homepage, ASP) is embedded in Internet Information Server (IIS), which can interactively and efficiently generate and execute dynamic site server applications, and is also one of the main ways to generate dynamic web pages at present. . ASP mainly realizes the dynamic generation of HTML homepage by combining WWW (World Wide Web, World Wide Web) publishing with database, which is often combined with XML technology and ASP's built-in data access component ActiveX Data Objects (ActiveX Data Objects, ADO) technology To create a page of database information, submit SQL statements to the database in ASP according to user requests, and receive query results through a specific interface and process the data to display the final results. Relevant literature: Liu Guangzhong, Wang Qiangbing, Using ASP to Generate Dynamic Web Pages, Computer Applied to Software, 2001Vol.18 No.4; Yang Jingjing, Utilizing XML and ASP Technology to Display Web Data Dynamically, Fujian Computer, 2004 No.9.
以上这些开发技术的目的主要是生成可以浏览的网页,如JSP实现了动态页面与静态页面的分离、脱离了硬件平台的束缚,以及编译后运行等方式,大大提高了其执行效率而逐渐成为因特网上的主流开发工具。与其相比,Web服务是独立的并可自我描述的应用程序组件,该组件可以被其他的应用程序使用,而不仅仅是可以浏览的动态网页,所以从严格意义上讲,上述开发技术并不能看做真正地实现了Web服务的动态生成。The purpose of the above-mentioned development technologies is mainly to generate web pages that can be browsed. For example, JSP realizes the separation of dynamic pages and static pages, breaks away from the shackles of the hardware platform, and runs after compilation, which greatly improves its execution efficiency and gradually becomes an Internet website. The mainstream development tools on the Internet. In contrast, Web services are independent and self-describing application components that can be used by other applications, not just dynamic web pages that can be browsed, so in a strict sense, the above development techniques cannot See it as the real realization of the dynamic generation of Web services.
也有一些实现客户端动态的生成Web服务的技术,中兴通讯股份有限公司周洪济提出的一种自动生成客户端的方法,该发明的步骤为:用户发起获取Web服务的请求;系统根据用户请求,依照预先存储的对应列表获取所述Web服务请求对应的统一资源定位符URL地址;根据所述URL地址,在预先存储的对应列表中找到相应的Web服务描述文件,并根据系统预定的开发环境生成对应的Web服务客户端源代码,动态编译生成Web服务客户端执行代码,即生成Web服务客户端。这只能作为客户端服务生成的方法,并不能应用于服务端。There are also some technologies for dynamically generating Web services from clients. Zhou Hongji of ZTE Corporation proposed a method for automatically generating clients. The steps of this invention are: the user initiates a request to obtain Web services; Obtain the Uniform Resource Locator URL address corresponding to the Web service request from the stored corresponding list; find the corresponding Web service description file in the pre-stored corresponding list according to the URL address, and generate the corresponding Web service description file according to the predetermined development environment of the system. The source code of the Web service client is dynamically compiled to generate the execution code of the Web service client, that is, the Web service client is generated. This can only be used as a client-side service-generated method, and does not apply to the server-side.
相关文献:中兴通讯有限股份公司,周洪济,一种自动生成网络服务客户端的方法[P],中国专利,200810098044.7,2009-11-25.Related literature: ZTE Corporation, Zhou Hongji, A method for automatically generating network service clients [P], Chinese Patent, 200810098044.7, 2009-11-25.
遥感图像处理Web服务的生成,需要服务提供者编写Web服务描述,目前遥感图像处理常用的Web服务生成方法大多通过手动编写源代码,生成WSDL和Web服务,每发布一个服务需要进行手动进行一次程序的编写。在遥感图像处理方面,服务的部署往往非常多,如果有成百上千的Web服务时,每个服务都需要进行一次手动的编码,不仅需要花费大量的人力和物力,而且效率低下。The generation of Web services for remote sensing image processing requires service providers to write Web service descriptions. At present, most of the Web service generation methods commonly used in remote sensing image processing are manually written source codes to generate WSDL and Web services. Every time a service is released, a manual procedure is required. of writing. In terms of remote sensing image processing, there are often many services deployed. If there are hundreds or thousands of web services, each service needs to be manually coded once, which not only requires a lot of manpower and material resources, but also is inefficient.
发明内容 Contents of the invention
本发明所要解决的问题是,提供一种能够提高遥感图像处理Web服务生成效率的自动化手段。The problem to be solved by the present invention is to provide an automatic means capable of improving the generation efficiency of web services for remote sensing image processing.
本发明提供一种遥感图像处理Web服务动态生成方法,方案如下:The present invention provides a method for dynamically generating web services for remote sensing image processing, the scheme is as follows:
当服务提供者首次要求发布Web服务时,进行以下步骤,When a service provider first requests to publish a web service, the following steps are performed,
步骤1.1,根据服务提供者所要发布Web服务的应用程序编程接口,获取Web服务名称;Step 1.1, obtain the name of the Web service according to the application programming interface of the Web service to be published by the service provider;
步骤1.2,根据Web服务名称,从应用程序编程接口提供的接口函数中读出Web服务相关信息;Step 1.2, according to the name of the Web service, read out the relevant information of the Web service from the interface function provided by the application programming interface;
步骤1.3,创建Web服务,根据步骤1.1读出的Web服务名称和步骤1.2读出的Web服务相关信息,生成Web服务源代码;Step 1.3, create a Web service, and generate the Web service source code according to the Web service name read out in Step 1.1 and the Web service related information read out in Step 1.2;
步骤1.4,根据步骤1.3生成的Web服务源代码,编译生成Web服务的网络服务描述语言文档,即生成服务提供者所要发布的Web服务;Step 1.4, according to the source code of the Web service generated in Step 1.3, compile and generate the Web service description language document of the Web service, that is, generate the Web service to be released by the service provider;
当服务提供者更新所要发布Web服务的应用程序时,进行以下步骤,When the service provider updates the application to publish the Web service, perform the following steps,
步骤2.1,从应用程序编程接口重新获取Web服务名称,与此次更新前获取的Web服务名称进行比较,若Web服务名称发生变化则重新读取Web服务相关信息后,然后进入步骤2.2;若Web服务名称未发生变化则重新读取Web服务相关信息,并将该Web服务相关信息与此次更新前读出的Web服务相关信息进行比较,若Web服务相关信息未发生变化则等待下次更新;若Web服务相关信息发生变化则进入步骤2.2;Step 2.1, reacquire the Web service name from the application programming interface, and compare it with the Web service name obtained before this update. If the Web service name changes, re-read the relevant information of the Web service, and then enter step 2.2; If the service name has not changed, re-read the relevant information of the web service, and compare the relevant information of the web service with the relevant information of the web service read before this update, if the relevant information of the web service has not changed, wait for the next update; If the relevant information of the Web service changes, go to step 2.2;
步骤2.2,根据步骤2.1读出的Web服务相关信息,重新生成Web服务源代码;Step 2.2, regenerate the source code of the Web service according to the relevant information of the Web service read out in Step 2.1;
步骤2.3,根据步骤2.2生成的Web服务源代码,重新编译生成Web服务的网络服务描述语言文档,即重新生成服务提供者所要发布的Web服务。Step 2.3, according to the source code of the Web service generated in Step 2.2, recompile and generate the Web service description language document of the Web service, that is, regenerate the Web service to be released by the service provider.
而且,所述Web服务相关信息包括Web服务的参数信息,所述参数信息包括Web服务的属性参数名称、类型以及默认值。Moreover, the Web service-related information includes Web service parameter information, and the parameter information includes attribute parameter names, types, and default values of the Web service.
而且,所述Web服务源代码是预定的开发环境下的源代码,在该开发环境下实现编译生成Web服务的网络服务描述语言文档。Moreover, the source code of the Web service is the source code in a predetermined development environment, and the compilation and generation of the Web service description language document of the Web service is implemented in the development environment.
而且,所述预定的开发环境为Visual Studio或JAVA开发环境。And, described predetermined development environment is Visual Studio or JAVA development environment.
依照本发明所提供自动生成遥感图像处理Web服务的方法,动态的生成Web服务,不需人工进行生成;而且能够在作为遥感图像处理Web服务的应用程序发生变化时,通过API的更新,自动重新生成Web服务。在大量生成Web服务的时候,减少了服务生成的时间、人力和物力,提高了效率。According to the method for automatically generating remote sensing image processing Web services provided by the present invention, the Web services are dynamically generated without manual generation; and when the application program used as the remote sensing image processing Web service changes, the API can be updated to automatically regenerate the Web service. Generate web services. When a large number of Web services are generated, the time, manpower and material resources of service generation are reduced, and the efficiency is improved.
附图说明 Description of drawings
图1为本发明实施例在首次要求发布Web服务时的流程图。Fig. 1 is a flow chart of an embodiment of the present invention when publishing a Web service is required for the first time.
图2为本发明实施例在更新所要发布Web服务的应用程序时的流程图。Fig. 2 is a flow chart of the embodiment of the present invention when updating the application program of the Web service to be published.
具体实施方法Specific implementation method
本发明要解决的核心问题是:动态地根据服务提供者提供的应用程序编程接口(Appiication Programming Interface,API)生成Web服务源代码,编译生成Web服务的WSDL文档。当遥感图像处理Web服务应用程序发生变化时,更新Web服务。The core problem to be solved by the present invention is: dynamically generate the source code of the Web service according to the Application Programming Interface (API) provided by the service provider, and compile and generate the WSDL document of the Web service. When the remote sensing image processing Web service application changes, update the Web service.
以下结合附图和实施例,详细描述本发明的动态生成遥感图像处理Web服务的方法。The method for dynamically generating remote sensing image processing Web services of the present invention will be described in detail below in conjunction with the accompanying drawings and embodiments.
参见附图1,当服务提供者首次要求发布Web服务时,进行以下步骤,Referring to accompanying drawing 1, when the service provider requests to publish the Web service for the first time, perform the following steps,
步骤1.1,根据服务提供者所要发布Web服务的应用程序编程接口,获取Web服务名称。Step 1.1, obtain the name of the Web service according to the application programming interface of the Web service to be released by the service provider.
为了支持大量Web服务的动态生成,本实施例从各Web服务的应用程序编程接口分别获取其Web服务名称。具体实施时,可以要求服务提供者采用一致格式的字符串提供服务名称,以便后续动态生成Web服务时进行识别。实施例中,获取所有Web服务的Web服务名称后形成一个字符串,该字符串的具体内容包括所有服务提供者提供的遥感影像处理服务的名称,格式是用同一分隔符分隔不同的服务名称。例如:服务1的名称,服务2的名称,…,服务n的名称。In order to support the dynamic generation of a large number of Web services, this embodiment obtains the Web service name from the API of each Web service. During specific implementation, the service provider may be required to provide the service name with a character string in a consistent format, so as to identify it when the Web service is dynamically generated later. In the embodiment, after obtaining the Web service names of all Web services, a character string is formed. The specific content of the character string includes the names of remote sensing image processing services provided by all service providers, and the format is to separate different service names with the same delimiter. For example: name of service 1, name of service 2, ..., name of service n.
步骤1.2,根据Web服务名称,从应用程序编程接口提供的接口函数中读出Web服务相关信息。Step 1.2, according to the name of the Web service, read out the relevant information of the Web service from the interface function provided by the application programming interface.
服务提供者发布关于服务信息的API,其中提供有关于Web服务相关信息的接口函数,为了能够完整提供Web服务的相关信息,可以设定Web服务相关信息包括遥感影像处理服务的参数信息,参数信息又可分为属性参数名称、类型以及默认值。实施例中,首先从步骤1.1获得的字符串,解析出用于识别各个遥感影像处理服务的服务名称。根据解析所得的服务名称进一步读取每个Web服务各自用于描述参数信息的属性信息字符串,包括属性参数名称、类型以及默认值。实施例设定,一个服务的各个属性之间用统一的字符分隔,每个属性的名称、类型和默认值之间用不同于属性之间的字符作为分隔符,且每个属性信息的顺序必须一致以免解析错误。The service provider publishes an API about service information, which provides interface functions about Web service-related information. In order to provide complete information about Web services, Web service-related information can be set, including parameter information of remote sensing image processing services, parameter information It can be divided into attribute parameter name, type and default value. In the embodiment, firstly, the service name used to identify each remote sensing image processing service is parsed out from the character string obtained in step 1.1. According to the parsed service name, the attribute information strings used to describe the parameter information of each Web service are further read, including the attribute parameter name, type and default value. According to the embodiment, the attributes of a service are separated by uniform characters, the name, type and default value of each attribute are separated by characters different from those between attributes, and the order of each attribute information must be Consistent to avoid parsing errors.
例如:对于服务1,根据服务名称和API提供的读取服务属性的接口函数,获得服务1的属性信息字符串:属性1,类型1,默认值1;属性2,类型2,;属性3,类型2,;属性4,类型3,默认值2;属性5,类型3,默认值3。两属性之间用“;”分隔,每个属性的名称、类型和默认值之间用“,”分隔。For example: for service 1, according to the service name and the interface function for reading service attributes provided by the API, the attribute information string of service 1 is obtained: attribute 1, type 1, default value 1; attribute 2, type 2; attribute 3, type 2,; property 4, type 3, default 2; property 5, type 3, default 3. Two attributes are separated by ";", and the name, type and default value of each attribute are separated by ",".
具体实施时,读取的服务名称可能会存在非法的服务变量名称(如带有空格,或带有非法的符号),那么在读取用于识别服务的服务名称后可以对其进行一些相应处理(如去空格和替换非法符号等);读取的类型名称也有可能是非法的(如float32),也可以进行一些相应处理(如替换操作);对于属性的默认值也可以进行相应处理(如没有提供默认值的情况,可以将其设为空值)。During specific implementation, the read service name may contain illegal service variable names (such as spaces or illegal symbols), so after reading the service name used to identify the service, it can be processed accordingly (such as removing spaces and replacing illegal symbols, etc.); the read type name may also be illegal (such as float32), and some corresponding processing can also be performed (such as replacement operation); corresponding processing can also be performed on the default value of the attribute (such as If no default value is provided, it can be set to an empty value).
具体实施时,可以由本领域技术人员进行编程实现本发明技术方案,作为软件提供给用户实用。因此,可以设计在软件界面上显示出所有的遥感图像处理服务的名称,以及对应的属性信息,方便Web服务开发者对服务的信息进行可视化的操作。During specific implementation, the technical scheme of the present invention can be implemented by programming by those skilled in the art, and provided as software for users to use. Therefore, it can be designed to display the names of all remote sensing image processing services and the corresponding attribute information on the software interface, which is convenient for Web service developers to perform visual operations on service information.
步骤1.3,创建Web服务,根据步骤1.1读出的Web服务名称和步骤1.2读出的Web服务相关信息,生成Web服务源代码。Step 1.3, create a Web service, and generate the source code of the Web service according to the name of the Web service read out in Step 1.1 and the related information of the Web service read out in Step 1.2.
对于API的调用和实现,以及写入Web服务源代码,可以在任何开发环境下,使用任何服务发布者需要的语言进行编写、实现。本发明预定开发环境,基于该开发环境生成Web服务源代码则有利于各Web服务发布的一致性。本实施例采用的开发环境为Visual Studio开发环境,在该开发环境下创建的Web服务为ASP.NET Web服务。基于Java开发环境的做法和基于Visual Studio开发环境的做法是一样的,只是基于Java开发环境时对应编译生成Web服务的网络服务描述语言文档采用tomcat或者apatch做代理,而基于Visual Studio开发环境时采用IIS。The calling and implementation of API, as well as the writing of Web service source code, can be written and implemented in any development environment, using any language required by the service publisher. The invention predetermines the development environment, and generating the source code of the Web service based on the development environment is beneficial to the consistency of each Web service release. The development environment adopted in this embodiment is Visual Studio development environment, and the Web service created under this development environment is ASP.NET Web service. The approach based on the Java development environment is the same as that based on the Visual Studio development environment, except that when the Java development environment is based on the corresponding compilation and generation of the network service description language document of the Web service, tomcat or apatch is used as the agent, and when the Visual Studio development environment is based on IIS.
具体实施时,批量生成的遥感图像处理服务中,不同服务的Web名称和参数信息不同,只需将服务名称和参数写入。根据步骤1.1获得的各个服务的名称和步骤1.2获得的各个服务的参数信息,动态生成每个Web服务的源代码即可。During specific implementation, in the remote sensing image processing services generated in batches, the Web names and parameter information of different services are different, and only the service names and parameters need to be written. According to the name of each service obtained in step 1.1 and the parameter information of each service obtained in step 1.2, the source code of each Web service can be dynamically generated.
步骤1.4,根据步骤1.3生成的Web服务源代码,编译生成Web服务的网络服务描述语言(WebServices Description Language,WSDL)文档,即生成服务提供者所要发布的Web服务。Step 1.4, according to the source code of the Web service generated in Step 1.3, compile and generate a Web Service Description Language (WebServices Description Language, WSDL) document of the Web service, that is, generate the Web service to be published by the service provider.
实施例使用Visual Studio开发环境进行Web服务源代码的编译,所生成的网络服务描述语言发布在Internet信息服务(Internet Information Server,IIS)站点。The embodiment uses the Visual Studio development environment to compile the source code of the Web service, and the generated Web service description language is published on the Internet Information Service (Internet Information Server, IIS) site.
参见图2,为了应对更新,本发明设计了动态生成Web服务的方案,当服务提供者更新所要发布Web服务的应用程序时,Referring to Fig. 2, in order to deal with updating, the present invention has designed the scheme of dynamic generation Web service, when service provider updates the application program that will issue Web service,
步骤2.1,从应用程序编程接口重新获取Web服务名称(与步骤1.1具体实施一致),与此次更新前获取的Web服务名称进行比较,判断Web服务名称是否变化。若Web服务名称发生变化则重新读取Web服务相关信息,然后直接进入步骤2.2。若Web服务名称未发生变化则重新读取Web服务相关信息,,并将此次读出的Web服务相关信息与此次更新前读出的Web服务相关信息进行比较,判断Web服务相关信息是否变化。若Web服务相关信息未发生变化则等待下次更新;若Web服务相关信息发生了变化则进入步骤2.2。重新读取Web服务相关信息的实施方式与步骤1.2具体实施一致,即重新从应用程序编程接口提供的接口函数中读取Web服务相关信息。Step 2.1, reacquire the Web service name from the application programming interface (consistent with the specific implementation of step 1.1), compare it with the Web service name obtained before this update, and determine whether the Web service name has changed. If the name of the Web service changes, re-read the relevant information of the Web service, and then go directly to step 2.2. If the name of the Web service has not changed, re-read the related information of the Web service, and compare the related information of the Web service read out this time with the related information of the Web service read before this update, and determine whether the related information of the Web service has changed . If the relevant information of the Web service has not changed, wait for the next update; if the relevant information of the Web service has changed, go to step 2.2. The implementation of re-reading the Web service-related information is consistent with the specific implementation of step 1.2, that is, re-reading the Web service-related information from the interface function provided by the application programming interface.
比如在首次发布后,进行第一次更新时,是将此次获取的新Web服务名称与首次发布时获取的Web服务名称进行比较,若不同则将此次读出的服务相关信息与首次发布时读出的服务相关信息进行比较;进行第二次更新时,是将此次读出的新Web服务名称与第一次更新时读出的Web服务名称进行比较,若不同则将此次读出的服务相关信息与第一次更新时读出服务相关信息进行比较。For example, after the first release, when the first update is performed, the new Web service name obtained this time is compared with the Web service name obtained at the time of the first release. If they are different, the service-related information read out this time is compared with the first release. When performing the second update, the new Web service name read this time is compared with the Web service name read at the first update, and if they are different, the new Web service name read this time is compared. Compare the service-related information read out with the service-related information read out during the first update.
步骤2.2,根据步骤2.1读出的Web服务名称和服务相关信息,重新生成Web服务源代码(与步骤1.3具体实施一致)。Step 2.2, regenerate the source code of the Web service according to the Web service name and service-related information read out in Step 2.1 (consistent with the specific implementation of Step 1.3).
步骤2.3,根据步骤2.2生成的Web服务源代码,重新编译生成Web服务的网络服务描述语言文档,即重新生成服务提供者所要发布的Web服务(与步骤1.4具体实施一致)。Step 2.3, recompile and generate the Web service description language document of the Web service according to the Web service source code generated in Step 2.2, that is, regenerate the Web service to be published by the service provider (consistent with the specific implementation of Step 1.4).
也就是说,对Web服务更新,即遥感图像处理服务应用程序发生变化时,本发明的技术方案自动更新服务相关API读取的遥感图像处理服务的描述信息,更新过程具体实施方式与首次发布时具体过程一致,本发明不予赘述。可以设定,服务发布者只需要求重新读取API,则按照本发明技术方案提供的软件自动完成Web服务源代码的生成,运行源程序,并生成WSDL,即可自动完成服务的更新。可见采用本发明可以动态地批量生成Web服务,不需人工干预;而且能够在遥感图像处理Web服务应用程序发生变化时,通过API的更新,自动重新生成Web服务。因此本发明特别适合运用于遥感图像处理服务领域,实现大量生成Web服务。That is to say, when the Web service is updated, that is, when the application program of the remote sensing image processing service changes, the technical solution of the present invention automatically updates the description information of the remote sensing image processing service read by the service-related API. The specific process is the same, and the present invention will not repeat them. It can be set that the service publisher only needs to re-read the API, then the software provided according to the technical solution of the present invention can automatically complete the generation of the source code of the Web service, run the source program, and generate WSDL to automatically complete the update of the service. It can be seen that the present invention can dynamically generate Web services in batches without manual intervention; and when the remote sensing image processing Web service application program changes, the Web services can be automatically regenerated through API update. Therefore, the present invention is particularly suitable for being used in the field of remote sensing image processing services, and realizes generating a large number of Web services.
以上所述仅为本发明中的一个实施例,并不用于限制本发明。凡在本发明的精神与原则之内,所做的任何修改,改进等,均应包含在本发明的保护范围之内。The above description is only an embodiment of the present invention, and is not intended to limit the present invention. All modifications, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (4)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2010101199334A CN101807204B (en) | 2010-03-05 | 2010-03-05 | Dynamic creation method of processing Web service with remote sensing image |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2010101199334A CN101807204B (en) | 2010-03-05 | 2010-03-05 | Dynamic creation method of processing Web service with remote sensing image |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN101807204A CN101807204A (en) | 2010-08-18 |
| CN101807204B true CN101807204B (en) | 2012-02-15 |
Family
ID=42608997
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2010101199334A Expired - Fee Related CN101807204B (en) | 2010-03-05 | 2010-03-05 | Dynamic creation method of processing Web service with remote sensing image |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN101807204B (en) |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8806469B2 (en) * | 2011-02-22 | 2014-08-12 | International Business Machines Corporation | Runtime code replacement |
| CN103473034B (en) * | 2012-06-06 | 2017-03-01 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus of dynamic publishing Web service |
| KR101998012B1 (en) * | 2015-02-16 | 2019-10-01 | 후아웨이 테크놀러지 컴퍼니 리미티드 | Method and apparatus for updating network service technicians |
| CN105159974A (en) * | 2015-08-27 | 2015-12-16 | 浪潮软件股份有限公司 | Method for automatically generating cross-data-source web service |
| CN106561030A (en) * | 2016-12-11 | 2017-04-12 | 天津汉铭科技发展有限公司 | Remote sensing image processing Web service dynamic generation method |
| CN106970948A (en) * | 2017-03-02 | 2017-07-21 | 努比亚技术有限公司 | The channel information management method and device of browser |
| CN110493067B (en) * | 2019-09-05 | 2022-02-18 | 中国银联股份有限公司 | Method and device for updating API gateway service |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1832478A (en) * | 2005-03-08 | 2006-09-13 | 微软公司 | Dynamic service generation for legacy components |
| CN101562606A (en) * | 2008-04-17 | 2009-10-21 | 鸿富锦精密工业(深圳)有限公司 | Open type data calling system and method |
| CN101588347A (en) * | 2008-05-23 | 2009-11-25 | 中兴通讯股份有限公司 | Method for automatically generating network service client terminal |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8484663B2 (en) * | 2007-04-27 | 2013-07-09 | Microsoft Corporation | Method of deriving web service interfaces from form and table metadata |
-
2010
- 2010-03-05 CN CN2010101199334A patent/CN101807204B/en not_active Expired - Fee Related
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1832478A (en) * | 2005-03-08 | 2006-09-13 | 微软公司 | Dynamic service generation for legacy components |
| CN101562606A (en) * | 2008-04-17 | 2009-10-21 | 鸿富锦精密工业(深圳)有限公司 | Open type data calling system and method |
| CN101588347A (en) * | 2008-05-23 | 2009-11-25 | 中兴通讯股份有限公司 | Method for automatically generating network service client terminal |
Non-Patent Citations (4)
| Title |
|---|
| 信息科学版》.2004,第29卷(第11期),985-989. |
| 贾文珏,陈玉敏,龚健雅,李爱霞.基于Web Service的OGC地图服务实现方法.《测绘信息与工程》.2004,第29卷(第4期),34-36. * |
| 龚健雅,贾文珏,陈玉敏,解吉波.从平台GIS到跨平台互操作GIS的发展.《武汉大学学报• |
| 龚健雅,贾文珏,陈玉敏,解吉波.从平台GIS到跨平台互操作GIS的发展.《武汉大学学报•信息科学版》.2004,第29卷(第11期),985-989. * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN101807204A (en) | 2010-08-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7870482B2 (en) | Web browser extension for simplified utilization of web services | |
| US8504913B2 (en) | Client-side components | |
| CN104158836B (en) | A kind of method by data render mobile application interface | |
| US7117504B2 (en) | Application program interface that enables communication for a network software platform | |
| CN101807204B (en) | Dynamic creation method of processing Web service with remote sensing image | |
| CN102184184B (en) | Method for acquiring webpage dynamic information | |
| CN104541262B (en) | System and method for being adapted in the transparent network of Rich Internet application | |
| CN108011768B (en) | Construction method of aop interception type HBase data storage micro-service architecture | |
| CN104866327B (en) | A kind of PHP development approaches and framework | |
| US10198414B2 (en) | Methods for optimizing interaction with a form in a website page and systems thereof | |
| US8621092B2 (en) | Remote portlet consumer with enhanced resource URL processing | |
| CN102184266A (en) | Method for automatically generating dynamic wireless application protocol (WAP) website for separation of page from data | |
| CN104572114A (en) | Binding device, application updating device and method and application | |
| CN104111855A (en) | A method for dynamic updating of iOS client functions based on Lua | |
| CN106997298A (en) | A kind of application resource acquisition methods and device | |
| CN103873918A (en) | Picture processing method, device and terminal | |
| CN103064975A (en) | Method and system for showing messages on client | |
| CN1987851A (en) | Updating display method for webpage data | |
| US20100229081A1 (en) | Method for Providing a Navigation Element in an Application | |
| CN111723314B (en) | Webpage display method and device, electronic equipment and computer readable storage medium | |
| CN104038520A (en) | Multi-version distributed resource management method and multi-version distributed resource management system | |
| US20030172186A1 (en) | Method, system and program product for transcoding content | |
| CN101702641A (en) | Encoding method and web server | |
| CN100421072C (en) | Method to realize software upgrade | |
| CN102142004B (en) | Service processing method and service engine |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120215 Termination date: 20150305 |
|
| EXPY | Termination of patent right or utility model |
