Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Java client connect to soap server

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am new to this field. I used axis to generate client stub from wsdl. Now I created a java application and try to connect to the remote soap server. But never sucessful, the error is "Connection refused". Soap server uses SSL. Where goes wrong? Here is my client code. Your help is highly apprecdated.

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

import javax.xml.namespace.QName;

public class testClient
public static void main(String [] args) {
try {
String endpoint =

Service service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress( new );
call.setOperationName(new QName("", "echoString") );

String ret = (String) call.invoke( new Object[] { "Hello!" } );

System.out.println("Sent 'Hello!', got '" + ret + "'");
} catch (Exception e) {
Posts: 43027
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Does the call work over HTTP? Has the server certificate been imported top the clients keystore?

This introduction to SAAJ covers HTTPS at the very end, and may be a useful read.
[ February 10, 2007: Message edited by: Ulf Dittmer ]
    Bookmark Topic Watch Topic
  • New Topic