0
요청에 삽입되는 요소를 제거하는 방법을 알고 싶습니다.공장에서 생성 된 요소를 제거하십시오 python suds
from suds.client import Client
client = Client('http://localhost/Service?wsdl')
lookup = client.factory.create('ns3:retreive')
lookup.person = 'Dave'
이것은 suds가 생성하는 것입니다.
<body>
<retrieve>
<random>
<person>Dave</person>
</random>
</retrieve>
<body>
어떻게 임의의 요소를 제거 할 수 있습니까?
# Remove entityType from the search input if it is None. This is
# because if it is None, suds will insert an empty element
# (<entityType/>) into the request, which the server doesn't like.
if searchInput.entityType.value == None:
del searchInput.entityType
: 여기