Im trying to access an outbound-endpoint sending login password for it, but the password have a # character, so ive tryed encode it to %23 and even so im getting an error message...
How can i can send it?
My code:
<http:outbound-endpoint host="localhost" path="path/path" port="8080" user="username" password="paswd%23" exchange-pattern="request-response" doc:name="HTTP">
</http:outbound-endpoint>
And the error is:
Invalid uri 'http://username:paswd##localhost:8080/path/path
Mule version 3.4
Need to encode. As #daviddessot mentioned. That's right.
As a extention:
Feel free to use: http://www.url-encode-decode.com/
Major chars:
! - %21
$ - %24
% - %25
# - %40
Double encode the password:
password="paswd%2523"
Related
I have created the following code to send an email with from address set with UTF-8 format. I know that msmtp has IDN support, but when i run this program, i get an error message that character \xe2\x82\xac (aka '€') is invalid.
msmtp: envelope from address relu\u20ac#4p\u20ac.com not accepted by the server
msmtp: server message: 555 5.5.2 Syntax error. p83sm6227819wma.18 - gsmtp
msmtp: could not send mail (account default from /usr/local/etc/msmtprc)
This is the code:
#include <stdio.h>
int main(){
char* sender = "relu\xe2\x82\xac#4p\xe2\x82\xac.com";
char cmd[100];
sprintf(cmd, "echo \"bla\" | msmtp -f %s example#domain.com", sender);
system(cmd);
return 0;
}
It seems like your environment doesn't understand that you're giving it complex characters. Make sure you're parsing the chars as unicode. If you try parsing a unicode value as ascii, you'll get some pretty weird results.
You may want to look into using wchar_t instead of char*.
I'm trying to upload some files to GCS and i get this:
Building synchronization state...
Caught non-retryable exception while listing file:///media/Respaldo: CommandExce ption: Invalid Unicode path encountered
(u'/media/Respaldo/Documentos/Trabajo/Traducciones/Servicio
Preventivo Semanal Hs Rev3 - Ingl\xe9s.doc'). gsutil cannot
proceed with such files present. Please remove or rename this file and
try again. NOTE: the path printed above replaces the problematic
characters with a hex-encoded printable representation. For more
details (including how to convert to a gsutil-compatible encoding) see
`gsutil help encoding`.
But when i run:
convmv -f ISO-8859-1 -t UTF-8 -r --replace /media/Respaldo
And says all the non English files are already UTF-8. How should I proceed?
Edit: example of convmv output:
Skipping, already UTF-8: /media/Respaldo/Multimedia/Mis Imágenes/NOKIA/Memoria/Videoclips/VÃdeo004.3gp
Skipping, already UTF-8: /media/Respaldo/Multimedia/Mis Imágenes/NOKIA/Memoria/Videoclips/VÃdeo009.3gp
Skipping, already UTF-8: /media/Respaldo/Multimedia/Mis Imágenes/NOKIA/Memoria/Videoclips/VÃdeo00133.3gp
Skipping, already UTF-8: /media/Respaldo/Multimedia/Mis Imágenes/NOKIA/Memoria/Videoclips/VÃdeo023.3gp
Skipping, already UTF-8: /media/Respaldo/Multimedia/Mis Imágenes/NOKIA/Memoria/Videoclips/VÃdeo026.3gp
I have created a new domain ac and defined a different port in domain.xml i.e. 11305. But when I try to start the domain it gives me following exception:
com.sun.enterprise.universal.xml.MiniXmlParserException: "Xml Parser Error: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[253,34]
Message: Open quote is expected for attribute "{1}" associated with an element type "port".
Here is the command:
./asadmin start-domain ac
Here is the part of the domain.xml file
<network-listeners>
<network-listener port=“11305” protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
<network-listener port="33389" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
<network-listener port="33356" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>
Where am I going wrong?
The xml config got malformed. Check if the port value is quoted and check if your quote is the right symbol (try copying quotes from other places in the xml)
Update: First and second quotes are non-standard in your excerpt of the domain.xml file, 3rd line. Compare the quotes around 11305 and the quotes around http-listener-1. They are different. The quotes around http-listener-1 are proper and you should use those.
I'm simply moving files, but for some reason they are appending weird characters to the front of the file.
Before:
(Encoded with UTF-8)
testCol1,testCol2,testCol3
After: (Encoded with ANSI)
¬í ur [B¬óøTà xp žÌtestCol1,testCol2,testCol3
Things I've tried:
Explicitly setting the encoding to utf-8.
Explicitly setting the encoding to ANSI.
Using a Object to Byte Array with encoding set to utf-8.
Using a Object to String with encoding set to utf-8.
Here is my flow and relevant connectors:
<sftp:connector name="Sftp" maxConnectionPoolSize="3" doc:name="SFTP"/>
<file:connector name="FileConnector" autoDelete="true" streaming="false" validateConnections="true" doc:name="FileConnector"/>
<flow name="SftpOutBound" initialState="stopped">
<file:inbound-endpoint
path="${ftp.base}/${id}/export"
pollingFrequency="${polling.frequency.millis}"
responseTimeout="${standard.response.timeout.millis}"
fileAge="${standard.fileage.delay.millis}"
connector-ref="deletingFileConnector"
doc:name="OutBound">
<file:filename-wildcard-filter pattern="${out.filter}" />
</file:inbound-endpoint>
<object-to-byte-array-transformer doc:name="Object to Byte Array" />
<all doc:name="all">
<file:outbound-endpoint
path="${archive.out}/${id}"
outputPattern="#[header:INBOUND:originalFileName]_#[function:datestamp:${standard.date.format}]_#[function:systime]"
responseTimeout="${standard.response.timeout.millis}"
connector-ref="deletingFileConnector"
doc:name="Archive" />
<logger
level="WARN"
message="Uploaded file from ${ftp.base}/${id}/export/#[header:INBOUND:originalFileName]"
doc:name="Logger"/>
<sftp:outbound-endpoint
connector-ref="Sftp"
host="${host}"
port="${port}"
path="${in.path}"
user="${user}"
identityFile="${configFullPath}/${identity.file}"
passphrase="${passphrase}"
responseTimeout="${standard.response.timeout.millis}"
keepFileOnError="true"
duplicateHandling="overwrite"
exchange-pattern="one-way"
outputPattern="#[header:INBOUND:originalFileName]"
doc:name="SFTP"/>
</all>
</flow>
Thanks for any help!
So it seems to be an issue with Mule 3.5.0, when I upgraded to 3.6.1 the issue went away. Still not sure what was causing it, but the version change solved it.
The payload result from file:inbound-endpoint is of type InputStream. Why don't you leave as is (byte[]) to be saved by the file and sftp outbound end-points?
If you have to convert it into a string, then I suggest using <byte-array-to-string-transformer /> after you read it instead of <object-to-byte-array-transformer />
I have this little chain of components in my Mule ESB project:
<set-payload value="Получена заявка ##[sessionVars['ticketID']]" doc:name="Set SMS Text"/>
<scripting:transformer doc:name="Send SMS" ignoreBadInput="true">
<scripting:script engine="Groovy"><![CDATA[
def command = ["/tmp/call.sh", message.payload]
def proc = command.execute()
proc.waitFor()
]]></scripting:script>
</scripting:transformer>
And /tmp/call.sh listing:
#!/bin/bash
echo $# > /tmp/call.out
When message passes Mule chain in /tmp/call.out I can see "Џолучена заЯвка #4041" instead of expected "Получена заявка #4041" ("Получена заявка" - Russian words), i.e. there is a problem with unicode chars output and there are no problems with ASCII chars.
When I check /tmp/groovy.out with HEX editor I see that all Russain chars has 1-byte lenght (in unicode that must be 2-bytes length), i.e. output of my Groovy component is not unicode.
There is no problem with unicode output to Mule log when I user Echo and Logger components. Also in SMTP component everything is perfect: I successfully receive letters in unicode from Mule.
Can you help me with unicode arguments in Mule ESB with Groovy command call?
Solved by selecting UTF-8 ecoding in Run configuration options (menu Run -> Run configurations...). By default it was MacCyrilic encoding.