kartagis / pysimplesoap

Automatically exported from code.google.com/p/pysimplesoap
0 stars 0 forks source link

problem when trying to use a different host than the one in the wsdl #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. instantiate a client with a wsdl that has a host : http://localhost
2. as init parameters, set location to something different, say http://foo
3. when calling methods on the wsdl, they will always go to http://localhost 
instead of http://foo

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
linux python 2.4

Please provide any additional information below.
commented out a line, not sure if that has other effects:

client.py:676, commented out the line that looks like
#self.location = port['location']

Original issue reported on code.google.com by hector.y...@gmail.com on 30 Oct 2010 at 9:21

GoogleCodeExporter commented 8 years ago
This is not a problem, it is a design decision to use WSDL data when available 
(location is defined per port basis at the webservice description, I think 
there could be many locations per ws).

Anyway, you could change the location looking at the SoapClient.service 
dictionary

And yes, I think your change has further unwanted side effects, making WSDL 
parser less useful, having to harcode by hand the location (that is not 
documented and may be error prone), that should be used only when no WSDL is 
available.

Original comment by reingart@gmail.com on 24 Nov 2010 at 12:02