I created a JAX-WS Web Service and an EJB skeleton from a WSDL file by following a Tutorial in the Rational Application Developer for WebSphere 8.0.4 help.
It created an EJB project to contain my EJB code. It created an EJBEar project to build an ear file. It created a RouterWebProject to create a war file.
The RouterWebProject provides servlet information so that I can post an HTTP soap request to the servlet to be routed to my web service code in the EJB.
The EJB service code calls a class in the same EJB project that uses a ResourceBundle to read a property file with the name AppSDKExamples.properties
static {
ResourceBundle props = ResourceBundle.getBundle("AppSDKExamples", Locale.getDefault());
brokerPartnerId = props.getString("broker.partner.id");
buyPartnerId = props.getString("svc.dealer.partner.id");
sellPartnerId = props.getString("platform.partner.id");
sellPartnerId2 = props.getString("platform.partner.id2");
accountNumber = props.getString("account.number");
}
I have tried placing the AppSDKExamples.properties file everywhere I can think of but I always get a java.util.MissingResourceException.
How do I make this property file available to the EJB code?
Currently the EJB ear looks like this:
- lib/AppSDKExamples.properties
- lib/AppSDKExamples_en_US.properties
- lib/other jar files
- META-INF/MANIFEST.MF (this does not contain a class path I can't figure out how to set it.)
- EJB.jar
- WebProject.war
The EJB.jar looks like this:
- com/activant/web/services/examples/class files that look for the property file
- com/activant/web/services/iaptest/class files for the web service
- META-INF/MANIFEST.MF (this has the AppSDKExamples.properties and AppSDKExamples_en_US.properties in the classpath)
- AppSDKExamples.properties
- AppSDKExamples_en_US.properties
The war file looks like this:
- lib contains same jar files as the EJB.jar files has
- META-INF (Class-Path: /lib EJB.jar)
- WEB-INF/classes this folder contains both the propertie files.
- WEB-INF/lib this folder contains both the properties files.
- WEB-INF/ibm-web-bnd.xml
- WEB-INF/ibm-web-ext.xml
- WEB-INF/web.xml
Any help on this would be greatly appreciated. Thanks.