Open EnzephaloN opened 4 years ago
In this case it looks like you may be passing an input that is not correctly decoded, is the error in the line:
arf = self.g.GetAbrResultFiles(tfile.DT_ID, self.s.secret)
If so then make sure that if you are reading either argument from a file you are correctly passing the encoding. The first error message suggests that your file has a BOM which isn't being removed correctly, I would start with trying "utf-16" or "utf-8-sig".
Hello @da1910 Thanks for your reply. tfile.DT_ID is integer, so no need/possibility to encode. self.s.secret ist object of type byte as a result of "from Crypto.Cipher import DES"
I realy do not know what to do...
Ok, in that case are you able to provide the relevant portion of the WSDL file? It's challenging to offer more specific advice without it.
Hello
Here some parts of WSDL. I renamed namespace and location because of "security".
<wsdl:definitions name="AuthPortalService" targetNamespace="http://tempuri.org/">
<wsdl:import namespace="http://G.Online" location="http://xxx.xx.xx.x/OnlineWebClientTest/PortalService.svc?wsdl=wsdl0"/>
<wsdl:types/>
<wsdl:binding name="BasicHttpBinding_IPortalService" type="i0:IPortalService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
...
<wsdl:operation name="GetAbrResultFiles">
<soap:operation soapAction="http://G.KvOnline/IPortalService/GetAbrResultFiles" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
...
<wsdl:service name="AuthPortalService">
<wsdl:port name="BasicHttpBinding_IPortalService" binding="tns:BasicHttpBinding_IPortalService">
<soap:address location="http://xxx.xx.xx.xx/OnlineWebClientTest/PortalService.svc"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
@EnzephaloN Did you manage to resolve your issue? I'm having a similar problem. In my case however, the input for the SOAP service is a Python dictionary and I let zeep handle the conversion. I suspect some values in that said dict may have special characters, but I don't know if I should encode the input or what the clients returns. According to my logs the header in the xml request I send to the service has the encoding utf-8, so I'm not sure what it is happening. And same as in your case, client is Linux (well, a Lambda really), and the services run on a Windows server.
@alfremedpal Sorry, but I didn't get it to work. Meanwhile I have buried this project.
Hello
I'm using zeep for (trying to) talk to webservices. The client runs on linux, the services on Windows - maybe thats important.
When I call a service, I get errors like:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
orUnicodeDecodeError: 'utf-8' codec can't decode byte 0xd9 in position 4: invalid continuation byte
my code (the needed parts):
last lines of error