Implementing a Custom Spring Bean as an Event Sink

17-2 Oracle Complex Event Processing Developers Guide 9.0.0.0.jar com.sun.tools.ws.WsImport EchoService.WSDL Where ORACLE_CEP_HOME refers to the directory in which you installed Oracle CEP such as oracle_home. 3. Archive the generated .class files within the Oracle CEP application JAR file. For more information, see Section 4.7, Managing Libraries and Other Non-Class Files in Oracle CEP Projects . 4. Export the Web-Services Java packages for the client-code in the MANIFEST.MF file using the Export-Package header: Export-Package: com.oracle.ocep.sample.echoService; For more information, see Section 4.7.4, How to Export a Package . 5. Import the following packages to the Oracle CEP application in the MANIFEST.MF file using the Import-Package header: Import-Package: com.ctc.wstx.stax, com.sun.xml.bind.v2, com.sun.xml.messaging.saaj.soap, com.sun.xml.messaging.saaj.soap.ver1_1, com.sun.xml.ws, javax.jws, javax.xml.bind, javax.xml.bind.annotation, javax.xml.namespace, javax.xml.soap, javax.xml.transform, javax.xml.transform.stream, javax.xml.ws, javax.xml.ws.spi, org.xml.sax, weblogic.xml.stax; For more information, see Section 4.7, Managing Libraries and Other Non-Class Files in Oracle CEP Projects . 6. Use the client-code to invoke the Web Service as in any other Java application: EchoService service = new EchoService; EchoPort port = service.getEchoServicePort; String echo = port.echofoo;

17.3 How to Expose an Oracle CEP Application as a Web Service

This procedure describes how to expose an Oracle CEP application as a Web Service. In this scenario, the Oracle CEP application is the Web Service provider. To expose an Oracle CEP application as a Web service: 1. Create or obtain the WSDL for the Web Service. In this example, assume the use of a WSDL named EchoService.WSDL. 2. Implement the service. Consider using java.jws annotations WebService and WebMethod. 3. Add a bea-jaxws.xml file to your application bundle as Example 17–1 shows. Table 17–1 describes the attributes in this file. Configuring Web Services 17-3 Example 17–1 bea-jaxws.xml File endpoints endpoint nameEchoServicename implementation-class com.bea.wlevs.test.echo.impl.EchoServiceImpl implementation-class url-patternechourl-pattern wsdl-location META-INFwsdlecho.wsdl wsdl-location service-name {http:wsdl.oracle.comexamplescepecho}EchoService service-name port-name {http:wsdl.oracle.comexamplescepecho}EchoServicePort port-name endpoint endpoints For more information, see Section 4.7, Managing Libraries and Other Non-Class Files in Oracle CEP Projects .

4. Reference the bea-jaxws.xml file in the MANIFEST.MF file using the

BEA-JAXWS-Descriptor header: BEA-JAXWS-Descriptor: META-INFbea-jaxws.xml; For more information, see Section 4.7, Managing Libraries and Other Non-Class Files in Oracle CEP Projects .

5. Import the following packages to the Oracle CEP application in the MANIFEST.MF

file using the Import-Package header: Import-Package: com.ctc.wstx.stax, com.sun.xml.bind.v2, com.sun.xml.messaging.saaj.soap, com.sun.xml.ws, javax.jws, javax.xml.bind, javax.xml.bind.annotation, javax.xml.namespace, javax.xml.soap, javax.xml.transform, javax.xml.transform.stream, javax.xml.ws, Table 17–1 bea-jaxws.xml File Attributes Attribute Description name The name of the web service. implementation-class The class that implements the service. url-pattern The url pattern to access the webservice. wsdl-location Relative path to the wsdl in the bundle. service-name QName of the service. port-name QName of the port.