Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 169987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:43:41+00:00 2026-05-11T12:43:41+00:00

I’ve been working with JAX-WS with Weblogic Server, using their Ant tasks to build

  • 0

I’ve been working with JAX-WS with Weblogic Server, using their Ant tasks to build EAR files that can be deployed on the server. I’ve gotten basic SOAP calls to work with JAX-WS, but now I’m trying to add some message-level security via WS-Security.

According to the documentation, there are two ways of adding security policies to web services. One is to use annotations on the Java source itself, but means that the policies are set forever. The second method is to add the policy files to the EAR file and then allow the administrator to set the policies for web services post-deployment.

While the documentation mentions where you must put the policy files, it fails to explain how to automatically add these policy files when doing a build with Ant. It would be entirely too laborious in testing to add the policy files manually every time I build/redeploy the EAR. Here’s the Ant code I use right now to build the EAR file:

<target name='build-service'>     <jwsc source' srcdir='java' destdir='${ear-dir}'>         <jws file='SoapService.java' type='JAXWS'/>     </jwsc> </target> 

How can I automatically build EAR with policy files into the right location? I’m most interested in building it into the WEB-INF/policies in the Java WAR file. You can assume I have the policy files on hand and can reference them before building.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:43:42+00:00Added an answer on May 11, 2026 at 12:43 pm

    For the record, the answer is to use <module> in conjunction with <zipfileset>:

    <target name='build-service'>     <jwsc srcdir='java' destdir='${ear-dir}'>         <module>             <jws file='SoapService.java' type='JAXWS'/>             <zipfileset dir='.' prefix='WEB-INF/policies'>                 <include name='mypolicy.xml'/>             </zipfileset>         </module>     </jwsc> </target> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have thousands of HTML files to process using Groovy/Java and I need to
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.