For a long time, the perception of using Oracle's SOA Suite was that its usage required deep XML knowledge. This has changed dramatically with SOA Suite 11g and the supporting tools. This talk will introduce you to the extended and enhanced Java capabilities all across the platform, the native support for Spring components inside composites, and the WebLogic SCA for Java container. Learn how to transparently leverage existing Java code, and let the platform worry about serialization and XML generation.
Elevate Developer Efficiency & build GenAI Application with Amazon Q
Java power to the SOA developer (ODTUG Kaleidoscope 2010)
1. Java Power to the SOA Developer ODTUG Kaleidoscope 2010 Wednesday, 30th June Clemens Utschig-Utschig Lucas Jellema AMIS, The Netherlands
2. Overview Three perspectives Java2SOA, SOA2Java, SOA running Java inside Invoking SOA Composite Application from Java WebService, EJB and ADF Binding; JMS Calling Java from SOA Composite application EJB binding, JMS Adapter Service; direct & socket Java exposed as WebService and as ADF-BC SDO Java inside BPEL Embedded Java; Mediator Java Callout Spring Context Service Component
3. From Java, To Java, Run Java ADF BC SDO ADF-BC Java Application JAX-WS Java Class Java Application EJB ADF EJB Java Application JMS Java Application JMS
4. Some material used from the book Shipping before OOW End of August On SOA and SOA Suite Chapters on Java inside SOA Suite (Java Callout, EmbeddedJava BPEL activity, Springcomponent) EJB and ADF Binding Interaction betweenSOA Suite & ADF SDO Services & BPEL
5. Invoking SOA Composite Application from Java Create Java WebService client (JAX-WS) Generate in JDeveloper, based on WSDL and XSD Call over HTTP with XML based messages Expose EJB Binding or ADF Binding from Composite Invoke over RMI with XML or (serialized) POJOs Interact from Java over JMS, through Direct Binding or Socket Adapter
6. Expose EJB Binding Create the SOA Composite application Create a Java Interface that describes the service to be exposed Create an EJB binding based on that interface as external Service exposed by the composite Create a Mediator wired to the EJB binding That routes incoming requests to ‘the rest of the composite’ Create the Java client that calls over RMI
11. Inbound ADF Binding Expose a service with binding.adf Based on the same WSDL as the binding.ws Wire this service to whatever the binding.ws service is wired to Incoming calls are overRMI and use XML according to WSDL/XSD
12. Client for ADF Binding Use SOA Suite run-time Java API Locator class pointed at t3://localhost:8001/soa-infra Lookup Composite default/FilterAndTranslateWithADFBinding!1.0 Find Service Invoke with XML message Response returned in XML
13. Overview Three perspectives Java2SOA, SOA2Java, SOA running Java inside Invoking SOA Composite Application from Java WebService, EJB and ADF Binding; JMS Calling Java from SOA Composite application EJB binding, JMS Adapter Service; direct & socket Java exposed as WebService and as ADF-BC SDO Java inside BPEL Embedded Java; Mediator Java Callout Spring Context Service Component
14. Invoking External Java based logic Expose Java application as JAX-WS WebService Expose ADF-BC with (SDO) Service Interface Use ADF-BC Binding Adapter and BPEL Entity Invoke Java EJB over EJB Binding Call out using Direct Binding or Socket Adapter Interact using JMS Adapter
15. Accessing Java based logic exposed by EJBs Create and deploy EJB Get (remote) Java Interface and JNDI name Create EJB Binding (reference) Configure with JNDI name and Java Interface Create wire to the EJB Binding A WSDL is automatically derived from the Java interface definition
19. ADF BC providing Data Access service to BPEL processes SOA Suite communicates with database through Database Adapter SQL (select, DML), PL/SQL and polling Alternatively, Service Data Objects and a Data Access Service can be used XML and HTTP based Stateful dataset & two-way synchronization
20. ADF Faces Web Application PatientAdministration (SDO) Web Service PatientsService Application Module PatientsService SOA Suite View Object PatientsVw E DN ADF Business Components Entity Object Patient PATIENTS
21. ADF BC, SDO and BPEL ADF BC Application Module can be exposed as Service Interface that is SDO enabled The SOA Suite ADF BC binding adapter connects to the SDO Service Interface BPEL Variables can be based on SDO Entity BPEL activity Create Entity does Insert BPEL activity Bind Entity does retrieve Assign in BPEL results in call to update on SDO
27. Overview Three perspectives Java2SOA, SOA2Java, SOA running Java inside Invoking SOA Composite Application from Java WebService, EJB and ADF Binding; JMS Calling Java from SOA Composite application EJB binding, JMS Adapter Service; direct & socket Java exposed as WebService and as ADF-BC SDO Java inside BPEL Embedded Java; Mediator Java Callout Spring Context Service Component
28. Run Java inside SOA Composite Extend BPEL processes with Embedded Java For manipulation of variables, auditing/logging,external call-outs, validation,.. Mediator Java Callout Before or after transformation ofrequest or reply For validation, transformation & enrichment, logging, … Spring Context service component
31. Add translations using Google’s RESTful Translation Service Java Class StringTranslator publishes a static method translate that will translate strings:
36. Java Embedding in BPEL process Hidden inside, not very decoupled Hard to maintain Mixing technology paradigms Requiring different skills In general: Useful for advanced logging/tracing Useful for special validations/transformations Use with great caution
37. Mediator Java Call-outs Mediators allow registration of a Java Callout class This class extends from AbstractJavaCalloutImpl May override methods invoke at specific momentsin thelife cycle
38. Mediator Java Call-outs Used for debugging & logging/auditing, advanced manipulation (enrichment?), complex validation
39. Java inside composites: Spring Component Primary citizen in SCA Composite applications As per the SCA Specification As per 11gR1 PS2 (preview in PS1) POJOs configured as Spring Beans provide services inside the Composite And potentially exposed externally Spring’s Dependency Injection is very similar to SCA’s Reference concept
40. Steps for adding Java logic to a composite application Add Spring Context to the composite A Spring Bean Configuration file is created Add bean definitions for POJOs based on Java Interfaces Add sca:service elements to exposebeans as service to other components Add sca:reference elements to get Service Components injected to satisfy a dependency
42. Use Case: Add PDF generation to a composite application PDF Generating Spring Bean is defined in the Spring Content – with an sca:service
43.
44. Dependency Injection: Spring Beans get Service Components injected Dependency injection is the heart and soul of Spring References in SCA are very similar Spring Beans can publish their dependencies as sca:reference elements That get exposed by the Spring Context These References can be satisfied by wiring in other Service Components Usually Mediator
48. 48 Summary and Conclusion SOA Composite applications can expose and access EJB bindings next to WebService BPEL Entity variables have direct SDO binding Service Adapters for Direct Binding, Sockets and JMS interact with Java applications both incoming and outgoing interaction Spring Context Service Component allows Spring Beans (POJOs) to be run inside SOA Spring Bean can be invoked as service Spring Bean can have service component injected
49. Resources Presentation and demos are on our blog http://technology.amis.nl/blog Contact me at:lucas.jellema@amis.nl