On Thu, Jun 9, 2011 at 6:04 PM, Ron Garret <ron(a)flownet.com> wrote:
Hello,
I'm new to Soap and Suds so please forgive me if this is a stupid question.
I'm able to connect to a server and access its services through the RPC
interface. The problem I'm having is that the WSDL I'm dealing with has
some "optional" elements that are actually not really optional but actually
have to be left out or the request won't validate. (There are no valid
values, so the element has to be absent from the request XML.) Is there a
way to do that (i.e. specify that an argument's corresponding XML should be
left out of the request) through the RPC interface?
You should be able to do this using a MessagePlugin. (
https://fedorahosted.org/suds/wiki/Documentation#MessagePlugin)
In your case, you'll want to override MessagePlugin.marshalled(), which
gives you the SOAP request envelope Docment object to modify at will. From
there, you can find the offending elements either by path or by walking the
whole document, and remove them.
--
david bonner // dbonner(a)adverplex.com