2017-01-03 7 views
1

이제 UCM 11.5 테스트 환경에서 작동하는 SOAP 요청을 받았습니다. 하지만 나는 이걸로 고민하고있다. 전화 업데이트. 나는 또한 cucm_server의 출력 만 updatePhone 부분이 포함됩니다python3, suds, SOAP 요청을 사용하는 Cisco AXL updatePhone

suds.TypeNotFound: Type not found: 'name' 

:

import ssl 
from suds.client import Client 

ssl._create_default_https_context = ssl._create_unverified_context 
username = 'Administrator' 
passwd = 'Password' 
wsdl_url = 'http://host.domain.com/axlsqltoolkit/schema/11.5/AXLAPI.wsdl' 
service_url = 'https://host.domain.com/axl/' 
cucm_server = Client(wsdl_url, location = service_url, username=username, password=passwd) 

def UpdatePhoneByName(cucm_server): 
    result = cucm_server.service.updatePhone({'name': 'SEP0023331B4DBB','description': 'Haasdfllo'}) 
    print(result) 
    return 
UpdatePhoneByName(cucm_server) 

나는 다음과 같은 결과를 얻을.

updatePhone(ns0:String100 name, ns0:XUUID uuid, ns0:UniqueString128 newName, ns0:String128 description, ns0:XFkType callingSearchSpaceName, ns0:XFkType devicePoolName, ns0:XFkType commonDeviceConfigName, ns0:XFkType commonPhoneConfigName, ns0:XNetworkLocation networkLocation, ns0:XFkType locationName, ns0:XFkType mediaResourceListName, ns0:XMOHAudioSourceId networkHoldMohAudioSourceId, ns0:XMOHAudioSourceId userHoldMohAudioSourceId, ns0:XFkType automatedAlternateRoutingCssName, ns0:XFkType aarNeighborhoodName, ns0:XLoadInformation loadInformation, ns0:XVendorConfig vendorConfig, ns0:String128 versionStamp, ns0:boolean traceFlag, ns0:String128 mlppDomainId, ns0:XStatus mlppIndicationStatus, ns0:XPreemption preemption, ns0:XStatus useTrustedRelayPoint, ns0:boolean retryVideoCallAsAudio, ns0:XFkType securityProfileName, ns0:XFkType sipProfileName, ns0:XFkType cgpnTransformationCssName, ns0:boolean useDevicePoolCgpnTransformCss, ns0:XFkType geoLocationName, ns0:XFkType geoLocationFilterName, ns0:boolean sendGeoLocation, ns0:removeLines removeLines, ns0:addLines addLines, ns0:lines lines, ns0:XFkType phoneTemplateName, ns0:speeddials speeddials, ns0:busyLampFields busyLampFields, ns0:XFkType primaryPhoneName, ns0:XStatus ringSettingIdleBlfAudibleAlert, ns0:XStatus ringSettingBusyBlfAudibleAlert, ns0:blfDirectedCallParks blfDirectedCallParks, ns0:addOnModules addOnModules, ns0:XUserLocale userLocale, ns0:XCountry networkLocale, ns0:XInteger idleTimeout, xs:string authenticationUrl, xs:string directoryUrl, xs:string idleUrl, xs:string informationUrl, xs:string messagesUrl, xs:string proxyServerUrl, xs:string servicesUrl, ns0:services services, ns0:XFkType softkeyTemplateName, ns0:XFkType defaultProfileName, ns0:boolean enableExtensionMobility, ns0:XBarge singleButtonBarge, ns0:XStatus joinAcrossLines, ns0:XStatus builtInBridgeStatus, ns0:XStatus callInfoPrivacyStatus, ns0:XStatus hlogStatus, ns0:XFkType ownerUserName, ns0:boolean ignorePresentationIndicators, ns0:XPacketCaptureMode packetCaptureMode, ns0:XInteger packetCaptureDuration, ns0:XFkType subscribeCallingSearchSpaceName, ns0:XFkType rerouteCallingSearchSpaceName, ns0:boolean allowCtiControlFlag, ns0:XFkType presenceGroupName, ns0:boolean unattendedPort, ns0:boolean requireDtmfReception, ns0:boolean rfc2833Disabled, ns0:XCertificateOperation certificateOperation, ns0:XAuthenticationMode authenticationMode, ns0:XKeySize keySize, ns0:XKeyOrder keyOrder, ns0:XECKeySize ecKeySize, ns0:String128 authenticationString, xs:string upgradeFinishTime, ns0:XStatus deviceMobilityMode, ns0:boolean remoteDevice, ns0:XDNDOption dndOption, ns0:XRingSetting dndRingSetting, ns0:boolean dndStatus, ns0:boolean isActive, ns0:XFkType mobilityUserIdName, ns0:XPhonePersonalization phoneSuite, ns0:XPhoneServiceDisplay phoneServiceDisplay, ns0:boolean isProtected, ns0:boolean mtpRequired, ns0:XSIPCodec mtpPreferedCodec, ns0:XFkType dialRulesName, ns0:String50 sshUserId, ns0:String255 sshPwd, ns0:String255 digestUser, ns0:XOutboundCallRollover outboundCallRollover, ns0:boolean hotlineDevice, ns0:String255 secureInformationUrl, ns0:String255 secureDirectoryUrl, ns0:String255 secureMessageUrl, ns0:String255 secureServicesUrl, ns0:String255 secureAuthenticationUrl, ns0:String255 secureIdleUrl, ns0:XStatus alwaysUsePrimeLine, ns0:XStatus alwaysUsePrimeLineForVoiceMessage, ns0:XFkType featureControlPolicy, ns0:XDeviceTrustMode deviceTrustMode, ns0:boolean earlyOfferSupportForVoiceCall, ns0:boolean requireThirdPartyRegistration, ns0:boolean blockIncomingCallsWhenRoaming, xs:string homeNetworkId, ns0:boolean AllowPresentationSharingUsingBfcp, ns0:confidentialAccess confidentialAccess, ns0:boolean requireOffPremiseLocation, ns0:boolean allowiXApplicableMedia, ns0:XFkType cgpnIngressDN, ns0:boolean useDevicePoolCgpnIngressDN, ns0:String128 msisdn, ns0:boolean enableCallRoutingToRdWhenNoneIsActive, ns0:XFkType wifiHotspotProfile, ns0:XFkType wirelessLanProfileGroup, ns0:XFkType elinGroup) 

또한 uuid, _uuid_name으로 시도했지만 아무것도 작동하는 것 같다 없습니다.

도움을 주시면 감사하겠습니다.

답변

0

WSDL을 확인 했습니까? 맞습니까? 그것은 '이름'을 정의합니까?

문서를 간략하게 살펴 봤습니다. 질문에 print cucm_server의 결과를 포함 시키십시오. 내가 보는 것에 따르면, 메서드는 명명 된 매개 변수를 취합니다. 단 하나의 dict입니다.

어쨌든 비눗물을 사용하지 못했습니다. 나는 Zeep로 돌아왔다. 그것은 마치 매력처럼 작동한다.

+0

내가 SoapUI와 같은 WSDL 성공적인 요청을했다, 그래서 이것은해야 문제가되지 마라. –

0

나는 형식이 같은 생각 updatePhone = cucm_server.service.updatePhone (UUID = UUID, newName로 = newname의, 설명 = 설명)