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

  • Home
  • SEARCH
  • 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 3357140
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:35:52+00:00 2026-05-18T02:35:52+00:00

I am developing some web services that must be implemented using JAXWS, and that

  • 0

I am developing some web services that must be implemented using JAXWS, and that must run on WebLogic 10.3, WebSphere 7 and Tomcat 5.5. Furthermore, installation of the services must be completely self-contained to avoid conflicts with any other applications in the container. WebLogic and WebSphere are solved, but tomcat gives me trouble.

Enabling tomcat for jaxws by using JAXWS-RI is functional, but installation of additional jars (jaxws.jar, jaxb.jar) in tomcat or jre is to be avoided.

Shipping my application with axis2 embedded inside the war is better, but the services get funny URIs. Take for example this service:

PortType generated with wsimport:

@WebService(name = "AuthenticationServicePortType", targetNamespace = "http://impl.auth.webservice.my.company")
@XmlSeeAlso({
    company.my.exposed.xsd.ObjectFactory.class,
    company.my.webservice.auth.impl.ObjectFactory.class
})
public interface AuthenticationServicePortType {

Implementation:

@WebService(
  portName = "AuthenticationServicePort", serviceName = "AuthenticationService",
  targetNamespace = "http://impl.auth.webservice.my.company", wsdlLocation = "WEB-INF/wsdl/AuthenticationService.wsdl",
  endpointInterface = "company.my.webservice.auth.impl.AuthenticationServicePortType"
)
public class AuthenticationServiceImpl implements AuthenticationServicePortType {

In WebSphere, WebLogic and tomcat+JAXWS-RI this service becomes available at the uri

http://localhost/MyProduct/services/AuthenticationService

However, with axis2 embedded inside the war, the service becomes available at the uri

http://localhost/MyProduct/services/AuthenticationService.AuthenticationServicePort

Because this is an upgrade of an existing service with a wide installed base, this change is not acceptable.

Configuring the service via services.xml has been removed from axis2’s jaxws support, so that is dead end.

Using Apache CXF instead of Axis2 is not a good solution because it could create a support nightmare.

The tomcat version of web.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <description>My web service</description>
    <display-name>MyProduct</display-name>
    <servlet>
        <description>JAX-WS endpoint for MyProduct</description>
        <display-name>MyProduct</display-name>
        <servlet-name>MyProduct</servlet-name>
        <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>MyProduct</servlet-name>
        <url-pattern>/services/*</url-pattern>
    </servlet-mapping>
</web-app>

I also modified axis2.xml to make it look for annotated classes among regular classes:

<deployer extension=".class" directory="classes" class="org.apache.axis2.jaxws.framework.JAXWSDeployer"/>

Two kinds of solutions would help:

  • A way of embedding JAXWS-RI inside the war, so nothing has to be installed in tomcat
  • A way to get Axis2 to deploy the services at regular URI’s (same as other containers)
  • 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. Editorial Team
    Editorial Team
    2026-05-18T02:35:53+00:00Added an answer on May 18, 2026 at 2:35 am

    I did not find a real solution to this problem, but I found a workaround.

    I used url rewriting (http://www.tuckey.org/urlrewrite/) to add the extra part in the URL.

    filter in web.xml:

    <filter>
        <filter-name>UrlRewriteFilter</filter-name>
        <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
        <init-param>
            <param-name>logLevel</param-name>
            <param-value>INFO</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>UrlRewriteFilter</filter-name>
        <url-pattern>/services/*</url-pattern>
    </filter-mapping>
    

    urlrewrite.xml:

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.2//EN"
            "http://tuckey.org/res/dtds/urlrewrite3.2.dtd">
    <urlrewrite>
        <rule>
            <note>
                Add .SomeServicePort to all urls
            </note>
            <from>/services/(.*)</from>
            <to>/services/$1.$1Port</to>
        </rule>
    </urlrewrite>
    

    Not beautyful but good enough.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing some client side Javascript that is using some JSON web services
After becoming somewhat estranged open source, and spending some years developing web applications in
I'm developing a web app in Perl with some C as necessary for some
Background We are developing some in-house utilities using ASP.NET 2.0. One of which is
What are some toolkits for developing 2D games in Python? An option that I
I'm developing a C# application that uses a handful of XML files and some
We're developing a .NET app that must make up to tens of thousands of
I'm developing a new set of web services at my company. My manager asked
I'm trying to upload documents to SharePoint using web services attaching custom metadata to
I'm new to SOA (and to Stack Overflow too...) Some services and web applications

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.