Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.이 콘텐츠는 선택한 언어로 제공되지 않습니다.
26.2. Implementing the Service Provider
Generating the implementation code 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
You generate the implementation class used to build your service provider with the code generator's
-impl
flag.
Tip
If your service's contract includes any custom types defined in XML Schema, you must ensure that the classes for the types are generated and available.
For more information on using the code generator see cxf-codegen-plugin.
Generated code 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
The implementation code consists of two files:
portTypeName.java
— The service interface(SEI) for the service.portTypeNameImpl.java
— The class you will use to implement the operations defined by the service.
Implement the operation's logic 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
To provide the business logic for your service's operations complete the stub methods in
portTypeNameImpl.java
. You usually use standard Java to implement the business logic. If your service uses custom XML Schema types, you must use the generated classes for each type to manipulate them. There are also some Apache CXF specific APIs that can be used to access some advanced features.
Example 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
For example, an implementation class for the service defined in Example 25.1, “HelloWorld WSDL Contract” may look like Example 26.2, “Implementation of the Greeter Service”. Only the code portions highlighted in bold must be inserted by the programmer.
Example 26.2. Implementation of the Greeter Service