Skip to content Skip to sidebar Skip to footer

Exception In Port Type Using Suds

I am trying to connect to Aramex shipping SOAP API using Python Suds using following code: import suds from suds.client import Client client = Client('file:///home/test/test_wsdl_a

Solution 1:

Error is here:

<wsdl:binding type="i0:Service_1_0" name="BasicHttpBinding_Service_1_0">

And

The binding element has two attributes - name and type.

The name attribute (you can use any name you want) defines the name of the binding, and the type attribute points to the port for the binding, in this case the "glossaryTerms" port.

So parser can't find port type="i0:Service_1_0", in this wsdl file there are two ports definition:

<wsdl:portTypename="Service_1_0"><wsdl:operationname="TrackShipments"><wsdl:inputname="ShipmentTrackingRequest"message="tns:ShipmentTrackingRequest"wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/TrackShipments"/><wsdl:outputname="ShipmentTrackingResponse"message="tns:ShipmentTrackingResponse"wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/TrackShipmentsResponse"/></wsdl:operation></wsdl:portType><wsdl:servicename="Service_1_0"><wsdl:portname="BasicHttpBinding_Service_1_0"binding="i0:BasicHttpBinding_Service_1_0"><soap:addresslocation="http://ws.aramex.net/shippingapi/tracking/service_1_0.svc"/></wsdl:port></wsdl:service>

So now you know what is wrong(change type in wsdl:binding), and you can't pass the validation of that.

Post a Comment for "Exception In Port Type Using Suds"