Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(at': 0.03; 'attribute': 0.05; 'method.': 0.05; 'modify': 0.05; 'schema': 0.05; '(of': 0.07; 'assign': 0.07; 'attributes': 0.07; 'prefix': 0.07; 'soap': 0.07; 'statically': 0.07; 'used.': 0.07; 'namespace': 0.09; 'prefixes': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:using': 0.09; 'underlying': 0.09; 'way:': 0.09; 'component': 0.15; 'attributes.': 0.16; 'expects': 0.16; 'fine.': 0.16; 'marshalled': 0.16; 'nodes': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'relevant.': 0.16; 'subject:python.': 0.16; 'subject:sending': 0.16; '(in': 0.18; 'question.': 0.20; 'elements': 0.23; 'this:': 0.23; 'seems': 0.23; '(this': 0.24; 'feature': 0.24; 'least': 0.25; 'header:User-Agent:1': 0.26; 'looks': 0.26; 'components': 0.27; 'see,': 0.27; 'correct': 0.28; 'header:X-Complaints-To:1': 0.28; 'node': 0.29; 'subject:like': 0.29; 'thus,': 0.29; 'writes:': 0.29; 'case,': 0.29; 'standards': 0.30; 'server.': 0.32; 'subject:change': 0.33; 'to:addr:python-list': 0.33; 'server': 0.35; 'needed': 0.35; 'whatever': 0.35; 'something': 0.35; 'received:org': 0.36; 'but': 0.36; 'child': 0.36; 'client': 0.36; 'test': 0.36; 'should': 0.36; 'charset:us-ascii': 0.36; 'problems': 0.36; 'possible': 0.37; 'bad': 0.37; 'xml': 0.37; 'does': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'supports': 0.38; 'some': 0.38; 'description': 0.39; 'to:addr:python.org': 0.39; 'application': 0.40; 'skip:" 10': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'your': 0.60; 'remove': 0.61; 'developed': 0.62; 'world': 0.63; 'skip:n 10': 0.63; 'information': 0.63; 'email addr:gmail.com': 0.63; 'subject:skip:M 10': 0.65; 'subject:. ': 0.66; 'visa': 0.66; 'received:217': 0.68; 'manner': 0.74; 'yourself': 0.77; 'elementary': 0.84; 'fortunately,': 0.84; 'standards.': 0.84; 'subject:before': 0.84; 'unsuccessful': 0.84; 'subject:services': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: dieter Subject: Re: SOAP web services using python. Would like to change the Envelope Document using MessagePlugin before sending it using suds Date: Tue, 19 Feb 2013 09:56:46 +0100 References: <56de6558-2701-4193-8f79-96a1599be5da@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gmane-NNTP-Posting-Host: pd9e08e84.dip0.t-ipconnect.de User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux) Cancel-Lock: sha1:HQR8G+UEE1T0khIOOCQCF2NoJbc= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 71 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361264218 news.xs4all.nl 6912 [2001:888:2000:d::a6]:48009 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39192 sarat.devineni@gmail.com writes: > My current SOAP request sent via suds.client looks like this: > > > > > > > > Test > > > > > > > This request fails on my server. If i take the same XML request and massage it and send it visa SOAPUI, it works fine. What I did was > > > > > > > > Test > > > > > > > As you see, I had to change SOAP-ENV to soapenv, modify node ns5:saveModule to saveModule and also remove attributes such xsi:type to other child nodes Looks as if you had a bad WSDL description of your service and a server which fails to honor elementary standard elements (of the "XML-namespace" standard, in particular). The XML-namespace standard dictates that the concrete namespace prefixes are (apart from some "xml" prefixes) insignificant; namespace prefixes are use only to refer to namespace uris and only these uris are relevant. Thus, a standard conform XML-namespace application should world with whatever prefix is used as long as they refer to the correct namespace uri. According to the standard, "xsi:type" is used when the underlying schema (in your WSDL) does not statically determine the type. In this case, missing type information is provided by "xsi:type". A standard conform application should not have problems with "xsi:type" attributes. Alternatively, the schema (in the WSDL) can assign types and "suds" will not generate "xsi:type" attribute (at least not in simple cases). > How can I , modify the request in above manner using suds.client. Documentation suggests to use a plugin with Client using marshalled method. But I was unsuccessful I cannot answer you concrete question. However, when you are working with a component that does not honor standards (this seems to be the case for your server component), it may not be possible to use (other) components developed against those standards. In your particular case, it might be necessary to generate the SOAP messages yourself - in the peculiar way, your server expects them - rather than use "suds". By the way: when I remember right, then "suds" supports some control over the namespace prefixes used. Apparently, servers not honoring the XML-namespace standard are not so rare. Fortunately, I never needed this feature but I think I have read something about it in the "suds" documentation.