[Fedora-suds-list] Problem parsing a wsdl
Alastair Irving
alastair.irving at sjc.ox.ac.uk
Wed Nov 4 21:50:40 UTC 2009
Thank you, clearing the cache seems to have sorted it.
Alastair
Jeff Ortel wrote:
> Hey Alastair,
>
> This works for me (see output below). I'd suggest you navigate to your wsdl url below and
> validate that it is an XML document. Also, be sure to view the source and make sure it's
> really as the browser shows it. It looks good for me and suds has no problem with it.
> But, each web environment is different (proxies, caching, etc). Also, if you tried this
> and did some ctrl^c, you may have corrupted the suds cache. By default, suds uses a
> file-based cache and when you interrupt it while writing to the cache, it can corrupt the
> files. So, you can specify that suds *not* use any caching by using the /cache=None/
> option as follows:
>
> >
> > url = 'https://api.betfair.com/global/v3/BFGlobalService.wsdl'
> > client = Client(url, cache=None)
> >
>
> And/or, you can also clear the cache.
>
> On Linux: ( rm -f /tmp/suds/* )
> On Windows: sorry, don't know :)
>
> Hope this helps,
>
> Jeff
>
>
>
>
>
> ________________________________________________________________
>
> Test @ ( https://api.betfair.com/global/v3/BFGlobalService.wsdl )
>
> Suds ( https://fedorahosted.org/suds/ ) version: 0.3.8 (beta) build: R589-20091030
>
> Service ( BFGlobalService ) tns="http://www.betfair.com/publicapi/v3/BFGlobalService/"
> Prefixes (3)
> ns0 = "http://schemas.xmlsoap.org/soap/encoding/"
> ns1 = "http://www.betfair.com/publicapi/types/global/v3/"
> ns2 = "http://www.betfair.com/publicapi/v3/BFGlobalService/"
> Ports (1):
> (BFGlobalService)
> Methods (28):
> addPaymentCard(ns1:AddPaymentCardReq request, )
> convertCurrency(ns1:ConvertCurrencyReq request, )
> createAccount(ns1:CreateAccountReq request, )
> deletePaymentCard(ns1:DeletePaymentCardReq request, )
> depositFromPaymentCard(ns1:DepositFromPaymentCardReq request, )
> forgotPassword(ns1:ForgotPasswordReq request, )
> getActiveEventTypes(ns1:GetEventTypesReq request, )
> getAllCurrencies(ns1:GetCurrenciesReq request, )
> getAllCurrenciesV2(ns1:GetCurrenciesV2Req request, )
> getAllEventTypes(ns1:GetEventTypesReq request, )
> getEvents(ns1:GetEventsReq request, )
> getPaymentCard(ns1:GetPaymentCardReq request, )
> getSubscriptionInfo(ns1:GetSubscriptionInfoReq request, )
> keepAlive(ns1:KeepAliveReq request, )
> login(ns1:LoginReq request, )
> logout(ns1:LogoutReq request, )
> modifyPassword(ns1:ModifyPasswordReq request, )
> modifyProfile(ns1:ModifyProfileReq request, )
> retrieveLIMBMessage(ns1:RetrieveLIMBMessageReq request, )
> selfExclude(ns1:SelfExcludeReq request, )
> setChatName(ns1:SetChatNameReq request, )
> submitLIMBMessage(ns1:SubmitLIMBMessageReq request, )
> transferFunds(ns1:TransferFundsReq request, )
> updatePaymentCard(ns1:UpdatePaymentCardReq request, )
> viewProfile(ns1:ViewProfileReq request, )
> viewProfileV2(ns1:ViewProfileV2Req request, )
> viewReferAndEarn(ns1:ViewReferAndEarnReq request, )
> withdrawToPaymentCard(ns1:WithdrawToPaymentCardReq request, )
> Types (186):
> ns1:APIErrorEnum
> ns1:APIRequest
> ns1:APIRequestHeader
> ns1:APIResponse
> ns1:APIResponseHeader
> ns1:AccountStatusEnum
> ns1:AccountTypeEnum
> ns1:AddPaymentCardErrorEnum
> ns1:AddPaymentCardReq
> ns1:AddPaymentCardResp
> ns0:Array
> ns1:ArrayOfBFEvent
> ns1:ArrayOfCouponLinks
> ns1:ArrayOfCurrency
> ns1:ArrayOfCurrencyV2
> ns1:ArrayOfEventType
> ns1:ArrayOfLIMBValidationErrorsEnum
> ns1:ArrayOfMarketSummary
> ns1:ArrayOfPaymentCard
> ns1:ArrayOfRetrieveCardBillingAddressCheckLIMBMessage
> ns1:ArrayOfServiceCall
> ns1:ArrayOfSubmitCardBillingAddressCheckLIMBMessage
> ns1:ArrayOfSubscription
> ns1:ArrayOfValidationErrorsEnum
> ns1:BFEvent
> ns1:BillingPeriodEnum
> ns1:CardTypeEnum
> ns1:ConvertCurrencyErrorEnum
> ns1:ConvertCurrencyReq
> ns1:ConvertCurrencyResp
> ns1:CouponLink
> ns1:CreateAccountErrorEnum
> ns1:CreateAccountReq
> ns1:CreateAccountResp
> ns1:Currency
> ns1:CurrencyV2
> ns1:DeletePaymentCardErrorEnum
> ns1:DeletePaymentCardReq
> ns1:DeletePaymentCardResp
> ns1:DepositFromPaymentCardReq
> ns1:DepositFromPaymentCardResp
> ns0:ENTITIES
> ns0:ENTITY
> ns1:EventType
> ns1:ForgotPasswordErrorEnum
> ns1:ForgotPasswordReq
> ns1:ForgotPasswordResp
> ns1:GamcareLimitFreqEnum
> ns1:GenderEnum
> ns1:GetCurrenciesReq
> ns1:GetCurrenciesResp
> ns1:GetCurrenciesV2Req
> ns1:GetCurrenciesV2Resp
> ns1:GetEventTypesReq
> ns1:GetEventTypesResp
> ns1:GetEventsErrorEnum
> ns1:GetEventsReq
> ns1:GetEventsResp
> ns1:GetPaymentCardErrorEnum
> ns1:GetPaymentCardReq
> ns1:GetPaymentCardResp
> ns1:GetSubscriptionInfoReq
> ns1:GetSubscriptionInfoResp
> ns0:ID
> ns0:IDREF
> ns0:IDREFS
> ns1:KYCStatusEnum
> ns1:KeepAliveReq
> ns1:KeepAliveResp
> ns1:LIMBValidationErrorsEnum
> ns1:LoginErrorEnum
> ns1:LoginReq
> ns1:LoginResp
> ns1:LogoutErrorEnum
> ns1:LogoutReq
> ns1:LogoutResp
> ns1:MarketStatusEnum
> ns1:MarketSummary
> ns1:MarketTypeEnum
> ns1:MarketTypeVariantEnum
> ns1:ModifyPasswordErrorEnum
> ns1:ModifyPasswordReq
> ns1:ModifyPasswordResp
> ns1:ModifyProfileErrorEnum
> ns1:ModifyProfileReq
> ns1:ModifyProfileResp
> ns0:NCName
> ns0:NMTOKEN
> ns0:NMTOKENS
> ns0:NOTATION
> ns0:Name
> ns1:PaymentCard
> ns1:PaymentCardStatusEnum
> ns1:PaymentsErrorEnum
> ns1:PrivacyPolicyChangeResponseEnum
> ns0:QName
> ns1:RegionEnum
> ns1:RetrieveAddressCheckLIMBMessage
> ns1:RetrieveBirthDateCheckLIMBMessage
> ns1:RetrieveCardBillingAddressCheckLIMBMessage
> ns1:RetrieveChatNameChangeLIMBMessage
> ns1:RetrieveContactDetailsCheckLIMBMessage
> ns1:RetrieveLIMBMessageErrorEnum
> ns1:RetrieveLIMBMessageReq
> ns1:RetrieveLIMBMessageResp
> ns1:RetrievePasswordChangeLIMBMessage
> ns1:RetrievePersonalLIMBMessage
> ns1:RetrieveTCPrivacyPolicyChangeLIMBMessage
> ns1:Runner
> ns1:SecurityQuestion1Enum
> ns1:SecurityQuestion2Enum
> ns1:SelfExcludeErrorEnum
> ns1:SelfExcludeReq
> ns1:SelfExcludeResp
> ns1:ServiceCall
> ns1:ServiceEnum
> ns1:SetChatNameErrorEnum
> ns1:SetChatNameReq
> ns1:SetChatNameResp
> ns0:Struct
> ns1:SubmitAddressCheckLIMBMessage
> ns1:SubmitBirthDateCheckLIMBMessage
> ns1:SubmitCardBillingAddressCheckLIMBMessage
> ns1:SubmitChatNameChangeLIMBMessage
> ns1:SubmitContactDetailsCheckLIMBMessage
> ns1:SubmitLIMBMessageErrorEnum
> ns1:SubmitLIMBMessageReq
> ns1:SubmitLIMBMessageResp
> ns1:SubmitPasswordChangeLIMBMessage
> ns1:SubmitPersonalLIMBMessage
> ns1:SubmitTCPrivacyPolicyChangeLIMBMessage
> ns1:Subscription
> ns1:SubscriptionStatusEnum
> ns1:TitleEnum
> ns1:TransferFundsErrorEnum
> ns1:TransferFundsReq
> ns1:TransferFundsResp
> ns1:UpdatePaymentCardErrorEnum
> ns1:UpdatePaymentCardReq
> ns1:UpdatePaymentCardResp
> ns1:ValidationErrorsEnum
> ns1:ViewProfileErrorEnum
> ns1:ViewProfileReq
> ns1:ViewProfileResp
> ns1:ViewProfileV2Req
> ns1:ViewProfileV2Resp
> ns1:ViewReferAndEarnErrorEnum
> ns1:ViewReferAndEarnReq
> ns1:ViewReferAndEarnResp
> ns1:WithdrawToPaymentCardReq
> ns1:WithdrawToPaymentCardResp
> ns0:anyURI
> ns0:arrayCoordinate
> ns0:base64
> ns0:base64Binary
> ns0:boolean
> ns0:byte
> ns0:date
> ns0:dateTime
> ns0:decimal
> ns0:double
> ns0:duration
> ns0:float
> ns0:gDay
> ns0:gMonth
> ns0:gMonthDay
> ns0:gYear
> ns0:gYearMonth
> ns0:hexBinary
> ns0:int
> ns0:integer
> ns0:language
> ns0:long
> ns0:negativeInteger
> ns0:nonNegativeInteger
> ns0:nonPositiveInteger
> ns0:normalizedString
> ns0:positiveInteger
> ns0:short
> ns0:string
> ns0:time
> ns0:token
> ns0:unsignedByte
> ns0:unsignedInt
> ns0:unsignedLong
> ns0:unsignedShort
>
>
>
> Finished: errors = 0
>
>
> On 11/04/2009 10:44 AM, Alastair Irving wrote:
>> Hi
>>
>> I'm very new to suds, so appologise in advance if I'm missing something
>> obvious. I'm running version 0.3.7 under Windows with python 2.6.
>>
>> I tried running the following:
>>
>> from suds.client import Client
>> c=Client('https://api.betfair.com/global/v3/BFGlobalService.wsdl')
>>
>> I got the following traceback:
>>
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> File "build\bdist.win32\egg\suds\client.py", line 109, in __init__
>> File "build\bdist.win32\egg\suds\wsdl.py", line 194, in __init__
>> File "build\bdist.win32\egg\suds\wsdl.py", line 255, in build_schema
>> File "build\bdist.win32\egg\suds\xsd\schema.py", line 90, in load
>> File "build\bdist.win32\egg\suds\xsd\schema.py", line 277, in open_imports
>> File "build\bdist.win32\egg\suds\xsd\sxbasic.py", line 608, in open
>> File "build\bdist.win32\egg\suds\xsd\sxbasic.py", line 626, in download
>> File "build\bdist.win32\egg\suds\sax\parser.py", line 134, in parse
>> File "c:\Python26\lib\xml\sax\expatreader.py", line 107, in parse
>> xmlreader.IncrementalParser.parse(self, source)
>> File "c:\Python26\lib\xml\sax\xmlreader.py", line 123, in parse
>> self.feed(buffer)
>> File "c:\Python26\lib\xml\sax\expatreader.py", line 211, in feed
>> self._err_handler.fatalError(exc)
>> File "c:\Python26\lib\xml\sax\handler.py", line 38, in fatalError
>> raise exception
>> xml.sax._exceptions.SAXParseException:
>> c:\docume~1\alasta~1\locals~1\temp\suds\s
>> uds-649682136.http:10:2: mismatched tag
>>
>> The contents of the file refference by the last line are:
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
>> "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
>>
>> <!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
>>
>> "http://www.w3.org/TR/html4/strict.dtd"> -->
>>
>> <HTML>
>>
>> <HEAD>
>>
>> <META HTTP-EQUIV="Refresh" CONTENT="0.1">
>>
>> <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
>>
>> <META HTTP-EQUIV="Expires" CONTENT="-1">
>>
>> <TITLE></TITLE>
>>
>> </HEAD>
>>
>> <BODY><P></BODY>
>>
>> </HTML>
>>
>> Something's clearly gone wrong as it surely shouldn't be fetching HTML
>> files. However I think its unlikely that there would be a problem with
>> the wsdl so I suspect its either a problem with suds or with my usage of
>> it.
>>
>> Any help will be much appreciated.
>>
>> Alastair Irving
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> fedora-suds-list mailing list
>> fedora-suds-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/fedora-suds-list
More information about the suds
mailing list