Update Mail WS to include underlying ant-mail library

git-svn-id: https://brutex.net/svn/xservices/trunk@182 e7e49efb-446e-492e-b9ec-fcafc1997a86
master
Brian Rosenberger 2016-05-31 13:49:11 +00:00
parent dbe899c014
commit fcd20c27a7
5 changed files with 52 additions and 58 deletions

View File

@ -1,11 +1,14 @@
<?xml version="1.0"?>
<project default="create-doc" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="toolsdir" location="C:/Users/brosenberger/JAVA-DEV/" />
<!-- C:\JAVA-DEV\apache-fop-1.1 -->
<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop">
<classpath>
<fileset dir="C:\\JAVA-DEV\\apache-fop-1.1">
<fileset dir="${toolsdir}/fop-2.1">
<include name="build/*.jar" />
<include name="lib/*.jar" />
</fileset>
@ -14,14 +17,15 @@
<!-- External Syntax Higlighter for docbook xsl -->
<path id="xslthl.path">
<pathelement location="C:\\JAVA-DEV\\xslthl-2.1.0\\xslthl-2.1.0.jar" />
<pathelement location="${toolsdir}/xslthl-2.1.0/xslthl-2.1.0.jar" />
</path>
<property name="current-loc" location="." />
<property name="workspace" location=".." />
<property name="htmldir" value="${current-loc}/doc/html" />
<property name="docbookdir" value="D:/DATA/JAVA-DEV/docbook-xsl-1.78.1/" />
<property name="docbookdir" value="${toolsdir}/docbook-xsl-1.79.1/" />
<property name="fo.stylesheet" value="${docbookdir}/fo/docbook.xsl" />
<property name="fo.stylesheet.hl" value="${docbookdir}/fo/docbook.xsl" />
@ -36,7 +40,7 @@
<property name="xalan" value="org.apache.xalan.processor.TransformerFactoryImpl" />
<property name="web.dir" value="${current-loc}/web" />
<property name="build.dir" value="${current-loc}/bin" />
<property name="delivery.dir" value="c:\\TEMP\\_DELIVERY_AREA" />
<property name="delivery.dir" value="c:/TEMP/_DELIVERY_AREA" />
<property name="name" value="XServices" />
@ -61,7 +65,7 @@
<xslt force="true" style="${html.stylesheet.hl}" in="${docbooksource}/BruteXServices_User_Guide.dbk" out="${htmldir}/index.html">
<factory name="${xalan}" />
<classpath refid="xslthl.path" />
<param name="highlight.xslthl.config" expression="file:///C:/JAVA-DEV/docbook-xsl-1.78.1/highlighting/xslthl-config.xml" />
<param name="highlight.xslthl.config" expression="file:///${docbookdir}/highlighting/xslthl-config.xml" />
<param name="highlight.source" expression="1" />
<param name="html.stylesheet" expression="style.css" />
</xslt>
@ -85,7 +89,7 @@
<param name="html.cleanup" expression="1" />
<param name="chunk.first.selection" expression="1" />
<param name="navig.showtitles" expression="1" />
<param name="highlight.xslthl.config" expression="file:///C:/JAVA-DEV/docbook-xsl-1.78.1/highlighting/xslthl-config.xml" />
<param name="highlight.xslthl.config" expression="file:///${docbookdir}/highlighting/xslthl-config.xml" />
<param name="highlight.source" expression="1" />
</xslt>
<copy file="${docbooksource}/style.css" overwrite="true" tofile="${htmldir}/style.css" />
@ -102,7 +106,7 @@
<param name="chapter.autolabel" expression="1" />
<param name="appendix.autolabel" expression="1" />
<param name="section.label.includes.component.label" expression="1" />
<param name="highlight.xslthl.config" expression="file:///C:/JAVA-DEV/docbook-xsl-1.78.1/highlighting/xslthl-config.xml" />
<param name="highlight.xslthl.config" expression="file:///${docbookdir}/highlighting/xslthl-config.xml" />
<param name="highlight.source" expression="1" />
<param name="paper.type" expression="A4" />
</xslt>

View File

@ -42,6 +42,8 @@
<dependency org="org.apache.ant" name="ant-jsch" rev="1.8.4"/>
<!--<dependency org="ant-contrib" name="ant-contrib" rev="20020829"/>-->
<dependency org="org.apache.ant" name="ant-commons-net" rev="1.8.4"/>
<!--<dependency org="javax.mail" name="mail" rev="1.4.7"/>-->
<dependency org="org.apache.ant" name="ant-javamail" rev="1.8.1"/>
<!-- JCS does not define scopes in its pom.xml, thus map any configuration to default -->
<dependency org="org.apache.jcs" name="jcs" rev="1.3"/>
@ -99,6 +101,7 @@
</dependency>
<!-- Serena Dimensions CM 14.1 -->
<dependency org="serena" name="serena.darius" rev="14.1" conf="*">
<artifact name="serena.darius" type="jar" />
</dependency>
@ -114,6 +117,6 @@
<dependency org="serena" name="serena.dmtpi" rev="14.1" conf="*">
<artifact name="serena.dmtpi" type="jar" />
</dependency>
</dependencies>
</ivy-module>

View File

@ -41,8 +41,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import com.sun.xml.bind.XmlAccessorFactory;
/**
* @author Brian Rosenberger, bru(at)brutex.de
*

View File

@ -78,7 +78,7 @@ public class MailServiceImpl implements MailService {
mail.setBccList(bcclist);
mail.setSubject(subject);
mail.setMessage(message);
mail.setMessageMimeType(messagemimetype);
//mail.setMessageMimeType(messagemimetype);
if (attachments != null) {
mail.addFileset(attachments.getAntResource(mail.getProject()));
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project name="MailService" resourceRoot="" soapui-version="5.0.0" abortOnError="false" runType="SEQUENTIAL" activeEnvironment="Default" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="MailServiceSoapBinding" type="wsdl" bindingName="{http://ws.xservices.brutex.net}MailServiceSoapBinding" soapVersion="1_1" anonymous="optional" definition="http://localhost:8080/XServices/MailService?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhost:8080/XServices/MailService?wsdl"><con:part><con:url>http://localhost:8080/XServices/MailService?wsdl</con:url><con:content><![CDATA[<wsdl:definitions name="MailService" targetNamespace="http://ws.xservices.brutex.net" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.xservices.brutex.net" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<con:soapui-project name="MailService" resourceRoot="" soapui-version="5.2.1" abortOnError="false" runType="SEQUENTIAL" activeEnvironment="Default" id="cc46c905-0837-49d7-97a4-f021d28bf35d" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="MailServiceSoapBinding" type="wsdl" bindingName="{http://ws.xservices.brutex.net}MailServiceSoapBinding" soapVersion="1_1" anonymous="optional" definition="http://localhost:8080/XServices/MailService?wsdl" id="ca20e6a3-2774-46a3-856a-1673adee3820" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhost:8080/XServices/MailService?wsdl"><con:part><con:url>http://localhost:8080/XServices/MailService?wsdl</con:url><con:content><![CDATA[<wsdl:definitions name="MailService" targetNamespace="http://ws.xservices.brutex.net" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.xservices.brutex.net" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xs:schema elementFormDefault="unqualified" targetNamespace="http://ws.xservices.brutex.net" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="antProperty" type="tns:antProperty"/>
@ -199,7 +199,7 @@
<soap:address location="http://localhost:8080/XServices/MailService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhost:8080/XServices/MailService</con:endpoint></con:endpoints><con:operation isOneWay="false" action="" name="sendMail" bindingOperationName="sendMail" type="Request-Response" outputName="sendMailResponse" inputName="sendMail" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/MailService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
</wsdl:definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhost:8080/XServices/MailService</con:endpoint></con:endpoints><con:operation isOneWay="false" action="" name="sendMail" bindingOperationName="sendMail" type="Request-Response" outputName="sendMailResponse" inputName="sendMail" receivesAttachments="false" sendsAttachments="false" anonymous="optional" id="cac0b3c0-9ae5-4e59-a134-2df61f634491"><con:settings/><con:call name="Request 1" id="38a40fc8-c86d-4572-8a59-c56085efad0c"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/MailService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:sendMail>
@ -252,7 +252,7 @@
<useStartTLS>?</useStartTLS>
</ws:sendMail>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/MailService/sendMail"/></con:call></con:operation><con:operation isOneWay="false" action="" name="sendMailSimple" bindingOperationName="sendMailSimple" type="Request-Response" outputName="sendMailSimpleResponse" inputName="sendMailSimple" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/MailService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/MailService/sendMail"/></con:call></con:operation><con:operation isOneWay="false" action="" name="sendMailSimple" bindingOperationName="sendMailSimple" type="Request-Response" outputName="sendMailSimpleResponse" inputName="sendMailSimple" receivesAttachments="false" sendsAttachments="false" anonymous="optional" id="1a3dcf8e-725e-4aac-a41e-7df95ced24dc"><con:settings/><con:call name="Request 1" id="dc9db9de-1633-4bdf-9ce2-96dc4bd2b30f"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/MailService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:sendMailSimple>
@ -272,47 +272,36 @@
<message>?</message>
</ws:sendMailSimple>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/MailService/sendMailSimple"/></con:call></con:operation><con:operation isOneWay="false" action="" name="sendMailSimpleWithAttachment" bindingOperationName="sendMailSimpleWithAttachment" type="Request-Response" outputName="sendMailSimpleWithAttachmentResponse" inputName="sendMailSimpleWithAttachment" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/MailService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:sendMailSimpleWithAttachment>
<mailhost>
<hostname>?</hostname>
<port>?</port>
<!--Optional:-->
<user>?</user>
<!--Optional:-->
<password>?</password>
</mailhost>
<from>?</from>
<to>?</to>
<!--Optional:-->
<subject>?</subject>
<!--Optional:-->
<message>?</message>
<!--Optional:-->
<attachments>
<FileSetType>FILES</FileSetType>
<source>?</source>
<filter>
<!--Zero or more repetitions:-->
<include>**/*</include>
<!--Zero or more repetitions:-->
<exclude>?</exclude>
<!--Optional:-->
<selector>
<!--Zero or more repetitions:-->
<contains>
<text>?</text>
<casesensitive>true</casesensitive>
<ignorewhitespace>false</ignorewhitespace>
</contains>
</selector>
</filter>
<!--Optional:-->
<excludes/>
<casesensitive>true</casesensitive>
</attachments>
</ws:sendMailSimpleWithAttachment>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/MailService/sendMailSimpleWithAttachment"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:properties/><con:wssContainer/><con:oAuth2ProfileContainer/></con:soapui-project>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/MailService/sendMailSimple"/></con:call></con:operation><con:operation isOneWay="false" action="" name="sendMailSimpleWithAttachment" bindingOperationName="sendMailSimpleWithAttachment" type="Request-Response" outputName="sendMailSimpleWithAttachmentResponse" inputName="sendMailSimpleWithAttachment" receivesAttachments="false" sendsAttachments="false" anonymous="optional" id="5c8fb520-d4a1-49e8-b005-5b27e68dde4f"><con:settings/><con:call name="Request 1" id="d0503ff1-dfba-4740-9be3-c3aa68078232"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/MailService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">\r
<soapenv:Header/>\r
<soapenv:Body>\r
<ws:sendMailSimpleWithAttachment>\r
<mailhost>\r
<hostname>mail.brutex.net</hostname>\r
<port>25</port>\r
<!--Optional:-->\r
<user>serena@brutex.de</user>\r
<!--Optional:-->\r
<password>serexxxxx</password>\r
</mailhost>\r
<from>brosenberger@serena.com</from>\r
<to>bru@brutex.de</to>\r
<!--Optional:-->\r
<subject>Testmail mit Anhang</subject>\r
<!--Optional:-->\r
<message>Hier sind die Dateien</message>\r
<!--Optional:-->\r
<attachments>\r
<FileSetType>FILES</FileSetType>\r
<source>c://temp/</source>\r
<filter>\r
<!--Zero or more repetitions:-->\r
<include>**/*.txt</include>\r
</filter>\r
<!--Optional:-->\r
<excludes/>\r
<casesensitive>true</casesensitive>\r
</attachments>\r
</ws:sendMailSimpleWithAttachment>\r
</soapenv:Body>\r
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/MailService/sendMailSimpleWithAttachment"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:properties/><con:wssContainer/><con:oAuth2ProfileContainer/></con:soapui-project>