봉투무효 SUDS는
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>Invalid command.</faultstring>
<detail>
<mmfaultdetails>
<message>Invalid command.</message>
<errorcode>5001</errorcode>
</mmfaultdetails>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
을하지만 난 그것을 변경하는 경우 soapUI to
<SOAP-ENV:Envelope xmlns:ns0="http://menandmice.com/webservices/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns0:Login>
<ns0:server>localhost</ns0:server>
<ns0:loginName>user</ns0:loginName>
<ns0:password>pass</ns0:password>
</ns0:Login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
01 23,516,
는
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<LoginResponse xmlns="http://menandmice.com/webservices/">
<session>UEk6A0UC5bRJ92MqeLiU</session>
</LoginResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
그래서 내 질문에 내가 대신 <ns1:Body>
의 <SOAP-ENV:Body>
으로 몸의 태그를 만들 수 비눗물을 강제 할 수있다 성공적으로 반환 또는
class EnvelopeFixer(MessagePlugin):
def sending(self, context):
# context is the envelope text
print type(context)
context.envelope = context.envelope.upper()
print context.envelope
return context
콘솔에 프린트 아웃을 볼 수 있기 때문에 확인을 요구하고 트릭
class EnvelopeFixer(MessagePlugin):
def marshalled(self, context):
root = context.envelope.getRoot()
envelope = root.getChild("Envelope")
envelope.getChildren()[1].setPrefix("SOAP-ENV")
print envelope.getChildren()[1]
return context
그래서를 할 것으로 보인다되고있다 이제 body 요소의 접두어를 서버가 요구하는 것과 일치하도록 변경했습니다. 즐거움!
안녕하세요 davideagle, 내 개인 헤더를 수정하기 위해 내 게시물을 사용했습니다. 하지만 suds.client 용 모드를 디버깅하기 위해 비눗물을 설정했습니다. 내 필요에 따라 컨텍스트가 변경되었지만 볼 수 있습니다. 그러나 비눗물은 여전히 이전 버전을 보냈습니다. 너 나 좀 도와 줄 수있어? –
setup.py 빌드를 실행하고 setup.py를 다시 설치하기 전에 이전 달걀 파일을 제거 했습니까? – davideagle
왜해야합니까? 'virtualenv'를 사용하고 나서'pip install suds'를 사용하고 있습니다. –