This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create a jar file that suits this specification?

 
Yun Shang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15492
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!).
 
Yun Shang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, it works!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic