Skip to main content

Unable to initialize stub with custom service url

1 reply [Last post]
ssteiner
Offline
Joined: 2005-04-25
Points: 0

Hi

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: {http://tempuri.org/}ServiceLauncher

So I tried plugging "{http://tempuri.org/}ServiceLauncher" as well as "http://tempuri.org/ServiceLauncher" 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.

Regards
Stephan

Reply viewing options

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

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("http://tempuri.org/", "ServiceLauncher"));