Thread

Posted on Mon Apr 28 20:31:15 2008 by asawczyn
Specifying the server URL from a client.
I've created a web service with SOAP::WSDL and now I'm writing a client. I'd like to test this client against a few different instances of this web service where each web service is on a different server. Using a couple of the included examples as template, this is how I am accessing my web service from the client...
my $soap = HotelInterfaces::HotelWebService::HotelWebService->new(); ... $result = $soap->cancel_request({shop_request_id => $shop_request_id});

Doing things this way, is it possible to specify the URL of the server? I tried the following but it did not work...
my $soap = HotelInterfaces::HotelWebService::HotelWebService->new( {proxy => $url} );
Direct Responses: 7782 | Write a response
Posted on Mon Apr 28 20:37:33 2008 by mkutter in response to 7781
Re: Specifying the server URL from a client.
Hi,

passing the URL as you stated should actually work:
my $interface = Interface::SomeService::SomePort->new({ proxy => $url, });

Which version are you using?

Martin
Direct Responses: 7783 | Write a response
Posted on Mon Apr 28 21:04:13 2008 by asawczyn in response to 7782
Re: Specifying the server URL from a client.
I am using version 2.00.33. This is the error I am receiving:
no transport class found for scheme <> at /usr/lib/perl5/site_perl/5.8.8/SOAP/WSDL/Factory/Transpor +t.pm line 80.
If it should work maybe I am doing something else wrong. Maybe I should revert back to 2.00.01.
Direct Responses: 7784 | Write a response
Posted on Mon Apr 28 21:07:34 2008 by mkutter in response to 7783
Re: Specifying the server URL from a client.
Hi,
this sounds like SOAP::WSDL cannot determine the protocol used. Your URL sure starts with http:// or https://?
Martin
Direct Responses: 7785 | Write a response
Posted on Mon Apr 28 21:28:16 2008 by asawczyn in response to 7784
Re: Specifying the server URL from a client.
Thank you! I did in fact have a typo in the URL. I guess I've been staring at the same lines of code for so long that I was blind to the mistake.
Write a response