<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> </DIV>
<DIV>I am trying to communicate with a vendor's WebService, using PyWin32. I am successful using most of the methods, but I don't know how to interpret those returning a dictionary like object.</DIV>
<DIV> </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> </DIV>
<DIV> sc = win32com.client.Dispatch("MSSOAP.SoapClient")</DIV>
<DIV> sc.mssoapinit("<A href="http://localhost:1024/wsdl/IXXXWebService">http://localhost:1024/wsdl/IXXXWebService</A>")</DIV>
<DIV> sc.connect()</DIV>
<DIV> ret = sc.ReadMeasureDataParam(paramName)</DIV>
<DIV> </DIV>
<DIV>Under C# or VB, ret would be a dictionary like object with 6 different keys, such as LongName and ShortName, accessed as ret.LongName, etc. Using that under PyWin32 gives an attribute error, but I can index with the [0] to [5]. Unfortunately, doing that still returns an object I don't know how to interpret.</DIV>
<DIV> </DIV>
<DIV>There are several other functions that have the same issue, but I think the basic problem is identical.</DIV>
<DIV> </DIV>
<DIV>The relevant XML code follows. I manually chopped the code apart, eliminating what I though was unnecessary. </DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>XML Code follows:</DIV>
<DIV> </DIV>
<DIV><?xml version="1.0" encoding="UTF-8"?><BR><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"></DIV>
<DIV> <types><BR> <xs:schema targetNamespace="urn:XXXWebServiceIntf" xmlns="urn:XXXWebServiceIntf"><BR> <xs:complexType name="TXXXMeasureParam"><BR> <xs:sequence><BR> <xs:element name="ShortName" type="xs:string"/><BR> <xs:element name="LongName" type="xs:string"/><BR> <xs:element name="Factor" type="xs:double"/><BR> <xs:element name="Offset" type="xs:double"/><BR> <xs:element name="ValueUnit" type="xs:string"/><BR> <xs:element name="Precision"
type="xs:int"/><BR> </xs:sequence><BR> </xs:complexType><BR> </xs:schema><BR> </types></DIV>
<DIV> <message name="ReadMeasureDataParam11Request"><BR> <part name="signal" type="xs:string"/><BR> </message><BR> <message name="ReadMeasureDataParam11Response"><BR> <part name="return" type="ns1:TXXXMeasureParam"/><BR> </message></DIV>
<DIV> <portType name="IXXXWebService"><BR> <operation name="ReadMeasureDataParam"><BR> <input message="tns:ReadMeasureDataParam11Request"/><BR> <output message="tns:ReadMeasureDataParam11Response"/><BR> </operation><BR> </portType></DIV>
<DIV> <binding name="IXXXWebServicebinding" type="tns:IXXXWebService"><BR> <soap:binding style="rpc" transport="<A href='http://schemas.xmlsoap.org/soap/http"/'>http://schemas.xmlsoap.org/soap/http"/</A>><BR> <operation name="ReadMeasureDataParam"><BR> <soap:operation soapAction="urn:XXXWebServiceIntf-IXXXWebService#ReadMeasureDataParam" style="rpc"/><BR> <input message="tns:ReadMeasureDataParam11Request"><BR> <soap:body use="encoded" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</A>" namespace="urn:XXXWebServiceIntf-IXXXWebService"/><BR> </input><BR> <output
message="tns:ReadMeasureDataParam11Response"><BR> <soap:body use="encoded" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</A>" namespace="urn:XXXWebServiceIntf-IXXXWebService"/><BR> </output><BR> </operation><BR> </binding></DIV>
<DIV> <service name="IXXXWebServiceservice"><BR> <port name="IXXXWebServicePort" binding="tns:IXXXWebServicebinding"><BR> <soap:address location="<A href='http://172.31.234.44:1024/soap/IXXXWebService"/'>http://172.31.234.44:1024/soap/IXXXWebService"/</A>><BR> </port><BR> </service></DIV>
<DIV></definitions><BR></DIV></div></body></html>