| Author |
How to create a jar file that suits this specification?
|
Yun Shang
Greenhorn
Joined: Dec 06, 2005
Posts: 2
|
|
I am trying to add a customized provider to Axis. In the Axis code, it specifies: /** Look for file META-INF/services/org.apache.axis.deployment.wsdd.Provider in all the JARS, get the classes listed in those files and add them to providers list if they are valid providers. Here is how the scheme would work. A company providing a new provider will jar up their provider related classes in a JAR file. The following file containing the name of the new provider class is also made part of this JAR file. META-INF/services/org.apache.axis.deployment.wsdd.Provider By making this JAR part of the webapp, the new provider will be automatically discovered. */ So for example, if I have a new Provider called AAAProvider, I have to put it under the "org.apache.axis.deployment.wsdd.Provider" package, right? But I don't quite understand the "META-INF/services/" part. Does it means that I put the class file in a dir like the following? services/org/apache/axis/deployment/wsdd/Provider/AAAProvider
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12950
|
|
It means this: 1. Create a file named org.apache.axis.deployment.wsdd.Provider (with dots, not a directory tree!). 2. In the file, add one line with the fully qualified class name of your implementation ("org.my.package.AAAProvider", for example). 3. Make sure the file you created in step 1 is in the directory META-INF/services in your JAR file (not in a directory services/org/... as you think!).
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
Yun Shang
Greenhorn
Joined: Dec 06, 2005
Posts: 2
|
|
Thank you, it works!
|
 |
 |
|
|
subject: How to create a jar file that suits this specification?
|
|
|