[Fedora-suds-list] error using the EPO's Open Patent Services

Gary Wilson Jr. gary.wilson at gmail.com
Thu Aug 27 03:38:28 UTC 2009


So, playing with the EPO service again (with the new multi-service
feature, thanks!), I'm using the following code:

from suds.client import Client
wsdl = 'http://ops.epo.org/wsdl/ops.wsdl'
client = Client(wsdl)
retrieve = getattr(client.service['OPSBiblioRetrievalService'],
'biblio-retrieval')
pub = client.factory.create('exch:publication-reference')
setattr(pub, '_data-format', "docdb")
doc = getattr(pub, 'document-id')
doc.country = "EP"
setattr(doc, 'doc-number', 1000000)
doc.kind = "A1"
retrieve(pub)

...which results in a server fault.  The generated request content is:

<SOAP-ENV:Envelope xmlns:ns0="http://www.epo.org/exchange"
xmlns:ns1="http://ops.epo.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <ns1:biblio-retrieval>
         <ns1:publication-reference data-format="docdb">
            <ns0:document-id>
               <ns0:country>EP</ns0:country>
               <ns0:doc-number
xsi:type="ns0:doc-numberType">1000000</ns0:doc-number>
               <ns0:kind xsi:type="ns0:kindType">A1</ns0:kind>
            </ns0:document-id>
         </ns1:publication-reference>
         <ns1:application-reference/>
         <ns1:priority-claim/>
         <ns1:publication-reference xsi:type="ns1:publication-referenceType"/>
         <ns1:application-reference xsi:type="ns1:application-referenceType"/>
         <ns1:priority-claim xsi:type="ns1:priority-claimType"/>
      </ns1:biblio-retrieval>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

...and what seems to be causing the problems are the empty elements
within the biblio-retrieval element.  Using the soapUI client [1], I
get a successful response if I remove those empty elements from the
above message.  From what soapUI reports, only one of the six
parameters there should be given, though I'm unsure of where that fact
can be inferred.  Is there a way I can make suds not put those empty
elements in the message, or is this a bug?

Thanks,
Gary

[1] http://www.soapui.org/




More information about the suds mailing list