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

View File

@ -42,6 +42,8 @@
<dependency org="org.apache.ant" name="ant-jsch" rev="1.8.4"/> <dependency org="org.apache.ant" name="ant-jsch" rev="1.8.4"/>
<!--<dependency org="ant-contrib" name="ant-contrib" rev="20020829"/>--> <!--<dependency org="ant-contrib" name="ant-contrib" rev="20020829"/>-->
<dependency org="org.apache.ant" name="ant-commons-net" rev="1.8.4"/> <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 --> <!-- 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"/> <dependency org="org.apache.jcs" name="jcs" rev="1.3"/>
@ -99,6 +101,7 @@
</dependency> </dependency>
<!-- Serena Dimensions CM 14.1 --> <!-- Serena Dimensions CM 14.1 -->
<dependency org="serena" name="serena.darius" rev="14.1" conf="*"> <dependency org="serena" name="serena.darius" rev="14.1" conf="*">
<artifact name="serena.darius" type="jar" /> <artifact name="serena.darius" type="jar" />
</dependency> </dependency>

View File

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

View File

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

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?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> <wsdl:types>
<xs:schema elementFormDefault="unqualified" targetNamespace="http://ws.xservices.brutex.net" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <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"/> <xs:element name="antProperty" type="tns:antProperty"/>
@ -199,7 +199,7 @@
<soap:address location="http://localhost:8080/XServices/MailService"/> <soap:address location="http://localhost:8080/XServices/MailService"/>
</wsdl:port> </wsdl:port>
</wsdl:service> </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:Header/>
<soapenv:Body> <soapenv:Body>
<ws:sendMail> <ws:sendMail>
@ -252,7 +252,7 @@
<useStartTLS>?</useStartTLS> <useStartTLS>?</useStartTLS>
</ws:sendMail> </ws:sendMail>
</soapenv:Body> </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:Header/>
<soapenv:Body> <soapenv:Body>
<ws:sendMailSimple> <ws:sendMailSimple>
@ -272,47 +272,36 @@
<message>?</message> <message>?</message>
</ws:sendMailSimple> </ws:sendMailSimple>
</soapenv:Body> </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: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/> <soapenv:Header/>\r
<soapenv:Body> <soapenv:Body>\r
<ws:sendMailSimpleWithAttachment> <ws:sendMailSimpleWithAttachment>\r
<mailhost> <mailhost>\r
<hostname>?</hostname> <hostname>mail.brutex.net</hostname>\r
<port>?</port> <port>25</port>\r
<!--Optional:--> <!--Optional:-->\r
<user>?</user> <user>serena@brutex.de</user>\r
<!--Optional:--> <!--Optional:-->\r
<password>?</password> <password>serexxxxx</password>\r
</mailhost> </mailhost>\r
<from>?</from> <from>brosenberger@serena.com</from>\r
<to>?</to> <to>bru@brutex.de</to>\r
<!--Optional:--> <!--Optional:-->\r
<subject>?</subject> <subject>Testmail mit Anhang</subject>\r
<!--Optional:--> <!--Optional:-->\r
<message>?</message> <message>Hier sind die Dateien</message>\r
<!--Optional:--> <!--Optional:-->\r
<attachments> <attachments>\r
<FileSetType>FILES</FileSetType> <FileSetType>FILES</FileSetType>\r
<source>?</source> <source>c://temp/</source>\r
<filter> <filter>\r
<!--Zero or more repetitions:--> <!--Zero or more repetitions:-->\r
<include>**/*</include> <include>**/*.txt</include>\r
<!--Zero or more repetitions:--> </filter>\r
<exclude>?</exclude> <!--Optional:-->\r
<!--Optional:--> <excludes/>\r
<selector> <casesensitive>true</casesensitive>\r
<!--Zero or more repetitions:--> </attachments>\r
<contains> </ws:sendMailSimpleWithAttachment>\r
<text>?</text> </soapenv:Body>\r
<casesensitive>true</casesensitive> </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>
<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>