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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:39:05+00:00 2026-05-15T00:39:05+00:00

For a new project, we want to build a web service in Java using

  • 0

For a new project, we want to build a web service in Java using JAX-WS RI, and for the web service client, we want to use PHP.

In a small tutorial about JAX-WS RI I found this example web service:

package webservice;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;

@WebService
@SOAPBinding(style = Style.RPC)
public class Calculator {
    public long addValues(int val1, int val2) {
        return val1 + val2;
    }
}

and for the web server:

package webservice;

import javax.xml.ws.Endpoint;
import webservice.Calculator;

public class CalculatorServer {
    public static void main(String args[]) {
        Calculator server = new Calculator();
        Endpoint endpoint = Endpoint.publish("http://localhost:8080/calculator", server);
    }
}

Starting the Server and browsing the WDSL with the URL “http://localhost:8080/calculator?wsdl” works perfectly. But calling the web service from PHP fails.

My very simple PHP call looks like this:

$client = new SoapClient('http://localhost:8080/calculator?wsdl', array('trace' => 1));
echo 'Sum: '.$client->addValues(4, 5);

But then I either get a “Fatal error: Maximum execution time of 60 seconds exceeded…” or an “Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘http://localhost:8080/calculator?wsdl‘ …” exception.

I have tested the PHP SoapClient() with other web services and they work without any issues. Is there a known issue with JAX-WS RI in combination with PHP, or is there an error in my web service I didn’t see?

I have found this bug report, but even updating to PHP 5.3.2 didn’t solve the problem.

Can anyone tell me what to do? And by the way, my Java version running on Windows 7 x64 is the following:

java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)
  • 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-15T00:39:06+00:00Added an answer on May 15, 2026 at 12:39 am

    If it times out it looks like php isn’t able to resolve the WSDL URL properly. Have you tried a file_get_contents()/curl on the WSDL Url? Maybe try calling the IP instead of localhost and see how that goes.

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

Sidebar

Related Questions

I'm trying to build a new web app using Eclipse, I want to use
Im starting a new project for a client. The client want to build an
I'm working on a new project where I want to use Phil Haack Areas
i want to use stripes in our new project. This will take care of
I want to measure API evolution for a given Java project, in particular new/renamed
Background: I'm trying to build a web app (as a personal project using modern
I'm working with Aptana 3 to build a PHP-based web app using phpfog. I
I am using hudson CI to manage a straight java web project, using ant
I started a small web project and used Drupal to build it. So far,
I want to use Neo4j database and JRuby on Rails to build a new

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.