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 8127569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:34:38+00:00 2026-06-06T07:34:38+00:00

I am working on a Java Web Application that exposes a web service. This

  • 0

I am working on a Java Web Application that exposes a web service. This web service makes remote calls to two other java web services, on the same tomcat server. If i try to call methods from the other two services, I get a stack of errors that results in a NoSuchMethodError in the code that is automatically generated. I am using Netbeans 6.9, sun java 1.6 and apache tomcat 6.0.26. I tested the web services individually and they work fine.

Thank you for your time.

Let me be more specific

I have the RecommendationWeb web application with the RecommendationManager web service:

@WebService()
public class RecommendationManager {
    public ArrayList<Long> getRecommendation(long userId, int NumOfRecommendations) {
        List<RecommendedItem> recommendations = this.myHModel.getRecommendations(userId, NumOfRecommendations);
        ArrayList<Long> result = new ArrayList<Long>();
        Iterator itr = recommendations.iterator();
        while(itr.hasNext()) {
            RecommendedItem recItem = (RecommendedItem) itr.next();
            result.add(new Long(recItem.getItemID()));
        }
        return result;
    }
}

and the ETL_Procedures web application with the ETL_WS web service:

@WebService()
public class ETL_WS {
    public ArrayList<Long> getCorrespondingActiveCouponsForRecommendation(ArrayList<Long> itemCategories, int numOfRecoms) {
    int sumOfAllRecommendedCategories = 0;
    Iterator itr = itemCategories.iterator();
    ArrayList<Coupon> coupons = new ArrayList<Coupon>();
    ArrayList<Long> recommendedCoupons = new ArrayList<Long>();
    HashMap productOccurences = new HashMap();
    while(itr.hasNext()) {
        Long item = (Long) itr.next();
        int val = 0;
        ArrayList<Coupon> temp = (ArrayList<Coupon>) couponMap.getCoupon(item);
        if(temp != null) {
            Iterator itr_a = temp.iterator();
            while(itr_a.hasNext()) {
                val += 1;
                sumOfAllRecommendedCategories += 1;
                Coupon tmp_coupon = (Coupon) itr_a.next();
                if(tmp_coupon.isActive())
                    coupons.add(tmp_coupon);
            }
            productOccurences.put(item, new Integer(val));
        }
    }
    long currentCat = coupons.get(0).getItem_id();
    int categoryRecs = 0;
    Integer currentOccurence = (Integer) productOccurences.get(new Long(currentCat));
    int maxCategoryItems = (currentOccurence.intValue()/sumOfAllRecommendedCategories);
    int tempRecItems = 0;
    int listIndex = 0;
    while(tempRecItems < numOfRecoms && listIndex < coupons.size()) {
        if(categoryRecs < maxCategoryItems && currentCat == coupons.get(listIndex).getItem_id()) {
            recommendedCoupons.add(coupons.get(listIndex).getItem_id());
            listIndex += 1;
            tempRecItems += 1;
            categoryRecs += 1;
        }else if(categoryRecs < maxCategoryItems && currentCat != coupons.get(listIndex).getItem_id()) {
            recommendedCoupons.add(coupons.get(listIndex).getItem_id());
            currentCat = coupons.get(listIndex).getItem_id();
            currentOccurence = (Integer) productOccurences.get(new Long(currentCat));
            maxCategoryItems = (currentOccurence.intValue()/sumOfAllRecommendedCategories);
            categoryRecs = 1;
            listIndex += 1;
            tempRecItems += 1;
        }else {
            recommendedCoupons.add(coupons.get(listIndex).getItem_id());
            currentCat = coupons.get(listIndex).getItem_id();
            currentOccurence = (Integer) productOccurences.get(new Long(currentCat));
            maxCategoryItems = (currentOccurence.intValue()/sumOfAllRecommendedCategories);
            categoryRecs = 1;
            listIndex += 1;
            tempRecItems += 1;
        }
    }

    return recommendedCoupons;
}
}

Those two methods are called within the Recommended_Interface web application from the INTERFACE_LAYER web service:

@WebService()
public class INTERFACE_LAYER {
    public ArrayList<Long> requestRecommendation(long userID, int noOfRecoms) {
    ArrayList<Long> recommendedCoupons = null;
    ArrayList<Long> recommendedItems = (ArrayList<Long>) getRecommendation(userID, noOfRecoms);
        recommendedCoupons = (ArrayList<Long>) getCorrespondingActiveCouponsForRecommendation(recommendedItems, noOfRecoms);
    return recommendedCoupons;
}

private static java.util.List<java.lang.Long> getRecommendation(long arg0, int arg1) {
    ws.recommender.RecommendationManagerService service = new ws.recommender.RecommendationManagerService();
    ws.recommender.RecommendationManager port = service.getRecommendationManagerPort();
    return port.getRecommendation(arg0, arg1);
}

private static java.util.List<java.lang.Long> getCorrespondingActiveCouponsForRecommendation(java.util.List<java.lang.Long> arg0, int arg1) {
    ws.etl.ETLWSService service = new ws.etl.ETLWSService();
    ws.etl.ETLWS port = service.getETLWSPort();
    return port.getCorrespondingActiveCouponsForRecommendation(arg0, arg1);
}
}
  • 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-06-06T07:34:40+00:00Added an answer on June 6, 2026 at 7:34 am

    The reason for not working was the return value of the Web Service’s methods ArrayList. When I changed it to String, it worked.

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

Sidebar

Related Questions

I'm working on an existing Java web application (HTML/CSS/JS/JSP/Servlets and Java classes in this
I am working on the Java web service and using Tomcat server. Since this
I'm working on a web application that is Java EE 5. I may be
I have a decent working web application (Java/Servlet/Jsp) that I would like to improve
I am working on a java web application that gets hit about 400,000 times
I am working on a Java web application that I inherited that uses Spring
I have a java web application that I'm running with tomcat. This application has
I'm working with a legacy WebLogic application that contains a web-service application and a
I am working on an old Java web application that runs on Tomcat. I
I'm working on a Java web application (Adobe Flex front-end, JPA/Hibernate/BlazeDS/Spring MVC backend) and

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.