<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt;color:#000000;"><DIV>Hi</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am trying to communicate with a vendor's WebService, using PyWin32.&nbsp; I am successful using most of the methods, but I don't know how to interpret those returning a dictionary like object.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Obfuscating the vendor name with XXX everywhere, to avoid checking on whether it is acceptable to communicate about this, the code looks like</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; sc = win32com.client.Dispatch("MSSOAP.SoapClient")</DIV>
<DIV>&nbsp;&nbsp;&nbsp; sc.mssoapinit("<A href="http://localhost:1024/wsdl/IXXXWebService">http://localhost:1024/wsdl/IXXXWebService</A>")</DIV>
<DIV>&nbsp;&nbsp;&nbsp; sc.connect()</DIV>
<DIV>&nbsp;&nbsp;&nbsp; ret = sc.ReadMeasureDataParam(paramName)</DIV>
<DIV>&nbsp;</DIV>
<DIV>Under C# or VB, ret would be a dictionary like object with&nbsp;6 different keys, such as LongName and ShortName, accessed as ret.LongName, etc.&nbsp; Using that under PyWin32 gives an attribute error, but I can index with the [0] to [5].&nbsp; Unfortunately, doing that still returns an object I don't know how to interpret.</DIV>
<DIV>&nbsp;</DIV>
<DIV>There are several other functions that have the same issue, but I think the basic problem is identical.</DIV>
<DIV>&nbsp;</DIV>
<DIV>The relevant XML code follows.&nbsp; I manually chopped the code apart, eliminating what I though was unnecessary.&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>XML Code follows:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<BR>&lt;definitions xmlns="<A href="http://schemas.xmlsoap.org/wsdl/">http://schemas.xmlsoap.org/wsdl/</A>" xmlns:xs="<A href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</A>" name="IXXXWebServiceservice" targetNamespace="<A href="http://tempuri.org/">http://tempuri.org/</A>" xmlns:tns="<A href="http://tempuri.org/">http://tempuri.org/</A>" xmlns:soap="<A href="http://schemas.xmlsoap.org/wsdl/soap/">http://schemas.xmlsoap.org/wsdl/soap/</A>" xmlns:soapenc="<A href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</A>" xmlns:mime="<A href="http://schemas.xmlsoap.org/wsdl/mime/">http://schemas.xmlsoap.org/wsdl/mime/</A>" xmlns:ns1="urn:XXXWebServiceIntf"&gt;</DIV>
<DIV>&nbsp; &lt;types&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;xs:schema targetNamespace="urn:XXXWebServiceIntf" xmlns="urn:XXXWebServiceIntf"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;xs:complexType name="TXXXMeasureParam"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;xs:sequence&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;xs:element name="ShortName" type="xs:string"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;xs:element name="LongName" type="xs:string"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;xs:element name="Factor" type="xs:double"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;xs:element name="Offset" type="xs:double"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;xs:element name="ValueUnit" type="xs:string"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;xs:element name="Precision"
 type="xs:int"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/xs:sequence&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/xs:complexType&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/xs:schema&gt;<BR>&nbsp; &lt;/types&gt;</DIV>
<DIV>&nbsp; &lt;message name="ReadMeasureDataParam11Request"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;part name="signal" type="xs:string"/&gt;<BR>&nbsp; &lt;/message&gt;<BR>&nbsp; &lt;message name="ReadMeasureDataParam11Response"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;part name="return" type="ns1:TXXXMeasureParam"/&gt;<BR>&nbsp; &lt;/message&gt;</DIV>
<DIV>&nbsp; &lt;portType name="IXXXWebService"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;operation name="ReadMeasureDataParam"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input message="tns:ReadMeasureDataParam11Request"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;output message="tns:ReadMeasureDataParam11Response"/&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/operation&gt;<BR>&nbsp; &lt;/portType&gt;</DIV>
<DIV>&nbsp; &lt;binding name="IXXXWebServicebinding" type="tns:IXXXWebService"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;soap:binding style="rpc" transport="<A href='http://schemas.xmlsoap.org/soap/http"/'>http://schemas.xmlsoap.org/soap/http"/</A>&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;operation name="ReadMeasureDataParam"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;soap:operation soapAction="urn:XXXWebServiceIntf-IXXXWebService#ReadMeasureDataParam" style="rpc"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input message="tns:ReadMeasureDataParam11Request"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;soap:body use="encoded" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</A>" namespace="urn:XXXWebServiceIntf-IXXXWebService"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/input&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;output
 message="tns:ReadMeasureDataParam11Response"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;soap:body use="encoded" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</A>" namespace="urn:XXXWebServiceIntf-IXXXWebService"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/output&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/operation&gt;<BR>&nbsp; &lt;/binding&gt;</DIV>
<DIV>&nbsp; &lt;service name="IXXXWebServiceservice"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;port name="IXXXWebServicePort" binding="tns:IXXXWebServicebinding"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;soap:address location="<A href='http://172.31.234.44:1024/soap/IXXXWebService"/'>http://172.31.234.44:1024/soap/IXXXWebService"/</A>&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/port&gt;<BR>&nbsp; &lt;/service&gt;</DIV>
<DIV>&lt;/definitions&gt;<BR></DIV></div></body></html>