2016-04-18 1 views
0

Jurko/suds existiert: Der Typ existiert in WSDL und der Client, wenn es erstellt wird. Wenn die client.factory.create-Funktion aufgerufen wird, wird der Type not found Fehler jedoch ausgelöst. Bitte helfen Sie, wenn jemand weiß, wo ich falsch liege. Ich habe sogar versucht, die wsdl-Datei lokal zu speichern, aber der gleiche Fehler wird ausgelöst.jurko/suds: Geben Sie nicht gefunden Fehler, auch wenn es in WSDL und beim Drucken Client Objekt

Version: schaum 0,6 python3.5.1

from suds.client import Client 
client = Client("http://netconnect.bluedart.com/Demo/ShippingAPI/Waybill/WayBillGeneration.svc?wsdl") 
print(client) 
Suds (https://fedorahosted.org/suds/) version: 0.6 

Service (WayBillGeneration) tns="http://tempuri.org/" 
    Prefixes (5) 
     ns0 = "http://schemas.datacontract.org/2004/07/SAPI.Entities.Admin" 
     ns1 = "http://schemas.datacontract.org/2004/07/SAPI.Entities.Enums.AWBGeneration" 
     ns2 = "http://schemas.datacontract.org/2004/07/SAPI.Entities.WayBillGeneration" 
     ns3 = "http://schemas.microsoft.com/2003/10/Serialization/" 
     ns4 = "http://tempuri.org/" 
    Ports (2): 
     (BasicHttpBinding_IWayBillGeneration) 
     Methods (2): 
      GenerateWayBill(ns2:WayBillGenerationRequest Request, ns0:UserProfile Profile) 
      ImportData(ns2:ArrayOfWayBillGenerationRequest Request, ns0:UserProfile Profile) 
     Types (17): 
      ns2:ArrayOfDimension 
      ns2:ArrayOfWayBillGenerationRequest 
      ns2:ArrayOfWayBillGenerationResponse 
      ns2:ArrayOfWayBillGenerationStatus 
      ns2:CommodityDetail 
      ns2:Consignee 
      ns2:Dimension 
      ns1:ProductType 
      ns2:Services 
      ns2:Shipper 
      ns0:UserProfile 
      ns2:WayBillGenerationRequest 
      ns2:WayBillGenerationResponse 
      ns2:WayBillGenerationStatus 
      ns3:char 
      ns3:duration 
      ns3:guid 
     (WSHttpBinding_IWayBillGeneration) 
     Methods (2): 
      GenerateWayBill(ns2:WayBillGenerationRequest Request, ns0:UserProfile Profile) 
      ImportData(ns2:ArrayOfWayBillGenerationRequest Request, ns0:UserProfile Profile) 
     Types (17): 
      ns2:ArrayOfDimension 
      ns2:ArrayOfWayBillGenerationRequest 
      ns2:ArrayOfWayBillGenerationResponse 
      ns2:ArrayOfWayBillGenerationStatus 
      ns2:CommodityDetail 
      ns2:Consignee 
      ns2:Dimension 
      ns1:ProductType 
      ns2:Services 
      ns2:Shipper 
      ns0:UserProfile 
      ns2:WayBillGenerationRequest 
      ns2:WayBillGenerationResponse 
      ns2:WayBillGenerationStatus 
      ns3:char 
      ns3:duration 
      ns3:guid 

request = client.factory.create('WayBillGenerationRequest') 
(WayBillGenerationRequest) not-found 
path: "WayBillGenerationRequest", not-found 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/Users/vatsalshah/Developer/virtualenvs/bluedart_python351/lib/python3.5/site-packages/suds/client.py", line 218, in create 
    raise TypeNotFound(name) 
suds.TypeNotFound: Type not found: 'WayBillGenerationRequest' 

Antwort

0

Einschließlich der Namespace, bevor der Typ das Problem behoben. Zum Beispiel für den obigen Fehler: Ändern der Anfrage = client.factory.create ('WayBillGenerationRequest') zu request = client.factory.create ('ns2: WayBillGenerationRequest') löste den Fehler.

Verwandte Themen