2009-03-18 1 views
1

나는 작동하는 PHP 스크립트를 가지고 있으며 파이썬에서 같은 것을 작성해야하지만 SOAPpy는 약간 다른 요청을 생성하고 서버를 수정하는 방법을 잘 모르겠습니다.Python SOAPpy를 사용하여 Yahoo Enterprise Web Services에 액세스하는 방법은 무엇입니까?

은 PHP 스크립트에 의해 생성 된 요청은 다음과 같습니다

<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns1="http://marketing.ews.yahooapis.com/V4" 
> 
<SOAP-ENV:Header> 
<ns1:username>*****</ns1:username> 
<ns1:password>*****</ns1:password> 
<ns1:masterAccountID>*****</ns1:masterAccountID> 
<ns1:accountID>6674262970</ns1:accountID> 
<ns1:license>*****</ns1:license> 
</SOAP-ENV:Header> 
<SOAP-ENV:Body> 
<ns1:getCampaignsByAccountID> 
<ns1:accountID>6674262970</ns1:accountID> 
<ns1:includeDeleted>false</ns1:includeDeleted> 
</ns1:getCampaignsByAccountID> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

내가이 요청을받을 같은 사용 SOAPPy를 만들려고 노력 :

<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/1999/XMLSchema" 
> 
<SOAP-ENV:Header> 
<username xsi:type="xsd:string">*****</username> 
<masterAccountID xsi:type="xsd:string">*****</masterAccountID> 
<license xsi:type="xsd:string">*****</license> 
<accountID xsi:type="xsd:integer">6674262970</accountID> 
<password xsi:type="xsd:string">*****</password> 
</SOAP-ENV:Header> 
<SOAP-ENV:Body> 
<ns1:getCampaignsByAccountID xmlns:ns1="http://marketing.ews.yahooapis.com/V4"> 
<includeDeleted xsi:type="xsd:boolean">False</includeDeleted> 
<accountID xsi:type="xsd:integer">6674262970</accountID> 
</ns1:getCampaignsByAccountID> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

약간 다른 요청을하지만 난 그것을해야 추측 작동하지만 서버에서 오류가 발생했습니다 : "

헤더에 지정된 계정 ID가 매개 변수에 지정된 계정 ID와 일치하지 않습니다."

하지만 그들은 일치합니다!

내가 보는 유일한 것은 네임 스페이스의 일부 차이점이지만 지금 당장 무엇을해야할지 모릅니다. 도와주세요.

답변

0

accountID는 xsd : integer가 아닌 xsd : string 유형이어야합니다. (아마도 정수 대신 문자열을 전달하고 SOAPpy가 그렇게하는 이유일까요?)

+0

같은 결과를 불행히도 전달하려고했습니다. 어쨌든 답변 주셔서 감사합니다 :) 마감일이 가까워지면 지금 SOAPpy없이 해결하려고합니다. – Andrey

관련 문제