This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to create a jar file that suits this specification? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to create a jar file that suits this specification?" Watch "How to create a jar file that suits this specification?" New topic
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
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to create a jar file that suits this specification?
 
Similar Threads
Unable to use the WS
Need help please...
common class folder
JDAVMail - NoSuchProviderException
msg=No Deserializer found to deserialize a ':return'