Apparatus, Method, and Program Product for Information Processing

Information

  • Patent Application
  • 20070233696
  • Publication Number
    20070233696
  • Date Filed
    March 21, 2007
    17 years ago
  • Date Published
    October 04, 2007
    17 years ago
Abstract
Methods and apparatus, including computer program products, implementing and using techniques for providing an interface for using a web service on an external server device. A first tree structure used for using the web service is stored. A request message calling up a web service is generated in response to having received access to a request node in the first tree structure. The request node is used for accessing the web service corresponding to the request node. The request message is sent to the server device providing the web service. A response message, including a result of having executed the web service from the server device, is received. The result of the web service execution is reflected in a response node in the first tree structure for storing the result of the web service.
Description

DESCRIPTION OF DRAWINGS


FIG. 1 shows an information processing apparatus along with a server device in accordance with one embodiment of the invention.



FIG. 2 shows a schematic example of configurations of a partial tree for request and a partial tree for response in accordance with one embodiment of the invention.



FIG. 3 shows an example of a configuration of a request generation unit in accordance with one embodiment of the invention.



FIG. 4 is a flowchart illustrating processing of the information processing apparatus in accordance with one embodiment of the invention.



FIG. 5(A) shows an example of a body part of a SOAP request message when using a web service providing a web page cached in a server device in accordance with one embodiment of the invention.



FIG. 5(B) shows an XPath formula for sending a request by specifying the partial tree for request as the basis of (A) in accordance with one embodiment of the invention.



FIG. 6 shows an example of a conversion condition by a conversion unit in accordance with one embodiment of the invention.



FIG. 7 is a schematic view of the information processing apparatus along with the server device and an HTML server device in accordance with one embodiment of the invention.



FIG. 8 is a flowchart for processing of the web service by the information processing apparatus of FIG. 7 in accordance with one embodiment of the invention.



FIG. 9(A) shows an XPath formula for accessing “ws:Request” in a tree structure for using the web service providing the cached web page in accordance with one embodiment of the invention.



FIG. 9(B) shows an XPath formula for accessing “ws:Response” in the tree structure in accordance with one embodiment of the invention.



FIG. 10 shows an example of the tree structure generated by the XPath formula illustrated in FIGS. 9(A) and 9(B) in accordance with one embodiment of the invention.



FIG. 11 shows an example of a hardware configuration of a computer in accordance with one embodiment of the invention.


Claims
  • 1. An information processing apparatus operable to provide an interface for using a web service on an external server device, comprising: a first storage unit operable to store a first tree structure used for using the web service;a request generation unit operable to generate a request message calling up a web service, in response to having received access to a request node in the first tree structure, the request node being used for accessing the web service corresponding to the request node;a request sending unit operable to send the request message to the server device providing the web service;a response receiving unit operable to receive a response message, including a result of having executed the web service, from the server device; anda response reflection unit operable to reflect the result of the web service execution in a response node in the first tree structure operable to store the result of the web service.
  • 2. The information processing apparatus of claim 1, further comprising: an application execution unit operable to execute an application using the web service; anda second storage unit operable to store a document used by the application in a second tree structure;wherein the application execution unit is operable to replicate a partial tree in the first tree structure including the at least one response node in which the result of the web service is reflected as a partial tree into the second tree structure.
  • 3. The information processing apparatus of claim 1, further comprising an application execution unit operable to execute an application using the web service, wherein the storage unit is operable to store a document used by the application with the first tree structure,the application execution unit, as a result of having used the web service for part of the document, is operable to access the request node in the first tree structure, the first tree structure being defined corresponding to the part of the document, andthe response reflection unit is operable to reflect the result of having executed the web service in the part of the document.
  • 4. The information processing apparatus of claim 1, wherein: the first storage unit is operable to store the first tree structure, the first tree structure having a partial tree for request accessed for executing a request to the web service and a partial tree for response reflecting the result of the web service;the request generation unit is operable to generate the request message in response to having accessed the request node in the partial tree for request; andthe response reflection unit is operable to reflect the result of having executed the web service in the response node in the partial tree for response.
  • 5. The information processing apparatus of claim 1, further comprising an application execution unit operable to execute the application using the web service, and wherein: the application execution unit is operable to set each parameter provided to the web service for the parameter nodes corresponding to each parameter in the first tree structure, andthe request generation unit is operable to acquire the parameter from each of the parameter nodes to which the parameters are set by the application execution unit to generate the request message including the parameters.
  • 6. The information processing apparatus of claim 4, wherein the request generation unit is operable to generate a request message in response to having accessed the request node with a path indicating a position in the first tree structure.
  • 7. The information processing apparatus of claim 5, wherein: the application execution unit is operable to set each parameter provided to the web service to each of the parameter nodes descended from the request nodes defined corresponding to the web services;the request generation unit includes: a service name acquisition unit operable to acquire a name of the web service from the request node;a WSDL acquisition unit operable to acquire a WSDL (Web Services Description Language) description defining a specification of the web service using the name of the web service; andan address acquisition unit operable to acquire an address of the server device which provides the web service from the WSDL description; andthe request sending unit is operable to send the request message to the address acquired by the address acquisition unit.
  • 8. The information processing apparatus of claim 1, wherein: the first storage unit is operable to cache the response node in which the result of the web service is reflected, the first storage unit further comprising: a cache hit processing unit operable to return the result of the web service cached on the first storage unit, if the request nodes have already been registered in the first tree structure; anda cache miss processing unit operable to cause the request sending unit to send the request message in order to cache the result of the web service on the first storing unit, and to register anew the request nodes as nodes in the first tree structure, when the request nodes have not been registered in the first tree structure.
  • 9. The information processing apparatus of claim 1, wherein the request generation unit is operable to generate the request message in response to accessing the response node after accessing the request node.
  • 10. The information processing apparatus of claim 1, further comprising: a conversion rule storage unit operable to store a conversion rule to convert the response message received complying with having accessed the request node in response to the each request node; anda conversion unit operable to convert the first tree structure in which the result of the web service included in the response message has been reflected based on the conversion rule corresponding to the response message.
  • 11. A computer-implemented method for providing an interface which uses a web service on an external server device by an information processing apparatus, the method comprising the steps of: storing a first tree structure used for using the web service in a first storage unit;generating a request message which calls up a web service, in response to having received access to a request node in the first tree structure, the request node being used for accessing the web service corresponding to the request node;sending the request message to the server device providing the web service;receiving a response message which includes a result of having executed the web service from the server device; andreflecting the response which reflects the result of the web service execution in a response node in the first tree structure storing the result of the web service.
  • 12. The method of claim 11, further comprising: executing an application using the web service; andstoring a document used by the application in a second tree structure;wherein executing includes replicating a partial tree in the first tree structure including the at least one response node in which the result of the one web service is reflected as a partial tree into the second tree structure.
  • 13. The method of claim 11, further comprising: storing a document used by the application with the first tree structure,accessing the request node in the first tree structure, the first tree structure being defined corresponding to the part of the document, andreflecting the result of having executed the web service in the part of the document.
  • 14. The method of claim 11, wherein the first tree structure has a partial tree for request accessed for executing a request to the web service and a partial tree for response reflecting the result of the web service, further comprising: generating the request message in response to having accessed the request node in the partial tree for request; andreflecting the result of having executed the web service in the response node in the partial tree for response.
  • 15. The method of claim 11, further comprising: setting each parameter provided to the web service for the parameter nodes corresponding to each parameter in the first tree structure, andacquiring the parameter from each of the parameter nodes to which the parameters are set to generate the request message including the parameters.
  • 16. The method of claim 14, further comprising: generating a request message in response to having accessed the request node with a path indicating a position in the first tree structure.
  • 17. The method of claim 15, further comprising: setting each parameter provided to the web service to each of the parameter nodes descended from the request nodes defined corresponding to the web services;generating the request includes: acquiring a name of the web service from the request node;acquiring a WSDL (Web Services Description Language) description defining a specification of the web service using the name of the web service; andacquiring an address of the server device which provides the web service from the WSDL description; andsending the request message to the address acquired by the address acquisition unit.
  • 18. The method of claim 11, further comprising: caching the response node in which the result of the web service is reflected, wherein the caching includes: returning the result of the web service cached on the first storage unit, if the request nodes have already been registered in the first tree structure; andsending the request message in order to cache the result of the web service on the first storing unit, and registering anew the request nodes as nodes in the first tree structure, when the request nodes have not been registered in the first tree structure.
  • 19. The method of claim 11, further comprising generating the request message in response to accessing the response node after accessing the request node.
  • 20. The method of claim 11, further comprising: storing a conversion rule to convert the response message received complying with having accessed the request node in response to the each request node; andconverting the first tree structure in which the result of the web service included in the response message has been reflected based on the conversion rule corresponding to the response message.
  • 21. A computer program product comprising a computer useable medium including a computer readable program, wherein the computer readable program when executed on a computer causes the computer to: store a first tree structure used for using the web service in a first storage unit;generate a request message which calls up a web service, in response to having received access to a request node in the first tree structure, the request node being used for accessing the web service corresponding to the request node;send the request message to the server device providing the web service;receive a response message which includes a result of having executed the web service from the server device; andreflect the response which reflects the result of the web service execution in a response node in the first tree structure storing the result of the web service.
  • 22. The computer program product of claim 21, further causing the computer to: execute an application using the web service; andstore a document used by the application in a second tree structure;wherein executing includes replicating a partial tree in the first tree structure including the at least one response node in which the result of the one web service is reflected as a partial tree into the second tree structure.
  • 23. The computer program product of claim 21, further causing the computer to: store a document used by the application with the first tree structure,access the request node in the first tree structure, the first tree structure being defined corresponding to the part of the document, andreflect the result of having executed the web service in the part of the document.
  • 24. The computer program product of claim 21, wherein the first tree structure has a partial tree for request accessed for executing a request to the web service and a partial tree for response reflecting the result of the web service, further causing the computer to: generate the request message in response to having accessed the request node in the partial tree for request; andreflect the result of having executed the web service in the response node in the partial tree for response.
  • 25. The computer program product of claim 21, further causing the computer to: set each parameter provided to the web service for the parameter nodes corresponding to each parameter in the first tree structure, andacquire the parameter from each of the parameter nodes to which the parameters are set to generate the request message including the parameters.
  • 26. The computer program product of claim 24, further causing the computer to: generate a request message in response to having accessed the request node with a path indicating a position in the first tree structure.
  • 27. The computer program product of claim 25, further causing the computer to: set each parameter provided to the web service to each of the parameter nodes descended from the request nodes defined corresponding to the web services;generate the request includes: acquire a name of the web service from the request node;acquire a WSDL (Web Services Description Language) description defining a specification of the web service using the name of the web service; andacquire an address of the server device which provides the web service from the WSDL description; andsend the request message to the address acquired by the address acquisition unit.
  • 28. The computer program product of claim 21, further causing the computer to: cache the response node in which the result of the web service is reflected, wherein the caching includes: returning the result of the web service cached on the first storage unit, if the request nodes have already been registered in the first tree structure; andsending the request message in order to cache the result of the web service on the first storing unit, and registering anew the request nodes as nodes in the first tree structure, when the request nodes have not been registered in the first tree structure.
  • 29. The computer program product of claim 21, further causing the computer to generate the request message in response to accessing the response node after accessing the request node.
  • 30. The computer program product of claim 21, further causing the computer to: store a conversion rule to convert the response message received complying with having accessed the request node in response to the each request node; andconvert the first tree structure in which the result of the web service included in the response message has been reflected based on the conversion rule corresponding to the response message.
Priority Claims (1)
Number Date Country Kind
JP2006-102227 Apr 2006 JP national