CXF OUTBOUND RESOURCE ADAPTER IBM WEBSPHERE 6.1 SAMPLE
======================================================
This sample demonstrates the new CXF outbound resource adapter. Notice that
it does not use the ra.xml file located in <CXF_HOME>/etc directory as does
the old outbound sample. Instead, it uses the ra.xml file in the sample's
etc directory. You may notice in ra.xml file that the new outbound connect-
ion classes have a new package name: org.apache.cxf.jca.outbound. The APIs
for new outbound resource adapter use that package name.
The src/demo/servlet/HelloWorldServlet.java source file illustrates how to
invoke the CXF outbound connector APIs.
The RAR deployment descriptor used in this demo is only configured to enable
outbound connection for clarity. It is perfectly fine to configure inbound
and outbound connector in the same RAR file.
The README.txt (this file) provides detailed instructions to run the sample
in IBM WebSphere 6.1. However, the cxf.rar and helloworld.war files built
by this sample can be deployed to other application servers as well. Please
consult application server vendor's documentation for instructions to deploy
in other application server environment.
In this sample, you will first build a resource adapter RAR file. Next, you
will create a web application and compile a WAR file. Upon receiving a
request, the web application will make outgoing calls to a CXF web service,
gather results, and send responses to the client.
The web application is a Servlet that accepts a HTTP request. It then looks
up a CXFConnectoryFactory from the application server's JNDI registry. The
CXFConnectoryFactory is the entry point to gain access to CXF web service.
The application calls the getConnection() method and gets back a
CXFConnection. With a CXFConnection, the application can get the web service
client by calling the getService() method. The application must close the
CXFConnection but the it can continue to use the web service client after the
connection has been closed.
The sole parameter to CXFConnectoryFactory.getConnection() method is
CXFConnectionSpec. The following fields of CXFConnectionSpec are required:
serviceName - the QName of the service
endpointName - the QName of the endpoint (port name)
wsdlURL - the URL of the WSDL
serviceClass - the service interface class
The following fields of CXFConnectionSpec are optional:
busConfigURL - the URL of the CXF bus configuration. If this is provided, it
overrides the busConfigURL defined (if any) in the
CXFConnectionFactory custom property. (see the next paragraph)
address - the transport address
The CXF bus configuration can be configured in CXF resource adapter factory's
custom property (busConfigURL). More than one factory can be created for each
resource adapter. Each factory has a JNDI name and can have different custom
property values. The application can choose to (JNDI) lookup the factory (by
different JNDI name) it needs and picks up the factory's custom property
values. If busConfigURL in the CXFConnectionSpec is specified during the
getConnection() call, the value in the CXFConnectionSpec takes precedence over
the property value of the connection factory custom property. If no
busConfigURL value is set in neither CXFConnectionSpec nor connection factory,
default bus will be created.
Prerequisite
------------
For IBM WebSphere 6.1, you need to copy <CXF_HOME>/lib/wsdl4j-1.6.2.jar to
<WAS_HOME>/AppServer/java/jre/lib/endorsed. If the "endorsed" directory does
not exist, create a new one. You need to restart the WebSphere 6.1 server.
If your environment already includes cxf-manifest.jar on the
CLASSPATH, and the JDK and ant bin directories on the PATH
it is not necessary to set the environment as described in
the samples directory README. If your environment is not
properly configured, or if you are planning on using wsdl2java,
javac, and java to build and run the samples, you must set the
environment.
Building and running the sample using Ant
-----------------------------------------
From the base directory of this sample (i.e., where this README file is
located), the Ant build.xml file can be used to build and run the sample.
Build the common Servlet base jar
---------------------------------
(Unix) % cd ../common
% ant
% cd ../outbound.was
(Windows) > cd ..\common
> ant
> cd ..\outbound.was
Build CXF J2C RAR file
----------------------
(Unix) % ant generate.rar
(Windows) > ant generate.rar
The result RAR file is located in build/classes/lib/cxf.rar
Launch the application server
-----------------------------
The sample requires an application server (IBM WebSphere 6.1). Make sure
you have a running instance of an application server.
Enable Tracing CXF messages (Optional)
--------------------------------------
To see the full effect of this sample, you will need to enable trace log in
your application server.
Please consult your vendor documentation on setting tracing and log level.
Here are basic instructions to deploy the MDB in WebSphere 6.1.
1. Logon to WebSphere Integrated Solution Console. The default address is:
http://<hostname>:9060/ibm/console/login.do
2. Navigate to tree menu: Servers -> Application Servers
3. On the Application servers page, click of the target server (e.g. server1).
We will refer the target server as "server1" thereafter. Please subsitute
for a suitable server name in your environment.
4. On the next page (Application servers -> server1 in the Configuration tab)
and under Troubleshooting, click on Logging and Tracing.
5. On the Logging and Tracking page, click on Change Log Detail Levels.
6. On the next page, click on the Runtime tab.
7. On the next page, check the "Save runtime changes to configuration as well"
box. Enter the following in the textbox and then click OK.
*=info: org.apache.cxf.*=finest
The trace log is located in:
<WebSphere install>/AppServer/profiles/AppSrv01/logs/server/trace.log.
Please remember to remove the "org.apache.cxf.*=finest" entry in a production
environment.
Deploy the CXF JCA Connector
-----------------------------
The CXF JCA Connector must be deployed to the application server before
running the sample. The JCA Connector used in this sample has a unique
deployment descriptor (ra.xml) to demonstrate the direct invocation of
service implementation resides in the Message Driven Bean. Therefore, the
JCA Connector in this sample cannot be used by other JCA samples. Please
make sure there is no other CXF JCA Connector deployed into the application
server.
Please consult your vendor documentation on Resource Adapter deployment.
Here are basic instructions to deploy the CXF JCA connector in WebSphere 6.1.
1. Logon to WebSphere Integrated Solution Console. The default address is:
http://<hostname>:9060/ibm/console/login.do
2. Navigate to tree menu: Resources -> Resource adapters -> Resource adapters
3. On the Resource adapters page, click the "Install RAR" button.
4. On the Install RAR File page, select the "Local path" radio button if the
browser that you are running is on the same machine as the WebSphere server.
Otherwise, select the "Server path" radio button. Specify or browse to the
path build/lib/cxf.rar file of this sample. Then, click the "Next" button.
5. On the next page, click the "OK" button to install the Resource Adapter.
6. On the next page, click the "CXF JCA Connector" link to edit the Resource
Adatper.
7. On the "Configuration" page, click the "J2C connection factories"
link.
8. On the next page, click the "New" button to create a new connection
factory.
9. On the next page, enter "CXFConnectionFactory" in the Name textbox and click
the "OK" button.
Notice that the JNDI name is optional. If it is omitted, a JNDI name
is cr
没有合适的资源?快使用搜索试试~ 我知道了~
apache-cxf-2.0.9-src
共2000个文件
java:2541个
xml:665个
wsdl:434个
4星 · 超过85%的资源 需积分: 10 35 下载量 91 浏览量
2009-02-26
11:29:06
上传
评论
收藏 6.43MB ZIP 举报
温馨提示
apache CXF 2.0.9源代码....
资源推荐
资源详情
资源评论
收起资源包目录
apache-cxf-2.0.9-src (2000个子文件)
cxf_doc.css 3KB
servicelist.css 367B
w3c.html 4KB
w3c.html 4KB
test.html 3KB
package.html 1KB
about.html 1KB
package.html 1KB
attach.html 1KB
package.html 1002B
package.html 999B
package.html 987B
package.html 986B
package.html 959B
package.html 940B
package.html 932B
package.html 892B
test.html 820B
index.html 110B
package.html 99B
AbstractTypeTestClient.java 88KB
AbstractTypeTestClient3.java 85KB
AbstractTypeTestClient2.java 83KB
AbstractTypeTestClient4.java 82KB
ReflectionServiceFactoryBean.java 77KB
HTTPConduit.java 75KB
SequenceTest.java 57KB
CodeGenTest.java 50KB
HandlerInvocationTest.java 50KB
HandlerChainInvokerTest.java 49KB
CodeGenBugTest.java 42KB
EndpointReferenceUtils.java 40KB
StaxUtils.java 35KB
ClientServerTest.java 35KB
JettyHTTPDestinationTest.java 34KB
WSDLServiceBuilderTest.java 34KB
ContextUtils.java 34KB
MAPCodec.java 33KB
SoapBindingFactory.java 32KB
MAPCodecTest.java 31KB
JAXBEncoderDecoder.java 31KB
DestinationSequenceTest.java 30KB
MAPAggregatorTest.java 30KB
PolicyEngineTest.java 30KB
HTTPConduitTest.java 30KB
ServiceProcessor.java 29KB
WSDLServiceBuilder.java 29KB
JAXBDataBinding.java 28KB
RMManagerTest.java 27KB
ParameterProcessor.java 27KB
DispatchClientServerTest.java 27KB
PolicyUtils.java 27KB
BeanType.java 26KB
JaxWsServiceConfiguration.java 26KB
MAPAggregator.java 26KB
SSLUtils.java 26KB
CustomizationParser.java 25KB
WrapperHelperCompiler.java 25KB
XMLTypeCreator.java 25KB
JAXBDataBinding.java 25KB
RMTxStore.java 25KB
ServiceImpl.java 25KB
PolicyEngineImpl.java 24KB
HTTPConduitURLEasyMockTest.java 24KB
SOAPHandlerInterceptorTest.java 24KB
WSDLRefValidator.java 24KB
WSDLToSoapProcessorTest.java 23KB
RMTxStoreTest.java 23KB
AbstractHTTPDestination.java 23KB
ClientServerMiscTest.java 23KB
PhaseInterceptorChain.java 23KB
ServiceWSDLBuilder.java 23KB
VersionTransformer.java 22KB
WSDLToJavaContainer.java 22KB
RMSoapInterceptor.java 22KB
ClientImpl.java 22KB
RMEndpoint.java 22KB
DispatchHandlerInvocationTest.java 21KB
DefaultTypeMappingRegistry.java 20KB
MessageFlow.java 20KB
JettyHTTPServerEngine.java 20KB
HandlerChainInvoker.java 20KB
BeanTest.java 19KB
JAXBEncoderDecoderTest.java 19KB
WSDLQueryHandler.java 19KB
AegisDatabinding.java 19KB
RMManager.java 19KB
JavaToProcessorTest.java 19KB
RetransmissionQueueImpl.java 19KB
DispatchInDatabindingInterceptor.java 19KB
WSIBPValidator.java 19KB
SOAPBindingUtil.java 19KB
JMSClientServerTest.java 18KB
ConfiguredEndpointTest.java 18KB
ColocOutInterceptorTest.java 18KB
JAXBSchemaInitializer.java 18KB
AutomaticWorkQueueTest.java 18KB
DispatchOutDatabindingInterceptor.java 17KB
JAXBUtils.java 17KB
DynamicClientFactory.java 17KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- Javapre2015-06-09研究一下。谢谢分享。
oop_ming2
- 粉丝: 1
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功