第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

suds Send None屬性

suds Send None屬性

胡說叔叔 2021-03-08 17:13:12
我正在嘗試調(diào)用需要Null(None)屬性但將suds刪除的服務(wù)。我需要發(fā)送..<ns1:Body>  <ns0:QueryIntersection>     <ns0:intersectingRoad>        <ns2:RoadName xsi:nil="true"/>        <ns2:RoadType xsi:nil="true"/>     </ns0:intersectingRoad>     <ns0:subjectRoad>        <ns2:RoadName>BURKE</ns2:RoadName>        <ns2:RoadType>ROAD</ns2:RoadType>     </ns0:subjectRoad>  </ns0:QueryIntersection>但suds刪除了IntersectingRoad對象,僅發(fā)送<ns1:Body>  <ns0:QueryIntersection>     <ns0:subjectRoad>        <ns2:RoadName>BURKE</ns2:RoadName>        <ns2:RoadType>ROAD</ns2:RoadType>     </ns0:subjectRoad>  </ns0:QueryIntersection>如果我在IntersectingRoad對象中設(shè)置值之一,它將發(fā)送它并正常工作,但None也是有效的請求。這是我正在使用的代碼的一部分...Int1 = client.factory.create('ns2:IntersectingRoad')Int1.RoadName = NoneInt1.RoadType = NoneInt2 = client.factory.create('ns2:SubjectRoad')Int2.RoadName = "BURKE"Int2.RoadType = "ROAD"try:    Ints = client.service.QueryIntersection(Int1,Int2, )except Exception as e:    print e.message請幫忙!
查看完整描述

1 回答

?
慕村9548890

TA貢獻1884條經(jīng)驗 獲得超4個贊

Suds具有用于傳遞可選參數(shù)的特殊null()函數(shù),因為None被視為缺少值。


我認為您的情況將如下所示:


from suds import null


Int1 = client.factory.create('ns2:IntersectingRoad')

Int1.RoadName = null()

Int1.RoadType = null()


查看完整回答
反對 回復(fù) 2021-03-27
  • 1 回答
  • 0 關(guān)注
  • 146 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號