Orbeon - Email Properties Settings - orbeon

I want to send an email to be sent from my Orbeon Form application to a host that is not gmail, following are the properties I added to my properties-local.xml
`<property as="xs:string" name="oxf.fr.email.smtp.host.MonashHealth.*" value="remote.elodigital.com.au"/>
<property as="xs:string" name="oxf.fr.email.from.MonashHealth.*" value="orbeon#elodigital.com.au"/>
<property as="xs:string" name="oxf.fr.email.to.MonashHealth.*" value="nilpath899#gmail.com,orbeon#elodigital.com.au"/>
<property as="xs:string" name="oxf.fr.email.smtp.username.MonashHealth.*" value="orbeon"/>
<property as="xs:string" name="oxf.fr.email.smtp.credentials.MonashHealth.*" value="******"/>
<property as="xs:string" name="oxf.fr.email.smtp.encryption.MonashHealth.*" value="ssl"/>
<property as="xs:string" name="oxf.fr.email.smtp.port.MonashHealth.*" value="25"/>`
but I get the following error
`javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection class com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection`
Are there any addtional properties that I must set? Need help please.

It might be because you are requiring SSL but your server on port 25 might respond with plain text. See this other question for a similar error.

Related

Orbeon header authentication

I'm currently using Orbeon 2019.2 CE version
I'm trying to configure header-driven method for access control without using Liferay or default Login/Logout form in Orbeon.
I have already set these properties in properties-dev.xml
I'm have 2 roles (form-builder, form-viewer) sending via My-Roles-Header.
<property as="xs:string" name="oxf.fr.authentication.method" value="header"/>
<property as="xs:boolean" name="oxf.fr.authentication.header.sticky" value="true"/>
<property as="xs:string" name="oxf.fr.authentication.header.username" value="My-Username-Header"/>
<property as="xs:string" name="oxf.fr.authentication.header.group" value="My-Group-Header"/>
<property as="xs:string" name="oxf.fr.authentication.header.roles.split" value="(\s*[,\|]\s*)+"/>
<property as="xs:string" name="oxf.fr.authentication.header.roles" value="My-Roles-Header"/>
<property as="xs:string" name="oxf.xforms.forward-submission-headers" value="My-Username-Header My-Group-Header My-Roles-Header"/>
<property as="xs:string" name="oxf.http.forward-headers" value="My-Username-Header My-Group-Header My-Roles-Header"/>
However, I'm still able to access form builder and form runner without sending My-Username-Header My-Group-Header My-Roles-Header headers. It should redirect me to 403 page
Form Runner: the default is that each individual form must have permissions enabled or the form will be public. Make sure that "Enable permission for this form" is selected in Form Builder (doc).
Form Builder: see Form Builder permissions.

Way to get Base64 from ImageURL in WSO2 ei

I have imageURL like https://resource.digitaldealer.com.au/image/3281718625d81ce1e136a0008808648_0_0.jpg, my main aim is to push image into Salesforce. For that, i'm trying to get Base64 from this url. once i get this base64 then i'll try to upload base64 content to Salesforce by using File concept of SFDC.
I have stuck while retrieve base64 from imageURL. Can anyone please help me?
FYI, Code
<iterate continueParent="true" description="urlIterator" expression="//url" id="listUnread" sequential="true">
<target>
<sequence>
<property description="fileURL" expression="//*[local-name()='url']" name="fileURL" scope="default" type="STRING"/>
<property description="uri.var.url" expression="get-property('fileURL')" name="uri.var.url" scope="default" type="STRING"/>
<log separator="===Input Image URL===">
<property expression="get-property('fileURL')" name="uri.var.url"/>
</log>
<call>
<endpoint>
<http method="get" uri-template="{uri.var.url}"/>
</endpoint>
</call>
<log level="full"/>
</sequence>
</target>
</iterate>
Exception:
[2019-12-09 12:26:14,762] [] ERROR - Axis2Sender Unexpected error during sending message out
org.apache.axis2.AxisFault: The system cannot infer the transport information from the %3Curl/%3E URL.
at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.java:86)
at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:116)
Please refer to this blog which explains How to use Enrich Mediator to download an image from a URL and use Synapse functions to base64 encode same using WSO2 ESB.

Customizing buttons in Orbeon 4.5

In proprties-local.xml I have defined persistence layer:
<property
as="xs:string"
name="oxf.fr.persistence.provider.*.*.*"
value="MsSqlPersistance"/>
<property
as="xs:anyURI"
name="oxf.fr.persistence.MsSqlPersistance.uri"
value="http://10.7.3.63:8080/MsSqlPersistenceLayerImpl"/>
So now, everytime I click on save or send button, there is HTTP PUT request sent to my MsSqlPersistenceLayerImpl REST service.
Also there is
<property as="xs:anyURI" name="oxf.fr.detail.send.success.uri.*.*"
value="http://10.7.3.63:8080/orb_submit/orbSubmit"/>
<!-- HTTP method to use to navigate to the success page -->
<property as="xs:string" name="oxf.fr.detail.send.success.method.*.*" value="post" replace="all"/>
As I understand, after clicking on Send button there is a HTTP PUT request send to my MsSqlPersistenceLayerImpl component and after success, there is another POST request send to orb_submit service.
Now, I would like after clicking Send button (workflow-send), not to send any HTTP PUT requests to my MsSqlPersistenceLayerImpl service, I want only to call (after form validation) orb_submit service. Is it possible?
UPDATE
Customizing buttons seems really hard for me. Normally, after clicking save my form is saved in database and the success message is shown - it's default behaviour. But when I put this code
<property as="xs:string" name="oxf.fr.detail.process.save-draft.*.*">
save
then success-message("save-draft-success")
recover error-message("database-error")
</property>
into properties-local.xml after clicking save nothing happens (no save, no message;I'd excepct still normal behaviour of course). Morover, trying to customize workflow-send in the same way, it has no affect at all. Am I missing something?
Inline properties were not supported in 4.5. Try instead:
<property
as="xs:string"
name="oxf.fr.detail.process.save-draft.*.*"
value='
save
then success-message("save-draft-success")
recover error-message("database-error")'
/>

Orbeon 4.8 and passing headers to CRUD interface

Is it still possible to send custom headers to a customized CRUD interface?
I tried all of these with no success: According to logging non of these headers is passed to the interface when opening a form.
<property as="xs:string" name="oxf.http.forward-headers" value="Orbeon-Client Cookie"/>
<property as="xs:string" name="oxf.http.forward-headers.private" value="Orbeon-Client Cookie"/>
<property as="xs:string" name="oxf.xforms.forward-submission-headers" value="Orbeon-Client Cookie"/>
<property as="xs:string" name="oxf.http.forward-cookies" value="JSESSIONID MYSAPSSO2 ReferenceCode"/>
<property as="xs:string" name="oxf.http.forward-cookies.private" value="JSESSIONID MYSAPSSO2 ReferenceCode"/>
They found the issue and fixed it: https://github.com/orbeon/orbeon-forms/issues/2053
I am also working on trying to solve this problem without avail.
(FYI, we are upgrading from 4.5 to 4.8 right now in our test environment and ran into the issue that specified cookies asked to be forwarded in properties-local.xml are do not seem to be honored in the persistence layer).
A few posts I have seen as we are trying to fix this....
http://discuss.orbeon.com/Secure-persistence-API-access-td4659372.html
^ This post seems to indicate that it is broken(?) in 4.8 and will be added back to 4.9?
(Looking at the code for FormRunnerPersistenceProxy.scala doesn't seem to indicate this thou?)
http://discuss.orbeon.com/oxf-http-forward-cookies-issue-in-case-of-invalid-JSESSIONID-td4658705.html
^ Different but similar issue

Orbeon localisation

I translated the necessary files for Dutch but apparently the runner still shows the error section in English.
I looked at both the runner and fb resource.xml but couldn't find the string 'Your form contains the following errors'.
I also have this entries in the properties-local.xml
<property as="xs:string" name="oxf.fr.available-languages.orbeon.builder" value="nl en"/>
<property as="xs:string" name="oxf.fr.default-language.orbeon.builder" value="nl"/>
<property as="xs:string" name="oxf.fr.default-language.orbeon.*" value="nl"/>
<property as="xs:string" name="oxf.fr.default-language.*.*" value="nl"/>
It depends which version you are using:
up to Orbeon Forms 4.2, resources.xml does contain that message
starting Orbeon Forms 4.3, resources.xml contains a more complex formatted string

Resources