You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by cdryst <cd...@gmail.com> on 2014/05/21 00:26:31 UTC

Camel headers sent in mail body on Weblogic server

Hello I've been looking for a solution for this issue but I haven't found
anything yet, when I use the smtp port and send a mail on development
environment on Apache Tomcat it send it just fine, but I deploy my
application to Weblogic server and it starts to send the email but it has
all the headers sent to the route on the mail body, has anyone happen
something like that? I been looking for a solution in many sites and it
seems to be a problem with JavaMail jar on Weblogic installation but I've
replaced it and it keeps the same,

You can reproduce the error calling the service:
http://www.universales.com/universales-fe/camel/pruebaMail?to=[your_mail]

thanks



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-headers-sent-in-mail-body-on-Weblogic-server-tp5751375.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel headers sent in mail body on Weblogic server

Posted by cdryst <cd...@gmail.com>.
Excelent! that worked for me, Thank you



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-headers-sent-in-mail-body-on-Weblogic-server-tp5751375p5751439.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel headers sent in mail body on Weblogic server

Posted by Willem Jiang <wi...@gmail.com>.
Oh, you are using camel-servlet transport.
I’m not sure if the Weblogic server pass the http headers to the servlet request,
but you can remove them by using <removeHeaders patterns=“Camel*”> to remove the headers which starts with Camel after the camel-servlet endpoint.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On May 21, 2014 at 10:57:51 AM, cdryst (cdryst@gmail.com) wrote:
> Sure:
>  
>  
>  
>  
> PRUEBA
>  
>  
> ccarrillo@universales.com
>  
>  
>  
>  
>  
>  
>  
> The only difference that I can note is that I added weblogic.xml file to
> make weblogic recognize and start the application once it's deployed:
>  
>  
> > xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
> http://xmlns.oracle.com/weblogic/weblogic-web-app
> http://xmlns.oracle.com/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">  
> 10.3.6.0
> universales-fe
>  
> true
>  
>  
> WSC2SESSIONID
>  
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-headers-sent-in-mail-body-on-Weblogic-server-tp5751375p5751380.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  


Re: Camel headers sent in mail body on Weblogic server

Posted by cdryst <cd...@gmail.com>.
Sure:

<route id="envioDummy">
	<from uri="servlet:///pruebaMail" />
	<setHeader headerName="Subject">
		<constant>PRUEBA</constant>
	</setHeader>
	<setHeader headerName="From">
		<constant>ccarrillo@universales.com</constant>
	</setHeader>
	<setBody>
		<constant></constant>
	</setBody>			
	<to uri="smtp://correo.segurosuniversales.net?contentType=text/html" />
</route>

The only difference that I can note is that I added weblogic.xml file to
make weblogic recognize and start the application once it's deployed:

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app 
	xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
http://xmlns.oracle.com/weblogic/weblogic-web-app
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
   <wls:weblogic-version>10.3.6.0</wls:weblogic-version>
   <wls:context-root>universales-fe</wls:context-root>
   <wls:container-descriptor>
      <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
   </wls:container-descriptor>
   <wls:session-descriptor>
      <wls:cookie-name>WSC2SESSIONID</wls:cookie-name>
   </wls:session-descriptor>
</wls:weblogic-web-app>



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-headers-sent-in-mail-body-on-Weblogic-server-tp5751375p5751380.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel headers sent in mail body on Weblogic server

Posted by Willem Jiang <wi...@gmail.com>.
Can you share the camel route with us?
Did you change anything between the application in the tomcat and the one in the weblogic?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On May 21, 2014 at 6:26:58 AM, cdryst (cdryst@gmail.com) wrote:
> Hello I've been looking for a solution for this issue but I haven't found
> anything yet, when I use the smtp port and send a mail on development
> environment on Apache Tomcat it send it just fine, but I deploy my
> application to Weblogic server and it starts to send the email but it has
> all the headers sent to the route on the mail body, has anyone happen
> something like that? I been looking for a solution in many sites and it
> seems to be a problem with JavaMail jar on Weblogic installation but I've
> replaced it and it keeps the same,
>  
> You can reproduce the error calling the service:
> http://www.universales.com/universales-fe/camel/pruebaMail?to=[your_mail]  
>  
> thanks
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-headers-sent-in-mail-body-on-Weblogic-server-tp5751375.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.
>