Hi. First of all, my question is posted here:
http://stackoverflow.com/questions/2836331/change-web-service-url-for-a-suds-client-on-runtime-keeping-the-wsdl
but I didn't get to the solution.

What we have is a series of environments, with the same set of services. For
some environments (the local ones) we can get access to the wsdl, and thus
generating the suds client. For external environment, we cannot access the wsdl.
But being the same, I was hoping I can change just the URL without regenerating
the client. I've tried cloning the client, but it doesn't work.

Lets see some code:

    host='http://.../MyService.svc'
    wsdl_file = 'file://..../wsdl/MyService.wsdl'

    client = suds.client.Client(wsdl_file, location=host, cache=None)

    client.set_options(port='BasicHttpBinding_IMyService')

    result = client.service.IsHealthy()

That gives me this exception:

The message with Action 'http://tempuri.org/IMyService/IsHealthy' cannot be
processed at the receiver, due to a ContractFilter mismatch at the
EndpointDispatcher. This may be because of either a contract mismatch
(mismatched Actions between sender and receiver) or a binding/security mismatch
between the sender and the receiver. Check that sender and receiver have the
same contract and the same binding (including security requirements, e.g.
Message, Transport, None).

The thing is, if I set the client directly to the host, it works fine: client =
suds.client.Client(host)

I've tried cloning the client, but with the same exception. I've tried this:

    baseclient = suds.client.Client(host)

    client = baseclient.clone()

    client.options.location = otherhost
    ....

And even this:

    baseclient = suds.client.Client(host)

    client = baseclient.clone()

    client.options.location = host
    ....


And got the same exception.
Anyone can help me?


-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to