WO2003081443A1 - Dispositif de formation d'images comportant une fonction de service web - Google Patents

Dispositif de formation d'images comportant une fonction de service web Download PDF

Info

Publication number
WO2003081443A1
WO2003081443A1 PCT/JP2003/003651 JP0303651W WO03081443A1 WO 2003081443 A1 WO2003081443 A1 WO 2003081443A1 JP 0303651 W JP0303651 W JP 0303651W WO 03081443 A1 WO03081443 A1 WO 03081443A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing
data
web service
request
application
Prior art date
Application number
PCT/JP2003/003651
Other languages
English (en)
French (fr)
Inventor
Hiroyuki Matsushima
Original Assignee
Ricoh Company, 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
Priority claimed from JP2003076611A external-priority patent/JP3710789B2/ja
Priority claimed from JP2003081245A external-priority patent/JP4373692B2/ja
Priority claimed from JP2003081246A external-priority patent/JP3831352B2/ja
Priority claimed from JP2003081244A external-priority patent/JP2004005503A/ja
Application filed by Ricoh Company, Ltd. filed Critical Ricoh Company, Ltd.
Priority to US10/490,978 priority Critical patent/US7743162B2/en
Priority to EP03715406.9A priority patent/EP1489520B1/en
Publication of WO2003081443A1 publication Critical patent/WO2003081443A1/ja
Priority to US12/771,330 priority patent/US8549162B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/329Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]

Definitions

  • the present invention relates to an image forming processing apparatus having a plurality of communication protocols, and more particularly, to an application capable of transmitting and receiving data without having a processing unit corresponding to various communication protocols. It is an object of the present invention to provide an image forming processing apparatus which facilitates the opening of the apparatus. Further, the present invention provides an image forming apparatus that facilitates development and application of an application for providing a web service. Further, the present invention provides a description of a web service request and response message. It provides a program that automatically generates a program that converts the format and the data format that can be processed by the Web service program.
  • an image forming apparatus in which functions of respective apparatuses such as a printer, a copier, a facsimile, and a scanner are housed in one housing is generally known.
  • a display unit, a printing unit, an imaging unit, and the like are provided in one housing, and applications corresponding to a printer, a copier, a scanner, and a facsimile device are provided.
  • the device operates as a printer, copier, scanner, or facsimile device.
  • the above-described conventional composite image forming apparatus having a printer function capable of communicating via a network can be connected to a device via the network. It has become desirable to provide a web service that is provided by a communication protocol performed, that is, communication control by HTTP (Hypertext Transfer Protocol). Furthermore, in addition to communication control by HT TP, messages in a general description format such as XML (extensible Markup Language) are described in the body of HT TP to expand the range of devices to be connected.
  • HTTP Hypertext Transfer Protocol
  • XML extensible Markup Language
  • an object of the present invention is to control the transmission / reception of print data and image data between devices connected via various interfaces, thereby achieving image formation processing different from various communication protocols. It is an object of the present invention to provide an image forming processing apparatus having an intermediary processing unit for mediating with a plurality of applications for performing communication, and facilitating the addition of a communication protocol and an application.
  • an object of the present invention is to provide a configuration in which a plurality of applications each performing a different image forming process are provided, and a processing unit necessary for providing a web service is formed as a component and can be shared by the plurality of applications.
  • an image forming processing unit 3 which facilitates development and application of an application for providing a web service is provided.
  • an object of the present invention is to provide an application that can function as a web service without depending on the description format of a message exchanged between the image forming apparatus that provides a plurality of web services and a connected device.
  • the goal is to develop an image forming device that can be developed.
  • an object of the present invention is to develop a program for a plurality of web services without depending on a description format of a message exchanged between the image forming apparatus providing a plurality of web services and a connected device.
  • An object of the present invention is to provide a program for automatically generating a program for converting the description format and a data format that can be processed by a development program of the l3 ⁇ 4Web service.
  • an application for executing processing relating to image formation, a plurality of communication protocol daemons for transmitting and receiving data according to different communication protocols, and a communication protocol daemon in response to a connection notification from each of the communication protocol daemons
  • the communication protocol daemon is configured to notify the application that there is a connection request, and a connection request mediation unit that mediates the connection.
  • the communication protocol daemon To store received data and transmitted data, and to have a shared memory used for passing the received data and the transmitted data between the application and the plurality of communication protocol daemons. Can be.
  • Such an image forming apparatus uses connection request mediation means (request mediation daemon 7) for mediating connection between various communication protocols and an application executing processing related to image formation, and data using a shared memory (99).
  • request mediation daemon 7 For mediating connection between various communication protocols and an application executing processing related to image formation, and data using a shared memory (99).
  • a protocol control daemon 9 that controls transmission and reception is configured. Therefore, there is no need for the interfaces of multiple communication protocols and each application to be aware of each other. Therefore, it is possible to easily add a communication protocol and an application to such an image forming apparatus.
  • a plurality of method processing means for performing predetermined processing according to a method and in response to a processing request, the method request is transmitted to the method processing means corresponding to the method specified by the processing request. It is configured to have a Web service execution means that executes a Web service by sorting. In addition, it is possible to configure so as to include a plurality of Web service applications that perform processing related to image formation as the Web service by sharing processing in the same method. In such an image forming apparatus, since the processing is made up of components for each method, the processing unique to the method can be shared by multiple Web service applications.
  • a web service processing means for executing a process based on a request message from a device connected via a network and providing the processing result as a web service, and receiving the processed result according to a predetermined message exchange protocol
  • the request message is converted into a processing request that can be processed by the Web service processing means, and the processing result output from the Web service processing means is converted into a response message according to the message exchange protocol.
  • conversion means for executing a process based on a request message from a device connected via a network and providing the processing result as a web service, and receiving the processed result according to a predetermined message exchange protocol.
  • the request message specified by the message exchange protocol is converted into a processing request that can be processed by the web service processing means, and the processing result of the web service processing means is specified by the message exchange protocol.
  • Response message Web service processing means can be developed to convert messages into messages without needing knowledge of such message exchange protocols.
  • an element tree generation procedure for analyzing, by a computer, an interface definition that defines an interface of a web service, and generating a first element tree indicating a relationship between a plurality of elements configuring the interface definition, Based on the first element tree, it can be processed by the Web service function that executes the Web service.-Input / output data format and 3 ⁇ 4
  • an interface definition that defines an interface of the Web service for example, WSDL (WSDL)
  • a program for example, implementation
  • a predetermined description format for example, XML (extensible Markup Language)
  • FIG. 1 is a block diagram showing a functional configuration of a multifunction peripheral that fuses various image forming functions according to an embodiment of the present invention.
  • FIG. 2 is a block diagram showing a hardware configuration of the multifunction peripheral shown in FIG.
  • FIG. 3 is a diagram showing an outline of a process performed by a process for performing communication control and a process for mediating between applications.
  • FIG. 4 is a diagram showing a registration sequence for registering an application.
  • FIG. 5 is a diagram showing a buffer registration sequence for registering an application buffer. '
  • FIG. 6 is a diagram showing a request notification sequence for notifying a request to an application.
  • FIG. 7 is a diagram showing a data transmission / reception sequence.
  • FIG. 8 is a diagram showing a connection termination sequence for terminating a connection of an application.
  • FIG. 9 is a diagram illustrating an example of a basic configuration of a multifunction peripheral that facilitates development and addition of an application.
  • FIG. 10 is a diagram illustrating a first configuration example of a multifunction peripheral that facilitates development and addition of an application.
  • FIG. 11 is a diagram showing a processing flow in the first configuration example of FIG.
  • FIG. 12 is a diagram showing a processing flow in the first configuration example of FIG.
  • FIG. 13 is a diagram illustrating an example of a thread configuration of the sequence control library.
  • FIG. 14 is a diagram illustrating an example of a thread configuration of the sequence control library.
  • FIG. 15 is a diagram illustrating a second configuration example of the multifunction peripheral that facilitates development and opening of an application.
  • Figure 16 is a diagram showing a third configuration example of a multifunction device that facilitates application development and ⁇ ⁇ ⁇ ⁇ .
  • FIG. 17 is a block diagram showing a functional configuration of the automatic handler generation apparatus according to one embodiment of the present invention.
  • FIG. 18 is a block diagram showing a hardware configuration of the automatic handler generation apparatus according to one embodiment of the present invention.
  • FIG. 19 is a flowchart illustrating the entirety of the handler automatic generation process.
  • FIG. 20 is a flowchart illustrating the type library generation processing.
  • FIG. 21 is a diagram illustrating an enumeration type definition generation process in the source code generation process.
  • FIG. 22 is a diagram for explaining a structure type definition generation process in the source code generation process.
  • FIG. 23 is a diagram illustrating an array type definition generation process in the source code generation process.
  • FIG. 24 is a diagram illustrating an enumerated type function declaration process in the source code generation process.
  • FIG. 25 is a diagram for explaining the function declaration processing of a structure in the source code generation processing.
  • FIG. 26 is a diagram for explaining an array function declaration process in the source code generation process.
  • FIG. 27 is a flowchart illustrating the handler generation processing.
  • FIG. 28 is a flowchart illustrating the handler generation processing.
  • FIG. 29 is a diagram showing a description example of an interface definition by WSDL.
  • 'FIG. 30 is a diagram showing a description example of an interface definition by WSDL.
  • FIG. 31 is a diagram for explaining the function declaration of the handler processing unit.
  • FIG. 32 is a diagram for explaining the function declaration of the Web service function.
  • FIG. 33 is a diagram for explaining the structure definition of the incoming message.
  • FIG. 34 is a view for explaining the structure definition of an output message.
  • FIG. 35 shows an example of an automatically generated handler source code.
  • FIG. 36 is a diagram showing a configuration example for realizing the Web service.
  • FIG. 37 is a flowchart illustrating a process of providing a web service by a SOAP.
  • FIG. 38 is a flowchart illustrating the process of providing a Web service by the SOAP.
  • FIG. 39 is a diagram illustrating an example of a description of an HTTP request according to a SOAP using XML.
  • FIG. 40 is a diagram illustrating an example of an element tree converted by the XML processor.
  • FIG. 41 is a flowchart for explaining the element tree analysis processing by the print handler.
  • FIG. 42 is a diagram illustrating an example of setting arguments of a function of the Web service function.
  • FIG. 43 is a diagram illustrating an example of setting a processing result in the print handler.
  • FIG. 44 is a flowchart for explaining the element tree generation processing by the print handler.
  • FIG. 45 is a diagram illustrating an example of the generated element tree.
  • Figure 46 shows the HTT P according to the SOP using XML transformed from the element tree. It is a figure showing the example of description of a response. BEST MODE FOR CARRYING OUT THE INVENTION
  • FIG. 1 is a block diagram illustrating a functional configuration of a multifunction peripheral that fuses various image forming functions according to an embodiment of the present invention.
  • a multifunction machine 1200 includes a plotter 1201, a scanner 1202, other hardware resources 1203, and the like, and includes a software group 1210 including a platform 1220 and an application 1230, and a multifunction machine start unit 1240. Have.
  • the fusion machine starting unit 1240 is executed first when the fusion machine 1200 is turned on, and starts the platform 1220 and the application 1230.
  • the platform 1220 interprets the processing request from the application 1230 and generates a hardware resource acquisition request as described below.
  • the control service 1250 manages one or more hardware resources, and provides a control service. It has a System Resource Manager (SRM) 1223 that mediates acquisition requests from 12.50, and an Operating System (OS) 1221.
  • SRM System Resource Manager
  • OS Operating System
  • the control service 1250 is formed by a plurality of service modules. Specifically, the SCS (System Control Service) 1222, the ECS (Engine Control Service) 1224, the MCS (Memory Control Service) 1225, and the OCS (Operation panel Control Service) 1226, FCS (FAX Control Service) 1227, NCS (Network Control Service) 1228, and IMH (Imaging Memory Handler) 1229.
  • the platform 1220 is defined in advance. An application program interface that enables processing requests from the application to be received by the function Have.
  • OS 1221 is a talent rating system such as UNIX (registered trademark), and executes each software of the platform 1220 and the application 1230 as a process in parallel.
  • UN IX registered trademark
  • OS and TCP / IP royalties are not required, making outsourcing easy.
  • resources such as scanners and plotters, memory, HDD files, host I / O (cent I / F, network I / F, I / F). It performs arbitration and controls execution according to requests from upper layers that use hardware resources such as EEE 1394 I / F and RS 232C IZF.
  • the SRM1223 determines whether the requested hardware resource is available (whether or not it is being used by another request, and if so, the requested hardware resource is available).
  • the upper layer informs the upper layer that hardware is available. Also, hardware resource use scheduling is not performed for requests from the upper layer, and the content of the request (eg, paper transport and image forming operation by the printer engine, memory (Secure, file generation, etc.).
  • the SCS 1222 has application management (function 1), operation unit control (function 2), system screen display (job list screen, power counter display screen, etc.) (function 3), LED display (function 4), resource management ( Performs multiple functions such as function 5) and interrupt application control (function 6).
  • application management functions 1
  • operation unit control Function 2
  • exclusive control of the operation unit usage right of the application is performed.
  • system screen display Function 3
  • a warning screen corresponding to the status of the engine is displayed according to the request from the application that has the operating unit usage right.
  • the LED display (function 4) controls the display of system LEDs such as the warning LED and application key.
  • Resource management provides services for exclusive control of engine resources (scanners, staples, etc.) that must be performed when an application executes a job using ECS.
  • engine resources scanners, staples, etc.
  • U In the interrupt application control (function 6), control and service for giving priority to a specific application are performed.
  • the ECS 122 4 controls the engine section such as the plotter 1 201, scanner 1 202, and other hardware resources 123, and performs image reading and printing, status notification, jam recovery, etc. Do it.
  • the MC S 122 2'5 performs memory control. Specifically, it performs acquisition and release of image memory, use of a hard disk drive (HDD), and compression and decompression of image data.
  • HDD hard disk drive
  • the OCS 122 6 is a module that controls the operation panel, which is a means of transmitting information between the operator and the main unit control.This process notifies the main unit control of key operation events of the operator, and enables each application to build a GUI. Performs processing to provide library functions, manages configured GUI information for each application, and reflects display on the operation panel.
  • FCS 1 227 is a facsimile transmission / reception using PS TN / ISDN network from each application layer of the system controller, registration / quotation of various facsimile data managed by BKM (backup SRAM), facsimile reading, facsimile Provides API (Application Program Interface) for performing reception printing, fusion transmission and reception.
  • BKM backup SRAM
  • facsimile reading facsimile Provides API (Application Program Interface) for performing reception printing, fusion transmission and reception.
  • NCS 122 8 is a group of modules for providing services that can be used in common for applications that require network I / O, and data received from the network by each protocol. It is divided into each application, and mediates when data is transmitted from the application to the network side.
  • the NCS 1 228 controls HTTP (Hypertext Transfer Protocol 1) data communication with network devices connected via the Internet by using the http (Hypertext Transfer Protocol) daemon among a plurality of protocols. Then, a plurality of web services required for the process specified by the HTTP request header are activated by a function call, and the results of the processes by the plurality of web services are notified to the network ⁇ by an HTTP response.
  • the web service is For example, processing is performed according to messages described in XML (extensible Markup Language).
  • the IMH1229 maps image data from a virtual memory area (user virtual space) to physical memory.
  • a system call is made to map the virtual memory area for the process, and to release the mapped virtual memory area at the end of the process.
  • the application 1230 is a printer application 1211 which is an application for a printer having a page description language (PDL), PCL and PostScript (PS), a copy application 1212 which is a copy application, and a facsimile application.
  • the main component is a screen display control program that performs job generation, etc. It is also possible to install a new abridgement via a network connected by NCS 1228.
  • Each application is a separate application. Can be removed or removed.
  • the web service application 1218 is an application that executes processing corresponding to the HTTP request notified by the NCS 1228, and the processing result is a network device that has performed an HTTP request by the NCS 1228 as an HTTP response.
  • the multifunction peripheral 1200 unifies the processes commonly required for each application by the platform 1220.
  • FIG. 2 is a block diagram showing a hardware configuration of the MFP shown in FIG.
  • the MFP 1200 includes an operation panel 1310 and an FCU (Fax Control unit) 1320, an engine unit 1350 composed of a plotter 1201, a scanner 1202, and other hardware, and an ASIC 1301 of a controller 1300 connected by a PCI (Peripheral Component Interconnect) node or the like.
  • the FCU 1320 has a non-volatile memory 1321 for storing received fax data and an RTC (Real Time Clock) 1322 for measuring time in the FCU 1320.
  • the FCU1320 may be further equipped with the G3 standard and the G4 standard as an option. '
  • the controller 1300 connects the MEM-C 1302, the HDD (Hard Disk Drive) 1303, and the like to the AS I C1301, and connects the AS I C1301 and the CPU 1304 via the NB 1305 of the CPU chipset.
  • the reason for connecting via the NB 1305 is that the interface of the CPU 1.304 itself is not disclosed.
  • the ASIC 1301 and the NB 1305 are not simply connected via the PC I, but are connected via the AGP 1308.
  • the reason for the connection via the AG P 1308 is that the MFP 1200 executes multiple processes forming the platform 1220 and the application 1230. ⁇ Due to the control, these are connected by a low-speed PC I. Doing so will reduce performance.
  • the CPU 1304 performs overall control of the multifunction machine 1200. Specifically, the SCS 1222, SRM1223, ECS 1224, MCS 1225, OCS 1226, FCS 1227, which form a platform 1220 on the OS 1221, The NCS 1228 is started and executed as a process, and the printer application 1211, copy application 1 212, fax application 1213, scanner application 1214, net file application 1215, process inspection application 1216, distribution application 1217 that forms the application 1230 Activate and execute the web service application 1218.
  • NB 1305 is a bridge for connecting CPU 1304 to MEM-P 1306, SB 1307, AS IC 1301.
  • MEM-C 1302 is a local memory used as an image buffer for copying and a code buffer.
  • AS IC 1301 is an image processing application having hardware elements for image processing. IC for
  • the NB 1305 connects to the SB 1307 via the PCI path, and also controls an NIC (Network Interface Card) 1311 for controlling network communication. It is connected to Universal Serial Bus (USB) 1312 and IEEE13941313, which connect to a Sonal computer to transmit and receive large amounts of image data, and to Centronitas 1314, which can be connected by a parallel cable.
  • the SB1307 is a bridge for connecting the NB 1305 to a ROM, a PCI device, and peripheral devices.
  • the SB 1307 has an RTC (Real Time Clock) 1323 for measuring time at the controller 1300.
  • the HDD 1310 is a storage for storing image data, storing programs, storing font data, and storing forms.
  • the operation panel 1310 receives input operations from the operator and displays information for the operator. This is the operation unit to perform.
  • the AS IC 1301 is provided with a RAM interface for connecting the MEM-C 1302 and a hard disk interface for connecting the HDD 1310, and inputs and outputs image data to and from these storage units.
  • the input / output destination is switched to the RAM interface or the hard disk interface.
  • the AGP 1308 is a bus interface for graphics accelerator cards proposed to speed up graphics processing. By accessing system memory directly with high throughput, the graphics accelerator card can be operated at high speed.
  • FIG. 3 is a diagram showing the entire process ⁇ of the process performed by the process that performs communication control and the process that mediates between applications.
  • the machine 1200 shown in Fig. 1 Only the main functional configuration among the functional configurations is illustrated, and other functional configurations are omitted.
  • a multifunction peripheral 1200 includes an application 1230 for executing various image forming processes and an NCS 1228 having a plurality of communication control daemons for controlling various communication protocols. It has an NAI 8 that interfaces between the NCS 1228 and the application 1230, and is connected to the network 15.
  • the NCS 1228 has a request mediation daemon 7 that mediates between the daemon 9 and the application 1230, and a protocol control daemon 9 composed of various communication protocol daemons.
  • the protocol control daemon 9 includes an http daemon 2, an ip daemon 91, an ftp daemon 92, a USB daemon 93, an IEEE1394 daemon 94, and a centronic daemon 95.
  • the http daemon 2 performs communication control according to, for example, HTTP (Hypertext Transfer Protocol), and performs network setting, device status monitoring, and transmission and reception of ⁇ control commands by XML in cooperation with an application.
  • the ip daemon 91 controls the reception of print data by the Internet Printing Protocol (IPP), which is an HTTP-based printing protocol.
  • the ftp daemon 92 controls the provision of services by FTP (File Transfer Protocol).
  • the USB daemon 93 controls reception of print data from a directly connected USB cable.
  • the IEEEE 139 daemon 94 controls the reception of print data from devices directly connected to the IEEE1394 dedicated cable.
  • the Centronics daemon 95 controls the reception of print data from ⁇ directly connected by a parallel cable.
  • the application 1230 registers the application with the request mediation daemon 7 of the NCS 1228 via the server 18 (step SO).
  • the protocol control daemon 9 of the NCS 1228 notifies the request mediation daemon 7 (step S2).
  • the request broker daemon 7 notifies the application 1230 of the connection request via the NAI 8 (step S3).
  • the application 1230 connects to the protocol control daemon 9 via the NAI 8 (step S4).
  • the protocol control daemon 9 transmits and receives data to and from the application 1230 via the network 15 by the connection from the application 1230 (step S5).
  • the NCS 122 is different from the control service 125 in that communication is performed by two processes, the request mediation daemon 7 and the protocol control daemon 9.
  • NCS 122 uses shared memory as a means of communicating large amounts of data between processes.
  • the shared memory is a memory area that can be accessed from a plurality of different processes, and is a standard function provided in NetBSD (registered trademark). To have exclusive access to shared memory from multiple processes, information about reading and writing data must be exchanged with each other.
  • FIG. 4 is a diagram showing a registration sequence for registering an application.
  • the application 1 230 queries the request mediation daemon 7 (step S101), and receives a notification of a service to be supported from the request mediation daemon 7 (step S102). Then, the application is registered in the request mediation daemon 7 by notifying the contents of the service performed by the application 123 (step S103). For example, as the “data receiving service”, an application name, a spool function “none”, a job function “none” and the like are registered.
  • FIG. 5 is a diagram showing a buffer registration sequence for registering an application buffer.
  • the application 1 230 executes transmission / reception buffer acquisition processing.
  • the application 1 230 registers with the request mediation daemon 7 a plurality of send / receive buffers for the application 1 230 (step S111), and further registers the registered send / receive buffers.
  • Open step S112
  • acquire send / receive buffer management information from the request mediation daemon 7 (step S113).
  • the application 1 230 reserves a plurality of transmission / reception buffers exclusively for itself in the shared memory.
  • FIG. 6 is a diagram showing a request notification sequence for notifying an application request. In FIG.
  • step S11 when the protocol control daemon 9 receives a connection via the network 1.5 (step S11), it notifies the request mediation daemon 7 of the connection (step S12).
  • Protocol ⁇ lj according to the connection notification from your daemon 9, the request mediation daemon 7 assigns one of a plurality of transmission and reception buffers app cable Chillon 1230 has registered, notifies the protocol control daemon 9 (step S 13) 0
  • the request mediation daemon 7 sends a connection notification to the application 1230 to notify the connection destination (step S14).
  • the application 1230 permits connection to the request mediation daemon 7 (step S15).
  • the application 1230 connects to the protocol control daemon 9 (step S16).
  • the protocol control daemon 9 connected to the application 1230 is one of the daemons 2, 91 to 95 shown in FIG.
  • the application 1230 sets the notification timing to the protocol control daemon 9 (step S17), and requests to start data reception from the connection destination (step S18).
  • FIG. 7 is a diagram showing a data transmission / reception sequence.
  • the protocol control daemon 9 of the NCS 1230 writes the reception data to the reception buffer 97 in the shared memory 99 (step S21), it moves the write pointer by the amount of the reception data (step S22).
  • the protocol control daemon 9 notifies the application 1230 of writing to the reception buffer (step S23). By this notification, a start pointer that has started writing and an end pointer that has finished writing are notified.
  • the application 1230 Upon receiving the notification from the protocol control daemon 9, the application 1230 reads the received data from the shared memory 99 (Step S24), and moves the read pointer by the amount of the received data (Step S25). Then, the application 1230 notifies the protocol control daemon 9 of reading from the reception buffer (step S26).
  • step S27 When writing the transmission data to the transmission buffer 98 in the shared memory 99 (step S27), the application 123 moves the write pointer by the transmission data (step S27-2).
  • the application 1 230 notifies the protocol control daemon 9 of writing to the transmission buffer (step S28). By this notification, a start pointer that has started writing and an end pointer that has finished writing are notified.
  • the protocol control daemon 9 In response to the notification from the application 1 230, the protocol control daemon 9 reads the transmission data from the shared memory 99 and transmits it to the connection destination (step S2 9), and moves the read point (step S3 0 ). Then, the protocol control daemon 9 notifies the application 1 230 of the reading from the transmission buffer (step S30-2).
  • FIG. 8 is a diagram showing a connection termination sequence for terminating a connection of an application.
  • the protocozo H control daemon 9 notifies the application 1 230 that the data reception has been completed (step S31). This notification is sent, for example, when the connection on the network is disconnected.
  • the application 123 that has received the notification determines that the application is disconnected, and requests the protocol control daemon 9 to disconnect from the daemon that received the data (step S32).
  • the protocol control daemon 9 performs termination processing and notifies the request mediation daemon 7 of the termination (step S33).
  • the MFP 1200 is connected via a variety of interfaces; by performing transmission / reception control of print data and image data with ⁇ , a variety of communication can be performed.
  • a request mediation daemon that mediates connections between multiple protocols and multiple applications that perform different image forming processes, and uses shared memory
  • a protocol control daemon 9 for controlling data transmission and reception. Therefore, there is no need for the interfaces of multiple communication protocols and each application to be aware of each other. Therefore, the i-port of the communication protocol and the application to the MFP 1200 can be easily performed.
  • the mediation processing unit that mediates various communication protocols and multiple applications that perform different image forming processes is configured in the image forming apparatus, the interfaces of multiple communication protocols and each application are aware of each other. No need to do. Therefore, it is easy to add a communication protocol and an application to the image forming apparatus according to the present invention.
  • a connection request mediation unit that mediates a connection with an application that performs processing related to various communication protocols and image formation is a registration unit that registers the application in response to a registration request from the application.
  • a buffer registering means for registering a reception buffer and a transmission buffer exclusively used for the application to make it usable can be provided. .
  • connection request mediation unit When the connection request mediation unit receives the connection notification from each of the communication protocol daemons, the connection request mediation unit allocates a reception buffer and a transmission buffer used during the connection in the shared memory, and The transmission / reception buffer allocating means for notifying the protocol daemon can be configured.
  • connection request intermediation means upon receiving the kneading notification from the connection request intermediation means, the application 1 230 notifies the connection request intermediation means of connection permission and performs connection processing for making a connection to the communication protocol daemon. Means for requesting the communication protocol daemon to start data reception.
  • each communication protocol daemon writes reception data into the reception buffer allocated by the transmission / reception buffer allocation means by the communication protocol daemon, and moves a write start position by a data length, and receives data writing means.
  • the application 1 230 upon receiving the write notification of the received data from the communication protocol daemon, the application 1 230 returns from the write buffer from the write start position to the write end position specified by the write notification.
  • Receiving data reading means for reading the received data and moving a read start position to the write end position; and a reception read for notifying the communication protocol daemon that the received data has been read from the reception buffer. And a notifying means.
  • the application 1 230 writes transmission data to the transmission buffer registered by the puffe registration unit, and transmits transmission data by a data length to a write start position, and the communication protocol daemon A transmission / write notifying unit for notifying that the transmission data has been written to the transmission buffer, and performing a write notification for designating a write start position and a write end position of the transmission data. it can.
  • the communication protocol daemon transfers the transmission data from the transmission buffer power from the write start position to the write end position specified by the write notification.
  • Transmission data reading means for reading and transmitting the transmission data to the communication protocol daemon connected to the application; read start position moving means for moving the read start position to the write end position; It can be configured to include a transmission reading notification unit that notifies that the transmission data has been read from the transmission buffer.
  • the functional configuration and the hardware configuration of the MFP 1200 are the same as the functional configuration and the hardware configuration in the first embodiment, and a description thereof will be omitted.
  • processing related to data transmission and reception performed between the NC S 1228 and the application 1230 is shared as a sequence control library, and the web service function is added. Since many similar processes are performed at the time of realization, it is conceivable to make these similar processes into parts and share them.
  • FIG. 9 is a diagram illustrating an example of a basic configuration of a multifunction device that facilitates development and application of an application.
  • FIG. 9 only the main functional configuration among the functional configurations of the MFP 1200 shown in FIG. 1 is illustrated, and other functional configurations are omitted.
  • an application 1230 and an NCS 1228 exchange received data and transmitted data via a sequence control library 100 as an intermediate layer.
  • HTTP daemon 2! / I will explain.
  • the sequence control library 100 executes the application 1230 having a processing unit for each method that specifies a data transmission method, for example, a POST method processing for performing processing by a POS II method It has a unit 103, a GET method processing unit 104 that performs processing by the GET method, and another method processing unit 199 that performs processing of methods other than the POST method and the GET method.
  • Each of the processing units 103, 104, and 199 performs a ⁇ f process specific to the method, executes a process according to the process request, and provides the process result as a Web service.
  • the sequence control library 100 includes an HTTP connection management unit 101 that manages a connection according to HTTP, and an HTTP service execution unit 102 that executes a service by transmitting and receiving data according to HTTP.
  • the HTTP service execution unit 102 Since the HTTP service execution unit 102 establishes a connection every time an HTTP service request is made, a plurality of HTTP service execution units 102 are generated as threads (or processes).
  • the HTTP service execution unit 102 distributes the processing to the GET method processing unit 104, the POST method processing unit 103, and the other method processing unit 199 according to the method that specifies the data transmission method specified by the HTTP header. I can.
  • the NCS 1228 communicates with the HTTP daemon 2 which controls communication of data transmission and reception via the network 15 in accordance with HTTP. It has a request mediation daemon 7 that performs disconnection processing.
  • the HTTP connection management unit 101 Upon receiving the first connection notification from the request mediation daemon 7, the HTTP connection management unit 101 initializes the shared memory 99, registers the reception buffers 97 and transmission buffers 98 for the number of possible connections, and transmits / receives data. Make it possible. Also, by this initialization, multiple connection requests can be accepted, the HTTP service execution unit 1.02 is generated as a thread for each connection, and the HTTP service can be enabled for each connection. .
  • the processing performance can be improved by preliminarily resident three threads.
  • the processing units 103, 104, and 199 of the application 1230 do not directly exchange data with the HTTP daemon 2 and the request mediation daemon 7, but receive a processing request from the HTTP service execution unit 102 and store the processing result in a shared buffer. It notifies the HTTP service execution unit 102 via 99.
  • the processing units 103, 104, and 199 read the print data (MB unit data) to be processed from the shared buffer 99, and The processing result obtained by performing the corresponding processing on the print data is written in the shared buffer 99, and is provided as a Web service to the processing request source via the HTTP service execution unit 102.
  • the processing result is, for example, image data (data in MB units) generated by performing image forming processing on the print data, status information indicating a status relating to the image forming processing, or the like.
  • each of the processing units 103, 104, and 199 of the application 1230 is a processing unit to which a processing request can be distributed by the HTTP service execution unit 102. Good.
  • FIG. 9 a basic configuration example in which a processing unit can be easily added for each method for providing a web service has been described.
  • the method-specific processing unit requires a method specific to the method required before executing the actual processing for performing the Web service. Processing must be provided for each web service. It is conceivable to perform processing specific to the method in common.
  • FIG. 10 illustrates a configuration in which the processing related to data transmission and reception performed between the NCS 1228 and the application 1230 is shared as a sequence control library, and processing specific to a method is shared. The processing flow will be described in detail with reference to FIGS. 11 and 12.
  • FIG. 10 is a diagram showing a first configuration example of a multifunction machine that facilitates development and application of an application.
  • FIG. 10 only the main functional configuration among the functional configurations of the MFP 1200 shown in FIG. 1 is illustrated, and other functional configurations are omitted. 10, the same reference numerals are given to the same processing units as those in FIG. 9, and the description thereof will be omitted.
  • the difference from the basic configuration example shown in Fig. 9 is that in the POST method processing unit 103 of the application 1230, the Web service application 1218-1 and the Web service application The point is that the XML processing unit 103-2, which performs the analysis of XML and generates the message by XML, and the XML analysis unit 103-3, which has the parts necessary for the analysis and generation of XML, are shared.
  • the POST method processing unit 103 When the processing is distributed from the HTTP service execution unit 102 to the POST method processing unit 103, if the processing request is described in an XML message, the POST method processing unit 103 uniformly executes the XML processing unit. 103-2 analyzes the XML message, and responds to the request as a web service by the web service applications 1218-1 and 1218-2. Describe as a message. XML processing unit 103-2 Execute the XML parser 103-3 as needed to analyze and generate XM.L messages.
  • each Web service application 1218-1 and 121 8-2 since each Web service application 1218-1 and 121 8-2 does not need to parse and generate the XML message, the developer actually executes the Web service using the POST method. Since only the processing part needs to be developed, it is possible to easily add a new web service application to the MFP 1200.
  • FIGS. 11 and 12 are diagrams showing a processing flow in the first configuration example of FIG.
  • the HTTP service execution unit 102 requests the HTTP connection management unit 101 to acquire a connection (step S42).
  • the HTTP connection management unit 101 requests the connection notification queue 105 to obtain a notification (step S43), and obtains a connection notification from the connection notification queue 105 (step S44).
  • the HTTP connection management unit 101 connects to the HTTP daemon 2 based on the connection notification acquired from the connection notification queue 105. Further, the HTTP connection management unit 101 generates connection management information and stores it in the connection processing unit 89 (step S46).
  • the connection processing unit 89 is a part of the processing performed by the HTTP service execution unit 102.
  • the HTTP daemon 2 stores the HTTP header information in the connection processing unit 89 (step S47).
  • the HTTP connection management unit 101 notifies the HTTP service execution unit 102 of the connection management information (step S48). If the connection management information specifies the POST method, the HTTP service execution unit 102 executes the POST method. A processing request is made to the processing unit 103 (step S49). POST method processing unit 103 specifies text / xm 1 as Content-Type: ⁇ , requests processing to XML processing unit 103-2 to analyze XML message (Step S50).
  • the XML processing unit 103-2 requests the connection processing unit 89 to read data (step S51).
  • the HTTP daemon 2 notifies the connection processing unit 89 that the reception data has been written to the reception buffer 97 (step S52).
  • the connection processing unit 89 notifies the received data to the XML processing unit 10S-2 (Step S53).
  • the XML processing unit 1032 requests the XML analysis unit 103-3 to analyze the XML message part of the received data (step S54). Then, when the XML processing unit 103-2 requests the XML analysis unit 103-3 to acquire the result, the XML analysis unit 1.0.3— ; 3 parses the element tree as a result of analyzing the syntax of the XML message. The processing unit 103-2 is notified (step S56).
  • ⁇ ML processing section 103-2 requests Web service application 1218 for processing based on the element tree notified from XML corner section 103-3 (step S57).
  • the web service application 1218 executes a process, and notifies the XML processing unit 103-2 of the result of the process using an element tree (step S 58).
  • the XML processing unit 103-2 generates an XML message by writing the processing result of the web service application 1218 to the connection management unit 87 in XML based on the notified element tree (step S59). Then, the connection processing unit 89 writes the XML message to the transmission buffer 98 and notifies the HTTP daemon 2 of the writing to the transmission buffer 98 (step S60).
  • the XML processing section 103-2 sends an end notification to the connection processing section 89 (step S 61).
  • the connection processing unit 89 disconnects the connection with the HTTP daemon 2 (step S62).
  • the XML processing section 103-2 notifies the connection processing section 89 of the processing end (step S63), and the connection processing section 89 notifies the HTTP service execution section 102 of the processing end (step S64). ).
  • the HTTP service execution unit 102 notifies the HTTP connection management unit 101 that the processing has been completed (step S65).
  • the Web service application 1218 only performs mutual processing with the XML processing unit 103-2 only in steps S57 and S58.
  • the sequence control library 100 and the application 123 The XML processing unit 103-2 and the XML analysis unit 103-3 in the 0 POST method processing unit 103 facilitates the development of Web service applications by using a new POST method by using a shared processing unit. It can be.
  • FIGS. 13 and 14 are diagrams showing examples of the thread configuration of the sequence control library. .
  • an initialization thread 191 generated when the multifunction peripheral 1.200 is activated generates a mediation daemon client thread 192 (step S61).
  • the mediation daemon client thread 192 is a processing unit of the HTTP connection management unit 101 and functions as the HTT-P connection management unit 101.
  • the initialization thread 1.91. Registers the application in the request mediation daemon 7 (step S62).
  • the initialization thread 191 generates at least one HTTP service execution thread 193 (step S63).
  • the HTTP service execution thread 193 is a processing unit of the HTTP service execution unit 102 and functions as the HTTP service execution unit 102.
  • the mediation daemon client thread 192 Upon receiving the connection notification from the request mediation daemon 7 (step S64), the mediation daemon client thread 192 adds a connection notification to the connection notification queue 105 and notifies one of the HTTP service execution threads 193 of the connection (step S64). Step S 65). The HTTP service execution thread 193 that has received the connection notification generates a client thread 194 for the HTTP daemon (step S66). The HTTP service execution thread 193 connects to the HTTP daemon 2 (step S67).
  • the request mediation daemon 7 notifies the client thread 194 for the HTTP daemon that the reception data has been written to the reception buffer 97 (step S68). Then, the HTTP daemon client thread 194 notifies the HTTP service execution thread 193 that the received data has been written (step S69). The HTTP service execution thread 193 reads the reception data written by the request mediation daemon 7 from the reception buffer 97 (step S70).
  • HTTP service execution thread 193 writes transmission data to transmission buffer 98 (Step S7)
  • the Do request mediation daemon 7 extracts the transmission data from the transmission buffer 98 (Step S72).
  • HTTP service execution thread 193 Disconnects the connection with the request mediation daemon 7 (step S73).
  • Thread processing in the sequence control library '100 enables access to a large amount of data by using the shared memory 99, and the application.Web that actually implements the web service function implemented in 1230 This can be realized as a process separated from the service application 1218. The same applies to the web service application that actually performs the web service function in the GET method processing unit 104 and the other method processing unit 199 illustrated in FIG. Therefore, developers of Web service functions need to develop Web service functions without needing to know the processing flow of data transmission and reception between NCS 1228 and Application 12.30. It can be carried out.
  • FIG. 15 illustrates 3 ⁇ 4 which is common for each processing mode in the POST method.
  • FIG. 15 is a diagram illustrating a second configuration example of the multifunction peripheral that facilitates development and addition of an application. 15, the same reference numerals are given to the same processing units as in FIG. 10, and the description thereof will be omitted.
  • the POST method processing unit 103 includes processing units 103-3, 103-3, and 1218-4 corresponding to the processing units 103-2 and 103-3 and 1212-1 to 1218-2 shown in FIG.
  • a content type distribution processing unit 113-1 that distributes processing based on the content type
  • a FORM data ⁇ ? Unit 113 that analyzes processing requests with FORM specified as the content type — 2
  • a multipart analysis unit 113-4 that analyzes the processing request with multipart specified in the content type, and actually processes the data set in the FORM as a processing unit that performs the web service Web service application 1218—3 and Web service application 1218—5 that perform processing to actually upload the data file specified by the multipart Having.
  • the content type distribution processing unit 113-1 distributes the processing request to the FORM data analysis unit 113-12, and the content type “nmltipart / When "form-data" is specified, the processing request is distributed to the multi-part analysis unit 113-4, and when "text / xmlj" is specified for the content type, the processing request is sent to the XML processing unit 103-2. Distribute.
  • the FORM data analysis unit 113-2, the multi-part analysis unit 113-4 and the XML processing unit 103-2 perform the analysis processing of the processing, respectively.
  • the corresponding Web service application 1218-3, 1218-5, 121 8-4 is processed. -In this way, ⁇
  • the developer can save the knowledge of the predetermined analysis process corresponding to the content type without requiring A new web service application 1218 can be developed, and a new web service application 1218 can be easily added to the MFP 1200.
  • FIG. No. 16 is a diagram showing a third configuration example of a multifunction device that facilitates the development and addition of applications. 16, the same reference numerals are given to the same processing units as in FIG. 9, and the description thereof will be omitted.
  • the GET method processing unit 104 has, as a processing unit to be shared, a URL distribution processing unit 104-1 that distributes a processing request based on a URL (Uniform resource Locator) that specifies a Web service. And a plurality of web service applications 1218-6 to 1218-8 corresponding to URLs as processing units for providing web services.
  • a URL Uniform resource Locator
  • the developer can use a new Web service application without requiring knowledge of the predetermined analysis processing of the URL.
  • the new Web service application 1218 to the MFP 1200. Can be.
  • the multifunction peripheral 1200 by configuring the multifunction peripheral 1200 to have a POST method processing unit 103 shown in FIG. 15 and a GET method processing unit 104 shown in FIG. Regardless of whether the GET method is used or not, development and addition of the web service application 128 can be easily performed.
  • the processing unit necessary for the multifunction peripheral 1200 to provide the Web service is made into a component and can be shared by a plurality of applications. Therefore, similar functions required for the provision of Web services are grouped into parts, and the functions (processing units) made into parts can be reused by the implemented application.
  • the application can be easily added to the MFP 1200.
  • the processing unit required to provide the Web service is configured as a component and can be shared by a plurality of applications.
  • An image forming apparatus that facilitates the development of an application that provides an eb service can be provided.
  • connection processing means for generating the connection management information and performing connection processing disconnects the connection with the Web communication protocol daemon when receiving a processing notification from the method processing unit to which the processing request is distributed. It can be configured as follows.
  • connection processing means notifies the web service execution means that the processing corresponding to the processing request has been completed, and the web service execution means notifies the web connection management means of the end of the processing. May be configured to be notified.
  • the computer distributes the processing request to a plurality of method processing procedures for performing predetermined processing according to the method, and, in response to the processing request, to the method processing procedure corresponding to the method specified by the processing request.
  • a program for executing the web service execution procedure for executing the web service can be provided.
  • FIG. 17 is a block diagram showing a functional configuration of the automatic handler generation device according to one embodiment of the present invention.
  • the handler automatic generation device 500 is a computer device, and executes a program for absorbing a difference between a data format of a message and a data format that can be processed in a program language in a web service function.
  • the handler automatic generation unit 510 inputs the interface definition 521 by WSDL (Web Service Description Language), parses a request message described in XML (extensible Markup Language), generates an element tree, and generates an element tree.
  • WSDL Web Service Description Language
  • a handler that sets an argument for function call to the Web service function (WSF) based on the tree and generates an element tree for describing the response message in XML including the return value from the Web service function
  • a processing unit that generates L5 the source code of the processing unit and outputs it.
  • the handler automatic generation unit 510 includes a] ⁇ 1 ⁇ analysis unit 511, a type library generation unit 512, a handler source code generation unit 513, an XML schema analysis unit 514, a type element analysis unit 515, It has a message element analysis section 516, an operation element analysis section 517, a file input section 520 for inputting an interface definition 521, and a file output section 530 for outputting 20 source codes 531.
  • the interface definition 521 defines what interface provides one web service, and defines the interface definition file 5.22 by WSDL and the type definition file 523 imported by importing from the interface definition file 522. It consists of. If the type definition file 523 is not imported by the interface definition file 522, the type definition file 523 does not exist.
  • the source code 531 is, for example, C language source code, and includes a handler source code 532 including a header file of a handler processing unit and a program file, and a type library 53 referenced from the handler source code 532. It is composed of three.
  • the type library 533 is composed of a header file and a program file.
  • the finale input unit 520 inputs the interface definition 521 specified by the user to the handler automatic generation unit 510 (Step S81), and notifies the XML analysis unit 511 (Step S82).
  • the XML analysis unit 511 analyzes the XML syntax based on the interface definition 521 received from the file input unit 520 and generates an element tree. Then, the ⁇ 1 analysis unit 511 notifies the element tree to the type element analysis unit 515 (step S83-1), notifies the message element analysis unit 516 (step S83-2), and further analyzes the operation element. Notify part 517 (step S83-3).
  • the type element analysis unit 515 is a processing unit that analyzes the ty pes element in the element tree in order to generate a type library.
  • the type element analysis unit 515 analyzes the element tree, detects a types element indicating a type definition, and performs XML schema analysis. Let the part 514 analyze the detected types element (step S84-1). Then, the type element analysis unit 515 notifies the analysis result by the XML schema analysis unit 514 to the type library generation unit 512 (step S85-1).
  • the message element analysis unit 516 is a processing unit that analyzes the message element in the element tree in order to generate a handler source code, and notifies the analysis result to the handler source code generation unit 513 (step S85-2).
  • the operation element analysis unit 517 is a processing unit that analyzes the operation element in the element tree in order to generate a handler source code, and notifies the analysis result to the handler 'source code generation unit 513 (step S85-). 3).
  • the type library generation unit 512 is a processing unit that generates a type library based on the analysis result notified from the type element analysis unit 515, and the generated type library is notified to the file output unit 530 (step S86—1).
  • the handler source code generation unit 513 generates a source code based on the analysis result notified from the message element analysis unit 516 and the operation element analysis unit 517, and notifies the file output unit (step S86— 2).
  • the file output unit 530 converts the source code notified from the handler source code generation unit 513 into the handler source code. 651
  • step S87 the source library 531 is output as the type library 533 notified from the type library generation unit 512.
  • the handler automatic generation device 500 can automatically output the source code 531 of the handler processing unit by inputting the interface definition 521 that defines the web service.
  • Such an automatic handler generation device 500 has a hardware configuration as shown in FIG.
  • FIG. 18 is a block diagram showing a hardware configuration of the automatic Pandora generation device according to one embodiment of the present invention.
  • an automatic handler generation device 500 is a device that is controlled by a computer and executes the automatic handler generation unit 510, and includes a CPU (Central Processing Unit) 551, a memory unit 552, a display unit 553, and an input unit. 554, a storage device 556, and a driver, 557, and are connected to the system bus B.
  • a CPU Central Processing Unit
  • the CPU 551 controls the automatic handler generation device 500 according to the program stored in the memory unit 552.
  • the memory cut 552 is composed of a RAM and a ROM, and stores programs executed by the CPU 551, data necessary for processing by the CPU 551, data obtained by the processing by the CPU 551, and the like. I do. Further, a part of the memory unit 552 is allocated as a work area used for processing in the CPU 551.
  • the display unit 553 displays various information required under the control of the CPU 551.
  • the input unit 554 has a mouse, a keyboard, and the like, and is used by a user to input various information necessary for the automatic handler generation device 500 to perform processing.
  • the storage device 556 is constituted by, for example, a hard disk unit, and stores an interface definition 521 and a source code 531 shown in FIG. 17, data necessary for generating the handler processing unit, and the like.
  • the program for realizing the automatic generation process performed by the automatic handler generation unit 510 in the automatic handler generation device 500 is sent to the automatic handler generation device 500 by a storage medium 558 such as a CD-ROM. That is, the program When the stored storage medium 558 is set in the driver 557, the dryno 557 reads the program from the storage medium 558, and the read program is stored in the storage device 5 via the system bus B. 5 Installed on 6. Then, when the program is started, the CPU 551 starts processing according to the program installed in the storage device 556.
  • the medium for storing the program is not limited to CD-ROM, but may be any medium that can be read by a computer. ⁇
  • FIG. 19 is a flowchart illustrating the entirety of the handler automatic generation process.
  • the interface definition file 5 21 is read by the file input unit 5 20 (step S 5 01), and the XML analysis unit 5 11 1 analyzes the description in XML to generate an element tree. (Step S502).
  • the handler automatic generation unit 5100 determines whether or not the force has been successfully analyzed (step S503). If the analysis fails, an error is displayed on the display unit 553 (step S504), and the handler generation processing ends. When the analysis is successful, a type library is generated by the type library generation unit 512 (step S505). Also, the handler source code generation unit 513 generates a handler source code (step S506), and ends the handler generation processing.
  • FIG. 20 is a flowchart illustrating the type library generation processing.
  • the type element analysis unit 515 searches for a types element from the element tree notified from the XML parsing unit 511 (step S 511).
  • the type element analysis unit 515 determines whether or not the types element has been found (step S512). If not, the type library generation processing ends. On the other hand, if found, it is determined whether or not the force is an empty element (step S513). If the element is empty, the type library generation processing ends. On the other hand, if it is not an empty element, it is determined whether or not the external file has import capability (step S5 14). That is, in FIG.
  • step S 5 17 it is determined whether or not the interface definition file 522 imports the type definition file 523.
  • External file type definition file 5 2 3) If has not been imported, the process proceeds to step S 5 16. On the other hand, if an external file (type definition file 5 2 3) has been imported, the schema definition file (type definition file 5 2 3) is read (step S 5 15).
  • the XML schema analysis unit 514 analyzes the XML schema of the interface definition file 522 (step S 516) and generates a source code (step S 517). Then, the file is output as a type library 533 composed of a header file and a program file by the file output section 530.
  • FIG. 21 is a diagram illustrating an enumeration type definition generation process in the source code generation process.
  • an XML schema 600 is a description example in XML in which a data type is defined by an enumeration type. 1 ⁇ 1
  • the schema 600 is defined as a simple data type having the name "SomeVakieEnuni" by the description 602 using the tag sinipleT ⁇ pe.
  • the description 604 is restricted by the description of the tag restriction so that the base type is a character string by the "string" specified by the base.
  • the enumeration tag enumerates three values of the character string “V ALUE1”, “VALUE2”, and rVALUE3j.
  • the data type of name "SomeValueEnum" is defined to have three strings.
  • C code 701 is the C language source code generated from the XML schema 601 that defines data types with enumerations.
  • the description 702 is based on the description 602, ⁇ Defining that OneValueEnumJ is an enumeration type, and the description 704 based on the description 603 and the description 604. It is defined that three character strings are defined by the description 704 in which three of “SomeValueEnum_VALUE1” and rSomeValueEnum_VALUE2j N rSomeValueEnum_VALUE3j are enumerated. And the description 705 indicates that it defines the same data type as the "SomeVal ieEnum” force S "en m — SomeValueEiiim”.
  • FIG. 22 is a diagram for explaining the structure type definition generation process in the source code generation process.
  • an XML schema 6 11 1 is a description example in XML in which a data type is defined by a structure.
  • the XML schema 6 11 1 is defined as a complex data type named “SomeStruct” by the description 6 1 2 using the tag complexTpe.
  • the description 6 1 3 using the tag sequence
  • the description 6 1 4 using the tag element defines that the structure member “strParam” is a character string, and the description 6 1 5 using the tag element indicates that the structure member “intParam” is an integer. Defined.
  • the C code 711 is the C language source code generated from the XML schema 611 that defines the data type in the structure.
  • the description 712 defines that SomeStructJ is a structure based on the description 612, and according to the description 714 based on the description 614 and the description 615. char * strParam; "and” int intParam; " Then, the description 715 indicates that the same data type as the “SomeStruct” force S “struct_SomeStruct” is defined.
  • the C code 7111 is generated from the XML schema 611 in which the structure is described in the types element.
  • FIG. 23 is a diagram for explaining an array type definition generation process in the source code generation process.
  • an XML schema 6 21 is a description example in XML in which a data type is defined by an array.
  • XML Schema 6 21 is defined by the tag complexTVpe to be a complex data type named “ArrayOfString” by the description 6 22.
  • the “soapEnc: Array” specified by the base is restricted to the array according to the SOAP encoding.
  • the data sequence according to the description 626 is defined by the description 625 using the tag sequence.
  • the description by tag element 6 2 6 defines that "item" is a sentence ⁇ , which can be omitted, and that there is no upper limit on the number of occurrences.
  • C code 721 is the C language source code generated from XML schema 621 which defines the data type by array.
  • the description 722 defines that ArrayOfStringJ is a structure based on the description 622, and the description 723 and description based on the description 626 and the description 627.
  • a “char ** array;” which is a pointer of an array of “char *” according to “init length; J and description 7 15” indicating the number of elements according to 7 2 4 is generated.
  • the description 725 indicates that it defines the same data type as the "AirayOfString" force "struct—ArrayOiStringJ".
  • FIGS. 24 to 26 An example of generating a C language function declaration based on the definitions of simpleT ⁇ ype and complexTVpe of the types element will be described with reference to FIGS. 24 to 26.
  • Document and Element in the C language code are obtained by mapping the type defined by DOM (Document Object Model) to a C language structure.
  • the serializer and deserializer are programs that are executed when converting the element tree and the structure data corresponding to each type, and the serializer converts the structure data into the element tree.
  • the serializer is a program that converts the structure data into an element tree.
  • the constructor and destructor are programs that are executed when generating structure data, and the destructor is a program that releases structure data.
  • FIG. 24 is a diagram illustrating an enumerated type function declaration process in the source code generation process.
  • the serializer 8001 indicated by Element * SomeValueEnum_serialize (Document * doc, char * tagName, SomeValueEnum value); receives the enumerated value as input by rSomeValueEnum value, and r * tagnamej generates and outputs an element (Tag) whose name is tagname, and the deserializer 8 11 1 indicated by "SomeValueEnum Some ValueEnum_deserialize (Element * element);” It receives as input, analyzes it and outputs the column «.
  • Serializer 801 and deserializer 810 are based on XML schema 601 Generated.
  • FIG. 25 is a diagram for explaining the function declaration processing of a structure in the source code generation processing.
  • the constructor 8 21 shown by “SomeStruct * SomeStruct_create (char * strParam, int intParam);” receives the value of the structure member as input, creates a structure, and outputs it. I do.
  • the destructor 831 denoted by “void SomeStruct_free (SomeStruct * st); j, receives the structure as input, and releases the memory area used by the structure. Also, the memory area used by the structure member is used.
  • the serializer 841 indicated by “Element * SomeStruct_serialize (doc in the document, char * tagName, SomeStruct * st); J, receives the structure as input using“ SomeStruct * st ”. Then, an element (Element) with tagname as the tag name is generated and output using “cliar * tagnamej.” Also, “SomeStruct * SomeStruct_deserialize (Element * element);”. ⁇ ara.izer 851 receives an element as input, analyzes it, generates a structure, and outputs it.
  • the input value can be set in a structure that can be processed by the Web service function by using the element indicating the input value described in XML with the deserializer 851 and the constructor 821.
  • a return value (output value as a processing result) from the Web service function can be set to correspond to an element described in XML.
  • Constructor 8 2 1, Destructor 8 3 1, Serializer 8 4 1 and Deserializer 8 5 1 are generated from XML schema 6 1 1
  • FIG. 26 is a diagram for explaining an array function declaration process in the source code generation process.
  • the constructor 861 shown as “ArrayOfString * ArrayOfString_create (int length, char ** array);” receives an array size and an array as input, and creates a structure that holds the array. Output.
  • the destructor 871 indicated by “void ArrayOf String_free (ArrayOfString * st);” receives the structure holding the array as input, and releases the memory area used. Also, the memory area used by the array members is recursively released.
  • the serializer 881 shown receives "a structure holding an array by ArrayOiString * stj as an input, and generates and outputs an element (Element) having tagname as a tag name by" char * tagnamej. " , "SomeStruct * SomeStruct_deserialize (Element * element);
  • the deserializer 891 indicated by J receives an element (E lement) as input, analyzes it, generates a structure that holds an array, and outputs it. .
  • the input value can be set in an array that can be processed by the Web service function. Also, by using the return value (output value as the processing result) from the Web service function and the realizer 881, the processing result can be set in correspondence with the element described in XML. . .
  • the constructor 861, destructor 871, serializer 881 and deserializer 891 are generated from the XML schema 6 21
  • the C language function declaration generated in this way is output to the header file of the type library 533.
  • the processing of each function is output to a program file.
  • FIG. 27 and FIG. 28 are flowcharts illustrating the handler generation processing.
  • the handler automatic generation unit 5110 acquires the service name from the name attribute of the service element. (Step S520). Then, each element is searched for in the order of the service element, the binding element, and the porttype element (step S522). The operation element that is a child of the porttype element is searched for, and the operation name is acquired from the name attribute (step S523). The input element that is a child of the operation element is searched, and the input message name is obtained from the name attribute (step S524).
  • the output element which is a child of the operation element, is searched, and the output message name is acquired from the name attribute (step S525). Then, a function declaration of the handler processing unit and the We service function (WSF) is generated (step S526).
  • WSF We service function
  • the message element of the input message is searched (step S520). Find the child part element of the message element, and extract the parameter name from the name attribute and the type from the types attribute. Obtain (step S 5 2 8). Then, the type is mapped to the C language type (step S520). It is determined whether there is still a part element (step S530). If there is a “part” element, the process returns to step S 528 to repeat the above processing. On the other hand, if there is no “part” element, the mapping of the input message to the C language type is finished, and the output message is mapped to the C language type. 'Take the message element of the outgoing message (step S 5 3 1).
  • the child element of the message element is searched for, and the parameter name is obtained from the name attribute, and the type is obtained from the typ attribute (step S532). Then, the type is mapped to a C language type (step S5333). It is determined whether or not there is still a part element (step S5334). If there is a p. art element, the process returns to step S 5 32 and repeats the above processing. On the other hand, if there is no par 't element, the mapping of the output message to the C language type ends.
  • a structure definition of the input message is generated (step S535).
  • a structure definition of the output message is generated (step S533).
  • a program for the handler processing unit is generated (step S533).
  • the structure definition and output of the input message are output to the header file of the structure definition, and the program of the handler processing section is output to the program file (step S533).
  • it is determined whether or not there is still an operation element (step S539). If there is an operation element, the process returns to step S522 and repeats the same processing as above. If there is no operation element, the handler generation processing ends.
  • FIGS. 29 and FIG. 30 are diagrams showing examples of description of the interface definition using WDSL.
  • the definition of the data type originally described by the 3 ⁇ 4ype> tag is the one defined by the type definition file 5 2 3 specified by foo.bar.com/types.xsdj.
  • the data type for describing the message is defined, the schema definition is set, and the ⁇ pe> tag is omitted. Imported from "foo.bar.com/types.xsd".
  • Tpe- 'xs: unsignedlnt'7> Therefore, the output parameter (printOutput ) Defines an unsigned integer (unsignedlnt) consisting of D reque stld.
  • the link defined by the link.
  • RPC Remote Procedure Call
  • r.com/netdoc print "/>) defines that the value of the SOAPAction header for a print request is" http://foo.bar.com/netdoc/print ".
  • the binding of the service name "netdoc” is “netdocHttpBinding", and the URL of the service (Uniform Resource Locator; is "Jittp: ⁇ printer.foo.bar.com/netdoc”).
  • the data type is determined, the operation is determined, and the URL and the SOAPAction header are determined by the interface definition file 52 and the definition file 52 defined in the WSDL.
  • FIG. 31 is a diagram for explaining the function declaration of the handler processing unit.
  • the function declaration of the handler processing unit is, for example, “netdoc” indicating the service name, “print” indicating the operation name, and “handlerj” indicating the handler processing unit, and “netdoc_print_handlerj” is used as the function name.
  • Declare as a function of the handler processing unit In this example, "netdoc_print_liandler” indicates the handler processing unit corresponding to the service that performs the print operation.
  • the function declaration of the handler processing part is Is output to the header file of 532.
  • FIG. 32 is a diagram for explaining the function declaration of the Web service function.
  • the function declaration of the Web service function is, for example, “netdoc_print” consisting of rnetdocj indicating the service name and “print” indicating the operation name as the function name; Declare as a function.
  • the argument of the function of the web service function specifies the structure of the input message by ⁇ Netdoc_printInput '' by ⁇ Netdoc '' indicating the service name and rprintlnputj indicating the input message name, and indicates the service name
  • the output message structure is specified by ' ⁇ etdoc_printOutputJ by rNetdocj and rprintOutputJ indicating the output message name.
  • the function declaration of the Web service function is output to the header file of the handler source code 532.
  • FIG. 33 is a view for explaining the structure definition of the incoming message.
  • the structure of the input message defines, for example, “Netdoc_printInput” using “netdocj” indicating the service name and “printlnput” indicating the input message name.
  • the structure “_Netdoc_printInput” has the parameter type “fileld” with the parameter type as “unsigned int” and an unsigned integer with the parameter type as “unsigned int”.
  • the structure of the input message is output to the header file of the handler source code 532.
  • FIG. 34 is a diagram for explaining the structure definition of an output message.
  • the structure of the output message defines, for example, “_Netdoc—printOutputj” by “netdocj” indicating the service name and “printOutput” indicating the output message name as a structure.
  • Netdoc_j> rintOutput ” is composed of the parameter name“ requ estldj ”with the parameter type as“ unsigned int ”and an unsigned integer.
  • the output message structure is output to the header file of the handler source code 532 .
  • FIG. 35 shows an example of an automatically generated handler source code.
  • Fig. 35 instead of describing the actual source code, an outline of the processing for each step is shown.
  • the handler source code as shown in FIG. 35 as shown in description 901, the function name of the declared handler processing unit shown in FIG. 31 is described first.
  • This handler processing unit is a handler for a print function as a Web 'service function. Hereinafter, it is called a print handler.
  • the codes from steps S120 to S131 are codes for analyzing a SOAP envelope indicating a processing request based on the element tree.
  • step S140 to step S148 are codes for generating an element tree for creating a SOAP envelope indicating a processing response.
  • a step S120 for the print node to acquire the root element is described.
  • Step S 1 2 0 is executed, it obtains the root element (E nve 1 o P e element).
  • Step S1221 for obtaining a child node list is described.
  • the print handler acquires "Header" and "Body" from the element tree.
  • a step S122 for searching and acquiring an element having a tag name of Body from the child node list is described.
  • Step S123 of acquiring the first child node of the Body element is described.
  • the print handler acquires a pinit element indicating the operation name.
  • Step S124 for acquiring the child node list of the pinit element is described.
  • a step S125 (in which repetition is determined as step S132) for sequentially acquiring tag names from the acquired child node list is described.
  • the tag name is fi 1 e ID; step S 126 for determining whether or not ⁇ is described.
  • the tag name is fi 1 e ID: ⁇ describes a step S127 to acquire the first child node of the tag name fi 1 e ID.
  • step S 1 2.7 the print handler obtains a text node.
  • a step S128 of extracting text data from the acquired text node and converting it to an integer is described.
  • the print handler returns Is set to a predetermined structure.
  • Step S129 of determining whether or not the tag name is coun t is described. If the tag name is cout, a step S130 of acquiring the first child node of the tag name cout is described. As a result of execution of step S130, the print handler obtains a text node. Step S131 of extracting the acquired text node and converting it to an integer is described. As a result of execution of step S131, the print handler sets a value in a predetermined structure as the number of copies parameter.
  • the description 902 from steps S126 to S131 is an example of a print handler. However, in other handlers, the determination for each tag name and the processing for the tag name change depending on the parameter definition of the input message.
  • Step S133 in which the value of each parameter acquired when the description 902 is executed is generated as structure data of the input message and set to the data name “in” is described.
  • a step S134 of calling a function “netdoc—print (in, out)” of the declared Web service function as shown in FIG. 32 using the structure data of the input message as an argument is described.
  • step S134 When step S134 is executed, it is determined whether the return value is an error. If the return value is an error, step S135 for setting SOAPFault in responseDocument is described.
  • steps S140 to S148 the step of generating an element tree for generating a processing response when no error is caused by execution of the function “netd oc_print (in, out)” of the web service function is described. Is done.
  • Step S140 for generating an Enveloe element is described.
  • Step S141 for generating a Body element is described.
  • Step S142 for connecting the Body element to the Envelope element is described.
  • Step S143 for generating a print Resp on se element is described.
  • Step S144 for connecting the printResponse element to the Body element is described.
  • Step S 145 for generating a request I d element is described.
  • Step S146 of connecting the print element to the Body element is described.
  • a step S147 for generating a text node using the request ID obtained as a result of the execution of the step S134 is described.
  • Step S148 connecting the text node to the requestId element is described.
  • Step S149 in which responseDocument indicating the processing result of the print handler is returned, is described.
  • the handler source code 53'2 described in this manner is not limited to a print handler, and similar steps can be generated corresponding to other operations. Therefore, 'the operation name “print” in the above ndora source code changes depending on the definition. '
  • the handler source code 532 is automatically generated, a large number of simple and similar codes can be generated, thereby eliminating the problem of bugs caused by simple mistakes by developers. be able to. Also, since the handler source code 532 can be generated in a short time, the burden on the developer can be reduced. Furthermore, the developer can develop the Web service function without being aware of the difference between the message data format in XML and the data format that can be processed by the programming language in the Web service function.
  • handler source code 532 and the type library 5 3 3 automatically generated by the handler automatic generation unit 510 corresponding to the functions of each Web service function based on the interface definition 5 2 1 It is compiled together with the web service function functions and other source code that constitutes the necessary processing units.
  • a program for automatically converting a data format of a message according to a message exchange protocol between devices is automatically generated. Therefore, it is possible to solve the problem that a bug is introduced due to a simple mistake by a developer.
  • the message can be processed even with a Web service function developed by a method similar to the conventional method. Becomes Therefore, it is possible to easily develop a web service function in the image forming apparatus. Further, cooperation with other systems that can be connected to the image forming apparatus can be expanded.
  • a computer analyzes an interface definition that defines an interface of a web service, and generates a first element tree indicating a relationship between a plurality of elements constituting the interface definition. Based on the element tree generation procedure and the first element tree, the input / output data format that can be processed by the web service function that executes the web service and a prescribed description format ⁇ We b It can be configured to execute a conversion program generation method for generating a conversion program for performing a conversion process into a request and response message relating to a service.
  • the conversion program generation procedure is set by the input / output data format that can be processed by the Web service function and the request and response message described in ⁇
  • an interface definition that defines an interface of a web service is analyzed by a computer, and a relationship between a plurality of elements constituting the interface definition is analyzed.
  • the conversion program generation procedure includes an input / output data format that can be processed by the web service function and an input / output message set by the request and response messages described in the format described above.
  • the functional configuration and the hardware configuration of the multifunction peripheral 1200 are the same as the functional configuration and the hardware configuration in the fourth embodiment, and the description thereof is omitted.
  • the web service function is, for example, software (application) written in a programming language such as C language.
  • a processing unit (handler) that handles between XML with a different syntax and a program language is required so that the Web service function can understand the processing contents of XML described according to SOAP as messages.
  • the print Web service for printing, the document list acquisition Web service for acquiring the document list, and the document information acquisition Web service for acquiring the document information will be described with reference to Fig. 36 as an example.
  • FIG. 36 is a diagram showing a configuration example for realizing a web service.
  • the print web service, the document list acquisition web service, and the document information acquisition web service are provided by the web service t: and the application 1218, respectively.
  • These web services are also available as independent functions of the application 1230 as separate functions of the application 1230.
  • FIG. 36 only the main functional configuration among the functional configurations of the fusion machine 1200 shown in FIG. 34 is illustrated, and other functional configurations are omitted.
  • an intermediate layer that controls the transmission and reception of data to and from the connected ⁇ is configured between the control ⁇ / service 1 250 and the web service application 1218.
  • the control service 1250 has an ECS 1224, an MCS 1225, and an NCS 1228 as components for realizing a web service by the web service application 1218.
  • the NCS 1228 has an HTTP daemon 2 that controls the HTTP, and a request mediation daemon 7 that mediates connection processing between the HTTP daemon 2 and the web service application 1218.
  • the middle layer 1255 includes a sequence control library 100, an XML library 110, a SOAP library 120, a job management unit 310, and a sequence control library 100 as components for absorbing data transmission / reception control with the connected ⁇ .
  • the sequence control library 100 further includes an HTTP connection management unit 101, an HTTP service execution unit 102, and a POST method S5.
  • the XML library 110 has an XML processing unit 115, an XML processor 116, and an XML serializer 117.
  • the SOAP library 120 has a SOAP action distribution processing unit 121.
  • the web service application 1218 has an element unparsed / generated handler 200 and a web service function (WSF) 300 as components for realizing the web service.
  • the element tree analysis and generation handler 200 is a processing unit that analyzes a syntax in a data format of a message in accordance with SOAP in Tengma, and converts the syntax into a data format that can be processed by the web service function 300. It has a tree analysis' generation handler, for example, a print handler 201, a document list acquisition handler 202, and a document information acquisition handler 203.
  • each of the print handler 201, the document list acquisition handler 202, and the document information acquisition handler 203 is a handler source of the source code 531 automatically generated by the handler automatic generation unit 510 shown in FIG. 17 in the third embodiment. It is a handler processing unit based on code 532 and type library 533.
  • the web service function 300 has a plurality of web service functions, for example, a print function 301, a document list acquisition function 302, and a document information acquisition function 303.
  • the print handler 201 parses the data format of the message according to the S OAP indicating the content of the processing for the print function 301, converts the data into a data format that can be processed by the print function 301, and processes the print function 301. Request. Further, the print handler 201 generates a response from the print function 301 as a message in a data format according to SOAP.
  • the document list acquisition handler 202 and the document information acquisition handler 203 perform the same processing on the document list acquisition function 302 and the document information acquisition function 303, respectively.
  • the print function 301 receives the file ID and the number of copies as input parameters, and issues a print request to the job management unit 3.10 by designating the job management file ID and the number of copies.
  • the request ID received from the job management unit 310 is returned as an output parameter.
  • the document list acquisition function 302 requests the file list By from the file management unit 311 and returns the list of IDs received from the file management unit 311 as output parameters.
  • the document information viewer 303 receives the file ID as an input parameter, and requests the file information by designating the file ID to the file manager 311.
  • the file information received from the file management unit 311 is returned as an output parameter.
  • the job management unit 310 manages job queues and execution results. In addition, it communicates with the ECS 1224 and the MCS 1125 to execute print processing of stored documents.
  • the file management unit 311 communicates with the MCS 1225 to obtain file information.
  • FIG. 37 and FIG. 38 are flowcharts describing the processing of the Web service by SOAP.
  • the NCS 1228 HTTP daemon 2 receives the connection request from the network 15 (step S1100).
  • the connection request is notified to the HTTP connection management unit 101 of the web service application 1218 via the request mediation daemon 7. Thereafter, the HTTP 101 notifies the HTTP service execution unit 102 of the connection request that provides a service according to HTTP.
  • the HTTP service execution unit 102 connects to the HTTP daemon 2 and acquires an HTTP request.
  • the HTTP service execution unit 102 analyzes the HTTP method indicating the data transmission method from the HTTP request received via the network 15 and checks whether the method is a GET method (step S1101). If it is the GET method, the Web service «is executed by the GET method (step S1102). In other words, it provides Web services other than Web services using SOAP.
  • the method is checked whether or not the method is the POST method (step S1103). If it is not the POST method, the process advances to step S1107 to perform error processing and end the SOAP web service processing.
  • the POS method the POS method distribution processing unit 105 is called.
  • the POST method distribution processing unit 105 analyzes the HTTP request header information and determines that the HTTP body has a stray format of XML (step S1104). In other words, the Content-Type of the HTTP response header specifies text / xml; If not, the process advances to step S1107 to perform error processing. On the other hand, if it is XML, the XML content handler 111 is included.
  • Otsu processing unit 115 analyzes the syntax of the HTTP body XML using the XML processor 116, and creates an element tree of the request that shows the relationship between the tags described in XML in a tree structure (Ste S110 5). It is determined whether the result of the syntax analysis is an error or not (step S1106). If the syntax analysis result is an error, the process advances to step S1107 to perform error processing. On the other hand, when the syntax analysis result is normal, the process proceeds to step S1109 in FIG.
  • the SOAP action distribution processing unit 121 analyzes the SOAP Action header of the HTTP request, and distributes the HTTP request to a different element tree analysis' generation handler 200 based on a URI (Uniform Resource Indicator) (step S1109).
  • a URI Uniform Resource Indicator
  • the print handler 201 for the print web service that specifies the web service the document list acquisition handler 202 for the web service that specifies the web service, and the document information acquisition web service
  • the HTTP request and element tree are sent to the document information acquisition handler 203 for the specified URI. Will be sorted out.
  • Each element tree ⁇ generation handler 200 analyzes the element tree of the request and converts it into C language structure data (step S1110). After that, the Web service function 300 corresponding to the URI specified by the HTTP request is called using the converted structure data as an argument (step S1111). In this case, the print handler 201 calls the print function 301, the document list acquisition handler 202 calls the document list acquisition function 302, and the document information acquisition handler 203 calls the document information acquisition function 303.
  • the web service function 3 executes the predetermined web service logic and returns the result as structure data (step S1112).
  • the acquisition function 303 executes the logic of each Web service and returns the result, which is in a data format that can be processed in a program language (for example, a C language structure).
  • the element tree analysis and generation handler 200 generates a response element tree from the received structure data (step S1113).
  • the element tree generated by each element tree analysis / generation handler 200 indicates the data structure of the relationship between XML tags, for example, by linking the pointers from tag to tag.
  • the element tree of the response is converted into XML by the XML serializer 117 via the OAP function distribution processing unit 121.
  • the XML serializer 117 converts the element tree into XML represented by text.
  • the converted XML is composed into an HTTP body conforming to SOAP, and after adding a predetermined HTTP header,
  • step S1114 This is referred to as a P response (step S1114).
  • the element tree analysis and generation handler 200 performs data conversion on the element tree according to the C language structure. It also converts C language structure data into element trees. Developers can develop Web services in a programming language without knowledge of SOAP and XML.
  • the POST method distribution processing unit 105 It starts by connecting to the sequence control library 100, and registers the XML processing unit 115 to the POST method distribution processing unit 105, registers the SOAP action distribution processing unit 121 to the XML processing unit 115, and analyzes the element tree. The registration of the generation handler 200 to the SOAP function distribution processing unit 121 is performed.
  • FIGS. 39, 40, and 41 taking the print handler 201 of the element tree analysis / generation handler 200 as an example.
  • Figure 39 is a diagram showing an example of a description of an HTTP request according to SOAP using XML.
  • 'FIG. 40 is a diagram showing an example of an element tree converted by the XML processor.
  • FIG. 41 is a flowchart for explaining the element tree analysis processing by the print handler.
  • the XML processor 112 converts the HTTP body 20 starting with ⁇ SOAP-ENV: Envelope> into an element tree.
  • Tag name 21 iEnvelopeJ is set as the root element
  • tag name 22 “Header” and tag name 23 “Body” are associated as the root element potato node.
  • the child node of the tag name 23 “Body” is set as the tag name 24 “print”
  • the tag name 25 “fileld” and the tag name 26 “count” are associated as the child nodes of the tag name 24 “print”.
  • the text data 27 “123” and the text data 28 “2” are associated with the tag name 25 rfileldj and the tag name 26 “count”, respectively.
  • the element tree structure associated in this way has a data structure as shown in FIG. 40, for example.
  • tag names 21 to 26 and text data 27 to 28 are indicated by ellipses, and associations are indicated by arrows.
  • step S120 structure data in a program language that can be processed by the print function 301 is generated by the print handler 201 in accordance with the flowchart shown in FIG.
  • the step numbers in FIG. 41 correspond to the step numbers in FIG.
  • the print noder 201 acquires a root element (step S120).
  • the root element is an Enveope element.
  • a child node list is obtained (step S121). That is, tag names 22 “Header” and 23 HBodyJ are acquired.
  • the element whose tag name is Body is searched and acquired from the child node list (step S122).
  • Bo dy element Obtain the first child node (step S123). In this case, get the rint element. Get the child node list of the print element (step S124).
  • the tag names are sequentially acquired from the acquired child node list (step S125).
  • step S 126 It is determined whether the tag name is f i 1 e ID or not (step S 126). If the tag name is not f i 1 e I D, go to step S 1 29. On the other hand, if the tag name is f i 1 e ID, the first child node of the tag name .f i 1 e ID is obtained (step S 127). That is, a text node is obtained. The acquired text nodes are extracted and converted into integers (step S128). That is, the value “123” is set in the predetermined structure as the file ID parameter. Further, it is determined whether or not the tag name is coutn (step S129). If the tag name is not “coun t”, go to step: / S 1 32.
  • step S130 the first child node having the tag name cout is obtained (step S130). That is, get the text node.
  • the acquired text nodes are extracted and converted into integers (step S1311). That is, the value “2” is set in the predetermined structure as the number of copies parameter.
  • the print handler 201 determines whether or not the next child node has a certain force from the child node list acquired in step S125 (step S132). If there is a next child node, the flow returns to step S125 to acquire the next child node and perform the same processing as above. If there is no next child node, the analysis processing of the element tree ends.
  • FIG. 42 is a diagram illustrating an example of setting arguments of a function of the web service function.
  • the value “123J” is set in step S128.
  • the parameter “unsigned int count” Is set to the value “2” in step S 13 1.
  • the print function 301 of the web service function 300 is a "netdoc-printj function" declared as a function of the web service function by the handler automatic generation unit 501 (see Fig. 32), "struct Netdoc_printInput * in And is defined as the structure of the input message by the handler automatic generation unit 501.
  • the structure "struct Netdoc_printInput” of the structure 29 and the pointer "in” to the structure 29 are set in the argument 30.
  • the processing result of the print function 301 is, for example, “struct etdoc—printOutput * out” that indicates the structure name “struct Netdoc—a pointer to“ out ”to printOutputJ. Returns with argument 31.
  • FIG. 43 is a diagram illustrating a setting example of the processing result in the print handler.
  • the print handler 201 obtains the structure 39 in which the processing result is to be set by the pointer “out” of the argument 31.
  • the structure 39 is a structure defined as an output message structure by the handler automatic generation unit 510 (see FIG. 34).
  • the value “100” is set to the parameter “unsigned int request Idj” as the processing result.
  • FIG. 44 is a flowchart for explaining the element tree generation processing by the print handler.
  • FIG. 45 is a diagram illustrating an example of the generated element tree.
  • the print handler 201 generates an Environment element 32 (step S140).
  • the body element 33 is generated (step S141).
  • the ody element 33 is connected to the EnVe1ope element 32 (step S142).
  • the HTTP body of the HTTP response according to SOAP is set by the processing in steps S140 to S142.
  • the print handler 201 generates the pRintResponse element 34 (step S143), and connects the pRintResponse element 34 to the Body element 33 (step S144). In addition, generate r eq u e s st I d element 35
  • Step S 145 connect the r eques st I d element 35 to the p r intRespons e se element 34 (step S I 46).
  • the print node 201 generates a text node 36 based on the request ID obtained as a result (step S 147), and replaces the text node with reauestld. Connect to element 3 5 (step S 1 4 8). In this case, “1 0 0” is set in the text node 36.
  • FIG. 46 is a diagram showing an example of a description of an HTTP response according to the SOP using XML converted from the element tree.
  • each element 32 to 36 shown in FIG. 45 is described in a tag delimited by ⁇ >, and predetermined information is described in XML according to a procedure according to the SOAP.
  • the MFP 1200 transmits the HTTP response to the device that transmitted the HTTP request by the HTTP daemon 2 via the network 15. In this way, the multifunction peripheral 12000 provides the Web service to the devices connected via the network 15.
  • the element tree indicating the relationship between elements in XML is converted into input data in a programming language that can be processed by the We service function, and the output data in a program language is converted into an element tree in a predetermined description format.
  • Source code 531 is automatically generated. Therefore, it is possible to generate a large amount of simple and similar code, and it is possible to solve a problem when a bug is introduced due to a simple mistake by a developer. Further, since the handler source code 532 can be generated in a short time, the burden on the developer can be reduced.
  • an element tree analysis' generation node 200 with the automatically generated source code 531 in the multifunction peripheral 12000, developers can use the same development method as before, for example, by using the C language.
  • an application can be developed as a Web service function.
  • applications that have already been implemented can be easily modified to support Web services.
  • the MFP 1200 having the element tree analysis and generation handler 2000 can interpret a message described in XML according to SOAP by the Web service function 300 developed by the program.
  • Web service function 300 can be used as another system. Therefore, since the system or computer terminal connected to the MFP 1200 is not limited, the availability of the MFP 1200 can be greatly expanded.
  • the processing unit for converting the data format of the message according to the message exchange protocol between the devices is provided, Even the Web service function developed by the method described above can process the message. Therefore, the b service function in the image forming apparatus can be easily developed without depending on the description format of the message.
  • applications that have already been implemented can be improved to easily support Web services. Further, cooperation with other systems connectable to the image forming apparatus can be expanded.
  • the multifunction peripheral 1200 converts the request message received according to the predetermined message exchange protocol into a processing request that can be processed by the Web service processing unit, in correspondence with each of the plurality of Web service processing units. It can be configured to have a plurality of conversion means for converting and converting the processing result output from the Web service processing means into a response message according to the message exchange protocol.
  • the request message and the response message can be configured to be described by the Simple Object Access Protocol, and therefore by the Extensible Marmp Language.
  • the second data format that can be processed by the programming language and the third data format that indicates the processing result output by the web service processing means can be configured to indicate a structure that can be processed by the C language. .
  • the multifunction peripheral 1200 notifies communication control means for controlling communication according to a predetermined communication protocol and connection management means of receiving a processing request via the network.
  • the Web service processing means executes the processing based on the processing request, and the processing result is transmitted to the equipment as a processing response to the equipment « Connection control means for controlling connection with the means.
  • the predetermined communication protocol can be configured to be the Hypertext Transfer Protocol.
  • the multifunction peripheral 1200 manages an application having a plurality of the Web service processing means, a plurality of hardware resources used in the image forming process, and uses the application from the application. It can be configured to have a control service for controlling use to the plurality of hardware resources in response to a request, and an operating system for controlling the application and the control service. ,
  • the bug combiner 1200 has a first message conversion procedure for converting the request message into a first data format indicating the configuration of the request message. It can be configured to have a first data format conversion procedure that allows one data format to correspond to the second data format that can be processed by the programming language that developed the Web service.
  • a first message conversion procedure for converting a request message into a first data format indicating a configuration of the request message includes the following: An element tree can be generated based on the elements constituting the request message and the values set for the elements, and the element tree can be configured to have the first data format.
  • the first data format conversion procedure may include processing the above-mentioned web service processing procedure by examining the relationship between the elements in the element tree. It can be configured to set a value for two data format elements
  • a third data format that can be processed in the predetermined program language and that indicates a processing result of the web service according to the web service procedure is included in a response message that indicates the processing result.
  • a second message conversion procedure that describes the message is performed based on the value set as the processing result in the element of the third data format and a plurality of elements constituting the response message.
  • An element tree can be generated, and the element tree can be configured to have the fourth data format.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Facsimiles In General (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)

Description

W e bサービス機能を有する画像形成装置 技術分野
本発明は、複数の通信プロトコルを有する画像形成処理装置に係り、詳しくは、 アプリケーションが多種多様な通信プロトコルに応じた処理部を有することなく データの送受信を行うことができ、 通信プロトコル及ぴアプリケーションの ϋ¾口 を容易とする画像形成処理装置を提供するものである。 また、 本発明は、 W e b " サービスを するアプリケーションの開発及び il¾口を容易とする画像形成装置 を提供するものである。 更に、 本発明は、 We bサービスの要求及び応答メッセ ージの記述形式と ¾W e bサービスのプログラムで処理可能なデータ形式を変換 するプログラムを自動生成するプログラムを提供するものである。 背景技術
近年、 プリンタ、 コピー、 ファクシミリ、 スキャナなどの各装置の機能を 1つ の筐体内に収納した画像形成装置が一般的に知られている。 このような複合型の 画像形成装置は、 1つの筐体内に表示部、 印刷部および撮像部などを設けるとと もに、 プリンタ、 コピー、 スキャナおよびファクシミリ装置にそれぞれ対応する アプリケーションを設け、 アプリケーションの切り替えによって、 当該装置をプ リンタ、コピー、スキャナまたはファタシミリ装置として動作させるものである。 しかしながら、 近年のインターネットの普及及び通信プロトコルの多様化にと もなつて、 プリンタ機能を有する上記従来の複合型画像形成装置は、 市場要求と して多種多様なィンターフェイスからの印刷要求に応じなければならなくなって きた。 上記従来の複合型画像形成装置において、 このような市場要求に応じるた め、 新しいインターフェイスが ϋ ^される毎に個別に対応をしてきた。 個別に対
Figure imgf000003_0001
従来から実装されているアプリケーションに新規のィンターフェイ スに対応するために手を加えなければならない。 また、 新規にアプリケーション を開発して実装するためには、 複数のインターフェイスに対応するように開発を 行わなければならない等の問題があつた。
また、 近年、 インターネットの発達と普及により、 ネットワークを介して通信 可能なプリンタ機能を有する上記従来の複合型画像形成装置は、 ネットワークを 介して機器と接続可能であるために、 更にインターネットを介して行われる通信 プロ卜コル、 つまり、 HT T P (Hypertext Trans fer Protocol) による通 信制御によつて行われる W e bサービスの提供が望まれるようになった。 更に、 HT T Pによる通信制御に加え、 HT T Pのボディ部に XML (extensible M arkup Language)等の汎用的な記述形式によるメッセージを記述して、接続さ ' れる機器の対象範囲を拡大する傾向にあるなかで、 上記従来の複合型画像形成装 置では、 画像形成に関する処理を実行する各アプリケーションが HT T Pによる 通信制御と XML等によってメッセージ交換を行うためには、 各アプリケーショ ンに HT T Pによって指定されるメソッドの違いによる処理、 及び、 XMLの記. 述に関する処理を行わせる必要があった。 従って、 W e bサービスに対応するァ プリケーシヨンを開発する開発者には、 機能毎のプログラムの開発が必要とされ ていた。
上記従来の複合型画像形成装置において、 ネットワークを介して個々のアプリ ケーションが画像形成処理を W e bサービスとして する場合、 そのネットヮ ークプロトコルに従って交換されるメッセージの記述形式を解釈できるように実 装されたアプリケーションに改良する必要があった。. また、 メッセージの記述形 式が XML (extensible Markup Language)である場合、従来の開発方法で 開発されたアプリケーションを W e bサービス対応に改良するのも、 また、 上記 従来の複合型画像形成装置に新規に W e bサービス対応のアプリケーションを追 加するのも、 開発者に XMLの知識が要求されるため、 従来の開発方法によって アプリケーシヨンを開発することが困難であった。
上述したように、 XMLによるメッセージのデータ形式と We bサービス機能 におけるプログラム言語にて処理可能なデータ形式とは異なつているため、 各 W e bサービス機能の中にこれらデータ形式の違いを吸収するための仕組みを持つ 必要があった。このようなデータ形式の違いを吸収するための仕組みの開発では、 単純で同じょうなコードを大量に繰り返す必要があり、 単純ミスによるバグカ入 りやすレ、という問題があつた。 発明の開示
そこで、 本発明の課題は、 多種多様なインターフェイスを介して接続される機 器との間の印刷データ及ぴ画像データの送受信制御を行うことによって、 多種多 様な通信プロトコルと夫々異なる画像形成処理を行う複数のアプリケーションと を仲介する仲介処理部を有し、 通信プロトコル及ぴアプリケーションの追加を容 易とする画像形成処理装置を提供することである。
また、 本発明の課題は、 夫々異なる画像形成処理を行う複数のアプリケーショ ンを有し、 W e bサービスを提供するために必要な処理部を部品化し該複数のァ プリケーションにて共有できる構成とすることによって We bサービスを提供す るアプリケーションの開発及び ϋ¾Πを容易とする画像形成処3¾置を ^するこ とである。
更に、 本発明の課題は、 複数の We bサービスを提供する該画像形成装置と接 続される機器とで交換されるメッセージの記述形式に依存することなく、 W e b サービスとして機能可能なアプリケーションの開発を行うことができる画像形成 装置を することである。
また、 本発明の課題は、 複数の We bサービスを ^する該画像形成装置と接 続される機器とで交換されるメッセージの記述形式に依存することなく該複数の W e bサービスのプログラム開発を容易とする、 該記述形式と l¾We bサービス の開発プログラムで処理可能なデータ形式を変換するプログラムを自動生成する プログラムを提供することである。
これら目的は、 以下に説明する手段により解決される。
本発明によれば、 画像形成に関する処理を実行するアプリケーションと、 夫々 異なる通信プロトコルに従ってデータ送受信を行う複数の通信プロトコルデーモ ンと、 上記各通信プロトコルデーモンからの接続通知に応じて、 該通信プロトコ ルデーモンに代わって、 該通信プロトコルデーモンにて接続要求があったことを 上記アプリケーションへ通知することによって接続を仲介する接続要求仲介手段 とを有するように構成される。 また、 上記複数の通信プロトコルデーモンによつ て共有され、 受信データ及び送信データを格納し、 上記アプリケーションと該複 数の通信プロトコルデーモンとの間で該受信データ及び該送信データの受け渡し に使用される共有メモリとを有するように構成することができる。
このような画像形成装置では、 多種多様な通信プロトコルと画像形成に関する 処理を実行するアプリケーションとの接続を仲介する接続要求仲介手段 (要求仲 介デーモン 7) 及び共有メモリ (9 9 ) を用いてデータ送受信を制御するプロト コル制御デーモン 9が構成される。 そのため、 複数の通信プロトコルのインター フェイスと各アプリケーションとが互いを意識する必要がない。 従って、 このよ うな画像形成装置への通信プロトコル及びアプリケーションの追加を容易に行う ことができる。
本発明によれば、 メソッドに従った所定の処理を行う複数のメソッド処理手段 と、 処理要求に応じて、 該処理要求で指定される上記メソッドに対応する上記メ ソッド処理手段に該処理要求を振り分けることによって W e bサービスを実行す る We bサービス実行手段を有するように構成される。 また、 同一メソッドにお ける処理を共有し、 上記 W e bサービスとして画像形成に関する処理を行う複数 の W e bサービスアプリケーションを有するように構成することができる。 このような画像形成装置では、 メソッド毎に処理を部品化されるため、 メソッ ド特有の処理を、 複数の We bサービスアプリケーションによって共有すること ができる。
本発明によれば、 ネットワークを介して接続される機器からの要求メッセージ に基づいて処理を実行し、 その処¾結果を W e bサービスとして提供する W e b サービス処理手段と、 所定メッセージ交換プロトコルに従って受信した上記要求 メッセージを上記 We bサービス処理手段によって処理可能な処理要求に変換す ると共に、 ^W e bサービス処理手段から出力される上記処理結果を該メッセー ジ交換プロトコルに従った応答メッセージに変換する変換手段とを有するように 構成される。
このような画像形成装置では、 メッセージ交換プロトコルで規定される要求メ ッセージを We bサービス処理手段が処理可能な処理要求に変換し、 また、 We bサービス処理手段の処 結果をメッセージ交換プロトコルで規定される応答メ ッセージに変換するため、 このようなメッセージ交換プロトコルの知識を必要と せずに、 W e bサービス処理手段を開発することができる。
本発明によれば、 コンピュータに、 W e bサービスのインターフェイスを定義 するインターフェイス定義を解析し、 該インターフェイス定義を構成する複数の 要素間の関連を示す第一要素木を生成する要素木生成手順と、 上記第一要素木に 基づいて、 上記 W e bサービスを実行する W e 'bサービス機能によって処理可能 -な入出力データ形式と所 ¾|己述形式によつて記述される^ W e bサービスに関す る要求及び応答メッセージとの変換処理を行う変換プログラムを生成する変換プ ログラム生成手順と実行させるように構成される。
このようなプログラムをインストールしたコンピュータ装置では、 W e bサー ビスのインターフェイスを定義するインターフェイス定義 (例えば、 WS D L (
Web Service Description Language) )力ら、 W e bサービス機能の入出力デ" タ形式と所定記述形式 (例えば、 XML (extensible Markup Language) ) に よる要求及び応答メッセージとの変換を行うプログラム (例えば、 実施例におけ るハンドラ処理部) を生成することができる。 従って、 単純で同じようなコード を大量に生成することができるため、 開発者による単純ミスによるバグが入り込 むといった問題を解消することができる。 また、 短時間でプログラムを生成する ことができるため、 開発者の負担を軽減することができる。
図面の簡単な説明
図 1は、 本発明の一実施例に係る.多種の画像形成機能を融合する融合機の機能 構成を示すブロック図である。
図 2は、 図 1に示す融合機のハードウエア構成を示すプロック図である。
図 3は、 通信制御を行うプロセスとアプリケーシヨンとの仲介を行うプロセス による処理の全 «要を示す図である。
図 4は、 アプリケーションの登録を行う登録シーケンスを示す図である。
図 5は、 アプリケーション用パッファの登録を行うバッファ登録シーケンスを' 示す図である。 '
図 6は、 アプリケーションへリクエストを通知するリクエスト通知シーケンス を示す図である。 図 7は、 データ送受信シーケンスを示す図である。
図 8は、 アプリケーションのコネクションを終了するコネクション終了シーケ ンスを示す図である。
図 9は、 アプリの開発及ぴ追加を容易とする融合機の基本構成例を示す図であ る。
図 1 0は、 アプリの開発及び追加を容易とする融合機の第一構成例を示す図で ある。
図 1 1は、 図 1 0の第一構成例における処理フローを示す図である。
図 1 2は、 図 1 0の第一構成例における処理フローを示す図である。
図 1 3は、 シーケンス制御ライブラリのスレツド構成の例を示す図である。 図 1 4は、 シーケンス制御ライブラリのスレツド構成の例を示す図である。 図 1 5は、 アプリの開発及ぴ 口を容易とする融合機の第二構成例を示す図で める。
図 1 6は、 アプリの開発及び ϋ¾πを容易とする融合機の第三構成例を示す図で ある。
図 1 7は、 本発明の一実施例に係るハンドラ自動生成装置の機能構成を示すブ 口ック図である。
図 1 8は、 本発明の一実施例に係るハンドラ自動生成装置のハードウエア構成 を示すプロック図である。
図 1 9は、 ハンドラ自動生成処理の全体を説明するフローチャート図である。 図 2 0は、 タイプライブラリ生成処理を説明するフローチャート図である。 図 2 1は、 ソースコード生成処理における列挙型定義生成処理を説明する図で ある。
図 2 2は、 ソースコード生成処理における構造体の型定義生成処理を説明する 図である。
図 2 3は、 ソースコード生成処理における配列の型定義生成処理を説明する図 である。
図 2 4は、 ソースコード生成処理における列挙型の関数宣言処理を説明する図 である。 図 2 5は、 ソースコード生成処理における構造体の関数宣言処理を説明する図 である。
図 2 6は、 ソースコード生成処理における配列の関数宣言処理を説明する図で ある。
図 2 7は、 ハンドラ生成処理を説明するフローチャート図である。
図 2 8は、 ハンドラ生成処理を説明するフローチヤ ト図である。
図 2 9は、 WS D Lによるインターフェイス定義の記述例を示す図である。 ' 図 3 0は、 WS D Lによるインターフェイス定義の記述例を示す図である。
図 3 1は、 ハンドラ処理部の関数宣言を説明する図である。
図 3 2は、 W e bサービス機能の関数宣言を説明する図である。
.図 3 3は、 入カメッセージの構造体定義を説明する図である。
図 3 4は、 出カメッセージの構造体定義を説明する図である。
図 3 5は、 自動生成されたハンドラソースコードの例を示す図である。
図 3 6は、 W e bサービスを実現するための構成例を示す図である。
図 3 7は、 S OA Pによる We bサービスの提供処理について説明するフロー チャート図である。
図 3 8は、 S O A Pによる W e bサービスの提供処理にっレ、て説明するフロー チャート図である。
図 3 9は、 XMLを使用した S OA Pに従った HT T Pリクエストの記述例を 示す図である。
図 4 0は、 XMLプロセッサによって変換された要素木の例を示す図である。 図 4 1は、 印刷ハンドラによる要素木解析処理を説明するためのフローチヤ一 ト図である。
図 4 2は、 W e bサービス機能の関数の引数の設定例を示す図である。
図 4 3は、 印刷ハンドラでの処 S t果の設定例を示す図である。
図 4 4は、 印刷ハンドラによる要素木生成処理を説明するためのスローチヤ一 ト図である。
図 4 5は、 生成された要素木の例を示す図である。
図 4 6は、 要素木から変換された XMLを使用した S OA Pに従った HTT P レスポンスの記述例を示す図である。 発明を実施するための最良の形態
以下、 本発明の実施の形態を図面に基づいて説明する。
[第一実施例]
多種の画像形成機能を融合する本発明の第一実施例に係る画像形成装置 (以下、 融合機と言う) は、 例えば、 図 1に示すような機能構成を成す。 図 1は、 本発明 の 実施例に係る多種の画像形成機能を融合する融合機の機能構成を示すプロッ ク図である。
図 1において、融合機 1200は、プロッタ 1201と、スキャナ 1202と、 その他ハードウエアリソース 1203などを有するとともに、 プラットフオーム 1220とアプリケーション 1230とから構成されるソプトウエア群 1210 と、 融合機起動部 1240とを備えている。
融合機起動部 1240は、癒合機 1200の電源投入時に先ず始めに実行され、 プラットフオーム 1220やアプリケーション 1230を起動する。
プラットフオーム 1220は、 アプリケーション 1230からの処理要求を解 釈して、 ハードウエア資源の獲得要求を発生させる下記に示すコントロールサー ビス 1250と、 一または複数のハードウエア資源の管理をおこない、 コント口 ールサービス 12.50からの獲得要求を調停するシステムリソースマネージャー (SRM (System Resource Manager) 1223) と、 OS (Operating Syst em) 1221とを有する。
このコントロールサービス 1250は、 複数のサービスモジュールにより形成 され、 具体的には、 SCS (System Control Service) 1222と、 ECS ((E ngine Control Service) 1224と、 MCS (Memory Control Service) 122 5と、 O C S (Operation panel Control Service) 1226と、 FCS (FAX Control Service) 1227と、 NCS (Network Control Service) 1228と、 I MH (Imaging Memory Handler) 1229とがある。 なお、 このプラット フォーム 1220は、 あらかじめ定義された関数により前記アプリケーションか らの処理要求を受信可能とするアプリケーションプログラムインターフェースを 有する。
O S 1221は、 UN I X (登録商標) などの才ぺレーティング ·システムで あり、 プラットフオーム 1220並びにアプリケーション 1230の各ソフトウ エアをそれぞれプロセスとして並列実行する。 オープンソースの UN IX (登録 商標) を用いることにより、 プログラムの安全' I·生を確保できるとともに、 ネット ワーク対応可能となり、 ソースコードの入手も容易となる。 さらに、 OS、 TC P/I Pのロイャリティが不要であり、 アウトソーシングも容易となる。
SRM1223は、 SCS 1222とともにシステムの制御およびリソースの 管理をおこなうものであり、 スキャナやプロッタなどのエンジン部、 メモリ、 H DDファイル、 ホスト I/O (セント口 I/F、 ネットワーク I/F、 I EEE 1394 I/F、 RS 232C IZFなど) のハードウェア資源を利用する上位 層からの要求にしたがって調停をおこない、 実行制御する。
具体的には、 この SRM1223は、 要求されたハードウェア資源が利用可能 であるかどうか (他の要求により利用されていないかどう力 を判断し、 利用可 能であれば要求されたハードウエア資源が利用可能である旨を上位層に伝える。 また、 上位層からの要求に対してハードウエア資源の利用スケジューリングをお こない、 要求内容' (たとえば、 プリンタエンジンによる紙搬送と作像動作、 メモ リ確保、 ファイル生成など) を直接実施するようにしてもよレ、。
SCS 1222は、 アプリ管理 (機能 1)、 操作部制御 (機能 2)、 システム画 面表示 (ジョブリスト画面、 力ゥンタ表示画面など) (機能 3 )、 L E D表示 (機 能 4)、 リソース管理 (機能 5)、 割り込みアプリ制御 (機能 6) 等の複数の機能 を行う。 具体的には、 アプリ管理 (機能 1) では、 アプリの登録と、 その情報を 他のアプリに通知する処理をおこなう。 操作部制御 (機能 2) では、 アプリの操 作部使用権の排他制御をおこなう。 システム画面表示 (機能 3) では、 操作部使 用権を持つアプリからの要求内容に応じて、 エンジン部の状態に対応する警告画 面の表示をおこなう。 LED表示 (機能 4) では、 警告 LED、 アプリキーなど のシステム LEDの表示制御をおこなう。 リソース管理 (機能 5) では、 アプリ が EC Sを使ってジョブを実行するにあたって、 他しなければならないェンジ ンリソース (スキャナ、 ステープルなど) の排他制御のためのサービスをおこな う。 割り込みアプリ制御 (機能 6 ) では、 特定のアプリを優先動作させるための 制御及びサービスをおこなう。
E C S 1 2 2 4は、 プロッタ 1 2 0 1、 スキャナ 1 2 0 2、 その他ハードゥエ ァリソース 1 2 0 3などのエンジン部を制御するものであり、 画像読み込みと印 動作、 状態通知、 ジャムリカバリなどをおこなう。
MC S 1 2 2' 5は、 メモリ制御をおこなうものであり、 具体的には、 画像メモ リの取得おょぴ開放、 ハードディスク装置 (HDD) の利用、 画像データの圧縮 および伸張などをおこなう。
O C S 1 2 2 6は、 オペレータと本体制御間の情報伝達手段となる操作パネル を制御するモジュールであり、 オペレータのキー操作ィベントを本体制御に通知 する処理、 各アプリが GU Iを構築するためのライブラリ関数を提供する処理、 構築された GU I情報をアプリ別に管理する処理、 操作パネル上への表示反映処 理などをおこなう。
F C S 1 2 2 7は、 システムコントローラの各アプリ層から P S TN/ I S D N網を使ったファクシミリ送受信、 B KM (バックアップ S RAM) で管理され ている各種ファクシミリデータの登録/引用、 ファクシミリ読み取り、 ファクシ ミリ受信印刷、 融合送受信をおこなうための A P I (Application Program Int er ace) を提供する。
NC S 1 2 2 8は、 ネットワーク I /Oを必要とするアプリケーションに対し て共通に利用できるサービスを提供するためのモジュ一ノレ群であり、 ネ トヮー ク側から各プロトコルによって受ィ言したデータを各アプリケーションに捩り分け たり、 アプリケーションからデータをネットワーク側に送信する際の仲介をおこ なう。
本実施例において、 N C S 1 2 2 8は、複数のプロトコルのうち h t t p (Hy pertext Transfer Protocol) デーモンによって、 インターネットを介して接続さ れるネットワーク機器とのデータ通信を H T T P (Hypertext Transfer Protoco 1)で制御し、 HTT Pリクエストヘッダで指定される処理に必要な複数の W e b サービスを関数コールによって起動し、 その複数の W e bサービスによる処理結 果を HTT Pレスポンスで該ネットワーク^^へ通知する。 We bサービスは、 例えば、 XML (extensible Markup Language) によって記述されたメッセ一 ジに従って処理を行う。
IMH1229は、 イメージデータを仮想メモリ領域 (ユーザー仮想空間) か ら物理メモリへマップする。プロセスの起動に応じて、システムコールを行ない、 プロセス用の仮想メモリ領域をマップしたり、 マップした仮想メモリ領域をプロ セスの終了時に開放する処理等を行う。 · '
アプリケーション 1230は、ページ記述言語(PDL)、 PCLおよびポスト スクリプト (PS) を有するプリンタ用のアプリケ"シヨンであるプリンタァプ リ 1211と、 コピー用アプリケージヨンであるコピーアプリ 1212と、 ファ クシミリ用アプリケーションであるファックスアプリ 1213と、 スキャナ用ァ プリ'ケーシヨンであるスキャナアプリ 1214と、 ネットファイル用アプリケー シヨンであるネッ卜ファイルアプリ 1215と、 工程検査用アプリケーションで ある工程検査アプリ 1216と、 配信用アプリケ ションである配信アプリ 12 17と、 実行した処理結果を We bサービスとして する We bサービスァプ リ 1218とを有する。 各アプリケーション 1211〜1218は、 プラットフ オーム 1220上の各プロセスを利用して動作実行し得るため、 画面制御、 キー 操作制御おょぴジョブ生成などをおこなう画面表示制御プログラムがその主体と なる。 なお、 NCS 1228により接続されたネットワークを介して新たなアブ リケーシヨンをネットワーク経由で搭載することもできる。 また、 各アプリケー シヨンはアプリケーションごとに 卩または削除することができる。
ここで、 We bサービスアプリ 1218とは、 NCS 1228によって通知さ れる HTTPリクエスト対応する処理を実行するアプリケーションであって、 そ の処理結果は、 HTTPレスポンスとして NCS 1228によって HTTPリク エストを行ったネットワーク機器へ提供される。
このように、 融合機 1200は、 各アプリで共通的に必要となる処理をブラッ トフオーム 1220で一元的に処理する。
次に、 融合機 1200のハードウエア構成について説明する。 図 2は、 図 1に 示す融合機のハードウエア構成を示すプロック図である。 図 2に示すように、 こ の融合機 1200は、 オペレーションパネル 1310と、 FCU (ファックスコ ントロールユニット) 1320と、 プロッタ 1201、 スキャナ 1202及ぴそ の他ハードウェアで構成されるエンジン部 1350と、 コントローラ 1300の AS I C1301とを PC I (Peripheral Component Interconnect) ノ ス等で 接続した構成となる。 FCU1320は、 受信したファックスデータを格納する ための不揮努性メモリ 1321と、 FCU1320内での時間を計測するための RTC (Real Time Clock) 1322とを有し、 通常 G 3規格に従ってファック スデータの送受信を行う。 FCU1320は、 オプションとして更に G 3規格と G 4規格とを搭載しても良い。 '
コントローラ 1300は、 AS I C1301に MEM— C 1302、 HDD (H ard Disk Drive) 1303などを接続するとともに、 この AS I C1301と C PU1304とを CPUチップセットの NB 1305を介して接続している。 こ のように、 NB 1305を介して接続する理由は、 CPU1.304自体のインタ 一フェイスが公開されていないためである。
ここで、 この AS I C1301と NB 1305は、 単に PC Iを介して接続さ れているのではなく、 AGP 1308を介して接続されている。 このように AG P 1308を介して接続することとした理由は、 この融合機 1200がブラット フォーム 1220やアプリケーション 1230を形成する複数のプロセスを実行 ■ 制御する関係上、 これらを低速の PC Iで接続したのでは、 パフォーマンスが低 下するからである。
C PU 1304は、 融合機 1200の全体制御をおこなうものであり、 具体的 には、 OS 1221上でプラットフオーム 1220を形成する S C S 1222、 SRM1223、 ECS 1224, MCS 1225, OCS 1226、 FCS 1 227、NCS 1228をそれぞれプロセスとして起動して実行させるとともに、 アプリケーション 1230を形成するプリンタアプリ 1211、 コピーアプリ 1 212、 ファックスアプリ 1213、 スキャナアプリ 1214、 ネットフアイノレ アプリ 1215、 工程検查アプリ 1216、 配信アプリ 1217、 We bサービ スアプリ 1218を起動して実行させる。
NB 1305は、 CPU1304と MEM— P 1306、 SB 1307, AS I C 1301とを接続するためのプリッジであり、 MEM— P 1306は、 融合 機の描画用メモリなどとして用いるシステムメモリであり、 MEM— C 1302 は、 コピー用画像バッファ、 符号バッファとして用いるローカルメモリであり、 AS I C 1301は、 画像処理用のハードウエア要素を有する画像処理用途向け の I Cである。
NB 1305は、 PC Iパスを介して SB 1307と接続する他、 ネットヮー ク通信を制御する N I C (Network Interface Card) 1311と、 ノ、。 ソナル コンピュータと接続し大容量の画像データの送受信を可能とする U S B (Univer sal Serial Bus) 1312及び I EEE13941313と、パラレルケーブルによ つて接続可能なセントロニタス 1314と接続する。 SB1307は、 NB 13 05と ROM、 P C Iデバイス、 周辺デバイスとを接続するためのブリッジであ る。 SB 1307は、 コントローラ 1300での時間を計測する RTC (Real T ime Clock) 1323を有する。
HDD1310は、 画像データの蓄積、 プログラムの蓄積、 フォントデータの 蓄積、 フォームの蓄積を行うためのストレージであり、 オペレーションパネル 1 310は、 操作者からの入力操作の受け付け並びに操作者に向けた表示をおこな う操作部である。
したがって、 AS I C 1301には、 MEM—C 1302を接続するための R AMインターフェイスと、 HDD 1310を接続するためのハードディスクイン ターフェースが設けられ、 これらの記憶部に対して画像データの入出力をおこな う場合には、 入出力先が RAMインターフェイスまたはハードディスクインター フェースに切り替えられる。
AGP 1308は、 グラフィック処理を高速化するために提案されたグラフィ ックスァクセラレーターカード用のバスインターフェイスであり、 システムメモ リに高スループットで直接アクセスすることにより、 グラフィックスァクセラレ 一ターカードを高速にする。
次に、 アプリケーション 1230と NCS 1228間のデータ送受信制御につ いて説明する。
図 3は、 通信制御を行うプロセスとアプリケーシヨンとの仲介を行うプロセス による処理の全 ίΦ¾要を示す図である。 図 3中、 図 1に示す融合機 1200の機 能構成のうち主要な機能構成のみが図示され、 他の機能構成は省略される。 図 3 において、 融合機 1200は、 種々の画像形成処理を実行するアプリケーション 1230と、 種々の通信プロトコルを制御する複数の通信制御デーモンを有する NCS 1228と。 NCS 1228とアプリケーション 1230とのインターフ エイスを行う NAI 8とを有し、 ネットワーク 15に接続される。 NCS 122 8は、 デーモン 9とアプリケーション 1230との仲介をする要求仲介デーモン 7と、 種々の通信プロトコルデーモンによって構成されるプロ トコル制御デーモ. ン 9とを有する。 プロトコル制御デーモン 9は、 h t t pデーモン 2と、 i p デーモン 91と、 f t pデーモン 92と、 USBデーモン 93と、 I EEE1394 デーモン 94と、 セントロニ 'タスデーモン 95とを有する。
h t t pデーモン 2は、例えば、 HTTP (Hypertext Transfer Protocol) に 従った通信制御を行い、 ネットワークの設定、 機器の状態監視、 及び、 アプリと 連携して XMLによる β制御コマンドの送受信を行う。 i p pデーモン 91は、 HTTPベースの印刷プロトコルである I PP (Internet Printing Protocol)に よる印刷データの受信を制御する。 f t pデーモン 92は、 FTP (File Trans fer Protocol) によるサービスの提供を制御する。
USBデーモン 93は、 U S Bケーブルで直結される からの印刷データの 受信を制御する。 I EEE 139 デーモン 94は、 I EEE 1394専用ケーブルで 直結される機器からの印刷データの受信を制御する。 セントロニクスデーモン 9 5は、 パラレルケーブルで直結される βからの印刷データの受信を制御する。 図 3より、 アプリケーション 1230は、 ΝΑ 18を介して、 NCS 1228 の要求仲介デーモン 7にアプリ登録を行う (ステップ SO) 。 ネットワーク 15 を介して接続要求を受信をすると (ステップ S I) 、 NCS 1228のプロトコ ル制御デーモン 9は、 要求仲介デーモン 7へ通知する (ステップ S 2) 。 要求仲 介デーモン 7は、 NAI 8を介して、 アプリケーション 1230へ接続要求を通 知する (ステップ S 3) 。 アプリケーション 1230は、 NAI 8を介して、 プ ロトコル制御デーモン 9に接続を行う (ステップ S 4) 。 プロトコル制御デーモ ン 9は、 アプリケーション 1230からの接続によって、 ネットワーク 15を介 して、データの送受信をアプリケーション 1230との間で行う(ステップ S 5)。 上記より、 N C S 1 2 2 8は、 要求仲介デーモン 7とプロトコノ Vf U御デーモン 9の 2つのプロセスとによって通信を行う点において、 コントロールサービス 1 2 5 0の他のサービスと異なる。
N C S 1 2 2 8は、 大量のデータをプロセス間で通信する手段として共有メモ リを用いる。 共有メモリは、 複数の異なるプロセスからアクセスすることのでき るメモリ領域であり、 N e t B S D (登録商標) の備える標準機能である。 共有 メモリに対して、 複数のプロセスから排他的にアクセスするには、 データの読み 書きに関する情報を互いにやりとりする必要がある。
図 3示す処理の全«要において、 N C S 1 2 2 8とアプリケーション 1 2 3 0間で大量のデータを受け渡すためのシーケンスについて図 4力 ら図 8で詳細に 説明する。
図 4は、 アプリケーションの登録を行う登録シーケンスを示す図である。 図 4 において、 アプリケーション 1 2 3 0は、 要求仲介デーモン 7に問い合わせを行 い(ステップ S 1 0 1 )、要求仲介デーモン 7からサポー'トするサービスの通知を 受けると (ステップ S 1 0 2 )、アプリケーション 1 2 3 0が行うサービスの内容 を通知することによって要求仲介デーモン 7にアプリケーションの登録を行う (ステップ S 1 0 3 )。 例えば、 「データ受信サービス」 として、 アプリケーショ ン名、 スプール機能 「なし」、 及びジョブ機能 「なし」 等が登録される。
この登録によって、 要求仲介デーモン 7は、 プロトコル制御デーモン 9から接 続の通知を受けた際には、 どのアプリケーションとどの通信プロトコルデーモン との接続を仲介すべきかを知ることができる。
図 5は、 アプリケーション用バッファの登録を行うバッファ登録シーケンスを 示す図である。 図 5において、 アプリケーション 1 2 3 0は、 送受信バッファ獲 得処理を実行する。アプリケ一ション 1 2 3 0は、要求仲介デーモン 7に対して、 アプリケーション 1 2 3 0のための複数の送受信バッファの登録を行ない (ステ ップ S 1 1 1 )、更に、登録した送受信バッファをオープンし(ステップ S 1 1 2 )、 要求仲介デーモン 7から送受信バッファ管理情報を取得する(ステップ S 1 1 3 )。 このとき、 アプリケーション 1 2 3 0は、 自分専用に複数の送受信バッファを共 有メモリ内に確保する。 図 6は、 アプリケーションヘリクェストを通知するリクエスト通知シーケンス を示す図である。 図 6において、 プロトコノ 御デーモン 9は、 ネットワーク 1 · 5を介して接続を受信すると (ステップ S 11 ) 、 要求仲介デーモン 7へ接続通 知を行う (ステップ S 12) 。 プロトコ ^lj御デーモン 9からの接続通知に応じ て、 要求仲介デーモン 7は、 アプリケーシヨン 1230が登録した複数の送受信 バッファの一つを割り当てて、 プロトコル制御デーモン 9に通知する (ステップ S 13)0
更に、 要求仲介デーモン 7は、 アプリケーション 1230に対して接続通知を 行い、接続先を通知するステップ S 14)。 この接続通知に応じて、アプリケーシ ヨン 1230は、要求仲介デーモン 7に対して接続許可を行う(ステップ S 15)。 そして、アプリケ一ション 1230は、プロトコル制御デーモン 9と接続する (ス テツプ S 16)。アプリケーション 1230と接続されるプロトコル制御デーモン 9は、 図 3に示されるデーモン 2、 91〜 95のいずれかである。 更に、 アプリ ケーシヨン 1230は、 プロトコル制御デーモン 9に対して、 通知タイミングの 設定を行い(ステップ S 17)、接続先からのデータ受信を開始するよう要求する (ステップ S 18)。
図 7は、 データ送受信シーケンスを示す図である。 図 7において、 NCS 12 30のプロトコル制御デーモン 9は、 受信データを共有メモリ 99内の受信パッ ファ 97に書き込むと (ステップ S 21)、書き込みポインタを受信データ分移動 する (ステップ S 22)。 プロトコル制御デーモン 9は、アプリケーシヨン 123 0へ受信バッファへの書き込みを通知する(ステップ S 23)。この通知によって、 書き込みを開始した開始ボインタと書き込みを終了した終了ボインタとが通知さ れる。
プロトコル制御デーモン 9からの通知を受けて、アプリケーション 1230は、 受信データを共有メモリ 99から読み出し(ステップ S 24)、読み出しポインタ を受信データ分移動する (ステップ S 25)。 そして、アプリケーション 1230 は、 プロトコル制御 ーモン 9に受信バッファからの読み出しを通知する (ステ ップ S 26)。
アプリケーション 1230からネットワーク 15にデータ送信する場合につい て説明する。 アプリケーション 1 2 3 0は、 送信データを共有メモリ 9 9内の送 信用バッファ 9 8に書き込むと (ステップ S 2 7 )、書き込みポインタを送信デー タ分移動する (ステップ S 2 7—2 )。 アプリケーション 1 2 3 0は、 プロトコル 制御デーモン 9へ送信バッファへの書き込みを通知する (ステップ S 2 8 )。 この 通知によって、 書き込みを開始した開始ポインタと書き込みを終了した終了ボイ ンタとが通知される。
アプリケーション 1 2 3 0からの通知を受けて、プロトコル制御デーモン 9は、 送信データを共有メモリ 9 9から読み出して接続先へ送信し (ステップ S 2 9 )、 読み出しポイントを移動する (ステップ S 3 0 )。 そして、プロトコル制御デーモ ン 9は、アプリケーション 1 2· 3 0に送信パッファからの読み出しを通知する(ス · テツプ S 3 0— 2 )。
図 7において、 説明の便宜上、 受信データの書き込みの後に読み出しが行われ るように説明したが、 書き込みと読み出しが同時に行われても良い。 送信データ の書き込み及び読み出しについても同様である。
図 8は、 アプリケーションのコネクションを終了するコネクション終了シーケ ンスを示す図である。 図 8において、 プロトコゾ H 御デーモン 9は、 アプリケー シヨン 1 2 3 0に対して、 データ受 ί言が完了したことを通知する (ステップ S 3 1 ) 。 この通知は、 例えば、 ネットワーク上の接続が切断されたときに通知され る。 通知を受けたアプリケーション 1 2 3 0は、 切断状態である判断して、 プロ トコル制御デーモン 9に対してデータを受信したデーモンとの切断を要求する (ステップ S 3 2 ) 。 プロトコル制御デーモン 9は、 終了処理をおこない、 要求 仲介デーモン 7に終了を通知する (ステップ S 3 3 ) 。
上記より、 データの読み書きに関する情報をアプリケーシヨン 1 2 3 0とプロ トコル制御デーモン 9との間で互いにやりとりすることによって、 共有メモリ 9 9に対して、 複数のプロセスから排他的にアクセスすることが可能となる。
上記より、 本発明によれば、 融合機 1 2 0 0に、 多種多様なインターフェイス を介して接続される; βとの間の印刷データ及び画像データの送受信制御を行う ことによって、 多種多様な通信プロトコルと夫々異なる画像形成処理を行う複数 のアプリケーシヨンとの接続を仲介する要求仲介デーモン Ί及ぴ共有メモリを用 いてデータ送受信を制御するプロトコ 御デーモン 9が構成される。そのため、 複数の通信プロトコルのインターフェイスと各アプリケーションとが互いを意識 する必要がない。 従って、 このような融合機 1 2 0 0への通信プロトコル及ぴァ プリケーションの i ¾口を容易に行うことができる。
以上、 第一実施例にて説明してきたように、 本願発明によれば、 多種多様なィ ンターフェイス介して接続される βとの間の印刷データ及び画像データの送受 信制御を行うことによって、 多種多様な通信プロトコルと夫々異なる画像形成処 理を行う複数のアプリケーションとを仲介する仲介処理部が画像形成装置内に構 成されるため、 複数の通信プロトコルのインターフェイスと各アプリケーション とが互いを意識する必要がない。 従って、 本願発明に係る画像形成装置への通信 プロトコル及ぴアプリケーションの追加を容易とする。
本願発明において、 多種多様な通信プロトコルと画像形成に関する処理を寒行 するアプリケーションとの接続を仲介する接続要求仲介手段は、 上記アプリケー シヨンからの登録要求に応じて該アプリケーションを登録する登録手段と、 上記 アプリケーションから送受信バッファの登録要求に応じて、 該アプリケーション 専用に使用される受信用パッファ及び送信用パッファとを登録して使用可能状態 とするノ ッファ登録手段とを有するように構成することができる。
また、 上記接続要求仲介手段は、 上記各通信プロトコルデーモンからの接続通 知を受けると、 上記共有メモリ内に上記接続中にて使用される受信用バッファと 送信用バッファとを割り当てて、 上記通信プロトコルデーモンに通知する送受信 バッファ割当手段を有するように構成することができる。
更に、 アプリケーション 1 2 3 0は、 上記接続要求仲介手段から接練の通知を 受信すると、 .該接続要求仲介手段に接続許可を通知すると共に、 上記通信プロト コルデーモンに対して接続を行う接続処理手段と、 上記通信プロトコルデーモン へデータ受信の開始を要求するデータ受信開始要求手段とを有するように構成す ることができる。
また、 各通信プロトコルデーモンは、 上記通信プロトコルデーモンが受信デー タを上記送受信バッファ割当手段によって割り当てられた上記受信用バッファに 書き込んで、 書き込み開始位置をデータ長分移動する受信データ書込手段と、 上 記アプリケーションに、 上記受信用バッファへ上記受信データを書き込んだこと を通知すると共に、 該受信データの書き込み開始位置と書き込み終了位置とを指 定する書き込み通知を行う受信書込通知手段とを有するように構成することがで きる。 ,
更に、 アプリケーシヨン 1 2 3 0は、 上記通信プロトコルデーモンから上記受 信データの書き込み通知を受信すると、 該書き込み通知で指定される上記書き込 み開始位置から上記書き込み終了位置まで上記受信用バッファから上記受信デー タを読み出して、 読み出し開始位置を該書き込み終了位置まで移動する受信デー タ読込手段と、 上記通信プロトコルデーモンに、 上記受信用バッファから上記受 信データを読み出したことを通知する受信読出通知手段とを有するように構成す
-ることができる。
また、 アプリケーション 1 2 3 0は、 上記パッフケ登録手段によって登録され た上記送信用バッファへ送信データを書き込んで、 書き込み開始位置をデータ長 分移動する送信データ書き込み手段と、 上記通信プロトコルデーモンに、 上記送 信用バッファへ上記送信データを書き込んだことを通知すると共に、 該送信デー タの書き込み開始位置と書き込み終了位置とを指定する書き込み通知を行う送信 書込通知手段とを有するように構成することができる。
. 更に、 上記各通信プロトコルデーモンは、 上記アプリケーションから上記送信 データの書き込み通知を受信すると、 該書き込み通知で指定される上記書き込み 開始位置から上記書き込み終了位置まで上記送信用バッファ力 ら上記送信データ を読み出して、 上記アプリケーションと接続した上記通信プロトコルデ モンに 該送信データを送信させる送信データ読出手段と、 上記読み出し開始位置を上記 書き込み終了位置まで移動する読出開始位置移動手段と、 上記アプリケーション に、 上記送信用バッファから上記送信データを読み出したことを通知する送信読 出通知手段とを有するように構成することができる。
[第二実施例]
第二実施例において、 融合機 1 2 0 0の機能構成及びハードウェア構成は、 第 一実施例における機能構成及びハードウエア構成と同様であるため、 その説明を 省略する。 上記第一実施例における機能構成及ぴハードウェア構成に加えて、 更に、 NC S 1228とアプリケーション 1230との間で行われるデータ送受信に関する 処理をシーケンス制御ライブラリとして共通化すると共に、 We bサービス機能 を実現する際には同様のいくつもの処理が行なわれるため、 これら同様の処理を 部品化して共通化する方法が考えられる。
以下に、 シーケンス制御ライブラリとして共通ィヒした場合の基本構成について 図囪 9で説明する。 図 9は、 アプリの開発及び を容易とする融合機の基本構 成例を示す図である。 図 9中、 図 1に示す融合機 1200の機能構成のうち主要 な機能構成のみが図示され、 他の機能構成は省略される。 図 9において、 アプリ ケーシヨン 1230と NCS 1228とは、 中間層としてのシーケンス制御ライ ブラリ 100を介して、受信データ及ぴ送信データの受け渡しを行う。ここでは、 HTTPデーモン 2によつて通信制御される場合につ!/、て説明する。 他デーモン による通信制御の場合においても同様に、 シーケンス制御ライブラリ 100が行 アプリケーション 1230は、 データの送信方法を指定するメソッド毎に処理 部を有し、 例えば、 P O S Τメソッドによる処理を行う POSTメソッド処理部 103と、 GETメソッドによる処理を行う GETメソッド処理部 104と、 P O S Tメソッド及び G E Tメソッド以外のメソッドの処理を行うその他メソッド 処理部 199とを有する。 各処理部 103、 104及び 199では、 メソッドに 特有の^ f処理を行うと共に、 処理要求に従った処理を実行し、 その処理結果を W e bサービスとして提供する。
シーケンス制御ライブラリ 100は、 HTTPに従った接続を管理する HTT P接続管理部 101と、 HTTPに従つてデータの送受信を行うことによってサ 一ビスを実行する HTTPサービス実行部 102とを有する。
H T T Pサービス実行部 102は、 H T T Pサービスの要求毎に接続が確立さ れるため、 複数の HTTPサービス実行部 102がスレッド (又はプロセス) と して生成される。 HTTPサービス実行部 102は、 HTTPヘッダで指定され るデータの送信方法を指定するメソッドに従つて G E Tメソッド処理部 104、 P O S Tメソッド処理部 103、 その他メソッド処理部 199とに処理を振り分 ける。
NCS 1228は、 ネットワーク 15を介してデータ送受信を HTTPに従つ て通信制御する HTTPデーモン 2と、 HTTPデーモン 2からの接続及び切断 の通知を受けると、 HTTP接続管理部 101との間で接続及び切断の処理を行 う要求仲介デーモン 7とを有する。
HTTP接続管理部 101は、 要求仲介デーモン 7から最初の接続通知を受け • ると、 共有メモリ 99の初期化を行い、 可能な接続数分の受信バッファ 97及び 送信バッファ 98を登録し、 データ送受信可能な状態どする。 また、 この初期化 によって、 複数の接続要求を受付けることができ、 接続毎に HTTPサービス実 行部 1.02がスレツドとして生成され、 接続毎に HTT Pサービスの ^^を可能 とする。 .
例えば、 HT T Pデーモン 2が同時に受けることのできる接続要求の最大数が 3であるとすると、 予め 3つのスレッドを常駐させておぐことで、 処理性能を向 上させることができる。 一方、 接続毎に 1つのスレッドを生成し、 処理が終了し た時点で終了させることも可能である。
アプリケーション 1230の各処理部 103、 104及び 199は、 HTTP デーモン 2及ぴ要求仲介デーモン 7と直接データのやり取りを行うのではなく、 HTTPサービス実行部 102から処理要求を受けて、 処理結果を共有バッファ 99を介して HTTPサービス実行部 102に通知する。
各処理部 103、 104及び 199は、 例えば、 HT T Pサービス実行部 10 2からの処理要求を受信後に、処理の対象となる印刷データ(MB単位のデータ) を共有バッファ 99から読み込み、 処理要求に応じた処理を印刷データに行った 処理結果を共有バッファ 99に書き込んで、 We bサービスとして HTTPサー ビス実行部 102を介して処理要求元に提供する。 処理結果は、 例えば、 その印 刷データに対して画像形成処理を行うことによって生成される画像データ (MB 単位のデータ)、或いは、画像形成処理に関するステータスを示すステータス情報 等である。
つまり、 アプリケーション 1230の各処理部 103、 104及ぴ 199は、 H T T Pサービス実行部 102によつて処理要求が振り分け可能な処理部であれ ば良い。
また、 同様に、 種々のアプリケーションの !]、 つまり、 メソッドに対応する 処理部の融合機 1200への をも容易に行うことができる。
図 9では、 We bサービスを提供するためのメソッド毎に処理部を容易に追加 することができる基本構成例について説明した。 し力し、 このようなメソッド毎 の処理部では; 同じメソッドであるが異なる We bサービスを提供する場合、 W e bサービスを行うための実際の処理を実行する前に必要となるメソッドに特有 の処理を We bサービス毎に備える必要がある。 メソッドに特有の処理を共通ィ匕 することが考えられる。
上記 N CS 1228とアプリケーシヨン 1230との間で行われるデータ送受 信に関する処理をシーケンス制御ライブラリとして共通化すると共に、 メソッド に特有の処理を共通ィ匕した場合の構成について図 10で説明する。 また、 その処 理フローについて図 11及び図 12で詳述する。
図 10は、 アプリの開発及び ϋ¾卩を容易とする融合機の第一構成例を示す図で ある。 図 10中、 図 1に示す融合機 1200の機能構成のうち主要な機能構成の みが図示され、 他の機能構成は省略される。 図 10中、 図 9と同様の処理部には 同一の符号を付しその説明を省略する。
図 9に示す基本構成例との違いは、 アプリケーション 1230の POSTメソ ッド処理部 103において、 We bサービスアプリ 1218— 1と We bサービ スアプリ 1218— 2とが、 POSTメソッドに特有の XMLによるメッセージ の解析及び XMLによるメッセージの生成を行う XML処理部 103— 2と、 X MLの解析及び生成に必要な部品を有する XML解析部 103— 3とを共有化し た構成となっている点である。
HTT Pサービス実行部 102から P O S Tメソッド処理部 103に処理が振 り分けられると、 POSTメソッド処理部 103は、 処理要求が XMLメッセ一 ジにて記述されている場合、 一様に、 XML処理部 103— 2に XMLメッセ一 ジの解析を行わせ、 実際に W e bサービスとして要求に応じた処理を行う W e b サービスアプリ 1218—1及び 1218— 2からの応答を XML処理部 103 —2によって XMLメッセージとして記述させる。 XML処理部 103— 2は、 必要に応じて XML解析部 103-3を実行し、 XM.Lメッセージの解析及び生 成を行う。
このような第一構成例では、 各 We bサービスアプリ 1218— 1及び 121 8-2は XMLメッセージの解析及び生成を行う必要がないため、 開発者は、 P O S Tメソッドによって W e bサービスを実際に行う処理部分のみを開発すれば 良いため、 新たな We bサービスアプリの融合機 1200への追加を容易に行う ことができる。
図 10に示す第 構成例において、 We bサービスとして We bサービスァプ リ 1218が実行され、 その処理結果が HTTPデーモン 2に通知されるまでの 処理フローについて図 11及び図 12にて説明する。 図 11及ぴ図 12は、 図 1 0の第一構成例における処理フローを示す図である。 図 1.1において、 要求仲介 デーモン 7が HTTP接続管理部 101に接続を通知すると (ステップ S 40)、 11丁丁?接続管理部101は、 接続通知キュー 105にその通知を追加する (ス テツプ S 41)。 HTTPサービス実行部 102は、 HTTP接続管理部 101に 対して接続の取得を要求する (ステップ S 42 )。 HTTP接続管理部 101は、 その要求に応じて、 接続通知キュー 105に対して通知の取得を要求し (ステツ プ S43)、 接続通知キュー 105から接続通知を取得する (ステップ S 44)。
HTTP接続管理部 101は、 接続通知キュー 105から取得した接続通知に 基づいて、 HTTPデーモン 2との接続を行う。 また、 HTTP接続管理部 10 1は、接続管理情報を生成して接続処理部 89に保存する (ステップ S46)。接 続処理部 89は、 HTTPサービス実行部 102で行われる処理の一部である。 一方、 HTTP接続管理部 101からの接続に応じて、 HTTPデーモン 2は、 接続処理部 89に HTTPヘッダ情報を保存する (ステップ S 47)。
HTTP接続管理部 101は、 HTTPサービス実行部 102に対して接続管 理情報を通知し(ステップ S 48 )、 H T T Pサービス実行部 102は、接続管理 情報が POSTメソッドを指定している場合、 POSTメソッド処理部 103に 対して処理の依頼を行う (ステップ S 49)。 POSTメソッド処理部 103は、 Con t e n t— Typ eとして t e x t/xm 1が指定されている:^、 XM Lメッセージの解析を行うため XML処理部 103— 2に対して処理を依頼する (ステップ S 50)。
XML処理部 103— 2は、 接続処理部 89に対してデータの読み込みを要求 する (ステップ S 51)。 HTTPデーモン 2は、受信バッファ 97へ受信データ を書き込んだことを接続処理部 89に通知する(ステップ S 52)。接続処理部 8 9は、 受信データを XML処理部 10 S— 2に通知する (ステップ S 53)。
XML処理部 103 2は、 受信データのうち XMLメッセージの部分を XM L解析部 103— 3に対して解析を依頼する (ステップ S 54)。そして、 XML 処理部 103— 2は、 XML解析部 103— 3に対して結果の取得を要求すると、 XML解析部 1.0.3— ;3は、 XMLメッセージの構文を解析した結果として要素 木を XML処理部 103— 2に通知する (ステップ S 56)。
^ML処理部 103— 2は、 XML角 部 103— 3から通知された要素木に よって処理を We bサービスアプリ 1218に依頼する- (ステップ S 57)。依頼 に応じて We bサービスアプリ 1218は、 処理を実行し、 その処理結果を要素 木によって XML処理部 103— 2に通知する (ステップ S 58)。
XML処理部 103— 2は、 通知された要素木に基づいて、 We bサービスァ プリ 1218による処理結果を接続管理部 87に XMLで書き出すことによって XMLメッセージを生成する (ステップ S 59)。 そして、接続処理部 89は、 X MLメッセージを送信バッファ 98へ書き込んで、 HTTPデーモン 2へ送信パ ッファ 98への書き込みを通知する (ステップ S 60)。
また、 XM L処理部 103— 2は、終了通知を接続処理部 89に対して行う(ス テツプ S 61)。その終了通知に応じて、接続処理部 89は、 HTTPデーモン 2 との接続の切断を行う (ステップ S 62)。更に、 XML.処理部 103— 2は、接 続処理部 89に処理終了を通知する (ステップ S 63 )、接続処理部 89は、 HT TPサービス実行部 102に処理終了を通知する (ステップ S 64)。そして、 H T T Pサービス実行部 102は、 処理が終了したことを H T T P接続管理部 10 1に対して通知する (ステップ S 65)。
上記処理フローにおいて、 We bサービスアプリ 1218は、 ステップ S 57 及ぴ S 58にて XML処理部 103-2のみとで相互の処理が行われるだけであ る。 このように、 シーケンス制御ライブラリ 100と、 アプリケーション 123 0の POSTメソッド処理部 103内の XML処理部 103— 2及ぴ XML解析 部 103— 3等による部品化され共有ィ匕された処理部によって、 新たな POST メソッドによる We bサービスアプリの開発を容易とすることができる。
更に、 共有メモリ 99を用いた送受信データのやり取りを実現するシーケンス 制御ライブラリで生成きれるスレツドの構成について図 13及ぴ図 14で説明す る。 図 13及び図 14は、 'シーケンス制御ライブラリのスレツド構成の例を示す 図である。 .
図 13において、 融合機 1.200が起動すると生成される初期化スレヅド 19 1は、仲介デーモン用クライアントスレツド 192を生成する(ステップ S 61)。 仲介デーモン用クライアントスレッド 192は、 HTTP接続管理部 101の処 理単位であって、 HTT-P接続管理部 101として機能する。 そして、 初期化ス レッド 1.91.は、 要求仲介デーモン 7にアプリケーションを登録する (ステツプ S 62)。更に、初期化スレツド 191は、 HTTPサービス実行スレツド 193 を少なくとも 1つ以上を生成する (ステップ S 63)。 HTTPサービス実行スレ ッド 193は、 HTTPサービス実行部 102の処理単位であって、 HTTPサ 一ビス実行部 102として機能する。
仲介デーモン用クライアントスレッド 192は、 要求仲介デーモン 7から接続 通知を受けると(ステップ S 64)、接続通知キュー 105に接続通知を追加して、 HTTPサービス実行スレツド 193の 1つに接続を通知する(ステップ S 65)。 接続通知を受けた HTTPサービス実行スレッド 193は、 HTTPデーモン用 クライアントスレツド 194を生成する (ステップ S 66)。 HTTPサービス実 行スレッド 193は、 HTTPデーモン 2と接続する (ステップ S 67)。
要求仲介デーモン 7は、 HTT Pデーモン用クライアントスレッド 194に対 して受信バッファ 97に受信データを書き込んだことを通知する (ステップ S 6 8)。そして、 HTTPデーモン用クライアントスレツド 194は、 HTTPサー ビス実行スレツド 193に受信データが書き込まれたことを通知する (ステップ S 69)。 HTTPサービス実行スレツド 193は、要求仲介デーモン 7が書き込 んだ受信データを受信バッファ 97から読み出す (ステップ S 70)。
H T T Pサービス実行スレッド 193は、 送信データを送信パッファ 98へ書 き込んで、 送信バッファへの書き込み通知を要求仲介デーモン 7へ通知する (ス テツプ S 7 Do要求仲介デーモン 7は、送信バッファ 98から送信データを取り 出す (ステップ S 72)。 HTTPサービス実行スレツド 193は、要求仲介デー モン 7との接続を切断する (ステップ S 73)。
シーケンス制御ライブラリ' 100におけるスレツドの処理によって、 共有メモ リ 99を使用することによる大量のデータのアクセスを可能とすると共に、 ァプ リケーシヨン.1230に実装された We bサービス機能を実際に行う We bサー ビスアプリ 1218から切り離した処理として実現することができる。 図 10に 示される GETメソッド処理部 104及ぴその他メソッド処理部 199での実際 に We bサービス機能を行う We bサービスアプリについても同様である。 よつ て、 W e bサービス機能の.開発者は、 NCS 1228とアプリケーシヨン 12.3 0との間で行われるデータ送受信に関する処理フローについての知識を必要とす ることなく、 We bサービス機能の開発を行うことができる。
図 10に示す第一構成例では、 POSTメソッドにて XMLメッセージによつ て処理の依頼及び応答を行う場合について説明したが、 POSTメソッドには、 コンテントタイプに応じた様々な処理形態がある。 そのような POSTメソッド における処理形態毎に共通ィ匕した ¾^について図 15で説明する。 図 15は、 ァ プリの開発及び追加を容易とする融合機の第二構成例を示す図である。図 15中、 図 10と同様の処理部には同一の符号を付し、 その説明を省略する。
図 15において、 POSTメソッド処理部 103は、 図 10に示される処理部 103— 2及び 103— 3と 1218— 1から 1218— 2に相当する処理部 1 03— 2及び 103— 3と 1218— 4に加えて、 共通化される処理部として、 コンテンッタイプに基づいて処理を分配するコンテントタイプ分配処理部 113 ー1と、 コンテンツタイプに FORMが指定された処理要求を解析する FORM データ^?部 113— 2と、 コンテンツタイプにマルチパートが指定された処理 要求 解析するマルチパート解析部 113— 4とを有し、 W e bサービスの を行う処理部として、 FORMで設定されたデータを実際に処理する We bサー ビスアプリ 1218— 3と、 マルチパートによって指定されるデータファイルを 実際にアップロードするための処理を行う We bサービスアプリ 1218— 5と を有する。
コンテンツタイプ分配処理部 113— 1は、 コンテンツタイプに 「application /x-www-form-urlencodedjが指定されている場合、 FORMデータ解析部 113 一 2に処理要求を分配し、 コンテンツタイプに 「nmltipart/form-data」 が指定さ れている場合、 マルチパート解析部 113— 4に処理要求を分配し、 コンテンッ タイプに 「text/xmlj が指定されている場合、 XML処理部 103— 2に処理要 求を分配する。
処理要求を分配されると、 F ORMデータ解析部 113— 2、 マルチパート解 ' 析部 113— 4及ぴ XML処理部' 103-2は、夫々処理の解析処理を行った後、 処理要求に対応する We bサービスアプリ 1218— 3、 1218— 5、 121 8— 4に対して処理を行わせる。 - このように、 ΡΌ S Tメソッドで扱われるコンテンツタイプに応じた所定の解 析処理を共有化することによって、 開発者は、 コンテンツタイプに応じた所定の 解析処理に関する知識を必要とすることなく、 新たな We bサービスアプリ 12 18の開発を行うことができ、 また、 融合機 1200への新たな We bサービス アプリ 1218の追加を容易に行うことができる。
次に、 G E Tメソッド処理部 104におレ、て、 G E Tメソッドに特有な処理を 共有化する構成について図 16で説明する。 囱 16は、 アプリの開発及び追加を 容易とする融合機の第三構成例を示す図である。 図 16中、 図 9と同様の処理部 には同一の符号を付し、 その説明を省略する。
図 16において、 GETメソッド処理部 104は、共通化される処理部として、 We bサービスを特定する URL (Uniform resource Locator)に基づいて処理 要求を分配する UR L分配処理部 104— 1を有し、 We bサービスの提供を行 う処理部として、 URLに対応する複数の We bサービスアプリ 1218— 6か ら 1218— 8を有する。
このように、 G E Tメソッドで扱われる U R Lの所定の解析処理を共有化する ことによって、 開発者は、 URLの所定の解析処理に関する知織を必要とするこ となく、 新たな We bサービスアプリ 1218の開発を行うことができ、 また、 融合機 1200への新たな We bサービスアプリ 1218の i ¾を容易に行うこ とができる。
また、 融合機 1 2 0 0が図 1 5に示す P O S Tメソッド処理部 1 0 3と、 図 1 6に示す G E Tメソッド処理部 1 0 4とを有するように構成されることによって、 P O S Tメソッド及ぴ G E Tメソッドのレ、ずれにぉレヽても、 W e bサービスァプ リ 1 2 1 8の開発及ぴ追加を容易に行うことができる。
本発明によれば、 融合機 1 2 0 0が W e bサービスを提供するために必要な処 -理部を部品化し複数のアプリケーションにて共有できる構成とすることができる。 したがって、 W e bサービスの提供に必要な同じような機能をまとめて部品化さ れ、 実装されるアプリケーションによってそれら部品化された機能 (処理部) を 再利用することができるため、 アプリケーションの開発及び融合機 1 2 0 0への 該アプリケーションの追加を容易に行える。
以上、 第二実施例にて説明してきたように、 本願発明によれば、 W e bサービ スを提供するために必要な処理部を部品化し複数のアプリケーションにて共有で きる構成であるため、 W e bサービスを提供するアプリケーションの開発を容易 とする画像形成装置を提供することができる。
本発明において、 上記接続管理情報を生成し接続処理を行う接続処理手段は、 上記処理要求が振り分けられた上記メソッド処理部から処理通知を受信すると、 上記 W e b通信プロトコルデーモンとの接続を切断するように構成することがで きる。
また、 上記接続処理手段は、 上記 W e bサービス実行手段に上記処理要求に応 じた処理を終了したことを通知し、 上記 W e bサービス実行手段は、 上記 W e b 接続管理手段に上記処理の終了を通知するように構成することができる。
更に、 コンピュータに、 メソッドに従った所定の処理を行う複数のメソッド処 理手順と、 処理要求に応じて、 該処理要求で指定される上記メソッドに対応する 上記メソッド処理手順に該処理要求を振り分けることによって W e bサービスを 実行する W e bサービス実行手順とを実行させるためのプログラムとすることが できる。
[第三実施例]
本発明の一実施例に係るハンドラ自動生成装置は、 図 1 7に示すような機能構 成を有する。 図 1 7は、 本発明の一実施例に係るハンドラ自動生成装置の機能構 成を示すブロック図である。 図 1 7において、 ハンドラ自動生成装置 500は、 コンピュータ装置であって、 メッセージのデータ形式と We bサービス機能にお けるプロダラム言語にて処理可能なデータ形式との違レ、を吸収するプログラムを 5 生成するハンドラ自動生成部 5 10と、 WSDL (Web Service Description L anguage) によるインターフェイス定義 521と、 ハンドラを実行するために必 要なソースコード 531とを記憶するための記憶媒体 (例えば、 ハードディスク ドライブ (HDD)) 有する。
ハンドラ自動生成部 510は、 WSDL (Web Service Description Langua L0 ge) によるインターフェイス定義 521を入力し、 XML (extensible Markup Language) で記述された要求メッセージの構文を解析して要素木を生成して、 要素木に基づいて We bサービス機能 (WSF) を関数コールするための引数を' 設定すると共に、 We bサービス機能からの戻り値を含む XMLによる応答メッ セージを記述するための要素木を生成するハンドラ処理部のソースコードを生成 L5 して出力する処理部である。
ハンドラ自動生成部 510は、 ]^1^解析部51 1と、 タイプライブラリ生成 部 51 2と、 ハンドラソースコード生成部 51 3と、 XMLスキーマ解析部 51 4と、 タイプ要素解析部 51 5と、 メッセージ要素解析部 5 16と、 操作要素解 析部 5 17と、インターフェイス定義 521を入力するファイル入力部 520と、 20 ソースコード 53 1を出力するファイル出力部 530とを有する。
インターフェイス定義 521は、 どういうインターフェイスで 1つの We bサ 一ビスを提供するかを定義し、 WSDLによるインターフェイス定義ファイル 5 . 22と、 インターフェイス定義ファイル 522からのインポートによって取り込 まれる型定義ファイル 523とで構成される。 インターフェイス定義ファイル 5 5 22にてインポートによって型定義ファイル 523が取り込まれない場合は、 型 定義フアイノレ 523が存在しない。
ソースコード 531は、 例えば、 C言語のソースコードであって、 ハンドラ処 理部のヘッダファイルとプログラムファイルとで構成されるハンドラソースコー. ド 532と、 ハンドラソースコード 532から参照されるタイプライブラリ 53 3とで構成される。 タイプライブラリ 533は、 ヘッダファイルとプログラムフ アイルとで構成され.る。
フアイノレ入力部 520は、 利用者によって指定されたインターフェイス定義 5 21をハンドラ自動生成部 510に入力し(ステップ S 81)、 XML解析部 51 1に通知する (ステップ S 82)。 XML解析部 511は、 ファイル入力部 520 力 ら受け取ったインターフェイス定義 521に基づいて、 XMLの構文を解析し て要素木を生成する。 そして、 ^1 解析部511は、 その要素木をタイプ要素 解析部 515に通知し(ステップ S 83— 1 )、またメッセージ要素解析部 516 に通知し(ステップ S 83-2),更に操作要素解析部 517に通知する (ステツ プ S83— 3)。
タイプ要素解析部 515は、タイプライブラリを生成するために要素木内の ty pes要素を解析する処理部であって、 要素木を解析して型定義を示す types要素'' を検出し、 XMLスキーマ解析部 514に検出した types要素を解析させる (ス テツプ S 84—1)。そして、 タイプ要素解析部 515は、 XMLスキーマ解析部 514による解析結果をタイプライブラリ生成部 512に通知する (ステップ S 85— 1)。
メッセージ要素解析部 516は、 ハンドラソースコードを生成するために要素 木内の message要素を解析する処理部であって、その解析結果をハンドラソース コード生成部 513に通知する(ステップ S 85— 2)。操作要素解析部 517は、 ハンドラソースコードを生成するために要素木内の operation要素を解析する処 理部であって、その解析結果をハンドラ'ソースコード生成部 513に通知する(ス テツプ S 85— 3)。
タイプライブラリ生成部 512は、 タイプ要素解析部 515から通知された解 析結果に基づいてタイプライブラリを生成する処理部であって、 生成されたタイ プライブラリはファイル出力部 530へ通知される(ステップ S 86— 1)。ハン ドラソースコード生成部 513は、 メッセージ要素解析部 516及ぴ操作要素解 析部 517から通知された解析結果に基づいて、 ソースコードを生成してフアイ ル出力部に通知する (ステップ S 86— 2)。 ファイル出力部 530は ハンドラ ソースコード生成部 513から通知されたソースコードをハンドラソースコード 651
31
532として、 また、 タイプライブラリ生成部 512から通知されたタイプライ ブラリをタイプライブラリ 533として、 ソースコード 531を出力する (ステ ップ S 87)。
このように、 ハンドラ自動生成装置 500は、 We bサービスを定義するイン ターフェイス定義 521の入力によって、 自動的にハンドラ処理部のソースコー ド 531を出力することができる。
このようなハンドラ自動生成装置 500は、 図 18に示すようなハードウェア 構成を有する。 図 18は、 本発明の一実施例に係るパンドラ自動生成装置のハー Kゥェァ構成を示すプロック図である。
図 18において、 ハンドラ自動生成装置 500は、 コンピュータによって制御 されハンドラ自動生成部 510を実行する装置であって、 CPU (中央処理装置) 551と、 メモリュニット 552と、 表示ュニット 553と、 入力ユエット 55 4と、 記憶装置 556と、 ドライパ、 557とで構成され、 システムバス Bに接続 される。
CPU551は、 メモリユニット 552に格納されたプログラムに従ってハン ドラ自動生成装置 500を制御する。 メモリュ-ット 552は、 RAM及ぴ R O M等にて構成され、 CPU551にて実行されるプログラム、 CPU551での 処理に必要な —タ、 C PU 551での処理にて得られたデータ等を格納する。 また、 メモリユニット 552の一部の領域が、 CPU551での処理に利用され るワークエリアとして割り付けられている。
表示ュニット 553は、 CPU551の制御のもとに必要な各種情報を表示す る。 入力ユニット 554は、 マウス、 キーボード等を有し、 利用者がハンドラ自 動生成装置 500が処理を行なうための必要な各種情報を入力するために用いら れる。 記憶装置 556は、 例えば、 ハードディスクユニットにて構成され、 図 1 7に示すインターフェイス定義 521及びソースコード 531、 ハンドラ処理部 を生成するために必要なデータ等を格納する。
ハンドラ自動生成装置 500においてハンドラ自動生成部 510によって行わ れる自動生成処理を実現するプログラムは、 例えば、 C D— R OM等の記憶媒体 558によってハンドラ自動生成装置 500に提洪される。 即ち、 プログラムが 保存された記憶媒体 5 5 8がドライバ 5 5 7にセットされると、 ドライノ 5 5 7 が記憶媒体 5 5 8からプログラムを読み出し、 その読み出されたプログラムがシ ステムバス Bを介して記憶装置 5 5 6にインストールされる。 そして、 プログラ ムが起動されると、 記憶装置 5 5 6にインストールされたプログラムに従って C P U 5 5 1がその処理を開合する。 尚、 プログラムを格納する媒体として C D— R OMに限定するものではなく、 コンピュータが読み取 可能な媒体であればよ い。 ■
'パンドラ自動生成部 5 1 0によって実行されるハンドラ自動生成処理の全体に ついて説明する。 図 1 9は、 ハンドラ自動生成処理の全体を説明するフローチヤ ート図である。 図 1 9において、 フアイノレ入力部 5 2 0によってインターフェイ ス定義ファイル 5 2 1を読み込み(ステップ S 5 0 1 )、. XML解析部 5 1 1が X MLによる記述を解析し要素木を生成する (ステップ S 5 0 2 )。
ハンドラ自動生成部 5 1 0は、 解析が成功した力否かを判断する (ステップ S 5 0 3 )。解析が失敗した場贪、エラーを表示ュニット 5 5 3に表示し (ステップ S 5 0 4 )、 ハンドラ生成処理を終了する。解析が成功した場合、 タイプライブラ リ生成部 5 1 2によってタイプライブラリが生成される (ステップ S 5 0 5 )。ま た、 ハンドラソースコード生成部 5 1 3によって、 ハンドラソースコードが生成 され (ステップ S 5 0 6 )、 ハンドラ生成処理を終了する。
タイプライブラリ生成部 5 1 2によるタイプライブラリ生成処理 (ステップ S 5 0 5 ) について詳述する。 図 2 0は、 タイプライブラリ生成処理を説明するフ ローチャート図である。 図 2 0において、 タイプ要素解析部 5 1 5は、 XML解 祈部 5 1 1から通知された要素木から types要素を探す (ステップ S 5 1 1 )。 タイプ要素解析部 5 1 5は、 types要素が見つかったカゝ否かを判断する (ステ ップ S 5 1 2 )。 具つからなかった場合、 タイプライブラリ生成処理を終了する。 一方、見つかった場合、空要素である力否かを判断する (ステップ S 5 1 3 )。 空 の要素である場合、 タイプライブラリ生成処理を終了する。 一方、 空要素でない 場合、外部ファイルのインポート力否かを判断する(ステップ S 5 1 4 )。つまり、 図 1 7において、 インターフェイス定義ファイル 5 2 2が型定義ファイル 5 2 3 をインポートしている力否かを判断する。外部ファイル(型定義ファイル 5 2 3 ) をインポ一トしていない場合、ステップ S 5 1 6へ進む。一方、外部フアイノレ(型 定義ファイル 5 2 3 ) をインポートしている場合、 スキーマ定義ファイル (型定 義ファイル 5 2 3 ) を読み込む (ステップ S 5 1 5 )。
XMLスキーマ解析部 5 1 4は、 インターフェイス定義ファイル 5 2 2の XM Lスキーマを解析し (ステップ S 5 1 6 )、 ソースコードを生成する (ステップ S 5 1 7 )。そして、 ファイル出力部 5 3 0によって、ヘッダファ'ィルとプログラム ファイルとで構成されるタイプライブラリ 5 3 3として出力される。
ステップ S 5 1 7のソースコード生成処理について図 2 1から図 2 7で説明す 'る。 先ず、' types要素において、 列挙型でデータ型が定義されている場合につい て説明する。 図 2 1は、 ソースコード生成処理における列挙型定義生成処理を説 明する図である。
図 2 1において、 XMLスキーマ 6 0 1は、 列挙型でデータ型が定義される X MLによる記述例である。 1\1 スキーマ6 0 1は、 タグ sinipleT^ peによる記 述 6 0 2によって、 「SomeVakieEnuni」 という名前を持つ単純型のデータ型で あることが定義される。 更に、 タグ restrictionによる記述 6 0 3によって、記述 6 0 4は、 baseで指定される 「string」 によって基底型が文字列であるように制 限される。例えば、記述 6 0 4において、 enumerationタグによって文字列が「V ALUE1」、 「VALUE2」、 rVALUE3j の 3つの値が列挙される。 この場合、 名前 「SomeValueEnum」 のデータ型は、 3つの文字列を持つことが定義される。 Cコード 7 0 1は、 列挙型でデータ型を定義する XM Lスキーマ 6 0 1から生 成された C言語のソースコードである。 Cコード 7 0 1において、記述 7 0 2は、 記述 6 0 2に基づいて 「一 SomeValueEnumJ が列挙型であることを定義し、 記 述 6 0 3及び記述 6 0 4に基づいて記述 7 0 4が生成される。 「SomeValueEnu m_VALUEl」、 rSomeValueEnum_VALUE2j N rSomeValueEnum_VALUE3j の 3つが列挙される記述 7 0 4によって、 3つの文字列を持つことが定義される。 そして、 記述 7 0 5は、 「SomeVal ieEnum」 力 S 「en m — SomeValueEiiiim」 と 同じデータ型を定義することを示す。
このように、 types要素で列挙型が記述されている XMLスキーマ 6 0 1から Cコード 7 0 1が生成される。 次に、 types要素において、 構造体でデータ型が定義されている場合について 説明する。 図 2 2は、 ソースコード生成処理における構造体の型定義生成処理を 説明する図である。
図 2 2において、 XMLスキーマ 6 1 1は、 構造体でデータ型が定義される X MLによる記述例である。 XMLスキーマ 6 1 1は、 タグ complexT pe による 記述 6 1 2によって、 「SomeStruct」 という名前を持つ複合型のデ"タ型である ことが定義される。 タグ sequenceによる記述 6 1 3によって、 データ順を規定 する。 タグ elementによる記述 6 1 4によって、 構造体メンバー 「strParam」 が文字列であることが定義され、 タグ elementによる記述 6 1 5によって、構造 体メンバー 「intParam」 が整数であることが定義される。
Cコード 7 1 1は、 構造体でデータ型を定義する XMLスキーマ 6 1 1から生 成された C言語のソースコードである。 Cコード 7 1 1において、記述 7 1 2は、 記述 6 1 2に基づいて し SomeStructJ が構造体であることを定義し、 記述 6 1 4及び記述 6 1 5に基づいて記述 7 1 4による 「char *strParam;」 及び記述 7 1 5による 「int intParam;」 が生成される。 そして、 記述 7 1 5は、 「SomeStr uct」 力 S 「struct _SomeStruct」 と同じデータ型を定義することを示す。
このように、 types要素で構造体が記述されている XMLスキ マ 6 1 1から Cコード 7 1 1が生成される。
次に、 types要素において、 配列でデータ型が定義されている場合について説 明する。 図 2 3は、 ソースコード生成処理における配列の型定義生成処理を説明 する図である。
図 2 3において、 XMLスキーマ 6 2 1は、 配列でデータ型が定義される XM Lによる記述例である。 XMLスキーマ 6 2 1は、 タグ complexTVpe による記 述 6 2 2によって、 「ArrayOfString」 という名前を持つ複合型のデータ型である ことが定義される。 更に、 タグ restrictionによる記述 6 2 4によって、 baseで 指定される 「soapEnc:Array」 によって S OA P符号化に従つた配列であるよう に制限される。 また、 タグ sequenceによる記述 6 2 5によって、 記述 6 2 6に よるデータ順を規定する。 タグ elementによる記述 6 2 6によって、 「item」 が 文^^であり、 省略可能であり、 出現回数に上限のないことが定義される。 タグ attributeによる記述 6 2 7は、 「soapEnc:arra iVpe」 が参照されて、 その配列 のタイプが 「wsdl:arrayType="xs:string口:] によつて文字列の配列であるように 属性を定義する。
Cコード 7 2 1は、 配列でデータ型を定義する XMLスキーマ 6 2 1から生成 された C言語のソースコードである。 Cコード 7 2 1において、 記述 7 2 2は、 記述 6 2 2に基づいて し ArrayOfStringJ が構造体であることを定義し、記述 6 2 6及び記述 6 2 7に基づいて記述 7 2 3及び記述 7 2 4による要素数を示す「i nt length;J 及ぴ記述 7 1 5による 「char*」 の配列のポインタであ'る 「char ** array;」 が生成される。 そして、 記述 7 2 5は、 「AirayOfString」 力 「struct— A rrayOiStringJ と同じデータ型を定義することを示す。
types要素の simpleT^ype及び complexTVpeの定義に基づレ、て C言語の関数宣 言を生成する例について図 2 4から図 2 6で説明する。 図 2 4から図 2 6におい て、 C言語コード内の Document及び Elementは、 D OM(Document Object Model)によつて定義される型を C言語の構造体にマッビングしたものであると する。 また、 図 2 4から図 2 6において、 シリアライザ及びデシリアライザは、 要素木と各型に対応した構造体データの変換を行う際に実行されるプログラムで あって、 シリアライザは構造体データを要素木に変換し、 でシリアライザは要素 木に構造体データに変換するプログラムである。 また、 コンストラクタ及びデス トラクタは、 構造体データを生成する際に実行されるプログラムであって、 デス トラクタは構造体データを解放するプログラムである。
図 2 4は、 ソースコード生成処理における列挙型の関数宣言処理を説明する図 である。 図 2 4におレヽて、 Element *SomeValueEnum_serialize(Document * doc, char *tagName, SomeValueEnum value);」 で示されるシリアライザ 8 0 1は、 rSomeValueEnum value」によつて列挙値を入力として受け取って、 「cha r *tagnamej によって tagnameをタク、名とする要素 (Element) を生成して出 力する。 また、 「SomeValueEnum Some ValueEnum_deserialize(Element *ele ment);」 で示されるデシリアライザ 8 1 1は、 要素 (Element) を入力として受 け取って、 これを解析して列 «を出力する。
シリアライザ 8 0 1及ぴデシリアライザ 8 1 1は、 XMLスキーマ 6 0 1より 生成される。
図 2 5は、 ソースコード生成処理における構造体の関数宣言処理を説明する図 である。図 2 5におレヽて、 「SomeStruct *SomeStruct_create(char *strParam, int intParam);」 で示されるコンストラクタ 8 2 1は、 構造体メンバーの値を入 力として受け取って、 構造体を生成して出力する。 「void SomeStruct_free(Som eStruct *st);j で示されるデストラクタ 8 3 1は、 構造体を入力として受け取つ て、 'その使用するメモリ領域を解放する。 また、 構造体メンバーの使用するメモ リ領域も再帰的に解放する。 「Element *SomeStruct_serialize(Document 中 doc, char *tagName, SomeStruct *st);J で示されるシリアライザ 8 4 1は、 「Som eStruct *st」によつて構造体を入力として受け取つて、 「cliar *tagnamejによつ て tagnameをタグ名とする要素 (Element) を生成して出力する。 また、 「Som eStruct *SomeStruct_deserialize(Element *element);」.で示さ..れるテシ 'リ'ァラ. ィザ 8 5 1は、 要素 (Element) を入力として受け取って、 これを解析して構造 体を生成して出力する。
従って、 XMLで記述された入力値を示す要素をデシリアライザ 8 5 1とコン ストラクタ 8 2 1とを用いることによって、 W e bサービス機能が処理可能な構 造体に入力値を設定することができる。 また、 W e bサービス機能からの戻り値 (処理結果としての出力値) を、 シリアライザ 8 4 1を用いることによって、 X MLで記述される要素に対応させて処 結果を設定することができる。
コンストラクタ 8 2 1、 デストラクタ 8 3 1、 シリアライザ 8 4 1及びデシリ ァライザ 8 5 1は、 XMLスキーマ 6 1 1より生成される
図 2 6は、 ソースコード生成処理における配列の関数宣言処理を説明する図で ある。 図 2 6において、 「ArrayOfString *ArrayOfString_create(int length, c har **array);」 で示されるコンストラクタ 8 6 1は、配列サイズと、 配列を入力 として受け取って、 配列を保持する構造体を生成して出力する。 「void ArrayOf String_free(ArrayOfString *st);」 で示されるデストラクタ 8 7 1は、 配列を保 持する構造体を入力として受け取って、 その使用するメモリ領域を解放する。 ま た、配列メンバーの使用するメモリ領域も再帰的に解放する。 HElement *Array OfString_serialize(Document *doc, char *tagName, ArrayOfString *st);」 で 示されるシリアライザ 8 8 1は、 「ArrayOiString *stjによつて配列を保持する 構造体を入力として受け取つて、 「char *tagnamej によって tagnameをタグ名 とする要素 (Element) を生成して出力する。 また、 「SomeStruct *SomeStruc t_deserialize(Element *element);Jで示されるデシリアライザ 8 9 1は、要素(E lement) を入力として受け取って、 これを解析して配列を保持する構造体を生成 して出力する。
従って、 XMLで記述された入力値を示す要素をデシリアライザ 8 9 1とコン ストラクタ 8 6 1とを用いることによって、 W e bサービス機能が処理可能な配 列に入力値を設定することができる。また、 W e bサービス機能からの戻り値 (処 理結果としての出力値) をシ,リアライザ 8 8 1とを用いることによって、 XML で記述される要素に対応させて処理結果を設定することができる。.
コンストラクタ 8 6 1、 デストラクタ 8 7 1、 シリアライザ 8 8 1及ぴデシリ ァライザ 8 9 1は、' XMLスキーマ 6 2 1より生成される
このようにして生成された C言語の関数宣言は、 タイプライブラリ 5 3 3のへ ッダファイルに出力される。 また、 各関数の処理はプログラムファイルに出力さ れる。
次に、 ハンドラ自動生成部 5 1 0によるハンドラ生成処理について図 2 7及ぴ 図 2 8で詳述する。 図 2 7及ぴ図 2 8は、 ハンドラ生成処理を説明するフローチ ヤート図である。 図 2 7において、ハンドラ自動生成部 5 1 0は、 service要素の name属性からサービス名を取得する. (ステップ S 5 2 1 )。 そして、 service要 素、 binding要素、 porttype要素の順に迪つて各要素を探す(ステップ S 5 2 2 )。 porttype要素の子の operation要素を探し、 name属性から操作名を取得する (ステップ S 5 2 3 )。 operation要素の子の input要素を探し、 name属性から 入力メッセージ名を取得する (ステップ S 5 2 4 )。 operation要素の子の outpu t要素を探し、 name属性から出力メッセージ名を取得する(ステップ S 5 2 5 )。 そして、 ハンドラ処理部と W e サービス機能 (WS F) の関数宣言を生成する (ステップ S 5 2 6 )。
入力メッセージの message要素を探す (ステップ S 5 2 7 )。 message要素の 子の part要素を探し、 name属性からパラメータ名、 及ぴ、 types属性から型を 取得する (ステップ S 5 2 8 )。 そして、型を C言語の型にマッピングする (ステ ップ S 5 2 9 )。 まだ part要素があるか否かを判断する (ステップ S 5 3 0 )。 p art要素がある場合、 ステップ S 5 2 8へ戻り、 上記処理を繰り返す。 一方、 par t要素がない場合、 入力メッセージの C言語の型へのマッピングを終了し、 出力 メッセージの C言語の型へのマッピングを行う。 ' 出カメッセージの message要素を採す (ステップ S 5 3 1 )。 message要素の 子の part要素を探し、 name属性からパラメータ名、 及ぴ、 typ 属性から型を 取得する (ステップ S 5 3 2 )。 そして、型を C言語の型にマッピングする (スデ ップ S 5 3 3 )。 まだ part要素があるか否かを判断する (ステップ S 5 3 4 )。 p. art要素がある場合、 ステップ S 5 3 2へ戻り、 上記処理を繰り返す。 一方、 par ' t要素がない場合、 出力メッセージの C言語の型へのマッピングを終了する。
次に、入力メッセージの構造体定義を生成する (ステップ S 5 3 5 )。 また、 出. カメッセージの構造体定義を生成する (ステップ S 5 3 6、)。ハンドラ処理部のプ ログラムを生成する (ステップ S 5 3 7 )。入カメッセージの構造体定義及び出力 メッセージを構造体定義をヘッダファイルに出力し、 ハンドラ処理部のプロダラ ムをプログラムファイルに出力する (ステップ S 5 3 8 )。 そして、 まだ operati on要素があるカゝ否かを判断する(ステップ S 5 3 9 )。 operation要素がある場合、 ステップ S 5 2 3へ戻り、 上記同様の処理を繰り返す。 operation要素がない場 合、 ハンドラ生成処理を終了する。
ハンドラ自動生成部 5 1 0に入力されるインターフェイス定義ファイル (WS D L) の記述例について図 2 9及び図 3 0で説明する。 図 2 9及び図 3 0は、 W S D Lによるインターフェイス定義の記述例を示す図である。 図 2 9及び図 3 0 において、本来く ¾ype>タグによって記述されるデータ型の定義は、 「foo.bar.com/ types.xsdjで特定される型定義ファイル 5 2 3によって定義されているものとす る。 この記述例において、 メッセージを記述するためのデータ型を定義し、 スキ 一マの定義が設定されるく t pe>タグは省略され、 その代わりに、記述 4 0によつ て 「foo.bar.com/types.xsd」 力 らインポートされる。
メッセージの書式を定義するく message>タグ 4 1 (記 く message name="pri ntlnput">) によって定義される定義情報 4 2において、 記述く part name="filel d" type="xs:unsignedInt"/>¾.O?fB¾ <par name="count" type="xs:unsignedl nt"/>によって、 印刷要求の入力パラメータ (printtnput) は、 符号なし整数 (u nsignedlnt) の fileld及ぴ符号なし整数 (unsignedlnt) の countによって構成 されることを定義する。 また、 メッセージの書式を定義す 5<message>タグ 4 3 (記述く message name="printOutput">)によつて定義される定義情報 4 4にお レヽて、 言己述く part name="reques d". t pe- 'xs:unsignedlnt'7>こよって、 卩 ΐ!]要 求の出力パラメータ (printOutput) は、 符号なし整数 (unsignedlnt) (D reque stldによって構成されることを定義する。- .
操作 (operation) の集合を定義するく porWy e>タグ 4 5 (記述く portT^ pe na me="netdocPortiype">) によつて定義される定義情報.4 6におレ、て、 操作毎の 入力メッセージ及び出力メッセージが定義される。 例えば、 く operation>タグ 4 7 (記述く operation name="print">)によって定義される定義情報 4 8において、 記述 <input message="tns:printlnput7>によって入カメッセーンは printmput であること力 s定義され、 また、 記述く output message="tns:print0utput7>によ つて出力メッセージは printOutputであることが定義される。 この場合、印刷(p rint) のみが定義される。
<portType>タグ 4 5によって定義された操作とメッセージを具体的なプロト コルとデータフォーマツトにマップするく binding>タグ 4 9 (記述く binding na me="netdocHttpBinding" type=''tns:netdoc or Type''>) によって疋 '義される疋. 義情報 5 0において、 netdocPor TVpeで定義されるポートタイプについて、 操 作とメッセージのプロトコルとデータフォーマツトへのマップが定義される。 定義情報 5 0において、 く sb:binding>タグ 5 1 (記述く sb binding transport= "http://schemas.xmlsoap.org/soap/http" style="rpc"/> ) ίこよって、 S O A P H T T Pバインディングによる R P C (Remote Procedure Call) の使用が定義さ れる。 く operation>タグ 5 2 (記述く operation name="print">) によって、 以下 に印刷 (print) に関する S O A Pメッセージが定義される。
先す、く sb:operation>タグ 5 3 (記述く sb:operation
Figure imgf000041_0001
r.com/netdoc print"/>) によって、 印刷 (print) 要求時の S O A P A c t i o n へッダの値が 「http://foo.bar.com/netdoc/print」 であることを定義する。 次に、 <input>タグ 5 4によって定義される定義情報 5 5において、 記述く sb: oody encoctmgStyle^littp /scliemas-xmlsoapOrg/soap/encoding/" use= "literal " namespace="littp:〃 foo.bar.com/netdoc/7>によって、 入力 Bきのェンコ一ディン グ形式を定義し、 <output>タグ 5 6によって定義される定義情報 5 7において、 gd¾&<sb:body encodingStyle= nttp ://schemas .xmlsoap.org/soap/encoding/' . us e="literal" namespace=''http://foo.bar.com/netdoc/7>によって、 出力時のェンコ 一ディング形式を定義する。
そして、 ネットワークの端点の集まりを定義するく 861^^6>タグ 5 8 (記述く se rvice name="netdoc">)によって定義される定義情報 5 9において、 <port>タグ 6 0 sd3∑!i<port name="netdocPort" binding="tns:netdocHttpBinding">) に よってネットワークの端点の 1つとなる netdocPortが定義され、更に、記述 !): address
Figure imgf000042_0001
よって、 その不'ットヮ 一クの端点のアドレス位置が定義される。 つまり、 サービス名 「netdoc」 のバイ. ンデイングは 「netdocHttpBinding」 であり、 サービスの U R L (Uniform Res ource Locator;は「Jittp:〃 printer.foo.bar.com/netdoc」であること »定義される。 このように W S D Lで定義されたインターフェイス定義ファイル 5 2 2及び方 定義ファイル 5 2 3によって、 データ型が決定され、 操作が決定され、 また、 U R L及び S O A P A c t i o nヘッダが決定される。
次に、 図 2 9及び図 3 0に示すィンターフェィス定義が入力された場合のハン ドラ処理部及 OW e bサービス機能の関数宣言と、 入カメッセージ及ぴ出カメッ セージの構造体定義について説明する。 先ず、 図 2 7のステップ S 5 2 6にて生 成されるハンドラ処理部と W e bサービス機能の関数宣言について図 3 1及び図 3 2で説明する。
図 3 1は、 ハンドラ処理部の関数宣言を説明する図である。 図 3 1において、 ハンドラ処理部の関数宣言は、 例えば、 サービス名を示す 「netdoc」 と操作名を 示す 「print」 と、 更にハンドラ処理部を示す rhandlerj による 「netdoc_print _handlerj によって関数名とし、 これをハンドラ処理部の関数として宣言する。 この例では、 「netdoc_print_liandler」によって、印刷操作を行うサービスに対応 するハンドラ処理部を示す。 ハンドラ処理部の関数宣言は、 ハンドラソースコー ド 5 3 2のヘッダファイルに出力される。
図 3 2は、 W e bサービス機能の関数宣言を説明する図である。 図 3 2におい て、 W e bサービス機能の関数宣言は、 例えば、 サービス名を示す rnetdocj と 操作名を示す 「print」 とによる 「netdoc_print」 を関数名とし、 ;れを W e bサ 一ビス機能の関数として宣言する。 また、 W e bサービス機能の関数の引数は、 サービス名を示す「Netdoc」 と入力メッセ一ジ名を示す rprintlnputj とによる 「Netdoc_printInput」 によって入力メッセージの構造体を指定し、 また、 サー ビス名を示す rNetdocj と出力メッセージ名を示す rprintOutputJ とによる' ΓΝ etdoc_printOutputJ によって出力メッセージの構造体を指定する。 W e bサー ビス機能の関数宣言は、 ハンドラソースコード 5 3 2のヘッダファイルに出力さ れる。
図 2 8のステップ S 5 3 5にて生成される入カメッセージの構造体定義につレ、. て図 3 3で説明する。 図 3 3は、 入カメッセージの構造体定義を説明する図であ る。 図 3 3において、入カメッセージの構造体は、例えば、サービス名を示す「n etdocj と入力メッセージ名を示す 「printlnput」 とによる し Netdoc_printInpu t」 を構造体として定義する。 また、 構造体 「_Netdoc_printInput」 は、 パラメ 一タ型を「unsigned int」によって符号なし整数としてパラメータ名「fileld」と、 パラメータ型を 「unsigned int」 によつて符号なし整数としてパラメータ名 「co untj とで構成される。 入力メッセージの構造体は、 ハンドラソースコード 5 3 2のへッダファィルに出力される。
図 2 8のステップ S 5 3 6にて生成される出カメッセージの構造体定義につい て図 3 4で説明する。 図 3 4は、 出カメッセージの構造体定義を説明する図であ る。 図 3 4において、 出力メッセージの構造体は、例えば、サービス名を示す「n etdocj と出力メッセージ名を示す 「printOutput」 とによる 「_Netdoc— printOu tputj を構造体として定義する。 また、 構造体 「― Netdoc_j>rintOutput」 は、 パ ラメータ型を 「unsigned int」 によって符号なし整数としてパラメータ名 「requ estldj で構成される。 出カメッセージの構造体は、ハンドラソースコード 5 3 2 のヘッダファイルに出力される。
図 2 9及ぴ図 3 0に示すインターフェイス定義に基づいて自動生成されるハン ドラソースコード 5 3 2のプログラムの例について図 3 5で説明する。図 3 5は、 自動生成されたハンドラソースコードの例を示す図である。 図 3 5において、 実 際のソースコードを記載する代わりに、 ステップ毎の処理概要を記してある。 図 3 5に示すようなハンドラソースコードでは、 記述 9 0 1に示すように、 図 3 1に示す宣言されたハンドラ処理部の関数名が最初に記述される。 このハンド ラ処理部は、 W e b'サービス機能としての印刷機能のためのハンドラである。 以 下、 印刷ハンドラと言う。 ステップ S 1 2 0から S 1 3 1までのコードは、 要素 木に基づいて処理リクエストを示す S OA Pエンベロープを解析するコードであ る。 また、 ステップ S 1 4 0から S 1 4 8までのコードは、 処理レスポンスを示 す S OA Pエンベロープを作成するための要素木を生成するたコードである。 印刷ハンドラにて口一カルに定義される変数の記述の後、 印刷ノヽンドラがルー ト要素を取得するためのステップ S 1 2 0が記載される。 ステップ S 1 2 0が実 行された結果として、 ルート要素 (E n v e 1 o P e要素) を取得する。 子ノー ドリストを取得するステップ S 1 2 1が記載される。 ステップ S 1 2 1が実行さ れた結果として、 印刷ハンドラは要素木から 「Header」 及ぴ 「Body」 を取得す ることになる。
子ノードリストからタグ名が B o d yの要素を検索して取得するステツプ S 1 2 2が記述される。 B o d y要素の最初の子ノードを取得するステップ S 1 2 3 が記述される。 ステップ S 1 2 3が実行された結果として、 印刷ハンドラは操作 名を示す p r i n t要素を取得する。 p r i n t要素の子ノードリストを取得す るステップ S 1 2 4が記述される。 取得した子ノ ドリストからタグ名を順に取 得するステップ S 1 2 5 (繰り返しの判断をステップ S 1 3 2とする) が記述さ れる。
タグ名が f i 1 e I Dである;^否かを判断するステップ S 1 2 6が記述される。 タグ名が f i 1 e I Dである:^に、 タグ名が f i 1 e I Dの最初の子ノードを 取得するステップ S 1 2 7が記述される。 ステップ S 1 2.7が実行された結果と して、 印刷ハンドラはテキストノードを取得する。 取得したテキストノードから テキストデータを抽出して整数に変換するステップ S 1 2 8が記述される。 ステ ップ S 1 2 8が実行された結果として、 印刷ハンドラはファイル I Dパラメータ として値を所定の構造体に設定する。
タグ名が c o un tである力否かを判断するステップ S 129が記述される。 タグ名が c o u n tである場合に、 タグ名が c o u n tの最初の子ノ一ドを取得 するステップ S 130が記述される。ステップ S 130が実行された結果として、 印刷ハンドラはテキストノードを取得する。 取得したテキストノードを抽出して 整数に変換するステップ S 131が記述される。 ステップ S 131が実行された 結果として、 印刷ハンドラは部数パラメ一として値を所定の構造体に設定する。 上記ステップ S 126から S 131までの記述 902は、 印刷ハンドラでの例 であるが、 他のハンドラでは、 入力メッセージのパラメータ定義によってタグ名 毎の判断及びタグ名に対する処理は変化する。
記述 902を実行した場合に取得した各パラメータの値を入カメッセージの構 造体データとして生成し、 データ名 「in」 に設定するステップ S 133が記述さ れる。
入カメッセージの構造体データを引数とした図 32に示すような宣言された W e bサービス機能の関数 「netdoc— print(in, out)」 をコールするステップ S 13 4が記述される。
ステップ S 134が実行された場合に、 戻り値がエラーであるかを判靳し、 ェ ラーである場合、 SOAPFaultを responseDocumentに設定するステップ S 13 5が記述される。
以下ステップ S 140から S 148までは、 We bサービス機能の関数 「netd oc_print(in, out)」 の実行によってエラーでなかった場合に処理レスポンスを生 成するための要素木を生成するステップが記述される。
Env e l o e要素を生成するステップ S 140が記述される。 B o d y要 素を生成するステップ S 141が記述される。 B o d y要素を E n v e 1 o p e 要素に接続するステップ S 142が記述される。 p r i n t Re s p on s e要 素を生成するステップ S 143が記述される。 p r i n tRe s p on s e要素 を B o d y要素に接続するステップ S 144が記述される。 r e q u e s t I d 要素を生成するステップ S 145が記述される。 p r i n t Re s p on s e要 素を B o d y要素に接続するステップ S 146が記述される。 ステップ S 1 3 4が実行された結果として得られたリクエスト I Dを用いてテ キストノードを生成するステップ S 1 4 7が記述される。 テキストノードを r e q u e s t I d要素に接続するステップ S 1 4 8が記述される。
印刷ハンドラでの処理結果を示す responseDocument を戻り値とするステツ プ S 1 4 9が記述される。
このよ-うにして記述されたハンドラソースコード 5 3' 2は、 印刷ハンドラに限 るものではなく、同様のステップを他の操作に対応させて生成することができる。 従って、'上記ノヽンドラソースコードにおける操作名 「print」 は、 定義によって変 化する。 '
このように、 ハンドラソースコード 5 3 2が自動生成されることによって、 単 純で同じようなコードを大量に生成することができるため、 開発者による単純ミ スによるバグが入り込むといった問題を解消することができる。 また、 短時間で ハンドラソースコード 5 3 2を生成することができるため、 開発者の負担を軽減 することができる。 更に、 開発者は、 XMLによるメッセージのデータ形式と W e bサービス機能におけるプログラム言語にて処理可能なデータ形式との違いを 意識することなく、 W e bサービス機能を開発することができる。
このようにハンドラ自動生成部 5 1 0によって、 インターフェイス定義 5 2 1 に基づいて、 各 W e bサービス機能の関数に対応させて自動生成されたハンドラ ソースコード 5 3 2及ぴタイプライブラリ 5 3 3は、 W e bサービス機能の関数 他、 必要な処理部を構成するソースコードと共に、 コンパイルされる。
以上、 第三実施例にて説明してきたように、 本願発明によれば、 機器間におけ るメッセージ交換プロトコルに従ったメッセージのデータ形式の変換を行うため のプログラムが自動的に生成される。 従って、 開発者による単純ミスによるバグ が入り込むといった問題を解消することができる。 また、 このように自動生成さ れたプログラムを画像形成装置に実装することによって、 従来と同様の方法によ つて開発された W e bサービスファンクションであっても、 該メッセ^ ~ジの処理 が可能となる。 そのため、 画像形成装置における W e bサービスファンクション の開発を容易に行うことができる。 また、 画像形成装置に接続可能な他システム との連携を拡大することができる。 本願発明に係るプログラム生成方法おいて、 コンピュータが、 We bサービス のインターフェイスを定義するインターフェイス定義を解析し、 該インターフエ イス定義を構成する複数の要素間の関連を示す第一要素木を生成する要素木生成 手順と、 上記第一要素木に基づいて、 上記 We bサービスを実行する We bサー ビス機能によつて処理可能な入出力データ形式と所定記述形式によつて記述され る ^We bサービスに関する要求及び応答メッセージへの変換処理を行う変換プ 口グラムを生成する変換プログラム生成手厦とを実行するように構成することが できる。
また、 上記変換プログラム生成手順は、 上記 W e bサービス機能によつて処理 可能な上記入出力データ形式と上記所; ¾|S述形式によつて記述される上記要求及 ぴ応答メッセージにて設定される入出力メッセージとの変換を行うデータ型変換 プログラム'を生成する第一プログラム生成手順と、 上記所定記述形式によつて記 述される上記要求メッセージを解析すると共に、 上記応答メッセージを生成する 第二プログラムを生成する第二プログラム生成手順とを有するように構成するこ とができる。'
本発明に係るコンピュータ読み取り可能なプログラムが記憶された記憶媒体に おいて、 コンビユータに、 We bサービスのインターフェイスを定義するインタ 一フェイス定義を解析し、 該インターフェイス定義を構成する複数の要素間の関 連を示す第一要素木を生成する要素木生成手順と、 上記第一要素木に基づいて、 上記 W e bサービスを実行する W e bサービス機能によつて処理可能な入出力デ ータ形式と所定記述形式によつて記述される^ W e bサービスに関する要求及び 応答メッセージへの変換処理を行う変換プログラムを生成する変換プログラム生 成手順とを對亍させるためのコンピュータ読み取り可能なプログラムが記憶され た記憶媒体。
また、 上記変換プログラム生成手順は、 上記 We bサービス機能によって処理 可能な上記入出力データ形式と上記所^ 5述形式によつて記述される上記要求及 び応答メッセージにて設定される入出力メッセージとの変換を行うデータ型変換 プログラムを生成する第一プログラム生成手順と、 上記所定記述形式によって記 述される上記要求メッセージを解析すると共に、 上記応答メッセージを生成する 第二プログラムを生成する第二プログラム生成手順とを有することを特徴とする 請求項 11記載の記憶媒体。
[第四実施例]
以下、 第三実施例にて説明された自動生成されたハンドラ処理部が組み込まれ た画像形成装置と ·しての融合機 1200の実施例について説明する。 '
第四実施例において、 融合機 1200の機能構成及びハードウェア構成は、 第 —実施例における機能構成及ぴノ、一ドウエア構成と同様であるため、 +その説明を' 省略する。
次に、 融合機 1200において、 XML (extensible Markup Language) に よる S OAP (Simple Object Access Protocol)に従った We bサービスを » 可能とする構成について詳述する。 We bサービスファンクションは、 例えば、 C言語などのプログラム言語で記述されたソフトウェア (アプリケーション) で ある。 SOAPに従って記述される XMLによる処理内容をメッセージとして W e bサービスファンクションが理解できるように、 構文の異なる XMLとプログ ラム言語との間をハンドリングする処理部 (ハンドラ) が必要となる。 以下に、 印刷する印刷 We bサービス、 文書リストを取得する文書リスト取得 We bサー ビス、 文書情報を取得する文書情報取得 We bサービスを例として、 図 36で説 明する。
図 36は、 We bサービス.を実現するための構成例を示す図である。 図 37に おいて、 印刷 We bサービス、 文書リスト取得 We bサービス、 文書情報取得 W e bサービスが、 We bサー t:、、スアプリ 1218にて提供される^を示す。 こ れら We bサービスは、 アプリケーション 1230の別の機能として We サー ビスアプリ 1·218力ら独立した構成としても良レ、。 図 36中、 図 34に示す融 合機 1200の機能構成のうち主要な機能構成のみが図示され、 他の機能構成は 省略される。
図 36において、 We bサービスを実現するために、 コントロー^/サービス 1 250と We bサービスアプリ 1218との間に、 接続される βとの間のデー タの送受信制御する中間層が構成される。 コントロールサービス 1250は、 We bサービスアプリ 1218による We bサービスを実現する構成部分として、 ECS 1224と、 MCS 1225と、 NCS 1228とを有する。 NCS 1228は、 HTT Pを制御する HTT Pデ 一モン 2と、 HTTPデーモン 2と We bサービスアプリ 1218との接続処理 の仲介をする要求仲介デーモン 7とを有する。
また、 中間層 1255は、 接続される βとの間のデータの送受信制御を吸収 する構成部分として、 シーケンス制御ライブラリ 100と、. XMLライブラリ 1 10と、 SOAPライブラリ 120と、 ジョブ管理部 310と、 ファイル管理部 311とを有する。 シーケンス制御ライブラリ 100は、 更に、 HTTP接続管 理部 101と、 HTTPサービス実行部 102と、 POSTメソッド分酉 S処理咅 1り 5とを有する。 XMLライブラリ 110は、 XML処理部 115と、. XML プロセッサ 116と、 XMLシリアライザ 117とを有ずる。 SOAPライブラ リ 120は、 SOAPアクション振分処理部 121を有する。
更に、 We bサービスアプリ 1218は、 We bサービスを実現するための構 成部分として、 要素未解析 ·生成ハンドラ 200と、 We bサービスファンクシ ョン (WS F) 300とを有する。 要素木解析 ·生成ハンドラ 200は、 騰間 における SOAPに従ったメッセージのデータ形式による構文を解析し、 We b サービスファンクション 300にて処理可能なデータ形式に変換する処理部であ つて、複数の要素木解析'生成ハンドラを有し、例えば、印刷ハンドラ 201と、 文書リスト取得ハンドラ 202と、 文書情報取得ハンドラ 203とを有する。 こ こで、 印刷ハンドラ 201、 文書リスト取得ハンドラ 202、 文書情報取得ハン ドラ 203の夫々は、 第三実施例における図 17に示すハンドラ自動生成部 51 0によって自動生成されたソースコード 531のハンドラソースコード 532及 びタイプライブラリ 533に基づくハンドラ処理部である。
We bサービスファンクション 300は、 複数の We bサービスファンクショ ンを有し、 例えば、 印刷機能 301と、 文書リスト取得機能 302と、 文書情報 取 能 303とを有する。 この 、 印刷ハンドラ 201は、 印刷機能 301 に対する処理の内容を示す S OAPに従ったメッセージのデータ形式を構文解析 し、 印刷機能 301が処理可能なデータ形式に変換して印刷機能 301に処理を 要求する。 また、 印刷ハンドラ 201は、 印刷機能 301からの応答を S OAP に従ったデータ形式にてメッセージとして生成する。 文書リスト取得ハンドラ 2 02及ぴ文書情報取得ハンドラ 203は、 夫々、 文書リスト取得機能 302及び 文書情報取得機能 303に対して同様の処理を行う。
印刷機能 301は、 入力パラメータとしてファイル I Dと部数を受け取り、 ジ ョブ管理部ファイル I Dと部数を指定して印刷要求をジョブ管理部 3.10に発行 する。 ジョブ管理部 310から受け取ったリクエスト I Dを出力パラメータとし て返す。 文書リスト取得機能 302は、 ファイル管理部 311にファイルリス卞 を要求し、 ファイル管理部 311から受け取った IDのリストを出力パラメータ として返す。 文書情報取觀能 303は、 入力パラメータとしてファイル IDを 受け取り、 ファイル管理部 311にファイル IDを指定してファイル情報を要求 する。 ファイル管理部 311から受け取ったファイル情報を出力パラメータとし て返す。
ジョブ管理部 310は、 ジョブのキュー及び実行結果を管理する。 また、 E C S 1224及び MC S 1125と通信して蓄積文書の印刷処理を 亍する。 ファ ィル管理部 311は、 MCS 1225と通信してファイル情報を取得する。
以下、 HTTPリクエストを受信してから HTTPレスポンスを送信するまで の処理について図 37及び図 38を参照しつつ説明する。 図 37及び図 38は、 SOAPによる We bサービスの 処理について説明するフローチヤ一ト図で ある。
NCS 1228の HTTPデーモン 2がネットワーク 15からの接続要求を受 信する (ステップ S 1100) 。 その接続要求は要求仲介デーモン 7を介して W e bサービスアプリ 1218の HTTP接続管理部 101に通知される。その後、 HTTP¾^ ¾¾101は、 その接続要求を HTTPに従ってサービスを提供 する HTTPサービス実行部 102に通知する。 通知を受けた HTTPサービス 実行部 102は、 HTTPデーモン 2に接続を行い、 HTTPリクエストを取得 する。 このような制御を NCS 1228で行うことにより、 必要時のみ HTTP による通信制御をすることができる。 よって、 常時 HTTP通信制御をする場合 に比べて、 通信制御に必要な資源を効果的に利用することができる。 HTTPサービス実行部 102は、 ネットワーク 15を介して受信した HTT Pリクエストからデータ送信方法を示す H T T Pメソッドを解析して、 G E Tメ ソッドである力否かをチェックする (ステップ S 1101) 。 GETメソッドで ある場合、 GETメソッドによる We bサービスの «を実行する (ステップ S 1102) 。 つまり、 SOAPによる We bサービス以外の We bサービスの提 供を行う。
一方、 GE.丁メソッドでない場合、 P O S Tメソッドであるか否かをチェック する (ステップ S 1103) 。 POSTメソッドでない場合、 ステップ S 110 7へ進み、 エラー処理を行い、 SOAPによる We bサービスの 処理を終了 する。 P O S Tメソッドである場合、 P O S Tメソッド分配処理部 105をコー ルする。 P O S Tメソッド分配処理部 105は、 HTT Pリクエストヘッダ情報 を解析し、 HTTPボディの記迷形式が XMLであることを ¾mする (ステップ S 1104) 。 つまり、 HTT Pレスポンスヘッダの Content-Typeが text/xml を指定している;^否かを判断する。 XMLでない場合、 ステップ S 1107へ進 み、 エラー処理を行う。 一方、 XMLである場合、 XMLコンテンツハンドラ 1 11をコーノレする。
1^乙処理部115は、 POSTメソッドハンドラとして、 XMLプロセッサ 116によって、 HTTPボディの XMLの構文を解析し、 XMLで記述される タグ間の関連を木構造で示すリクエストの要素木を作成する (ステップ S 110 5) 。 構文解析結果がエラー力、否かを判断する (ステップ S 1106) 。 構文解 析結果がエラーの場合、 ステップ S 1107へ進み、 エラー処理を行う。 一方、 構文解析結果が正常の場合、 図 38のステップ S 1109へ進む。
SOAPァクション振分処理部 121は、 HTTPリクエストの SOAP Ac t i o nヘッダを解析して、 UR I (Uniform Resource Indicator) により異な る要素木解析'生成ハンドラ 200に HTTPリクエストを振り分ける (ステツ プ S 1109) 。 この場合、 印刷 We bサービスを指定する UR Iに対して印刷 ハンドラ 201、 文書リスト取得 We bサービスを指定する UR Iに対して文書 リスト取得ノヽンドラ 202、 及ぴ、 文書情報取得 W e bサービスを指定する U R Iに対して文書情報取得ハンドラ 203に、 HTT Pリクエスト及ぴ要素木とが 振り分けられる。
各要素木 ·生成ハンドラ 200は、 リクエストの要素木を解析して C言語 の構造体データに変換する (ステップ S 1110) 。 その後、 変換した構造体デ ータを引数として、 HTTPリクエストで指定される UR Iに対応する We bサ 一ビスファンクション 300をコールする (ステップ S 1111) 。 この場合、 印刷ノヽンドラ 201は印刷機能 301、 文書リスト取得ハンドラ 202は文書リ スト取得機能 302、 文書情報取得ハンドラ 203は文書情報取得機能 303を コールする。
We bサービスファンクション 3ひ 0は、 所定の" We bサービスのロジックを 実行して、 構造体データとして結果を返す (ステップ S 1112) 。 この場合、 印刷機能 301、 文書リスト取得機能 302、 文書情報取得機能 303は、 各 W e bサービスのロジックを実行して、 その結果を返す。 返される結果は、 プログ' ラム言語で処理可能なデータ形式 (例えば、 C言語の構造体) である。
各要素木解析 ·生成ハンドラ 200は、 受け取った結果の構造体データからレ スポンスの要素木を生成する (ステップ S 1113) 。 各要素木解析■生成ハン ドラ 200によって生成された要素木は、 例えば、 XMLのタグ間の関係をタグ からタグへのポインタによるリンクによって、 そのデータ構造を示す。 以後、 S
OAPァクション振分処理部 121を介して、 XMLシリアライザ 117によつ て、レスポンスの要素木から XMLに変換される。 XMLシリアライザ 117は、 要素木をテキストで示す XMLに変換する。 変換された XMLは、 SOAPに従 つた HTTPボディに構成され、 所定の HTTPヘッダが付加された後、 HTT
Pレスポンスとして 言される (ステップ S 1114) 。
上述より、 要素木解析 ·生成ハンドラ 200が要素木を C言語の構造体に応じ たデータ変換を行う。 また、 C言語の構造体データから要素木への変換を行う。 開発者は、 SOAP及び XMLの知識が無くても、 We bサ ビスをプログラム 言語で開発することができる。
We bサービスファンクション 300を起動時の初期化処理では、 モジュール 間の (¾/線で示される) 接続が行われ、 図 36に示すように構成される。 初期化 処理では、 P O S Tメソッド分配処理部 105が P O S Tメソッドハンドラとし てシーケンス制御ライブラリ 100に接続することで開始され、 XML処理部 1 15の POSTメソッド分配処理部 105への登録、 SOAPアクション振分処 理部 121の XML処理部 115への登録、 要素木解析 ·生成ハンドラ 200の SOAPァクション振分処理部 121への登録が行われる。
次に、 要素木解析 ·生成ハンドラ 200の印刷ノヽンドラ 201を例にして、 印 刷ハンドラ 201における要素木の解析処理について図 39、 図 40及び図 41 で説明する。 図 39は、 XMLを使用した SOAPに従った HTTPリクエスト の記述例を示す図である。'図 40は、 XMLプロセッサによって変換された要素 木の例を示す図である。 図 41は、 印刷ハンドラによる要素木解析処理を説明す るためのフローチャート図である。
印刷 W e bサービスを依頼する図 39に示すような HTTPリクエストの場合、 XMLプロセッサ 112は、く SOAP-ENV:Envelope>で始まる HTTPボディ 2 0を要素木に変換する。 タグ名 21 iEnvelopeJ をルート要素とし、ルート要素 の芋ノードとしてタグ名 22 「Header」及ぴタグ名 23 「Body」を関連づける。 更に、 タグ名 23 「Body」 の子ノードをタグ名 24 「print」 とし、 更に、 タグ 名 24 「print」 の子ノードとしてタグ名 25 「fileld」 及ぴタグ名 26 「count」 とを関連付ける。そして、タグ名 25 rfileldj及びタグ名 26 「count」に、夫々、 テキストデータ 27 「123」 及びテキストデータ 28 「2」 を関連付ける。 こ のようにして関連付けられた要素木構造は、 例えば、 図 40に示されるようなデ ータ構造となる。 図 40において、 タグ名 21から 26及ぴテキストデータ 27 から 28を楕円で示し、 関連付けが矢印で示される。
図 40に示すようなデータ構造となった要素木は、 印刷ハンドラ 201によつ て、 図 41に示されるフローチャートに従って、 印刷機能 301が処理可能なプ ログラム言語による構造体データが生成される。 図 41でのステップ番号は、 図 35でのステップ番号に対応する。 図 41において、 印刷ノヽンドラ 201は、 ル ート要素を取得する (ステップ S 120) 。 この場合、 ルート要素は、 Enve 1 o p e要素となる。子ノードリストを取得する(ステップ S 121)。つまり、 タグ名 22 「Header」 及び 23 HBodyJ を取得する。 子ノードリストからタグ 名が B o d yの要素を検索して取得する (ステップ S 122) 。 Bo dy要素の 最初の子ノードを取得する (ステップ S 1 23) 。 この場合、 r i n t要素を 取得する。 p r i n t要素の子ノードリストを取得する (ステップ S 1 24)。取 得した子ノードリストからタグ名を順に取得する (ステップ S 1 25 )。
タグ名が f i 1 e I Dである力否かを判断する (ステップ S 1 26)。 タグ名が f i 1 e I Dでない場合、 ステップ S 1 2 9へ進む。 一方、 タグ名が f i 1 e I Dである場合、 タグ名が. f i 1 e I Dの最初の子ノードを取得する (ステップ S 1 27)。つまり、テキストノードを取得する。取得したテキストノードを抽出レ て整数に変換する(ステップ S 1 28)。つまり、ファイル I Dパラメータとして、 値 「1 23」 が所定の構造体に設定される。 更に、 タグ名が c o u n tであるか 否かを判断する.(ステップ S 1 2 9)。 タグ名が c o un tでない場合、 ステツ:/ S 1 3 2へ進む。 一方、 タグ名が c o u n tである場合、 タグ名が c o u n tの 最初の子ノードを取得する'(ステップ S 1 30)。 つまり、テキストノードを取得 する。 取得したテキストノードを抽出して整数に変換する (ステップ S 1 3 1)。 つまり、 部数パラメータとして、 値 「2」 が所定の構造体に設定される。
印刷ハンドラ 20 1は、 ステップ S 1 2 5で取得した子ノードリストから次の 子ノードがある力否かを判断する (ステップ S 1 3 2) 。 次の子ノードがある場 合、 ステップ S 1 2 5に戻り、 次の子ノードを取得し、 上記同様の処理を行う。 次の子ノードがない場合、 要素木の解析処理を終了する。
このようにして解析された要素木は、 印刷ハンドラ 20 1によって図 42に示 されるようなプログラム言語による構造体のパラメータに値が設定される。 図 4 2は、 We bサービス機能の関数の引数の設定例を示す図である。 図 42におい て、 構造体 29 ( ["struct Netdoc一 printlnputj ) のノ ラメータ 「 nsigned int ffleldj には、 ステップ S 1 28によって、 値 「1 23J が設定される。 また、 パ ラメータ 「unsigned int count」 には、 ステップ S 1 3 1によって、 値 「2」 が 設定される。
W e bサービスファンクション 300の印刷機能 30 1は、 ハンドラ自動生成 部 5 1 0によって We bサービス機能の関数として宣言された 「netdoc一 printj 関数であるため (図 3 2参照) 、 「struct Netdoc_printInput *in」 のようにし て、 ハンドラ自動生成部 5 1 0によって入カメッセージの構造体として定義され た構造体 29の構造 「struct Netdoc_printInput」 とその構造体 29へのポ インタ 「in」 が引数 30に設定される。 印刷機能 301 ( rnetdoc_printj 関数) をコールすると、 印刷機能 301での処理結果が、 例えば、 構造体名 「struct N etdoc— printOutputJ へのホインタ 「out」 を示す 「struct etdoc— printOutput *out」 のような引数 31で戻る。
図 43は、 印刷ハンドラでの処理結果の設定例を示す図である。 図 43におい て、印刷ハンドラ 201は、 引数 31のポインタ 「out」 によって、処理結果を設 定すべき構造体 39を取得する。 構造体 39は、 ハンドラ自動生成部 510によ 'つて出カメッセージの構造体として定義された構造体である(図 34参照)。例え ば、 構造体 39において、 処理結果として、 パラメータ 「unsigned int request Idj に値 「100」 を設定する。
次に、 処 結果を示す構造体 39から要素木を生成する要素木の生成処理につ いて図 44及ぴ図 45で説明する。 図 44でのステップ番号は、 図 35でのステ ップ番号に対応する。 図 44は、 印刷ハンドラによる要素木生成処理を説明する ためのフローチャート図である。 図 45は、 生成された要素木の例を示す図であ る。
図 45を 照しつつ、 印刷ハンドラによる要素木生成処理を説明する。 図 44 において、 印刷ハンドラ 201は、 Env e l o p e要素 32を生成する (ステ ップ S 140)。 B o dy要素 33を生成する (ステップ S 141)。 そして、 o d y要素 33を En V e 1 o p e要素 32に接続する(ステップ S 142)。 こ れらステップ S 140から S 142での処理によって、 SOAPに従った HTT Pレスポンスの HTTPボディが設定される。
そして、 印刷ハンドラ 201は、 p r i n t R e s p o n s e要素 34を生成 し(ステップ S 143), p r i n tRe s p o n s e要素 34を B o d y要素 3 3に接続する (ステップ S 144)。更に、 r e q u e s t I d要素 35を生成し
(ステップ S 145)、 r e que s t I d要素 35を p r i n tRe s p on s e要素 34に接続する (ステップ S I 46)。
印刷ノヽンドラ 201は、 結果として得られたリクエスト IDよ,り、 テキストノ ード 36を生成して (ステップ S 147)、テキストノードを r e a u e s t l d 要素 3 5に接続する (ステップ S 1 4 8 )。 この場合、 テキストノード 3 6には、 「1 0 0」 が設定される。
このように生成された要素木は、 XML処理部 1 1 5及ぴ XMLシリアライザ 1 1 2によって、 図 4 6に示されるような HT T Pボディ 3 2を生成する。 図 4 6は、 要素木から変換された XMLを使用した S OA Pに従った HT T Pレスポ ンスの記述例を示す図である。 図 4 6において、 図 4 5に示す各要素 3 2から 3 6は、 < >で区切られるタグ内に記述され、 所定の情報を S OA Pに従った手順 で XMLにて記述される。 融合機 1 2 0 0は、 HT T Pデーモン 2によって HT T Pリクエストを送信した機器へネットワーク 1 5を介じてこの HT T Pレスポ ンスを送信する。 このようにして、 融合機 1 2 0 0は、 ネットワーク 1 5を介し て接続される機器へ We bサービスを«する。
上記実施例より、 XMLによる要素間の関連を示す要素木から W e サービス 機能が処理可能なプログラム言語による入力データに変換、 及び、 プログラム言 語による出力データを所定記述形式の要素木に変換するソースコード 5 3 1が自 動生成される。 従って、 単純で同じようなコードを大量に生成することができる ため、 開発者による単純ミスによるバグが入り込むといつた問題を解消すること ができる。 また、 短時間でハンドラソースコード 5 3 2を生成することができる ため、 開発者の負担を軽減することができる。
また、 自動生成されたソースコード 5 3 1による要素木解析'生成ノヽンドラ 2 0 0を融合機 1 2 0 0に備えることによって、開発者はく従来と同様の開発方法、 例えば、 C言語による開発方法によって、 We bサービスファンクションとして のアプリケーションの開発を行うことができる。 また、 既に実装されているァプ リケーションを容易に W e bサービスに対応するに改良することができる。
また、 要素木解析 ·生成ハンドラ 2 0 0を有する融合機 1 2 0 0では、 S O A Pに従う XML記述されたメッセージをプログラム開発された W e bサービスフ アンクション 3 0 0が解釈することができるため、 We bサービスファンクショ ン 3 0 0を他システムに することが可能となる。 よって、 融合機 1 2 0 0に 接続されるシステム又はコンピュータ端末を限定しないため、 融合機 1 2 0 0の 利用可能性を大幅に拡大することが可能となる。 以上、 第四実施例にて説明してきたように、 本願発明によれば、機器間におけ るメッセージ交換プロトコルに従ったメッセージのデータ形式の変換を行う処理 部を備えているため、 従来と同様の方法によって開発された W e bサービスファ ンクシヨンであっても、 該メッセージの処理が可能となる。 そのため、 画像形成 装置における bサービスファンクションの開発をメッセ ジの記述形式に依 存することなく容易に行うことができる。 また、 既に実装されているアプリケー シヨンを容易に W e bサービスに対応できるように改良することができる。更に、 画像形成装置に接続可能な他システムとの連携を拡大することができる。
以上、 本発明の好ましい実施例を説明したが、 本発明はこれに限定されるわけ ではなく、 本発明の要旨の範囲内で種々の変形及ぴ変更が可能である。
本発明に係る融合機 1 2 0 0は、 複数の W e bサービス処理手段の夫々に対応 させて、 所定メッセージ交換プロトコルに従って受信した上記要求メッセージを 上記 W e bサービス処理手段によって処理可能な処理要求に変換すると共に、 該 W e bサービス処理手段から出力される上記処理結果を該メッセージ交換プロト コルに従った応答メッセージに変換する複数の変換手段を有するように構成する ことができる。
また、 本発明に係る融合機 1 2 0 0において、 要求メッセージ及び応答メッセ ーシ ίま、 Simple Object Access Protocol^こ従って Extensible Marmp Languag eによって記述されるように構成することができる。
更に、 プログラム言語にて処理可能な第二データ形式及び W e bサービス処理 手段によって出力された処理結果を示す第三データ形式は、 C言語によって処理 可能な構造体を示すように構成することができる。
また、 本発明に係る融合機 1 2 0 0は、 所定通信プロトコルに従って通信を制 御する通信制御手段と、 接続管理手段へ、 上記ネットワークを介して処理リクェ ストを受信したことを通知することによって'、 上記通信制御手段と、 上記所定通' 信プロトコルに従って、 上記処理リクエストに基づいて上記 W e bサービス処理 手段に処理を実行させ、 その処理結果を処理レスポンスとして上 器へ »す る上記サービス «手段との接続を制御する接続制御手段とを有するように構成 することができる。 更に、上記所定通信プロトコノレは、 Hypertext Transfer Protocolであるように 構成することができる。
また、 本発明に係る融合機 1 2 0 0は、 複数の上記 W e bサービス処理手段を 有するアプリケーションと、 上記画像形成処理で利用される複数のハードウエア 資源を管理すると共に、 上記アプリケーションからの利用要求に応じて、 該複数 のハードウエア資源への利用を制御するコントロールサービスと、 該アプリケー ションと該コント口一ルサービスとを制御するオペレーテイングシステムとを有 するように構成することができる。,
本発明に係る 虫合機 1 2 0 0は、 上記要求メッセージを該要求メッセージの構 成を示す第一データ形式に変換する第一メッセージ変換手順を有し、 上記変換手 j噴は、 上記第一データ形式を上記 W e bサービス処理手)噴を開発したプログラム 言語にて処理可能な第二データ形式に対応させる第一データ形式変換手順を有す るように構成することができる。
本発明に係る融合機 1 2 0 0にて行われる W e bサービス提供方法において、 要求メッセージを該要求メッセージの構成を示す第一データ形式に変換する第一 メッセージ変換手順は、 上記要求メッセージから該要求メッセージを構成する要 素とその要素に対して設定された値とに基づレ、て要素木を生成し、 その要素木を 上記第一データ形式とするように構成することができる。
また、 このような W e bサービス提供方法において、 上記第一データ形式変換 手順は、 上記要素木の上記要素間の関連を迪ることによって、 上記 W e bサービ ス処理手順にて処理可能な上記第二データ形式の要素に値を設定するように構成 することができる
更に、 W e bサービス提供方法において、 上記所定のプログラム言語にて処理 可能であって上記 W e bサービス手順による W e bサービスの処 3結果を示す第 三データ形式を、 該処理結果を示す応答メッセージの構成を示す第四データ形式 に変換する第二データ形式変換手順と、 上記第四データ形式によって示される上 記応答メッセージの構成に基づいて、 上記機器にて受信可能な記述形式にて該応 答メッセージを記述する第二メッセージ変換手順とを有するように構成すること ができる。 また、 W e bサービス提供方法において、 上記第二データ形式変換手順は、 上 記第三データ形式の要素に上記処理結果として設定された値と上記応答メッセー ジを構成する複数の要素とに基づいて要素木を生成し、 その要素木を上記第四デ ータ形式とするように構成することができる。
以上、 本発明の好ましい実施例を説明したが、 本発明はこれに限定されるわけ ではなく、 本発明の要旨の範囲内で種々の変形及び変更が可能である。

Claims

請求の範囲
1 . 画像形成に関する処理を実行するアプリケーションと、
夫々異なる通信プロトコルに従ってデータ送受信を行う複数の通信プロトコル ァーモンと、
上記各通信プロトコルデーモンからの接続通知に応じて、 該通信プロトコルデ ーモンに代わつて、 該通信プ口トコルデーモンにて接続要求があったことを上記 アプリケーションへ通知することによって接続を仲介する接続要求仲介手段とを 有することを特徴とする画像形成装置。
2. 上記アプリケーションと上記通信プロトコルデーモンによって共有され、 受信データ及び送信データを格納し、 上記アプリケーションと該複数の通信プロ トコルデーモンとの間で該受信データ及ぴ該送信データの受け渡しに使用される 共有メモリとを有することを特徴とする請求項 1記載の画像形成装置。
3. 上記接続要求仲介手段は、
上記アプリケーションからの登録要求に応じて該アプリケーションを登録する 登録手段と、
上記アプリケーシヨンから送受信バッファの登録要求に応じて、 該アプリケー ション専用に使用される受信用バッファ及び送信用バッファとを登録して使用可 能状態とするバッファ登録手段とを有することを特徴とする請求項 1記載の画像 形成装置。
4 . 上記接続要求仲介手段は、
上記各通信プロトコルデーモンからの接続通知を受けると、 上記共有メモリ内 に上記接続中にて使用される受信用バッファと送信用バッファとを割り当てて、 上記通信プロトコ /レデーモンに通知する送受信バッファ割当手段を有することを 特徴とする請求項 2又は 3のレ、ずれ力一項記載の画像形成装置。
5 . 上記アプリケーションは、
上記接続要求仲介手段から接続の通知を受信すると、 該接続要求仲介手段に接 続許可を通知すると共に、 上記通信プロトコルデーモンに対して接続を行う接続 処理手段と、 上記通信プロトコルデーモンへデータ受信の開始を要求するデータ受信開始要 求手段とを有することを特徴とする請求項 1乃至 4のいずれカゝ一項記載の画像形
6 . 上記各通信プロトコルデーモンは、
上記通信プロトコルデーモンが受信データを上記送受信バッファ割当手段によ つて割り当てられた上記受信用パッファに書き込んで、 書き込み開始位置をデ一' タ長分移動する受信データ書込手段と、
上記アプリケーションに; 上記受信用バッファへ上記受信データを書き込んだ ことを通知すると共に、 該受信データの書き込み開始位置と書き込み終了位置と' を指定する書き込み通知を行う受信書込通知手段とを有することを特徴とする請 求項 4又は 5項記載の画像形成装置。
7. 上記アプリケーションは、
上記通信プロトコルデーモンから上記受信データの書き込み通知を受信すると、 該書き込み通知で指定される上記書き込み開始位置から上記書き込み終了位置ま で上記受信用バッファから上記受信データを読み出して、 読み出し開台位置を該 書き込み終了位置まで移動する受信データ読込手段と、
上記通信プロトコルデーモンに、 上記受信用バッファから上記受信データを読 み出したことを通知する受信読出通知手段とを有することを特徴とする請求項 6 記載の画像形成装置。
8 . 上記アプリケーションは、
上記パッファ登録手段によつて登録された上記送信用パッファへ送信データを 書き込んで、書き込み開始位置をデータ長分移動する送信データ書き込み手段と、 上記通信プロトコルデーモンに、 上記 言用バッファへ上記送信データを書き 込んだことを通知すると共に、 該送信データの書き込み開始位置と書き込み終了 位置とを指定する書き込み通知を行う送信書込通知手段とを有することを特徴と する請求項 4乃至 7のいずれか一項記載の画像形成装置。
9 . 上記各通信プロトコルデーモンは、
上記アプリケーションから上記 言データの書き込み通知を受信すると、 該書 き込み通知で指定される上記書き込み開始位置から上記書き込み終了位置まで上 記送信用バッファから上記送信データを読み出して、 上記アプリケーションと接 続した上記通信プロトコルデーモンに該送信データを送信させる送信データ読出 手段と、
上記読み出し開始位置を上記書き込み終了位置まで移動する読出開始位置移動 手段と、
上記アブリケーシ 'ョンに、 上記送信用パッファから上記送信データを読み出し たことを通知する送信読出通知手段とを有することを特徴とする請求項 8記載の
1 0 . コンピュータが夫々異なる通信プロトコルに従ってデータ送受信を行う . 複数の通信プロトコルデーモンと複数のアプリケーションとの間で行われるデー タ送受信を制御するデータ送受信制御方法にぉ 、て、
上記上記各通信プロトコルデーモンからの接続通知に応じて、 該通信プロトコ ノレデーモンに代わって、 該通信プロトコルデーモンにて接続要求があったことを 上記アプリケーションへ通知することによって接続を仲介する接続要求仲介手順 と、
上記複数の通信プロトコルデーモンによって共有される共有メモリを介して上 記アブリケーシヨンとの間で行われる受信データ及び送信データの受け渡しを制 御するデータ送受信制御手順とを有することを特徴とするデータ送受信制御方法。
1 1 . メソッドに従つた所定の処理を行う複数のメソッド処理手段と、 処理要求に応じて、 該処理要求で指定される上記メソッドに対応する上記メソ ッド処理手段に該処理要求を振り分けることによって W e bサービスを実行する W e bサービス実行手段とを有することを特徴とする画像形成装置。
1 2. 同一メソッドにおける処理を共有し、 上記 We bサービスとして画像形 成に関する処理を行う複数の We bサービスアプリケーションを有することを特 徴とする請求項 1 1記載の画像形成装置。
1 3 . 上記複数のメソッド処理手段の 1つである第一メソッド処理手段は、 所 定記述形式によって記述された上記処理要求のボディ部を処理する記述処理手段 を有し、
上記記述処理手段による処理結果に基づレ、て、 上記 W e bサービスアプリケー シヨンが実行されることを特徴とする請求項 1 1又は 1 2記載の画像形成装置。
1 4 . 上記複数のメソッド処理手段の 1つである第一メソッド処理手段は、 上記第一メソッド処理手段を指定する上記第一メソッドに関して、 上記処理要 求のボディ部の記述形式を指定するへッダに応じた所定の処理を実行する複数の 処理手段と、
上記処理要求に指定されるコンテンッタイプに対応する上記処理手段に該処理 要求を分配する第一分配処理手段とを有し、
上記第一メソッドが上記処理要求によって指定されている場合、 該処理要求が 上記 W e bサービズ実行手段によって上記第一分配処理手段に振り分けられ、 上 記第一分配処理手段によって、 上記処理要求が上記へッダに対応する上記処理手 段に分配され、 該処理手段による処理結果に基づいて、 上記 W e bサービスアブ リケーションが実行されることを特徴とする請求項 1 1又は 1 2記載の画像形成
1 5 . 上記複数のメソッド処理手段の 1つである第二メソッド処理手段は、 . 上記第二メソッド処理手段を指定する上記第二メソッドに関して、 上記 W e b サービスアプリケーションを特定する特定情報に基づいて、 上記処理要求を e bサービスアプリケーションに分配する第二分配処理手段を有し、
上記第二メソッドが上記処理要求によって指定されている場合、 該処理要求が 上記 W e bサービス実行手段によつて上記第二分配処理手段に振り分けられるこ とを特徴とする請求項 1 1乃至 1 4のレ、ずれか一項記載の画像形成装置。
1 6 . W e bを介して通信制御を行う W e b通信プロトコルデーモンと、 上記 W e b通信プロトコルデーモンとの接続によって生成され、 ^W e b通信 プロトコルデーモンと上記 W e bサービスアプリケーシヨンとの間で行われる所 定記憶 S域からの受信データの読み込み及び該所定記憶領域への送信データの書 き込みを制御する接続処理手段とを有することを特徴とする請求項 1 2乃至 1 5 の!/、ずれ力—項記載の画像形成装置。
1 7 . 接続通知をキューとして保持する接続通知キューと、
上記接続通知キューを用いて、 上記 W e bサービス実行手段と上記 W e b,通信 プロトコルデーモンとの接続を管理する W e b接続管理手段と、 ±fSW e b通信プロトコルデーモンから上記接続通知があったことを、 上記 W e b通信プロトコルデーモンに代わって、 上記 W e b接続管理手段へ通知するこ とによって接続を仲介する接続要求仲介手段とを有し、
上記 W e b接続管理手段は、 上記 W e bサービス実行手段からの接続要求に応 じて、 上記 W e bサービスアプリケーションに代わって、 上記接続通知キューか ら上記接続通知を取り出して、 記 W e 通信プロトコルデーモンと接続すること を特徴とする請求項 1 6記載の画像形成装置。 .
1 8. 上記 We b接続管理手段は、 上記 We b通信プロトコルデーモンと接続 後、 上記接続処理手段を生成し、 上記 W e bサービス実行手段に上記接続に関す る接続管理情報を通知し、
上記 W e bサービス実行手段は、 上記通知を受けて、 上記処理要求を該処理要 求で指定されるメソッドに対応する上記メソ Vド処理手段に振り分けること'を特 徴とする請求項 1 7記載の画像形成装置。
1 9 . 上記画像形成処理で利用される複数のハードウェア資源を管理すると共 に、 上記複数の W e bサービスアプリケーションからの利用要求に応じて、 該複 数のハードゥエァ資源への利用を制御するコント口一ルサービスと、
該複数の W e bサービスアプリケーションと該コント口一ルサービスとを制御 するオペレーティングシステムとを有することを特徴とする請求: 2乃至 1 8 のいずれ力一項記載の画像形成装置。
2 0. コンピュータが、
メソッドに従つた所定の処理を行う複数のメソッド処理手順と、
処理要求に応じて、 該処理要求で指定される上記メソッドに対応する上記メソ ッド処理手順に該処理要求を振り分けることによって W e bサービスを実行する W e bサービス実行手順とを有することを特徴とする画像形成方法。
2 1 . ネットワークを介して接続される; βからの要求メッセージに基づいて 処理を^ ΐし、 その処理結果を W e bサービスとして提供する W e bサービス処 理手段と、
所定メッセージ交換プロトコルに従って受信した上記要求メッセージを上記 W e bサービス処理手段によつて処理可能な処理要求に変換すると共に、 該 W e b サービス処理手段から出力される上記処理結果を該メッセージ交換プロトコルに 従った応答メッセージに変換する変換手段とを有することを特徴とする画像形成
2 2. 上記要求メッセージを該要求メッセージの構成を示す第一データ形式に 変換する第一メッセージ変換手段を有し、
上記変換手段は、 上記第一データ形式を上記 We bサービス処理手段を開発し たプログラム言語にて処理可能な第二データ形式に対応させる第一データ形式変 換手段を有することを特徴とする請求項 2 1記載の画像形成装置。
2 3 . 上記第一メッセージ変換手段は、 上記要求メッセージから該要求メッセ' ージを構成する要素とその要素に対して設定された値とに基づいて要素木を生成 し、 その要素木を上記第一データ形式とすることを特徴とする請求項 2 2記載の
2 4. 上記第一データ形式変換手段は、 上記要素木の上記要素間の関連を迪る ことによって、 上記 W e bサービス処理手段にて処理可能な上記第二データ形式 の要素に値を設定することを特徴とする請求項 2 3記載の画像形成装置。
2 5. 上記応答メッセージの構成に基づいて、 上記機器にて受信可能な記述形 式にて該応答メッセージを記述する第二メッセージ変換手段を有し、
上記変換手段は、 上記 W e bサービス処理手段によつて出力された上記処理結 果を示す第三データ形式を、 該処 結果を示す応答メッセージの構成を示す第四 データ形式に変換する第二データ形式変換手段を有し、
上記応答メッセージは上記第四データ形式によって示されることを特徴とする 請求項 2 4記載の画像形成装置 b
2 6 . 上記第二データ形式変換手段は、 上記第三データ形式の要素に上記処理 結果として設定された値と上記応答メッセージを構成する複数の要素とに基づい て要素木を生成し、 その要素木を上記第四データ形式とすることを特徴とする請 求項 2 5記載の画像形成装置。
2 7. 所定通信プロトコルに従って受信した処理リクエストが上記要求メッセ ージによって処理要求を行うメソッドであるカゝ否かを判断するメソッド判断手段 と、 上記メソッド判断手段による判断結果に基づいて、 上記処理リクエストを上記 第一メッセージ変換手段へ分配する分配手段とを有することを特徴とする請求項 2 1乃至 2 6のいずれか一項記載の画像形成装置。
' 2 8 . 上記処理リクエストのヘッダ部を解析して W e bサービスを指定する W e bサービス指定情報を取得するヘッダ解析手段と、
上記ヘッダ解析手段による解析結果に基づいて、 上記第一メッセージ変換手段 によって変換された上記第一データ形式を引数として対応する上記複数の変換手 段の 1つを関数コールすることによって、 処理を振り分ける振り分け手段とを有 ることを特徴とする請求項 2 7記載の画像形成装置。
2 9 . 上記処理リクエストのポディ部の上記所定記述形式による要素名を解析 して W e bサービスを指定する W e bサービス指定情報を取得する W e bサービ ス指定情報取得手段と、
上記 W e bサービス指定情報取得手段による解析結果に基づいて、 上記第一メ ッセージ変換手段によつて変換された上記第一データ形式を引数として対応する 上記複数の変換手段の 1つを関数コールすることによって、 処理を振り分ける振 り分け手段とを有することを特徴とする請求項 2 7記載の画像形成装置。
3 0 . 上記所定通信プロトコルに従って、 ネットワークを介して βとの接続 を管理する接続管理手段と、
上記接続管理手段から上記接続の通知を受信後、 上記所定通信プロトコルに従 つて、 上記処理リクエストに基づレ、て上記 W e bサービス処理手段に処理を実行 させ、 その処理結果を処理レスポンスとして上記機器へ «するサービス «手 段とを有することを特徴とする請求項 2 7記載の画像形成装置。
3 1 . コンピュータが、
ネットワークを介して接続される機器からの要求メッセージに基づいて処理を 実行し、 その処理結果を W e bサービスとして^する W e bサービス処理手順 と、
所定メッセージ交換プロトコルに従って受信した上記要求メッセージを上記 W e bサービス処理手順によつて処理可能な処理要求に変換すると共に、 w e サービス処理手順から出力される上記処理結果を該メッセージ交換プロトコノレに 従った応答メッセージに変換する変換手順とを有することを特徴とする W e bサ 一ビス 方法。
3 2. コンピュータに、
We bサービスのインターフェイスを定義するインターフェイス定義を解析し 、 該インターフェイス定義を構成する複数の要素間の関連を示す第一要素木を生 成する要素木生成手順と、
上記第一要素木に基づいて、 上記 W e bサービスを実行する W e bサービス機 能によって処理可能な入出力データ形式と所定記述形式によって記述される^ W e b:サービスに関する要求及び応答メッセージとの変換処理を行う変換プロダラ ムを生成する変換プログラム生成手順とを実行させるためのコンピュータ読み取 り可能なプログラム。
3 3 . 上記変換プログラム生成手順は、
上記 W e bサービス機能によつて処理可能な上記入出力データ形式と上記所定 記述形式によって記述される上記要求及び応答メッセージにて設定される入出力 メッセージとの変換を行うデータ型変換プログラムを生成する第一プログラム生 成手順と、
上記所定記述形式によって記述される上記要求メッセージを解析すると共に、 上記応答メッセージを生成する第二プログラムを生成する第二プログラム生成手 J嗔とを有することを特徴とする請求項 3 2記載のプロ,グラム。
3 4. 上記第二プログラム生成手順は、
上記要求メッセージを構成する複数の要素間の関連を示す第二要素木の末端に 設定される値を、 上記 W e bサービス機能によって処理可能な入力データ形式に 変換する第ニコードを生成する第ニコード生成手順と、
上記 We bサービス機能を関数コールする第三コードを生成する第三コード生 成手順と、
上記応答メッセージを構成する複数の要素間の関連を示す第三要素木を生成す ると共に、 上記 We bサービス機能による戻り値を該第三要素木の末端に設定す る第四コードを生成する第四コード生成手順とを有することを特徴とする請求項 3 2又は 3 3記載のプログラム。
3 5 . 上記第一要素木に基づいて、 上記インターフェイス定義にて指定される サービス名と操作名とによつて上記変換プログラム生成手順によって生成された 上記変換プログラムを実行する第一関数の関数名を生成し、 その関数名によって 該第一関数を宣言する第一関数宣言手順と、
上記第一要素木に基づいて、 上記ィンターフェイス定義にて指定されるサービ ス名と操作名とによつて上記 W e bサービス機能を実行する第二関数の関数名を 生成し、 該インターフェイス定義にて指定される該サービス名と入カメッセージ 名及び出カメッセージとによって引数の型と引数名とを決定し、 その関数名と引 数名とによって該第二関数を宣言する第二関数宣言手順とを有することを特徴と する請求項 3 2乃至 3 4のいずれか一項記載のプログラム。
3 6 . 上記第一要素木に基づいて、 上記インターフェイス定義にて指定される 上記サービス名.と上記入カメッセージ名とによって入力データの構造 を生成 し、 該インターフェイス定義にて指定されるパラメータ型と、 パラメータ名とに ,よつて上記 W e bサービス機能によつて処理可能な入力データ構造体を構成して 定義する第一構造体定義手 1嗔と、
上記第一要素木に基づレ、て、 上記ィンターフェイス定義にて指定される上記サ 一ビス名と上記出カメッセージ名とによって出力データの構造体名を生成し、 該 インターフェイス定義にて指定されるパラメータ型と、 パラメータ名とによって 上記 W e bサービス機能によつて処理可能な出力データ構造体を構成して定義す る第二構造体定義手順とを有することを特徴とする請求項 3 5記載のプログラム
3 7. 上記第一要素木におけるデータ型の定義に基づいて、 上記 W e bサービ ス機能によつて処理可能な型定義を生成する型定義生成手順と、
上記第二要素木における入力データが格納される要素を上記 W e bサービス機 能によって処理可能な定義された型に変換するデータ型変換関数の宣言を生成す るデータ型関数宣言生成手順とを有することを特徴とする請求項 3 4記載のプロ グラム。 .
3 8. 上記型定義に基づいて、 上記 W e bサービス機能による上記出力デ、ータ のデータ型を上記第三要素木における出力データが格納される要素に変換するデ ータ型変換関数の宣言を生成するデータ型関数宣言生成手順とを有することを特 徴とする請求項 3 7記載のプログラム。
3 9 . 上記要素木生成手順は、 Extensible Markup Languageによって記述さ れた上記ィンターフェイス定義を解析して上記第一要素木を生成することを特徴 とする請求項 1記載のプログラム。
4 0 . 上記変換プログラム生成手順によって生成された上記変換プログラムは 、 画像形成処理を行うアプリケーションと上記画像形成処理によって利用される ハードウエア資源とを制御するオペレーティンダシステム上で実行可能であるこ とを特徴とする請求項 1乃至 8のいずれカゝ一項記載のプログラム
PCT/JP2003/003651 2002-03-25 2003-03-25 Dispositif de formation d'images comportant une fonction de service web WO2003081443A1 (fr)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US10/490,978 US7743162B2 (en) 2002-03-25 2003-03-25 Image forming apparatus, with connection request mediation, having web service functions
EP03715406.9A EP1489520B1 (en) 2002-03-25 2003-03-25 Image formation device having a web service function
US12/771,330 US8549162B2 (en) 2002-03-25 2010-04-30 Image forming apparatus having web service functions

Applications Claiming Priority (14)

Application Number Priority Date Filing Date Title
JP2002-84552 2002-03-25
JP2002084554 2002-03-25
JP2002084552 2002-03-25
JP2002084553 2002-03-25
JP2002-84553 2002-03-25
JP2002-84554 2002-03-25
JP2003076611A JP3710789B2 (ja) 2002-03-25 2003-03-19 複数の通信プロトコルを有する画像形成装置
JP2003-76611 2003-03-19
JP2003081245A JP4373692B2 (ja) 2002-03-25 2003-03-24 Webサービス機能を有する画像形成装置
JP2003081246A JP3831352B2 (ja) 2002-03-25 2003-03-24 プログラム生成処理をコンピュータに行わせるためのコンピュータ読み取り可能なプログラム
JP2003-81244 2003-03-24
JP2003081244A JP2004005503A (ja) 2002-03-25 2003-03-24 Webサービス機能を有する画像形成装置
JP2003-81245 2003-05-16
JP2003-81246 2003-05-16

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US10490978 A-371-Of-International 2003-03-25
US12/771,330 Division US8549162B2 (en) 2002-03-25 2010-04-30 Image forming apparatus having web service functions

Publications (1)

Publication Number Publication Date
WO2003081443A1 true WO2003081443A1 (fr) 2003-10-02

Family

ID=28458077

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2003/003651 WO2003081443A1 (fr) 2002-03-25 2003-03-25 Dispositif de formation d'images comportant une fonction de service web

Country Status (4)

Country Link
US (2) US7743162B2 (ja)
EP (1) EP1489520B1 (ja)
CN (2) CN1980247B (ja)
WO (1) WO2003081443A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1592222A3 (en) * 2004-04-26 2006-07-19 Ricoh Company, Ltd. Service providing method, service providing apparatus, computer-readable storage medium and computer program product

Families Citing this family (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7296022B2 (en) * 2003-07-14 2007-11-13 Microsoft Corporation Method and system for accessing a network database as a web service
JP4061288B2 (ja) * 2004-04-08 2008-03-12 インターナショナル・ビジネス・マシーンズ・コーポレーション Webサービス・システム、リクエスタ、soapメッセージ用中間処理装置、リクエスタのリクエスト用soapメッセージ処理方法、リクエスタのレスポンス用soapメッセージ処理方法、soapメッセージ用中間処理装置のリクエスト用soapメッセージ処理方法、soapメッセージ用中間処理装置のレスポンス用soapメッセージ処理方法、及びプログラム
JP4498045B2 (ja) * 2004-07-22 2010-07-07 キヤノン株式会社 画像処理装置及びその制御方法及びプログラム
JP4208786B2 (ja) 2004-07-28 2009-01-14 キヤノン株式会社 画像処理装置、ネットワークシステム、情報処理方法、ならびにプログラム、記憶媒体
US8145653B2 (en) * 2005-04-08 2012-03-27 International Business Machines Corporation Using schemas to generate application specific business objects for use in an integration broker
US20060230057A1 (en) * 2005-04-08 2006-10-12 International Business Machines Corporation Method and apparatus for mapping web services definition language files to application specific business objects in an integrated application environment
US20060230048A1 (en) * 2005-04-08 2006-10-12 International Business Machines Corporation Method and apparatus for object discovery agent based mapping of application specific markup language schemas to application specific business objects in an integrated application environment
US8458201B2 (en) * 2005-04-08 2013-06-04 International Business Machines Corporation Method and apparatus for mapping structured query language schema to application specific business objects in an integrated application environment
KR100716169B1 (ko) * 2005-05-06 2007-05-10 삼성전자주식회사 네트워크 관리 시스템에서의 메시지 처리 장치 및 방법
KR100750122B1 (ko) * 2005-06-13 2007-08-21 삼성전자주식회사 인쇄 옵션 설정 방법 및 장치
JP2008073895A (ja) * 2006-09-19 2008-04-03 Ricoh Co Ltd 画像形成装置、画像形成方法、画像形成プログラム、及び、情報記録媒体
US20080183822A1 (en) * 2007-01-25 2008-07-31 Yigang Cai Excluding a group member from receiving an electronic message addressed to a group alias address
US8218165B2 (en) * 2007-03-26 2012-07-10 Ricoh Company, Ltd. Interruption management method for an image forming apparatus
US20080307071A1 (en) * 2007-06-05 2008-12-11 Oracle International Corporation Retrieving specific hierarchical information using web services
US8438567B2 (en) * 2007-11-07 2013-05-07 Ricoh Company, Ltd. Information processing device and image processing apparatus
JP2009137165A (ja) * 2007-12-06 2009-06-25 Ricoh Co Ltd 画像形成装置、情報処理方法及びプログラム
JP5132417B2 (ja) * 2008-05-13 2013-01-30 キヤノン株式会社 データ処理装置、データ処理方法、及びコンピュータプログラム
US8364696B2 (en) * 2009-01-09 2013-01-29 Microsoft Corporation Efficient incremental parsing of context sensitive programming languages
EP2347545A1 (en) * 2009-04-27 2011-07-27 International Business Machines Corporation Message switching
JP5539126B2 (ja) * 2010-09-09 2014-07-02 キヤノン株式会社 データ処理装置、制御方法、及びプログラム
US9049176B2 (en) 2011-06-22 2015-06-02 Dropbox, Inc. File sharing via link generation
JP5891740B2 (ja) * 2011-11-24 2016-03-23 ブラザー工業株式会社 仲介サーバ及び通信装置
JP5970819B2 (ja) 2012-01-10 2016-08-17 株式会社リコー ネットワーク制御装置
US8914420B2 (en) 2012-04-30 2014-12-16 Gainspan Corporation Populating data structures of software applications with input data provided according to extensible markup language (XML)
CN103001813A (zh) * 2013-01-08 2013-03-27 太仓市同维电子有限公司 一种用于网管设备中配置管理的方法
US10261757B2 (en) * 2013-03-13 2019-04-16 Northrop Grumman Systems Corporation System and method for automated web processing service workflow building and application creation
US10817662B2 (en) 2013-05-21 2020-10-27 Kim Technologies Limited Expert system for automation, data collection, validation and managed storage without programming and without deployment
KR102230266B1 (ko) * 2013-11-11 2021-03-19 삼성전자주식회사 복수의 전자 디바이스 사이에서 애플리케이션을 공유하는 방법 및 전자 디바이스
JP2015184824A (ja) * 2014-03-20 2015-10-22 富士通株式会社 情報処理プログラム、情報処理方法および情報処理装置
US9294543B2 (en) * 2014-04-09 2016-03-22 International Business Machines Corporation Generation of representational state transfer interface from application programming interfaces
US10084820B2 (en) * 2015-02-27 2018-09-25 Konica Minolta Laboratory U.S.A., Inc. Method and system for IPSec security for IPP-USB data
EP3516536A4 (en) 2016-09-19 2020-05-13 Kim Technologies Limited ACTIVELY ADAPTED KNOWLEDGE BASE, CONTENT CALIBRATION AND CONTENT RECOGNITION
JP2022115602A (ja) 2021-01-28 2022-08-09 株式会社リコー 情報処理システム、情報処理方法およびプログラム
JP2022144259A (ja) 2021-03-18 2022-10-03 株式会社リコー 情報処理システム、情報処理方法、プログラムおよび情報処理装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200201A (ja) * 1993-12-28 1995-08-04 Nissin Electric Co Ltd プリンタサーバ装置
JPH10173890A (ja) * 1996-12-09 1998-06-26 Fuji Xerox Co Ltd リモート操作可能なファクシミリ装置
EP0874306A2 (en) 1997-04-15 1998-10-28 Xerox Corporation Network printing system
JPH11112775A (ja) * 1997-10-08 1999-04-23 Murata Mach Ltd ファクシミリ装置及び通信ネットワークシステム
EP0915601A2 (en) 1997-11-04 1999-05-12 Hewlett-Packard Company Input/output device for peripheral equipment
JP2001345979A (ja) * 2000-05-30 2001-12-14 Ricoh Co Ltd 監視システム
JP2002032331A (ja) * 2000-07-13 2002-01-31 Cross Head Kk コンテンツ配信システム、コンテンツ配信方法、コンテンツ配信のための複合機能付複写機、本システムに用いられる複合機能付複写機及び携帯情報端末等のユーザーインターフェイス

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6148377A (en) * 1996-11-22 2000-11-14 Mangosoft Corporation Shared memory computer networks
TW384611B (en) * 1997-02-14 2000-03-11 Canon Kk Data communication apparatus and method
JP3077640B2 (ja) 1997-09-05 2000-08-14 日本電気株式会社 ファクシミリ装置
US6185632B1 (en) * 1998-10-19 2001-02-06 Hewlett-Packard Company High speed communication protocol for IEEE-1394 including transmission of request and reply writes to a datagram-FIFO-address to exchange commands to end a job
CN1099783C (zh) * 1998-11-12 2003-01-22 英业达集团(上海)电子技术有限公司 可支持多种协议的网络会议系统
JP2000242463A (ja) * 1999-02-24 2000-09-08 Nec Corp 印刷システム
US6668279B1 (en) * 2000-02-25 2003-12-23 Sun Microsystems, Inc. User level web server in-kernel network I/O accelerator
JP2002032263A (ja) 2000-07-13 2002-01-31 Atl Systems:Kk 異なる構造のxmlファイルを使用したシステムどうしの接続方法
US7047293B2 (en) * 2001-02-14 2006-05-16 Ricoh Co., Ltd. Method and system of remote diagnostic, control and information collection using multiple formats and multiple protocols with delegating protocol processor
US20030061257A1 (en) * 2001-09-25 2003-03-27 Javier Cardona Multithreaded universal daemon for network data exchanges
US20030225894A1 (en) * 2002-03-25 2003-12-04 Tatsuo Ito Image forming apparatus including web service functions
EP1761023B1 (en) * 2003-03-04 2018-05-02 Ricoh Company, Ltd. Image forming apparatus and image processing apparatus
JP4498770B2 (ja) * 2003-03-10 2010-07-07 株式会社リコー データ配信する画像形成装置及びその画像形成装置からデータを取得する情報処理装置
JP4574253B2 (ja) * 2004-07-09 2010-11-04 キヤノン株式会社 画像処理装置及びその制御方法
US20080275909A1 (en) * 2007-05-03 2008-11-06 Sharp Laboratories Of America, Inc. Systems and methods for managing image data and metadata
KR20090039321A (ko) * 2007-10-18 2009-04-22 삼성전자주식회사 Ip 주소 관리를 지원하는 화상형성장치 및 그 방법

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200201A (ja) * 1993-12-28 1995-08-04 Nissin Electric Co Ltd プリンタサーバ装置
JPH10173890A (ja) * 1996-12-09 1998-06-26 Fuji Xerox Co Ltd リモート操作可能なファクシミリ装置
EP0874306A2 (en) 1997-04-15 1998-10-28 Xerox Corporation Network printing system
JPH11112775A (ja) * 1997-10-08 1999-04-23 Murata Mach Ltd ファクシミリ装置及び通信ネットワークシステム
EP0915601A2 (en) 1997-11-04 1999-05-12 Hewlett-Packard Company Input/output device for peripheral equipment
JP2001345979A (ja) * 2000-05-30 2001-12-14 Ricoh Co Ltd 監視システム
JP2002032331A (ja) * 2000-07-13 2002-01-31 Cross Head Kk コンテンツ配信システム、コンテンツ配信方法、コンテンツ配信のための複合機能付複写機、本システムに用いられる複合機能付複写機及び携帯情報端末等のユーザーインターフェイス

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP1489520A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1592222A3 (en) * 2004-04-26 2006-07-19 Ricoh Company, Ltd. Service providing method, service providing apparatus, computer-readable storage medium and computer program product

Also Published As

Publication number Publication date
CN1980247B (zh) 2010-06-23
EP1489520B1 (en) 2015-07-15
US20100220348A1 (en) 2010-09-02
CN100351818C (zh) 2007-11-28
US20040267808A1 (en) 2004-12-30
US7743162B2 (en) 2010-06-22
CN1980247A (zh) 2007-06-13
EP1489520A1 (en) 2004-12-22
US8549162B2 (en) 2013-10-01
EP1489520A4 (en) 2008-06-25
CN1592893A (zh) 2005-03-09

Similar Documents

Publication Publication Date Title
WO2003081443A1 (fr) Dispositif de formation d&#39;images comportant une fonction de service web
US6020973A (en) Centralized print server for interfacing one or more network clients with a plurality of printing devices
WO2011080994A1 (en) Server apparatus, terminal apparatus, and printing system and data conversion method thereof
US20040205376A1 (en) Service processing system, processing result management device and processing result checking method of service processing system
US20090063612A1 (en) Image forming apparatus and image forming system
US20100220352A1 (en) Image forming apparatus, image forming system, and information processing method
JP4291856B2 (ja) Webサービス機能を有する画像形成装置
JP2005310171A (ja) プログラム生成処理をコンピュータに行わせるためのコンピュータ読み取り可能なプログラム
JP3831352B2 (ja) プログラム生成処理をコンピュータに行わせるためのコンピュータ読み取り可能なプログラム
JP4141209B2 (ja) Webサービス機能を有する画像形成装置
US8271621B2 (en) Metadata communication system
JP4130108B2 (ja) Webサービス機能を有する画像形成装置
JP4291855B2 (ja) Webサービス機能を有する画像形成装置
JP4373692B2 (ja) Webサービス機能を有する画像形成装置
JP4136738B2 (ja) Webサービス機能を有する画像形成装置
JP2004005503A (ja) Webサービス機能を有する画像形成装置
JP2006020341A (ja) Webサービス機能を有する画像形成装置
JP3977039B2 (ja) 画像情報処理装置用通信プログラム生成方法および画像情報処理装置用通信プログラム生成装置
JP5046818B2 (ja) 画像形成装置、画像形成装置内のデータ処理方法、及びデータ処理プログラム
US20050068559A1 (en) Enabling a heterogeneous imaging device to operate as a homogeneous device
JP4141210B2 (ja) Webサービス機能を有する画像形成装置
JP4130109B2 (ja) Webサービス機能を有する画像形成装置
JP2004272888A (ja) サービス提供装置、ユーザ端末装置、サービス提供方法、サービス利用方法、サービス提供プログラム、サービス利用プログラム及び記録媒体
JP5140350B2 (ja) 情報処理装置
JP5090828B2 (ja) 情報処理装置

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): CN US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PT RO SE SI SK TR

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 10490978

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2003715406

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 20038015641

Country of ref document: CN

WWP Wipo information: published in national office

Ref document number: 2003715406

Country of ref document: EP