juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ks...@apache.org
Subject svn commit: r1470785 - in /juddi/trunk: juddi-core/src/main/java/org/apache/juddi/subscription/notify/ juddi-core/src/test/java/org/apache/juddi/api/impl/ uddi-tck/src/test/java/org/apache/juddi/v3/tck/
Date Tue, 23 Apr 2013 02:44:23 GMT
Author: kstam
Date: Tue Apr 23 02:44:23 2013
New Revision: 1470785

URL: http://svn.apache.org/r1470785
Log:
JUDDI-496, specifying UTF-8 when sending email

Modified:
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/notify/SMTPNotifier.java
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_090_SubscriptionListenerIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/notify/SMTPNotifier.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/notify/SMTPNotifier.java?rev=1470785&r1=1470784&r2=1470785&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/notify/SMTPNotifier.java
(original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/notify/SMTPNotifier.java
Tue Apr 23 02:44:23 2013
@@ -108,7 +108,7 @@ public class SMTPNotifier implements Not
 				message.setFrom(new InternetAddress(getEMailProperties().getProperty("mail.smtp.from",
"jUDDI")));
 				//maybe nice to use a template rather then sending raw xml.
 				String subscriptionResultXML = JAXBMarshaller.marshallToString(body, JAXBMarshaller.PACKAGE_SUBSCR_RES);
-				message.setText(subscriptionResultXML);
+				message.setText(subscriptionResultXML, "UTF-8");
 				message.setSubject("UDDI Subscription Notification for subscription " 
 						+ body.getSubscriptionResultsList().getSubscription().getSubscriptionKey());
 				Transport.send(message);

Modified: juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_090_SubscriptionListenerIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_090_SubscriptionListenerIntegrationTest.java?rev=1470785&r1=1470784&r2=1470785&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_090_SubscriptionListenerIntegrationTest.java
(original)
+++ juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_090_SubscriptionListenerIntegrationTest.java
Tue Apr 23 02:44:23 2013
@@ -71,13 +71,15 @@ public class API_090_SubscriptionListene
 		Registry.start();
 		try {
 			smtpPort = 9700 + new Random().nextInt(99);
+			httpPort = 9600 + new Random().nextInt(99);
 			System.setProperty(Property.DEFAULT_JUDDI_EMAIL_PREFIX + "mail.smtp.host", "localhost");
 			System.setProperty(Property.DEFAULT_JUDDI_EMAIL_PREFIX + "mail.smtp.port", String.valueOf(smtpPort));
 			System.setProperty(Property.DEFAULT_JUDDI_EMAIL_PREFIX + "mail.smtp.from", "jUDDI@example.org");
 			mailServer = SimpleSmtpServer.start(smtpPort);
 			//bring up the TCK HTTP SubscriptionListener
-			endPoint = Endpoint.publish("http://localhost:" + httpPort + "/tcksubscriptionlistener",
new UDDISubscriptionListenerImpl());
-			
+			String httpEndpoint = "http://localhost:" + httpPort + "/tcksubscriptionlistener";
+			System.out.println("Bringing up SubscriptionListener endpoint at " + httpEndpoint);
+			endPoint = Endpoint.publish(httpEndpoint, new UDDISubscriptionListenerImpl());
 			logger.debug("Getting auth tokens..");
 		
 			api010.saveJoePublisher();
@@ -87,7 +89,7 @@ public class API_090_SubscriptionListene
         	  
 	     } catch (Exception e) {
 	    	 logger.error(e.getMessage(), e);
-				Assert.fail("Could not obtain authInfo token.");
+				Assert.fail(e.getMessage());
 	     } 
 	}
 	

Modified: juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java?rev=1470785&r1=1470784&r2=1470785&view=diff
==============================================================================
--- juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
(original)
+++ juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
Tue Apr 23 02:44:23 2013
@@ -91,7 +91,9 @@ public class UDDI_090_SubscriptionListen
 			properties.store(new FileOutputStream(tmpFile), "tmp email settings");
 			
 			//bring up the TCK SubscriptionListener
-			endPoint = Endpoint.publish("http://localhost:" + httpPort + "/tcksubscriptionlistener",
new UDDISubscriptionListenerImpl());
+			String httpEndpoint = "http://localhost:" + httpPort + "/tcksubscriptionlistener";
+			System.out.println("Bringing up SubscriptionListener endpoint at " + httpEndpoint);
+			endPoint = Endpoint.publish(httpEndpoint, new UDDISubscriptionListenerImpl());
 			
 			manager  = new UDDIClerkManager();
 			manager.start();



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org


Mime
View raw message