1 / 16

Service Generation Framework

Service Generation Framework. Prasad Konka caCORE SDK Team August 10, 2010. Scope. Generate various service artifacts Provide pluggable business interface implementation to facilitate loose coupling between service and business implementation

galena
Download Presentation

Service Generation Framework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Service Generation Framework Prasad Konka caCORE SDK Team August 10, 2010

  2. Scope • Generate various service artifacts • Provide pluggable business interface implementation to facilitate loose coupling between service and business implementation • Assemble service artifacts and business implementation to generate deployable enterprise service.

  3. Service Generation Framework

  4. Templates

  5. Validation

  6. CXF • CXF code generation tools • Java to WSDL • WSDL to Java • XSD to WSDL • WSDL to XML • WSDL to SOAP • WSDL to service • WSDL to JavaScript • WSDL validator • Eclipse webtools

  7. Annotations package com.nih.nci.sdk.demo; @WebService public interface HelloWorld { String sayHi(@WebParam(name="text") String text);   }

  8. Annotations package com.nih.nci.sdk.demo; import javax.jws.WebService; @WebService(endpointInterface = " com.nih.nci.sdk.demo.HelloWorld", serviceName = "HelloWorld") @SOAPBinding(style=SOAPBinding.Style.DOCUMENT,use=SOAPBinding.Use.LITERAL,parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) public class HelloWorldImpl implements HelloWorld {   @WebMethod public String sayHi(String text) { System.out.println("sayHi called"); return "Hello " + text; } }

  9. Interceptors

  10. Interceptors public class MyInterceptor extends AbstractSoapInterceptor { public MyInterceptor() { super(Phase.USER_PROTOCOL); // MyInterceptor needs to run after SomeOtherInterceptor getAfter().add(SomeOtherInterceptor.class.getName()); // MyInterceptor needs to run before YetAnotherInterceptor getBefore().add(YetAnotherInterceptor.class.getName()); } ... }

  11. Interceptors @org.apache.cxf.interceptor.InInterceptors (interceptors = {"com.example.Test1Interceptor" }) @org.apache.cxf.interceptor.InFaultInterceptors (interceptors = {"com.example.Test2Interceptor" }) @org.apache.cxf.interceptor.OutInterceptors (interceptors = {"com.example.Test1Interceptor" }) @org.apache.cxf.interceptor.InFaultInterceptors (interceptors = {"com.example.Test2Interceptor","com.example.Test3Intercetpor" }) @WebService(endpointInterface = "org.apache.cxf.javascript.fortest.SimpleDocLitBare", targetNamespace = "uri:org.apache.cxf.javascript.fortest") public class HelloWorldImpl implements HelloWorld { public long sayHi(long arg) { return arg; } ... }

  12. Error Handling package com.example.customerservice; @WebFault(name="NoSuchCustomer") @XmlAccessorType( XmlAccessType.FIELD ) public class NoSuchCustomerException extends RuntimeException { /** * We only define the fault details here. Additionally each fault has a message * that should not be defined separately */ String customerName; }

  13. The approach

  14. Service Assembler

  15. Service Synchronization • Operations • Relationships • Properties • Domain object annotations

  16. Questions Q & A

More Related