CN101853156A - Method for realizing web service call in component-based software system - Google Patents

Method for realizing web service call in component-based software system Download PDF

Info

Publication number
CN101853156A
CN101853156A CN201010171986A CN201010171986A CN101853156A CN 101853156 A CN101853156 A CN 101853156A CN 201010171986 A CN201010171986 A CN 201010171986A CN 201010171986 A CN201010171986 A CN 201010171986A CN 101853156 A CN101853156 A CN 101853156A
Authority
CN
China
Prior art keywords
web service
type
soap
component
document
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.)
Granted
Application number
CN201010171986A
Other languages
Chinese (zh)
Other versions
CN101853156B (en
Inventor
王�锋
游青华
王文斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
PRIMETON INFORMATION TECHNOLOGY CO., LTD.
Original Assignee
PRIMETON TECHNOLOGIES Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by PRIMETON TECHNOLOGIES Ltd filed Critical PRIMETON TECHNOLOGIES Ltd
Priority to CN 201010171986 priority Critical patent/CN101853156B/en
Publication of CN101853156A publication Critical patent/CN101853156A/en
Application granted granted Critical
Publication of CN101853156B publication Critical patent/CN101853156B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a method for realizing web service call in a component-based software system. The component-based software system comprises a graphical component development platform and a component running platform connected with the graphical component development platform, wherein the method comprises the following steps of the development processing operation of a Web Service call component and the running processing operation of the Web Service call component. By adopting the method for realizing the Web Service call in the component-based software system, the development process and the call process of the Web Service are more visual, simpler, more efficient, rapid and convenient, the running efficiency of the system is higher, the performance is stable and reliable, and the development and maintenance costs are reduced; meanwhile, the portability and the expandability of the system are enhanced; the method can rapidly respond to the changes and the technical changes of service demands, can support the establishment of the high-modularity and high-integration software, has comparatively wide range of application and lays a firm foundation for the further development of a computer component-based software technology.

Description

Realize the method that Web Service calls in the component software system
Technical field
The present invention relates to computer software fields, particularly the component software system technical field specifically is meant and realizes the method that Web Service calls in a kind of component software system.
Background technology
Along with the development of modern social science technology, computer system has become the indispensable instrument of all trades and professions, and plays central role therein, then is computer software.Along with the day by day infiltration of software systems in all trades and professions, business system huge day by day, the problem of himself also is more and more serious.A present enterprise uses, and usually can relate to each part of enterprise, can write hundreds of thousands by tens people and finish to millions of line codes.On the other hand, modern enterprise is survival and development in a dynamic environment that constantly changes, and therefore, enterprise uses just to be needed constantly to safeguard---promptly partly rewrite some existing softwares.By the hundreds of thousands code change factor up to a million, the system of the continuous variation of composition, its complexity is not meet on the human history.The security of software and reliability usually become serious problems of modern omnipresent, omnipotent information system.
Component technology has been integrated traditional component technology, model-driven technology and service-oriented technology, is a kind of effective means that solves existing software system structure drawback.So-called member is meant that certain has a style of one's own and the software of (or one a group) clear interface is arranged.Simultaneously, member also should have when moving clearly and the intension of reaching the standard grade.That is to say that this member possesses the interface of visit in the time of can supplying operation; And at certain time point of SDLC, this member can independently be paid and install.In addition, member can also merge or combination with other members easily, thus provide usefulness function---generally, single member has only with other component synergism work just can reach its effect.
In the enterprise-level application development field, along with the continuous expansion of using scale, integrated between each system and become more and more important alternately.Web Service is owing to characteristics such as its distinctive platform independence, programming language have nothing to do, become and use technology very widely in the system integration, and Web Service is as an industrial standard, obtained the support of more and more manufacturers, a series of standard (ws-*) has all been arranged as supporting from the transmission that is encapsulated into data of data.Simultaneously, externally only with the intermediary of WSDL (web services definition language, Web Services Description Language) as interchange, it is a language based on XML to Web Service, having described the service definition of Web Service and the communication of service, is cross-platform.
How to call the Web Services that external system provides easily, becoming in the integrated stage of system becomes more and more important.The URL of the practice for providing according to the outside of external web Service is provided usually, gets the description document WSDL of its Web Services, call the stub of Web Service then according to generations such as instrument such as Apache axis2, Apache cxf.This mode can generate the static code of calling at external web Service, has comprised the processing to data in static code, and these codes are generated by fixed form, or file super large row up to ten thousand easily, or file is super many, is difficult to safeguard and positioning problems.If outside WSDL has had variation slightly, even the variation of having only the node title is as changing in by parameter, the so former static stub that generates need regenerate stub according to new WSDL, and compile packing once more not correct.Simultaneously, call, all will generate a series of program code at each Web Service, a large amount of codes be deposited in the system integration often regular meeting bring extra maintenance cost, even can cause a large amount of rubbish codes, reduced production efficiency.
Summary of the invention
The objective of the invention is to have overcome above-mentioned shortcoming of the prior art, provide a kind of can by member to outside WebService call, development stage visual pattern, efficient and convenient, runtime efficient is higher, system performance is reliable and stable, the scope of application realizes the method that Web Service calls comparatively widely in the component software system.
In order to realize above-mentioned purpose, the method that realization Web Service calls in the component software system of the present invention is as follows:
Realize the method that Web Service calls in this component software system, comprise graphical development platform of protocol component and the member operation platform that is connected with this graphical development platform of protocol component in the described component software system, its principal feature is, described method comprises operation of Web Service component invoking development process and Web Service component invoking operation processing operation, described Web Service component invoking development process operation may further comprise the steps:
(A1) the newly-built member bag of the graphical development platform of protocol component of system;
(A2) described graphical development platform of protocol component imports outside wsdl document;
(A3) described graphical development platform of protocol component imports this outside XSD file that wsdl document relied on;
(A4) described graphical development platform of protocol component carries out the mutual conversion between XSD mode type and the Service Data Object;
(A5) general view in resource tree of described graphical development platform of protocol component shows the WebService coherent element in the wsdl document that is imported;
(A6) general view in resource tree of described graphical development platform of protocol component shows type and the attribute information that defines in the XSD file that is imported;
(A7) described graphical development platform of protocol component generates Web Service and calls pel in the member editing machine;
(A8) described graphical development platform of protocol component calls pel to Web Service call parameters is set;
(A9) described graphical development platform of protocol component adds the SOAP header;
(A10) described graphical development platform of protocol component adds the SOAP accessory information;
Operation is handled in described Web Service component invoking operation, may further comprise the steps:
(B1) system with the resource deployment under the member bag in the member running environment of described member operation platform;
(B2) described member operation platform loads wsdl document to member running environment, and mode-definition is wherein formed Service Data Object;
(B3) described member operation platform loads the XSD file to member running environment;
(B4) described member operation platform turns to document object with described Service Data Object sequence;
(B5) described member operation platform is a Service Data Object with the document object unserializing;
(B6) described member operation platform sends Web Service request;
(B7) described member operation platform is handled Web Service rreturn value;
(B8) the SOAP header is resolved and returned to described member operation platform;
(B9) the SOAP accessory information is resolved and returned to described member operation platform.
Member bag in the method that realization Web Service calls in this component software system is the physical location that comprises certain function logic, and this member bag is deployed in the member running environment of described member operation platform as the deployment unit of a minimum, comprises all dependence resources that realize member function in this member bag.
Dependence resource in the method that realization Web Service calls in this component software system comprises the class file of wsdl document, XSD file, Java operation needs.
The wsdl document of the importing outside in the method that realization Web Service calls in this component software system may further comprise the steps:
(11) described graphical development platform of protocol component is according to the URL at external web Service place, and the wsdl document specified this URL downloads to this locality;
(12) wsdl document downloaded of described graphical development platform of protocol component analysis if comprise other wsdl document of quoting in the wsdl document of being downloaded, then downloads to this locality with this other wsdl document in the lump;
(13) described graphical development platform of protocol component is given tacit consent to the wsdl document of being downloaded under " interface " node that is saved under the member bag resource tree.
Realize comprising in the wsdl document in the method that Web Service calls other wsdl document of quoting in this component software system, a kind of in following two kinds of situations:
(1) by { wsdl document that http://schemas.xmlsoap.org/wsdl/}import is quoted;
(2) by { wsdl document that http://schemas.xmlsoap.org/wsdl/}include is quoted.
The XSD file that wsdl document relied on of the importing outside in the method that realization Web Service calls in this component software system may further comprise the steps:
(21) all wsdl documents of being downloaded of described graphical development platform of protocol component analysis if comprise other XSD file of quoting in the wsdl document, then download to this locality to the XSD file of being quoted;
(22) all XSD files of being downloaded of described graphical development platform of protocol component analysis if comprise other XSD file of quoting in the XSD file, then download to this locality to the XSD file of being quoted;
(23) described graphical development platform of protocol component is given tacit consent to the XSD file of being downloaded under " XML pattern " node that is saved under the member bag resource tree.
Realize comprising in the wsdl document in the method that Web Service calls other XSD file of quoting in this component software system, a kind of in following two kinds of situations:
(1) the type definition part branch in wsdl document comprises passes through { the XSD file that http://www.w3.org/2001/XMLSchem}import is quoted;
(2) the type definition part branch in wsdl document comprises passes through { the XSD file that http://www.w3.org/2001/XMLSchem}include is quoted.
Realize comprising in the XSD file in the method that Web Service calls other XSD file of quoting in this component software system, a kind of in following two kinds of situations:
(1) by { the XSD file that http://www.w3.org/2001/XMLSchem}import is quoted;
(2) by { the XSD file that http://www.w3.org/2001/XMLSchem}include is quoted.
Graphical development platform of protocol component in the method that realization Web Service calls in this component software system carries out the mutual conversion between XSD mode type and the Service Data Object, may further comprise the steps:
(31) described graphical development platform of protocol component is corresponding with the complexType that defines in Service Data Object and the XSD file;
(32) described graphical development platform of protocol component is corresponding with the attribute of definition complexType in the XSD file with the attribute of Service Data Object;
(33) described graphical development platform of protocol component judges whether the attribute type of definition complexType in the XSD file is complicated type;
(34) if, corresponding another Service Data Object of this complicated type then, and as the attribute of this another Service Data Object.
Graphical development platform of protocol component general view in resource tree in the method that realization Web Service calls in this component software system shows the Web Service coherent element in the wsdl document that is imported, and may further comprise the steps:
(41) described graphical development platform of protocol component is resolved under " type " node in the wsdl document data type that the mode by the XML pattern defines;
(42) rule by Service Data Object resolves to Service Data Object with data type information;
(43) type information after will resolving is presented under " type " node under the WSDL resource tree;
(44) described graphical development platform of protocol component resolve " port type " node in the wsdl document and analyze comprising operation and parameter type;
(45) carry out the parsing of parameter type with the rule of Service Data Object, when the analytic parameter number, adopt different analysis modes according to the difference of the style that defines in the wsdl document;
(46) the port type information after resolving is presented under " port type " node under the WSDL resource tree;
(47) " service " node in the parsing wsdl document, and parse the port child node that it comprises;
(48) find the corresponding ports type according to the binding of each port correspondence, and then show operation and parameter information that service is corresponding;
(49) information on services after will resolving is presented under " service " node under the WSDL resource tree.
The rule by Service Data Object in the method that realization Web Service calls in this component software system resolves to Service Data Object with data type information, may further comprise the steps:
(421) if data type is the primary type of XSD, then this data type is resolved to the Java fundamental type;
(422), then the original text data type is resolved to the commonj.sdo.DataObject object in the Service Data Object if data type is a complicated type.
Graphical development platform of protocol component general view in resource tree in the method that realization Web Service calls in this component software system shows type and the attribute information that defines in the XSD file that is imported, and may further comprise the steps:
(51) described graphical development platform of protocol component is resolved all global element nodes and the overall complicated type node information that is comprised in the XSD file;
(52) global element node and overall complicated type node are presented under " data " node under the resource tree as the child node of XML pattern;
(53) attribute that carries out type with the rule of Service Data Object is resolved, and is presented under the corresponding type as child node.
Generate Web Service in the member editing machine in the method that realization Web Service calls in this component software system and call pel, may further comprise the steps:
(61) in resource tree the child node of WSDL node " service " node list the service under all can invokedly be operated, described graphical development platform of protocol component will be operated accordingly according to user's ole Server OLE and be dragged and dropped in the member editing machine, and generation Web Service calls pel;
(62) described Web Service calls the end-point addresses that pel demonstrates the operation of calling and Web Service service place;
(63) described Web Service calling graph unit generates the actual parameter information of calling according to selected operation types information, comprising number of parameters and parameter type;
(64) described Web Service calling graph unit adds SOAP header and accessory information according to needs.
Realize Web Service is called pel call parameters is set in the method that Web Service calls in this component software system, may further comprise the steps:
(71) described graphical development platform of protocol component is judged the type of input and output parameter;
(72), then directly carry out assignment if input and output parameter is a simple types;
(73), then each attribute that defines is carried out assignment respectively in complicated type by the mode of XPath if input and output parameter is a complicated type.
Interpolation SOAP header in the method that realization Web Service calls in this component software system may further comprise the steps:
(81) the SOAP header is stored by the Map structure;
(82) when the storage of this SOAP header, the key in the Map structure is corresponding to following node title of SOAP header;
(83) when this SOAP header storage, the value in the Map structure is corresponding to the value of corresponding keys node under the SOAP header;
(84) sequence of rulesization that the key and the value of this SOAP header storage are pressed Service Data Object;
(85) in adding to the end as the SOAP header document object after the serializing.
Interpolation SOAP accessory information in the method that realization Web Service calls in this component software system may further comprise the steps:
(91) the SOAP accessory information is stored by the Map structure;
(92) when this SOAP accessory information storage, the key in the Map structure is corresponding to the ContentId in the SOAP accessory information;
(93) when this SOAP accessory information storage, the value in the Map structure is corresponding to the detailed content in the SOAP accessory information;
(94) travel through institute's stored accessory information, and add among the SOAP as the SOAP accessory information.
Realize in this component software system in the method that Web Service calls with the resource deployment under the member bag in member running environment, may further comprise the steps:
(C1) all component resources under the member bag are copied in the specified catalogue of member running environment;
(C2) undefined Java compiling class file of member bag and page resource are copied in the application directory of application server appointment.
Component resource in the method that realization Web Service calls in this component software system comprises XSD file and wsdl document.
Page resource in the method that realization Web Service calls in this component software system comprises jsp file and js file.
Loading wsdl document in the method that realization Web Service calls in this component software system may further comprise the steps to member running environment:
When (D1) member running environment starts, all wsdl documents that traversal imports;
(D2) resolve the pattern node under the type node in the wsdl document and be loaded as the type of Service Data Object;
(D3) service, binding, the port type information in the loading wsdl document, and be encapsulated as the runtime model;
(D4) judge the stylistic category of wsdl document correspondence, and be loaded in the WSDL runtime model.
Stylistic category in the method that realization Web Service calls in this component software system comprises following several:
(1)document/literal;
(2)document/literal/wrapper;
(3)rpc/literal、rpc/encoded。
Loading XSD file in the method that realization Web Service calls in this component software system may further comprise the steps to member running environment:
When (E1) member running environment starts, all XSD files that traversal imports;
(E2) resolve type information under the XSD file mode node, and load into the type of Service Data Object.
Type information under the XSD file mode node in the method that realization Web Service calls in this component software system comprises element type and complicated type.
Realize in this component software system in the method that Web Service calls the Service Data Object sequence being turned to document object, may further comprise the steps:
(F1) Service Data Object is according to the schema type information of correspondence, turns to document object by the defined nucleotide sequence of pattern, and the document object comprises node title and node place name space;
(F2) attribute type of Service Data Object is a Service Data Object, and by the definition of pattern its sequence of attributes is turned to document object.
In the method that realization Web Service calls in this component software system is Service Data Object with the document object unserializing, may further comprise the steps:
(G1) the document object root node is obtained corresponding namespace information;
(G2) by the corresponding Service Data Object of name space retrieval;
(G3) child node of traversal document object finds the attribute of the same name of Service Data Object correspondence;
(G4), then directly carry out assignment if this attribute is a simple types;
(G5) if this attribute is a complicated type, then recurrence is carried out the unserializing of document object.
Transmission Web Service request in the method that realization Web Service calls in this component software system may further comprise the steps:
(H1) structure SOAP envelope;
(H2) according to the stylistic category of wsdl document definition, the Service Data Object serializing as input parameter is become document object;
(H3) document object after the serializing adds in the SOAP envelope as the content of SOAP body;
(H4) be provided with header if Web Service calls pel, press the serializing mode of input parameter, the header serializing of setting is become document object;
(H5) header after the serializing adds in the SOAP envelope as the content of SOAP head;
(H6) be provided with accessory information if Web Service calls pel, the accessory information of setting converted to the javax.activation.DataHandler object, and add in the SOAP envelope as the SOAP accessory information;
(H7) URL according to Web Service place sets up the Http connection;
(H8) Http connection requests attribute is set, content type, content-length is set, the SOAP action is correct requesting data information;
(H9) the SOAP envelope is sent in the output stream of connection.
Processing Web Service rreturn value in the method that realization Web Service calls in this component software system may further comprise the steps:
(I1) from the output stream that Http connects, obtain the SOAP envelope that returns;
(I2) from the SOAP envelope, obtain the content of SOAP body as output parameter;
(I3) output parameter is carried out antitone sequence by the unserializing rule of Service Data Object definition and change into data object, and the value after the unserializing is saved in the context that calls.
Parsing in the method that realization Web Service calls in this component software system is also returned the SOAP header, may further comprise the steps:
(J1) from the SOAP envelope, obtain the SOAP header;
(J2) the SOAP header is stored by the Map structure;
(J3) node under the traversal SOAP header, node name is referred to as the key of Map structure;
(J4) child node of traversal bond point is its document object unserializing a Service Data Object, as the value of Map structure;
(J5) the SOAP header is saved in the context that calls, for other component resource visit.
Parsing in the method that realization Web Service calls in this component software system is also returned the SOAP accessory information, may further comprise the steps:
(K1) from the SOAP envelope, obtain the SOAP accessory information;
(K2) the SOAP accessory information is stored by the Map structure;
(K3) with the key of Map structure ContentId corresponding to annex;
(K4) with the value of Map structure detailed content corresponding to annex;
(K5) the SOAP accessory information is saved in the context that calls, for other component resource visit.
Adopted and realized the method that Web Service calls in the component software system of this invention, because the method for dynamic call external web Service wherein is provided, call at different Web Service, no longer need to generate the stub of its WSDL correspondence, the operation steps called and dependence have been reduced to different external tools, really accomplished flexible invocation, the Service Data Object (SDO) of the The data standard of Chuan Diing encapsulates simultaneously, for the data transfer of isomerous environment is had laid a good foundation, thereby what need no longer in the integrated work of system that maintaining webs Service instrument generates calls Web Service code in a large number, and change for external web Service can fast adaptation, thereby make the exploitation of Web Service, invoked procedure is more directly perceived, simple and efficient, improved the efficient of calling, efficient and convenient, running efficiency of system is higher, and is stable and reliable for performance, reduced the cost of development and maintenance; System's portability and extensibility have been strengthened simultaneously; Moreover, this method can also be responded the variation and the technique variation of business demand fast, can support the software systems of setting up high modularization and highly integrating again, the scope of application is comparatively extensive, for further developing of computer component software engineering established solid foundation.
Description of drawings
Fig. 1 is a Web Service calling system configuration diagram of the present invention.
Fig. 2 is that the Web Service in the method that realization Web Service calls in the component software system of the present invention calls exploitation, loading, flow chart of data processing figure.
Fig. 3 is the request transmission of Web Service in the method that realization Web Service calls in the component software system of the present invention and the treatment scheme of rreturn value.
Fig. 4 resolves class figure for pattern (schema) among WSDL, the XSD in the method that realizes Web Service in the component software system of the present invention and call.
Fig. 5 is a pattern (schema) and SDO type conversion class figure in the method that realization Web Service calls in the component software system of the present invention.
Fig. 6 is the class figure of serializing in the method that realization Web Service calls in the component software system of the present invention, unserializing.
Fig. 7 is the synoptic diagram that Web Service calls pel in the method that realization Web Service calls in the component software system of the present invention.
Fig. 8 is a soap message structural representation in the method that realization Web Service calls in the component software system of the present invention.
Embodiment
In order more to be expressly understood technology contents of the present invention, describe in detail especially exemplified by following examples.
Calling Web Service when service, the mutual bridge of client and server end is WSDL (Web ServiceDefinition Language, a Web Service Definition Language), comprising following essential element:
● the container of types---dtd, use XML Schema to come the structural information of data of description type.
● portType---the abstract set of service operations is described, with the Java interface class seemingly.
● the concrete host-host protocol of binding---appointment in the data transmission procedure and the data format specifications of institute's defining operation.
● service---the service that externally provides.
● operation---to the abstractdesription of the operation supported in the service, the requests/response messages of access entrance and unusual statement have been described.
In calling Web Service process, the mutual information of client and server end is soap message, defines with the XML form, and its structure sees also Fig. 8 as showing, comprising following essential element:
● SOAP Body---encapsulated the data that will transmit.
● SOAP Header---as the expansion of pass-along message, can freely add.
See also Fig. 1 to shown in Figure 9, realize the method that Web Service calls in this component software system, comprise graphical development platform of protocol component and the member operation platform that is connected with this graphical development platform of protocol component in the described component software system, wherein, described method comprises operation of Web Service component invoking development process and Web Service component invoking operation processing operation, described Web Service component invoking development process operation may further comprise the steps:
(A1) the newly-built member bag of the graphical development platform of protocol component of system; This member bag is the physical location that comprises certain function logic, and this member bag is deployed in the member running environment of described member operation platform as the deployment unit of a minimum, comprises all that realize member function in this member bag and relies on resources; This dependence resource comprises the class file of wsdl document, XSD file, Java operation needs;
(A2) described graphical development platform of protocol component imports outside wsdl document, may further comprise the steps:
(a) described graphical development platform of protocol component is according to the URL at external web Service place, this URL indication
Fixed wsdl document downloads to this locality;
(b) wsdl document downloaded of described graphical development platform of protocol component analysis if comprise other wsdl document of quoting in the wsdl document of being downloaded, then downloads to this locality with this other wsdl document in the lump; Comprise other wsdl document of quoting in this wsdl document, a kind of in following two kinds of situations:
(i) by { wsdl document that http://schemas.xmlsoap.org/wsdl/}import is quoted;
(ii) by the { wsdl document that http://schemas.xmlsoap.org/wsdl/}include is quoted;
(c) described graphical development platform of protocol component is given tacit consent to the wsdl document of being downloaded under " interface " node that is saved under the member bag resource tree;
(A3) described graphical development platform of protocol component imports this outside XSD file that wsdl document relied on, and may further comprise the steps:
(a) all wsdl documents of being downloaded of described graphical development platform of protocol component analysis if comprise other XSD file of quoting in the wsdl document, then download to this locality to the XSD file of being quoted; Comprise other XSD file of quoting in this wsdl document, a kind of in following two kinds of situations:
(i) the type definition part branch in wsdl document comprises passes through { the XSD file that http://www.w3.org/2001/XMLSchem}import is quoted;
(ii) the type definition part branch in wsdl document comprises passes through { the XSD file that http://www.w3.org/2001/XMLSchem}include is quoted;
(b) all XSD files of being downloaded of described graphical development platform of protocol component analysis if comprise other XSD file of quoting in the XSD file, then download to this locality to the XSD file of being quoted; Comprise other XSD file of quoting in this XSD file, a kind of in following two kinds of situations:
(i) by { the XSD file that http://www.w3.org/2001/XMLSchem}import is quoted;
(ii) by { the XSD file that http://www.w3.org/2001/XMLSchem}include is quoted;
(c) described graphical development platform of protocol component is given tacit consent to the XSD file of being downloaded under " XML pattern " node that is saved under the member bag resource tree;
(A4) described graphical development platform of protocol component carries out the mutual conversion between XSD mode type and the Service Data Object, may further comprise the steps:
(a) described graphical development platform of protocol component is corresponding with the complexType that defines in Service Data Object and the XSD file;
(b) described graphical development platform of protocol component is corresponding with the attribute of definition complexType in the XSD file with the attribute of Service Data Object;
(c) described graphical development platform of protocol component judges whether the attribute type of definition complexType in the XSD file is complicated type;
(d) if, corresponding another Service Data Object of this complicated type then, and as the attribute of this another Service Data Object;
(A5) general view in resource tree of described graphical development platform of protocol component shows the WebService coherent element in the wsdl document that is imported, and may further comprise the steps:
(a) described graphical development platform of protocol component is resolved under " type " node in the wsdl document data type that the mode by the XML pattern defines;
(b) rule by Service Data Object resolves to Service Data Object with data type information, may further comprise the steps:
(i) if data type is the primary type of XSD, then this data type is resolved to the Java fundamental type;
If (ii) data type is a complicated type, then the original text data type is resolved to the commonj.sdo.DataObject object in the Service Data Object;
(c) type information after will resolving is presented under " type " node under the WSDL resource tree;
(d) described graphical development platform of protocol component resolve " port type " node in the wsdl document and analyze comprising operation and parameter type;
(e) carry out the parsing of parameter type with the rule of Service Data Object, when the analytic parameter number, adopt different analysis modes according to the difference of the style that defines in the wsdl document;
(f) the port type information after resolving is presented under " port type " node under the WSDL resource tree;
(g) " service " node in the parsing wsdl document, and parse the port child node that it comprises;
(h) find the corresponding ports type according to the binding of each port correspondence, and then show operation and parameter information that service is corresponding;
(j) information on services after will resolving is presented under " service " node under the WSDL resource tree;
(A6) general view in resource tree of described graphical development platform of protocol component shows type and the attribute information that defines in the XSD file that is imported, and may further comprise the steps:
(a) described graphical development platform of protocol component is resolved all global element nodes and the overall complicated type node information that is comprised in the XSD file;
(b) global element node and overall complicated type node are presented under " data " node under the resource tree as the child node of XML pattern;
(c) attribute that carries out type with the rule of Service Data Object is resolved, and is presented under the corresponding type as child node;
(A7) described graphical development platform of protocol component generates Web Service and calls pel in the member editing machine, may further comprise the steps:
(61) in resource tree the child node of WSDL node " service " node list the service under all can invokedly be operated, described graphical development platform of protocol component will be operated accordingly according to user's ole Server OLE and be dragged and dropped in the member editing machine, and generation Web Service calls pel;
(62) described Web Service calls the end-point addresses that pel demonstrates the operation of calling and Web Service service place;
(63) described Web Service calling graph unit generates the actual parameter information of calling according to selected operation types information, comprising number of parameters and parameter type;
(64) described Web Service calling graph unit adds SOAP header and accessory information according to needs;
(A8) described graphical development platform of protocol component calls pel to Web Service call parameters is set, and may further comprise the steps:
(a) described graphical development platform of protocol component is judged the type of input and output parameter;
(b), then directly carry out assignment if input and output parameter is a simple types;
(c), then each attribute that defines is carried out assignment respectively in complicated type by the mode of XPath if input and output parameter is a complicated type;
(A9) described graphical development platform of protocol component adds the SOAP header, may further comprise the steps:
(a) the SOAP header is stored by the Map structure;
(b) when the storage of this SOAP header, the key in the Map structure is corresponding to following node title of SOAP header;
(c) when this SOAP header storage, the value in the Map structure is corresponding to the value of corresponding keys node under the SOAP header;
(d) sequence of rulesization that the key and the value of this SOAP header storage are pressed Service Data Object;
(e) in adding to the end as the SOAP header document object after the serializing;
(A10) described graphical development platform of protocol component adds the SOAP accessory information, may further comprise the steps:
(a) the SOAP accessory information is stored by the Map structure;
(b) when this SOAP accessory information storage, the key in the Map structure is corresponding to the ContentId in the SOAP accessory information;
(c) when this SOAP accessory information storage, the value in the Map structure is corresponding to the detailed content in the SOAP accessory information;
(d) travel through institute's stored accessory information, and add among the SOAP as the SOAP accessory information;
Operation is handled in described Web Service component invoking operation, may further comprise the steps:
(B1) system in the member running environment of described member operation platform, may further comprise the steps the resource deployment under the member bag:
(a) all component resources under the member bag are copied in the specified catalogue of member running environment; This component resource comprises XSD file and wsdl document.
(b) undefined Java compiling class file of member bag and page resource are copied in the application directory of application server appointment; This page resource comprises jsp file and js file;
(B2) described member operation platform loads wsdl document to member running environment, and mode-definition is wherein formed Service Data Object; This loads wsdl document to member running environment, may further comprise the steps:
When (a) member running environment starts, all wsdl documents that traversal imports;
(b) resolve the pattern node under the type node in the wsdl document and be loaded as the type of Service Data Object;
(c) service, binding, the port type information in the loading wsdl document, and be encapsulated as the runtime model;
(d) judge the stylistic category of wsdl document correspondence, and be loaded in the WSDL runtime model; This stylistic category comprises following several:
(i)document/literal;
(ii)document/literal/wrapper;
(iii)rpc/literal、rpc/encoded;
(B3) described member operation platform loads the XSD file to member running environment, may further comprise the steps:
When (a) member running environment starts, all XSD files that traversal imports;
(b) resolve type information under the XSD file mode node, and load into the type of Service Data Object; Type information under this XSD file mode node comprises element type and complicated type;
(B4) described member operation platform turns to document object with described Service Data Object sequence, may further comprise the steps:
(a) Service Data Object is according to the schema type information of correspondence, turns to document object by the defined nucleotide sequence of pattern, and the document object comprises node title and node place name space;
(b) attribute type of Service Data Object is a Service Data Object, and by the definition of pattern its sequence of attributes is turned to document object;
(B5) described member operation platform is a Service Data Object with the document object unserializing, may further comprise the steps:
(a) the document object root node is obtained corresponding namespace information;
(b) by the corresponding Service Data Object of name space retrieval;
(c) child node of traversal document object finds the attribute of the same name of Service Data Object correspondence;
(d), then directly carry out assignment if this attribute is a simple types;
(e) if this attribute is a complicated type, then recurrence is carried out the unserializing of document object;
(B6) described member operation platform sends Web Service request, may further comprise the steps:
(a) structure SOAP envelope;
(b) according to the stylistic category of wsdl document definition, the Service Data Object serializing as input parameter is become document object;
(c) document object after the serializing adds in the SOAP envelope as the content of SOAP body;
(d) be provided with header if Web Service calls pel, press the serializing mode of input parameter, the header serializing of setting is become document object;
(e) header after the serializing adds in the SOAP envelope as the content of SOAP head;
(f) be provided with accessory information if Web Service calls pel, the accessory information of setting converted to the javax.activation.DataHandler object, and add in the SOAP envelope as the SOAP accessory information;
(g) URL according to Web Service place sets up the Http connection;
(h) Http connection requests attribute is set, content type, content-length is set, the SOAP action is correct requesting data information;
(j) the SOAP envelope is sent in the output stream of connection;
(B7) described member operation platform is handled Web Service rreturn value, may further comprise the steps:
(a) from the output stream that Http connects, obtain the SOAP envelope that returns;
(b) from the SOAP envelope, obtain the content of SOAP body as output parameter;
(c) output parameter is carried out antitone sequence by the unserializing rule of Service Data Object definition and change into data object, and the value after the unserializing is saved in the context that calls;
(B8) described member operation platform is resolved and is returned the SOAP header, may further comprise the steps:
(a) from the SOAP envelope, obtain the SOAP header;
(b) the SOAP header is stored by the Map structure;
(c) node under the traversal SOAP header, node name is referred to as the key of Map structure;
(d) child node of traversal bond point is its document object unserializing a Service Data Object, as the value of Map structure;
(e) the SOAP header is saved in the context that calls, for other component resource visit;
(B9) described member operation platform is resolved and is returned the SOAP accessory information, may further comprise the steps:
(a) from the SOAP envelope, obtain the SOAP accessory information;
(b) the SOAP accessory information is stored by the Map structure;
(c) with the key of Map structure ContentId corresponding to annex;
(d) with the value of Map structure detailed content corresponding to annex;
(e) the SOAP accessory information is saved in the context that calls, for other component resource visit.
In the middle of reality is used, realize calling the method for Web Service in this component software system, the operation platform that comprises graphical development platform of protocol component and member, described method comprises Web Service component invoking development and operation and Web Service component invoking operation, as shown in Figure 2.In Web Service exploitation and invoked procedure, unified Service Data Object (SDO is adopted in the definition of data and encapsulation, Service Data Object) model, Service Data Object (SDO) has been unified the data programing of different pieces of information Source Type, stalwartness support to the general purpose application program pattern is provided, and make application program and the easier inquiry of instrument, read, its operation is undertaken by the XPath rule, and the class figure of Service Data Object (SDO) and Schema conversion is as shown in Figure 5.
Described Web Service component invoking development and operation may further comprise the steps::
(1) newly-built member bag, this member package definition a business module unit, corresponding service is provided, corresponding with file directory physically;
(2) import outside wsdl document, may further comprise the steps:
(a) according to the URL at external web Service place, the WSDL of its URL appointment is downloaded to this locality;
(b) analyze the wsdl document of downloading, if comprise in the wsdl document of downloading by { http://schemas.xmlsoap.org/wsdl/}import or { other wsdl document that http://schemas.xmlsoap.org/wsdl/}include quotes then downloads to this locality in the lump;
(c) wsdl document of downloading is given tacit consent under " interface " node that is saved under the member bag resource tree.
(3) import the outside XSD file that wsdl document relied on, may further comprise the steps:
(a) if all wsdl documents of analyze downloading are the type definition<types in the wsdl document〉part comprise by
Http:// www.w3.org/2001/XMLSchem}import or
{ other XSD file that http://www.w3.org/2001/XMLSchem}include quotes then downloads to this locality to the XSD file of quoting;
(b) all XSD files of analyze downloading, if comprise by
Http:// www.w3.org/2001/XMLSchem}import or
{ other XSD file that http://www.w3.org/2001/XMLSchem}include quotes then downloads to this locality to the XSD file of quoting simultaneously;
(c) the XSD file of downloading is given tacit consent under " XML Schema " node that is saved under the member bag resource tree.
(4) the mutual conversion of XSD Schema Type and Service Data Object (SDO) may further comprise the steps:
(a) complexType that defines among Service Data Object and the XSD is corresponding;
(b) attribute of Service Data Object is corresponding with the attribute of definition complexType among the XSD;
(c) among the XSD attribute type of definition complexType as be complexType, another Service Data Object of correspondence then, and as the attribute of Service Data Object.
(5) the resource tree general view shows the wsdl document that imports, and may further comprise the steps:
(a) resolve under the types node in the wsdl document data type that the mode according to XML Schema defines;
(b) data type information is pressed the rule of Service Data Object (SDO), resolve to Service Data Object (SDO), if type is the primary type of XSD, then resolve to the Java fundamental type, if type is complicated type (complexType), then resolve to the commonj.sdo.DataObject object in the Service Data Object (SDO);
(c) type information after resolving is presented under " type " node under the WSDL resource tree;
(d) resolve portType node in the wsdl document, and analyze comprising operation and parameter type;
(e) parsing of parameter type is carried out with the rule of Service Data Object (SDO), when the analytic parameter number, adopts different analysis modes according to the style that defines in the wsdl document (document, rpc) difference;
(f) the portType information after resolving is presented under " port type " node under the WSDL resource tree;
(g) resolve service node in the wsdl document, and parse the port child node that it comprises, find corresponding portType according to the binding of each port correspondence, and then show the operation and the parameter information of service correspondence;
(h) the service information after resolving is presented under " service " node under the WSDL resource tree.
(6) the resource tree general view shows the XSD file that imports, and may further comprise the steps:
(a) resolve all overall element nodes and the overall complexType node information that comprises in the XSD file;
(b) overall element node and overall complexType node are presented under " data " node under the resource tree as the child node of XML Schema;
(c) resolve the attribute of type, and be presented under the corresponding type as child node, the parsing of type is carried out with the rule of Service Data Object (SDO).
(7) generate componentization Web Service and call pel, may further comprise the steps:
(a) child node of WSDL node " service " node has been listed service down all can invokedly have been operated in the resource tree, directly operation is dragged and dropped in the member editing machine, generates Web Service and calls pel;
(b) the Web Service of Sheng Chenging calls the end-point addresses (Endpoint) that demonstrates the operation of calling and Web Service service place in the pel;
(c) the Web Service of Sheng Chenging calls in the pel, according to selected operation types information, generates the actual parameter information of calling, and comprises number of parameters and parameter type, wherein the display message unanimity of type in the information of same resource tree of type;
(d) the Web Service calling graph unit of Sheng Chenging can add SOAP Header and annex according to needs.
(8) Web Service calls pel call parameters is set, and may further comprise the steps:
(a) if input, output parameter are simple types, directly carry out assignment;
(b) if input, output parameter are complicated type (SDO type), the mode by XPath is carried out assignment respectively to each attribute of its definition.
(9) add SOAP Header information, may further comprise the steps:
(a) SOAP Header information is stored by the Map structure;
When (b) Header stores, the node title of Header under the corresponding SOAP Header of key (key);
When (c) Header stores, the value of corresponding keys (key) node under value (value) corresponding SOAP Header;
(d) key (key) of Header storage and be worth the sequence of rulesization that (value) presses Service Data Object (SDO);
(e) document object after the serializing (document) adds among the Header as SOAP Header.
(10) add SOAPAttachment information, may further comprise the steps:
(a) SOAP Attachment information is stored by the Map structure;
When (b) Attachment stores, the ContentId of the corresponding annex of key (key);
When (c) Attachment stores, the detailed content of value (value) corresponding annex;
(d) the Attachment information of traversal storage is added among the SOAP as accessory information.
Through above step, the preparatory stage that Web Service calls finishes, and the Web Service that exploitation is finished calls the pel synoptic diagram as shown in Figure 7.Therefrom as can be seen, the user is when calling Web Service and call, by two simple steps: import and be provided with call parameters and just finished.
Described Web Service component invoking operation may further comprise the steps:
(1) resource may further comprise the steps to member running environment under the deployment member bag:
(a),, copy in the member running environment designated directory as XSD file, wsdl document all component resources under the member bag;
(b) undefined Java compiling class file of member bag and page resource (jsp file, js file) are put in application (webapp) catalogue of application server appointment.
(2) load wsdl document to member running environment, the class figure of parsing as shown in Figure 3.Described operation may further comprise the steps:
When (a) member running environment starts, all wsdl documents that traversal imports;
(b) resolve the type that the schema node under the types node in the wsdl document loads into Service Data Object (SDO);
(c) service, binding, the portType information in the loading wsdl document is encapsulated as the runtime model, in the system runtime model is carried out buffer memory, to improve performance;
(d) load the operation information that the portType in the wsdl document defines, and each operational parameter information is carried out buffer memory, to improve invocation performance;
(e) (rpc/literal rpc/encoded), and is loaded in the WSDL runtime model style type of judgement wsdl document correspondence for document/literal, document/literal/wrapper.
(3) load the XSD file load to member running environment, may further comprise the steps:
When (a) member running environment starts, all XSD files that traversal imports;
(b) resolve type (element, complexType) information under the XSD file schema node, and load into the type of Service Data Object (SDO);
(c) Service Data Object (SDO) that generates is carried out buffer memory, to improve the performance of searching of type.
(4) Service Data Object (SDO) sequence turns to document object (document), may further comprise the steps:
(a) Service Data Object (SDO) is according to the SchemaType information of correspondence, turns to document object (document) by the defined nucleotide sequence of Schema, comprises node title and node place name space;
(b) attribute type of Service Data Object is Service Data Object (SDO), by the definition of Schema its sequence of attributes is turned to document object (document).
(5) document object (document) unserializing is Service Data Object (SDO), may further comprise the steps:
(a) the document object root node is obtained corresponding namespace information;
(b) by the corresponding Service Data Object (SDO) of name space retrieval;
(c) child node of traversal document object finds the corresponding attribute of the same name of Service Data Object (SDO);
(d) if be simple types, directly carry out assignment;
(e) if be complicated type (SDO type), then recurrence is carried out the unserializing of document object (document).
(6) send Web Service request, process flow diagram as shown in Figure 2.Described operation may further comprise the steps:
(a) structure SOAP envelope;
(b) according to the style type of wsdl document definition, Service Data Object (SDO) serializing as input parameter is become document object (document), the serializing rule is as follows:
(I) type of input parameter is a simple types, and then the type that defines among the Schema according to the input parameter correspondence is carried out serializing, comprises the node title of needs generation and the name space at place;
(II) type of input parameter is the type of Service Data Object (SDO), then carry out according to the serializing of SDO, the SDO data object has carried out mapping and it has been carried out buffer memory with complexType when resolving schema, the SDO data object is when serializing, and the corresponding style type according to schema definition and WSDL definition generates corresponding node title, attribute and affiliated name space fully.
(c) document object after the serializing adds in the SOAP envelope as the content of SOAP Body;
(d),, the Header information sequence of setting is changed into document object (document) in the serializing mode of input parameter if it is the Header information of storing by the Map structure that Web Service calls pel being provided with;
(e) the Header information after the serializing is added in the SOAP envelope as the content of SOAP Header;
(f) if Web Service calls pel to be provided with by the Map structure and to carry out stored accessory information, the accessory information of setting is converted to the javax.activation.DataHandler object, and add in the SOAP envelope as SOAP Attachment;
(g), set up Http and connect according to the URL at Web Service place;
(h) Http connection requests attribute is set, Content-type, Content-length is set, SOAPAction is correct requesting data information;
(j) the SOAP envelope is sent in the output stream of connection.
(7) handle Web Service rreturn value, may further comprise the steps:
(a) from the output stream that Http connects, obtain the SOAP envelope that returns;
(b) from the SOAP envelope, obtain the content of SOAP Body as output parameter;
(c) output parameter is carried out antitone sequence by the definition unserializing rule of Service Data Object (SDO) and change into the DataObject object, and the value after the unserializing is saved in the context that calls, for other component resource visit;
(8) SOAP Header information is returned in parsing, may further comprise the steps:
(a) from the SOAP envelope, obtain SOAP Header information;
(b) SOAP Header stores by the Map structure;
(c) node under the traversal SOAP Header, node name is referred to as the key (key) of Map structure;
(d) child node of traversal key (key) node is its document object unserializing Service Data Object (SDO), as the value (value) of Map structure;
(e) SOAP Header information is saved in the context that calls, for other component resource visit.
(9) SOAPAttachment information is returned in parsing, may further comprise the steps:
(a) from the SOAP envelope, obtain SOAPAttachment information;
(b) SOAP Attachment stores by the Map structure;
(c) ContentId of the corresponding annex of the key of Map structure (key);
(d) detailed content of the corresponding annex of the value of Map structure (value);
(e) SOAP Attachment information is saved in the context that calls, for other component resource visit.
Adopted and realized the method that Web Service calls in the above-mentioned component software system, because the method for dynamic call external web Service wherein is provided, call at different Web Service, no longer need to generate the stub of its WSDL correspondence, the operation steps called and dependence have been reduced to different external tools, really accomplished flexible invocation, the Service Data Object (SDO) of the The data standard of Chuan Diing encapsulates simultaneously, for the data transfer of isomerous environment is had laid a good foundation, thereby what need no longer in the integrated work of system that maintaining webs Service instrument generates calls Web Service code in a large number, and change for external web Service can fast adaptation, thereby make the exploitation of Web Service, invoked procedure is more directly perceived, simple and efficient, improved the efficient of calling, efficient and convenient, running efficiency of system is higher, and is stable and reliable for performance, reduced the cost of development and maintenance; System's portability and extensibility have been strengthened simultaneously; Moreover, this method can also be responded the variation and the technique variation of business demand fast, can support the software systems of setting up high modularization and highly integrating again, the scope of application is comparatively extensive, for further developing of computer component software engineering established solid foundation.
In this instructions, the present invention is described with reference to its certain embodiments.But, still can make various modifications and conversion obviously and not deviate from the spirit and scope of the present invention.Therefore, instructions and accompanying drawing are regarded in an illustrative, rather than a restrictive.

Claims (29)

1. realize the method that Web Service calls in a component software system, comprise graphical development platform of protocol component and the member operation platform that is connected with this graphical development platform of protocol component in the described component software system, it is characterized in that, described method comprises operation of Web Service component invoking development process and Web Service component invoking operation processing operation, described Web Service component invoking development process operation may further comprise the steps:
(A1) the newly-built member bag of the graphical development platform of protocol component of system;
(A2) described graphical development platform of protocol component imports outside wsdl document;
(A3) described graphical development platform of protocol component imports this outside XSD file that wsdl document relied on;
(A4) described graphical development platform of protocol component carries out the mutual conversion between XSD mode type and the Service Data Object;
(A5) general view in resource tree of described graphical development platform of protocol component shows the WebService coherent element in the wsdl document that is imported;
(A6) general view in resource tree of described graphical development platform of protocol component shows type and the attribute information that defines in the XSD file that is imported;
(A7) described graphical development platform of protocol component generates Web Service and calls pel in the member editing machine;
(A8) described graphical development platform of protocol component calls pel to Web Service call parameters is set;
(A9) described graphical development platform of protocol component adds the SOAP header;
(A10) described graphical development platform of protocol component adds the SOAP accessory information;
Operation is handled in described Web Service component invoking operation, may further comprise the steps:
(B1) system with the resource deployment under the member bag in the member running environment of described member operation platform;
(B2) described member operation platform loads wsdl document to member running environment, and mode-definition is wherein formed Service Data Object;
(B3) described member operation platform loads the XSD file to member running environment;
(B4) described member operation platform turns to document object with described Service Data Object sequence;
(B5) described member operation platform is a Service Data Object with the document object unserializing;
(B6) described member operation platform sends Web Service request;
(B7) described member operation platform is handled Web Service rreturn value;
(B8) the SOAP header is resolved and returned to described member operation platform;
(B9) the SOAP accessory information is resolved and returned to described member operation platform.
2. realize the method that Web Service calls in the component software system according to claim 1, it is characterized in that, described member bag is the physical location that comprises certain function logic, and this member bag is deployed in the member running environment of described member operation platform as the deployment unit of a minimum, comprises all dependence resources that realize member function in this member bag.
3. realize the method that Web Service calls in the component software system according to claim 2, it is characterized in that described dependence resource comprises the class file of wsdl document, XSD file, Java operation needs.
4. it is characterized in that the method that Web Service calls according to realizing in each described component software system in the claim 1 to 3, the described wsdl document that imports the outside may further comprise the steps:
(11) described graphical development platform of protocol component is according to the URL at external web Service place, and the wsdl document specified this URL downloads to this locality;
(12) wsdl document downloaded of described graphical development platform of protocol component analysis if comprise other wsdl document of quoting in the wsdl document of being downloaded, then downloads to this locality with this other wsdl document in the lump;
(13) described graphical development platform of protocol component is given tacit consent to the wsdl document of being downloaded under " interface " node that is saved under the member bag resource tree.
5. realize the method that Web Service calls in the component software system according to claim 4, it is characterized in that, comprise other wsdl document of quoting in the described wsdl document, a kind of in following two kinds of situations:
(1) by { wsdl document that http://schemas.xmlsoap.org/wsdl/}import is quoted;
(2) by { wsdl document that http://schemas.xmlsoap.org/wsdl/}include is quoted.
6. it is characterized in that the method that Web Service calls according to realizing in each described component software system in the claim 1 to 3, the described XSD file that wsdl document relied on that imports the outside may further comprise the steps:
(21) all wsdl documents of being downloaded of described graphical development platform of protocol component analysis if comprise other XSD file of quoting in the wsdl document, then download to this locality to the XSD file of being quoted;
(22) all XSD files of being downloaded of described graphical development platform of protocol component analysis if comprise other XSD file of quoting in the XSD file, then download to this locality to the XSD file of being quoted;
(23) described graphical development platform of protocol component is given tacit consent to the XSD file of being downloaded under " XML pattern " node that is saved under the member bag resource tree.
7. realize the method that Web Service calls in the component software system according to claim 6, it is characterized in that, comprise other XSD file of quoting in the described wsdl document, a kind of in following two kinds of situations:
(1) the type definition part branch in wsdl document comprises passes through { the XSD file that http://www.w3.org/2001/XMLSchem}import is quoted;
(2) the type definition part branch in wsdl document comprises passes through { the XSD file that http://www.w3.org/2001/XMLSchem}include is quoted.
8. realize the method that Web Service calls in the component software system according to claim 6, it is characterized in that, comprise other XSD file of quoting in the described XSD file, a kind of in following two kinds of situations:
(1) by { the XSD file that http://www.w3.org/2001/XMLSchem}import is quoted;
(2) by { the XSD file that http://www.w3.org/2001/XMLSchem}include is quoted.
9. according to realizing the method that Web Service calls in each described component software system in the claim 1 to 3, it is characterized in that, described graphical development platform of protocol component carries out the mutual conversion between XSD mode type and the Service Data Object, may further comprise the steps:
(31) described graphical development platform of protocol component is corresponding with the complexType that defines in Service Data Object and the XSD file;
(32) described graphical development platform of protocol component is corresponding with the attribute of definition complexType in the XSD file with the attribute of Service Data Object;
(33) described graphical development platform of protocol component judges whether the attribute type of definition complexType in the XSD file is complicated type;
(34) if, corresponding another Service Data Object of this complicated type then, and as the attribute of this another Service Data Object.
10. according to realizing the method that Web Service calls in each described component software system in the claim 1 to 3, it is characterized in that, the general view in resource tree of described graphical development platform of protocol component shows the WebService coherent element in the wsdl document that is imported, and may further comprise the steps:
(41) described graphical development platform of protocol component is resolved under " type " node in the wsdl document data type that the mode by the XML pattern defines;
(42) rule by Service Data Object resolves to Service Data Object with data type information;
(43) type information after will resolving is presented under " type " node under the WSDL resource tree;
(44) described graphical development platform of protocol component resolve " port type " node in the wsdl document and analyze comprising operation and parameter type;
(45) carry out the parsing of parameter type with the rule of Service Data Object, when the analytic parameter number, adopt different analysis modes according to the difference of the style that defines in the wsdl document;
(46) the port type information after resolving is presented under " port type " node under the WSDL resource tree;
(47) " service " node in the parsing wsdl document, and parse the port child node that it comprises;
(48) find the corresponding ports type according to the binding of each port correspondence, and then show operation and parameter information that service is corresponding;
(49) information on services after will resolving is presented under " service " node under the WSDL resource tree.
11. realize the method that Web Service calls in the component software system according to claim 10, it is characterized in that described rule by Service Data Object resolves to Service Data Object with data type information, may further comprise the steps:
(421) if data type is the primary type of XSD, then this data type is resolved to the Java fundamental type;
(422), then the original text data type is resolved to the commonj.sdo.DataObject object in the Service Data Object if data type is a complicated type.
12. according to realizing the method that Web Service calls in each described component software system in the claim 1 to 3, it is characterized in that, the general view in resource tree of described graphical development platform of protocol component shows type and the attribute information that defines in the XSD file that is imported, and may further comprise the steps:
(51) described graphical development platform of protocol component is resolved all global element nodes and the overall complicated type node information that is comprised in the XSD file;
(52) global element node and overall complicated type node are presented under " data " node under the resource tree as the child node of XML pattern;
(53) attribute that carries out type with the rule of Service Data Object is resolved, and is presented under the corresponding type as child node.
13. it is characterized in that the method that Web Service calls according to realizing in each described component software system in the claim 1 to 3, generate Web Service in the described member editing machine and call pel, may further comprise the steps:
(61) in resource tree the child node of WSDL node " service " node list the service under all can invokedly be operated, described graphical development platform of protocol component will be operated accordingly according to user's ole Server OLE and be dragged and dropped in the member editing machine, and generation Web Service calls pel;
(62) described Web Service calls the end-point addresses that pel demonstrates the operation of calling and Web Service service place;
(63) described Web Service calling graph unit generates the actual parameter information of calling according to selected operation types information, comprising number of parameters and parameter type;
(64) described Web Service calling graph unit adds SOAP header and accessory information according to needs.
14. the method according to realizing in each described component software system in the claim 1 to 3 that Web Service calls is characterized in that, describedly Web Service is called pel call parameters is set, and may further comprise the steps:
(71) described graphical development platform of protocol component is judged the type of input and output parameter;
(72), then directly carry out assignment if input and output parameter is a simple types;
(73), then each attribute that defines is carried out assignment respectively in complicated type by the mode of XPath if input and output parameter is a complicated type.
15. the method that Web Service calls it is characterized in that described interpolation SOAP header may further comprise the steps according to realizing in each described component software system in the claim 1 to 3:
(81) the SOAP header is stored by the Map structure;
(82) when the storage of this SOAP header, the key in the Map structure is corresponding to following node title of SOAP header;
(83) when this SOAP header storage, the value in the Map structure is corresponding to the value of corresponding keys node under the SOAP header;
(84) sequence of rulesization that the key and the value of this SOAP header storage are pressed Service Data Object;
(85) in adding to the end as the SOAP header document object after the serializing.
16. the method that Web Service calls it is characterized in that described interpolation SOAP accessory information may further comprise the steps according to realizing in each described component software system in the claim 1 to 3:
(91) the SOAP accessory information is stored by the Map structure;
(92) when this SOAP accessory information storage, the key in the Map structure is corresponding to the ContentId in the SOAP accessory information;
(93) when this SOAP accessory information storage, the value in the Map structure is corresponding to the detailed content in the SOAP accessory information;
(94) travel through institute's stored accessory information, and add among the SOAP as the SOAP accessory information.
17. the method according to realizing in each described component software system in the claim 1 to 3 that Web Service calls is characterized in that, described with the resource deployment under the member bag in member running environment, may further comprise the steps:
(C1) all component resources under the member bag are copied in the specified catalogue of member running environment;
(C2) undefined Java compiling class file of member bag and page resource are copied in the application directory of application server appointment.
18. realize the method that Web Service calls in the component software system according to claim 17, it is characterized in that described component resource comprises XSD file and wsdl document.
19. realize the method that Web Service calls in the component software system according to claim 17, it is characterized in that described page resource comprises jsp file and js file.
20. the method that Web Service calls it is characterized in that described loading wsdl document may further comprise the steps to member running environment according to realizing in each described component software system in the claim 1 to 3:
When (D1) member running environment starts, all wsdl documents that traversal imports;
(D2) resolve the pattern node under the type node in the wsdl document and be loaded as the type of Service Data Object;
(D3) service, binding, the port type information in the loading wsdl document, and be encapsulated as the runtime model;
(D4) judge the stylistic category of wsdl document correspondence, and be loaded in the WSDL runtime model.
21. realize the method that Web Service calls in the component software system according to claim 20, it is characterized in that described stylistic category comprises following several:
(1)document/literal;
(2)document/literal/wrapper;
(3)rpc/literal、rpc/encoded。
22. the method that Web Service calls it is characterized in that described loading XSD file may further comprise the steps to member running environment according to realizing in each described component software system in the claim 1 to 3:
When (E1) member running environment starts, all XSD files that traversal imports;
(E2) resolve type information under the XSD file mode node, and load into the type of Service Data Object.
23. realize the method that Web Service calls in the component software system according to claim 22, it is characterized in that the type information under the described XSD file mode node comprises element type and complicated type.
24. the method according to realizing in each described component software system in the claim 1 to 3 that Web Service calls is characterized in that, described the Service Data Object sequence is turned to document object, may further comprise the steps:
(F1) Service Data Object is according to the schema type information of correspondence, turns to document object by the defined nucleotide sequence of pattern, and the document object comprises node title and node place name space;
(F2) attribute type of Service Data Object is a Service Data Object, and by the definition of pattern its sequence of attributes is turned to document object.
25. the method that Web Service calls it is characterized in that described is Service Data Object with the document object unserializing, may further comprise the steps according to realizing in each described component software system in the claim 1 to 3:
(G1) the document object root node is obtained corresponding namespace information;
(G2) by the corresponding Service Data Object of name space retrieval;
(G3) child node of traversal document object finds the attribute of the same name of Service Data Object correspondence;
(G4), then directly carry out assignment if this attribute is a simple types;
(G5) if this attribute is a complicated type, then recurrence is carried out the unserializing of document object.
26. it is characterized in that the method that Web Service calls according to realizing in each described component software system in the claim 1 to 3, described transmission Web Service request may further comprise the steps:
(H1) structure SOAP envelope;
(H2) according to the stylistic category of wsdl document definition, the Service Data Object serializing as input parameter is become document object;
(H3) document object after the serializing adds in the SOAP envelope as the content of SOAP body;
(H4) be provided with header if Web Service calls pel, press the serializing mode of input parameter, the header serializing of setting is become document object;
(H5) header after the serializing adds in the SOAP envelope as the content of SOAP head;
(H6) be provided with accessory information if Web Service calls pel, the accessory information of setting converted to the javax.activation.DataHandler object, and add in the SOAP envelope as the SOAP accessory information;
(H7) URL according to Web Service place sets up the Http connection;
(H8) Http connection requests attribute is set, content type, content-length is set, the SOAP action is correct requesting data information;
(H9) the SOAP envelope is sent in the output stream of connection.
27. realize the method that Web Service calls in the component software system according to claim 26, it is characterized in that described processing Web Service rreturn value may further comprise the steps:
(I1) from the output stream that Http connects, obtain the SOAP envelope that returns;
(I2) from the SOAP envelope, obtain the content of SOAP body as output parameter;
(I3) output parameter is carried out antitone sequence by the unserializing rule of Service Data Object definition and change into data object, and the value after the unserializing is saved in the context that calls.
28. the method that Web Service calls it is characterized in that described parsing is also returned the SOAP header, may further comprise the steps according to realizing in each described component software system in the claim 1 to 3:
(J1) from the SOAP envelope, obtain the SOAP header;
(J2) the SOAP header is stored by the Map structure;
(J3) node under the traversal SOAP header, node name is referred to as the key of Map structure;
(J4) child node of traversal bond point is its document object unserializing a Service Data Object, as the value of Map structure;
(J5) the SOAP header is saved in the context that calls, for other component resource visit.
29. the method that Web Service calls it is characterized in that described parsing is also returned the SOAP accessory information, may further comprise the steps according to realizing in each described component software system in the claim 1 to 3:
(K1) from the SOAP envelope, obtain the SOAP accessory information;
(K2) the SOAP accessory information is stored by the Map structure;
(K3) with the key of Map structure ContentId corresponding to annex;
(K4) with the value of Map structure detailed content corresponding to annex;
(K5) the SOAP accessory information is saved in the context that calls, for other component resource visit.
CN 201010171986 2010-05-12 2010-05-12 Method for realizing web service call in component-based software system Active CN101853156B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010171986 CN101853156B (en) 2010-05-12 2010-05-12 Method for realizing web service call in component-based software system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010171986 CN101853156B (en) 2010-05-12 2010-05-12 Method for realizing web service call in component-based software system

Publications (2)

Publication Number Publication Date
CN101853156A true CN101853156A (en) 2010-10-06
CN101853156B CN101853156B (en) 2013-07-17

Family

ID=42804665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010171986 Active CN101853156B (en) 2010-05-12 2010-05-12 Method for realizing web service call in component-based software system

Country Status (1)

Country Link
CN (1) CN101853156B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957758A (en) * 2010-10-14 2011-01-26 上海普元信息技术股份有限公司 Method for realizing rapid Web Service publishment in service oriented architecture application systems
CN102521323A (en) * 2011-12-02 2012-06-27 山东中创软件工程股份有限公司 Method and system for processing application program file
CN102571944A (en) * 2011-12-28 2012-07-11 东软集团股份有限公司 Method for analyzing and calling world wide web service
CN102566984A (en) * 2010-12-07 2012-07-11 北大方正集团有限公司 Method and device for configuring parameters
CN102779034A (en) * 2011-05-13 2012-11-14 易程(苏州)软件股份有限公司 Client side of railway ticketing system and implementation method of client side
CN103678701A (en) * 2013-12-31 2014-03-26 福建四创软件有限公司 Disaster prevention and reduction information processing system and method based on WebService
CN104166551A (en) * 2014-08-14 2014-11-26 华为技术有限公司 Application interface developing method and developing device
CN105389355A (en) * 2015-11-02 2016-03-09 中国民生银行股份有限公司 Data processing method and terminal
CN106201744A (en) * 2016-07-07 2016-12-07 普元信息技术股份有限公司 The method realizing in componentization system calling RESTful service
CN109086148A (en) * 2018-08-01 2018-12-25 山东浪潮通软信息科技有限公司 A kind of cross-platform method for calling Web Service service

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1637710A (en) * 2003-12-30 2005-07-13 国际商业机器公司 Method and system for scheduling invocation of web service in data processing basic structure
CN1761943A (en) * 2003-04-02 2006-04-19 国际商业机器公司 Program creation by combining web services using graphic user interface controls

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1761943A (en) * 2003-04-02 2006-04-19 国际商业机器公司 Program creation by combining web services using graphic user interface controls
CN1637710A (en) * 2003-12-30 2005-07-13 国际商业机器公司 Method and system for scheduling invocation of web service in data processing basic structure

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957758B (en) * 2010-10-14 2013-01-23 上海普元信息技术股份有限公司 Method for realizing rapid Web Service publishment in service oriented architecture application systems
CN101957758A (en) * 2010-10-14 2011-01-26 上海普元信息技术股份有限公司 Method for realizing rapid Web Service publishment in service oriented architecture application systems
CN102566984B (en) * 2010-12-07 2015-07-15 北大方正集团有限公司 Method and device for configuring parameters
CN102566984A (en) * 2010-12-07 2012-07-11 北大方正集团有限公司 Method and device for configuring parameters
CN102779034A (en) * 2011-05-13 2012-11-14 易程(苏州)软件股份有限公司 Client side of railway ticketing system and implementation method of client side
CN102521323A (en) * 2011-12-02 2012-06-27 山东中创软件工程股份有限公司 Method and system for processing application program file
CN102571944A (en) * 2011-12-28 2012-07-11 东软集团股份有限公司 Method for analyzing and calling world wide web service
CN102571944B (en) * 2011-12-28 2014-08-13 东软集团股份有限公司 Method for analyzing and calling world wide web service
CN103678701A (en) * 2013-12-31 2014-03-26 福建四创软件有限公司 Disaster prevention and reduction information processing system and method based on WebService
CN104166551A (en) * 2014-08-14 2014-11-26 华为技术有限公司 Application interface developing method and developing device
CN105389355A (en) * 2015-11-02 2016-03-09 中国民生银行股份有限公司 Data processing method and terminal
CN105389355B (en) * 2015-11-02 2019-04-23 中国民生银行股份有限公司 Data processing method and terminal
CN106201744A (en) * 2016-07-07 2016-12-07 普元信息技术股份有限公司 The method realizing in componentization system calling RESTful service
CN106201744B (en) * 2016-07-07 2019-08-27 普元信息技术股份有限公司 The method for calling RESTful service is realized in componentization system
CN109086148A (en) * 2018-08-01 2018-12-25 山东浪潮通软信息科技有限公司 A kind of cross-platform method for calling Web Service service

Also Published As

Publication number Publication date
CN101853156B (en) 2013-07-17

Similar Documents

Publication Publication Date Title
CN101853156B (en) Method for realizing web service call in component-based software system
CN101930370B (en) System structure for realizing data conversion in service integration of SOA (Service Oriented Architecture) application system and method thereof
CA2576478C (en) System and method and apparatus for using uml tools for defining web service bound component applications
US7747983B2 (en) System and method for generating a web service definition and database schema from wireless application definition
JP3839472B2 (en) Object-oriented rule-based protocol system
US7725590B2 (en) Web services broker
Burke RESTful Java with Jax-RS
US20020174178A1 (en) Communication system for automation equipment based on the WSDL language
JP5046161B2 (en) Application partitioning for network edge computing
US20050015439A1 (en) Flexible architecture component (FAC) for efficient data integration and information interchange using web services
US20060206863A1 (en) System and method for designing component based applications
Katasonov et al. Towards ontology-driven development of applications for smart environments
CN102754411A (en) Managing objects using a client-server bridge
WO2006110982A1 (en) System and method for flexible visual representation of presentation components
CN100596139C (en) System and method for building component applications using metadata defined mapping between message and data domains
Jaroucheh et al. Apto: a MDD-based generic framework for context-aware deeply adaptive service-based processes
Hackmann et al. Extending BPEL for interoperable pervasive computing
CN106201744A (en) The method realizing in componentization system calling RESTful service
Miranda et al. Enough about standardization, let's build cloud applications
Sefid‐Dashti et al. A reference architecture for mobile SOA
EP1712995B1 (en) System and method for supporting packaging, publishing and republishing of wireless component applications
Riedemann et al. Services for data integration
Bartolomeo et al. Smile-simple middleware independent layer for distributed mobile applications
WO2006108290A1 (en) System and method for unified visualization of two-tiered applications
Gannod et al. On-the-fly wrapping of web services to support dynamic integration

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
C56 Change in the name or address of the patentee

Owner name: PRIMETON INFORMATION TECHNOLOGY CO., LTD.

Free format text: FORMER NAME: PRIMETON TECHNOLOGIES LTD.

CP03 Change of name, title or address

Address after: 201203, Shanghai Zhangjiang hi tech park, Pudong New Area, No. 456 blue wave road, 4F

Patentee after: PRIMETON INFORMATION TECHNOLOGY CO., LTD.

Address before: 201203, Shanghai Zhangjiang hi tech park, No. 456 blue wave road, 4F

Patentee before: Primeton Technologies Ltd.