Hello,
I want to set the UserInformation via SOAP, using setUserInformation together with an RemoteUserInformation Object. The text is posted, but the newlines ({{\n}}) are converted to <br/>
and all is surrounded by <p>
. That's why the htmltags are shown in the browser. I tried several ways of posting, including escaping the \n
or writing htmltags for breaklines. But nothing helped. And I still wonder why there is an additional <p>
around the text (I noticed it's been added when manually editing the UserInformation).
I've found some infos about a html macro but though it might be a solution for this problem, it must not be enabled for the whole wiki.
I am sure I am just missing any trick to solve my problem, but what is the trick ?
Thanks for any help!
Greetings,
Daniela
Community moderators have prevented the ability to post new answers.
The SOAP API is deprecated. Atlassian suggests we use their REST API. See https://developer.atlassian.com/confdev/confluence-rest-api
Deprecated since Confluence 5.5. This means that we will not add new features or fix bugs related to the XML-RPC and SOAP API for Confluence 5.5 or later
If their REST API doesn't provide a service to update the user info, then I would create my own REST service and use the JAVA API to update the user info.
I do know that SOAP is deprecated but I do have to use it at the moment. If my problem is a bug, then I do understand that it will not be fixed. But is it a bug ? The new REST API does not support any user options at the moment as far as I can see. So I know there will be a problem in future. What do you mean with using JAVA API ? Doing changes on confluences DB directly or hooking into the code of confluence ? Or something else ? Thanks in advance for clarifying.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This code:
String template = "Automatically updated:\n" + "Name: " + user.name + "\n" + "Mail: " + user.mail + "\n" + "Phone:" + user.phone
should be:
Automatically updated: Name: Smith Mail: smith@nomail.tld Phone: 000 / 00000
but it is:
<p>Automatically updated:<br/> Name: Smith<br/> Mail: smith@nomail.tld<br/> Phone:000 / 00000</p>
and in sourcecode of HTML
<p><p>Automatically updated:<br/><br/> Name: Smith<br/><br/> Mail: smith@nomail.tld<br/><br/> Phone:000 / 00000</p></p>
I tried several variations in {{String template = ... }} including using HTML-Tags but no luck so far.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I may be misunderstanding what you are doing, but it looks to me like you should be using a structure not a string for the user information object. See https://developer.atlassian.com/confdev/confluence-rest-api/confluence-xml-rpc-and-soap-apis/remote-confluence-data-objects#RemoteConfluenceDataObjects-userinformationUserInformation .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, it's a string build up in Java. The "\n" are new lines which should be put into. The {{user}} is an object which holds the userdata but e.g. {{user.mail}} gives back strings also. All written in one line would look like: {{String template = "Automatically updated:\n Name: " + user.name + "\n Mail: " + user.mail + "\n Phone:" + user.phone}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you share your code? I'm having trouble understanding where ({{\n}}) would come in with a user information object.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.