Comments (8)
Okay, that seems to have worked on the live system as well. Thanks for your help here!
from sympa.
Hi @dpc22 ,
This is correctly encoded using the 2 byte UTF-8 sequence: "0xc2 0xa3" in my SOAP client.
Please provide a sample of the input data, the client script you used and how you made sure the client encoded it correctly.
from sympa.
I attach my example Python script which fails (.txt extension required by github)
The equivalent Perl script seems to work:
The only obvious difference is:
$soap->default_ns('urn:sympasoap');
I can't find a direct equivalence to "$soap->default_ns()" in the Zeep library that I am using in Python.
There is: "zeep.set_ns_prefix()", but that takes two arguments.
| set_ns_prefix(self, prefix, namespace)
| Set a shortcut for the given namespace.
The following didn't help:
zeep.set_ns_prefix(None, 'urn:sympasoap');
Afraid that I don't know what SOAP namespaces do, so I'm blundering around in the dark rather.
from sympa.
I'm pretty sure that my Python code was originally derived from: https://pypi.org/project/sympasoap/.
That doesn't seem to do anything with namespaces either.
(Edit to add)
It also has a normalize method which just discards any non-ASCII characters on the GeCOS field before invoking the SOAP add method. Presumably the author ran into the same issue, but didn't come up with a more sensible fix.
from sympa.
https://docs.python-zeep.org/en/master/transport.html#debugging
tells me how to dump the raw XML which is sent to the sympasoap server.
The raw HTTP POST request was:
zeep.transports: HTTP Post to https://test.lists.cam.ac.uk/sympasoap:
<?xml version='1.0' encoding='utf-8'?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Body><ns0:add xmlns:ns0="urn:sympasoap"><list>test-dpc22</list><email>[email protected]</email><gecos>Test £</gecos><quiet>true</quiet></ns0:add></soap-env:Body></soap-env:Envelope>
We have <xml ... encoding='utf-8'>
The <gecos>
field appears to be correctly encoded as UTF-8: if I send the output to a file and use "od -c", I see the two byte sequence: "0xc2 0xa3" sent by the SOAP client.
0000440 l > < g e c o s > T e s t 302 243
0000460 < / g e c o s > < q u i e t > t
>>> hex(0o302)
'0xc2'
>>> hex(0o243)
'0xa3'
I have a dedicated test server if I can add useful debugging at the server end. The normal Sympa verbose logging didn't tell me anything.
from sympa.
@dpc22, could you please apply #1592 and check if the problem will be solved?
from sympa.
Thank you.
That seems to have fixed the problem on my test server.
I did need to add a patch for src/lib/Makefile.in in order to backport your fix from the GIT repository to the 6.2.72 release tarball given:
rename from src/lib/Sympa/WWW/SOAP/Transport.pm
rename to src/lib/Sympa/WWW/SOAP/FastCGI.pm
I will apply the fix to the live system either tomorrow morning or Monday morning.
from sympa.
Duplicate of #1541.
from sympa.
Related Issues (20)
- How can I rebuild archives and get attachments with exact extensions? HOT 1
- log_socket_type parameter should allow host, port, timeout options HOT 1
- Prevent custom_header with accents HOT 1
- Incorrect "No bouncing members" on a large list with small number of bouncers
- Empty SMTP FROM for successful delivery notification message HOT 7
- Setting invite sender as From: violates modern sender authentication HOT 1
- Add age based deletion of archives HOT 2
- Part in multipart contains a dot alone in a line, transmitted as is, considered as end of transmission by clients HOT 7
- DKIM signing and ARC sealing order is reversed HOT 14
- Do not remove (possibly invalid) DKIM-Signature headers from outgoing messages
- LDAP auth not working correctly when LDAP alias is found first
- Add optional release date & time for moderated messages, defaulting to right now.
- Warn list owner/listmaster when a high number of list member are deleted in dynamic lists HOT 6
- SOAP server sometimes dies quietly after ADD or DEL is performed HOT 2
- alias addresses not being created for new lists since the Operating System was updated HOT 3
- New scenario send.privateorpublickeyandeditorkey HOT 1
- Allow full sympa list email addresses to be used instead of only the listserv name
- Sympa 6.2.66 web interface returns "400 bad request" after upgrading to apache 2.4.52-1ubuntu4.10 HOT 6
- Sympa arc sign is not enabled HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sympa.