Skip to main content

Unable to initialize stub with custom service url

1 reply [Last post]
Joined: 2005-04-25


I'm trying to initialize a webservice stub using a custom url.

launcher = new ServiceLauncher(new URL(this.serviceUrl), new QName("ServiceLauncher"));

All I get for my trouble is a WebserviceException with the following content:

ServiceLauncher is not a valid service. Valid services are: {}ServiceLauncher

So I tried plugging "{}ServiceLauncher" as well as "" into the QName constructor but to no avail.

The Service definition looks as follows:


Does anyone have an idea what I'm doing wrong here? The same approach (using the service name in the QName constructor) is working fine for other webservices I'm using.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-04-25

I managed to figure it out on my own - somehow I ended up with the Stub class open in Netbeans and I had a look at the default constructor and saw how it uses the same two parameters constructor internally.. so I could simply replicate what is being done there.

Initializing the stub as follows works:

launcher = new ServiceLauncher(new URL(this.serviceUrl), new QName("", "ServiceLauncher"));