[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axis-user
Subject:    Re: [Axis2] Re: User manual for Axis2 v 0.95 - Problems with "Invoking a service using a mail"
From:       Chamil Thanthrimudalige <chamil () wso2 ! com>
Date:       2006-04-29 13:16:18
Message-ID: 98EA44C3-A553-459C-A0C9-5150BCA960DF () wso2 ! com
[Download RAW message or body]

Hi Jack,

I did a bit of digging and found a few problems with the mail  
transport and I have fixed them now. This is due to the fact that we  
have excluded the mail tests from the build since we can't have a  
dependency on the sun javamail and activation jars. There were some  
changes to axis2 code which have not been tested with the mail  
transport. I have fixed these and you will be able to use the mail  
transport now.

Have  a look at MailRequestResponseRawXMLTest[1] for an example about  
how to do a request response case, and have a look at mail-enabled- 
server-axis2.xml[2] and mail-enabled-client-axis2.xml[2] for examples  
on configurations.

I still have not updated the docs. So you will have to stick to the  
code for now.

Have a go[4] at the code with the sun javamail and activation jars.  
You can do this from inside by changing the etc/project.properties  
file to use the sun jars after copying them into the maven repository.

Best Regards,
Chamil Thanthrimudalige

[1] modules/integration/test/org/apache/axis2/mail/ 
MailRequestResponseRawXMLTest.java
[2] modules/integration/test/org/apache/axis2/mail/mail-enabled- 
server-axis2.xml
[3] modules/integration/test/org/apache/axis2/mail/mail-enabled- 
client-axis2.xml
[4] maven -o test:single - 
Dtestcase=org.apache.axis2.mail.MailRequestResponseRawXMLTest


On Apr 26, 2006, at 6:45 PM, Jack wrote:

> Ho Chamil,
>
> Ok let me see if I have this right now. To use a generic mail server
> (and only perform one way communication - ie the client sends a
> message to the service, which then performs some back end processing)
> I need to:
>
> 1. have an email account where the messages are sent to (and the
> service collects them from)
>
> 2. set the mail transport sections of the axis2.xml
>    Where the transport sender section includes smtp details and the
> transport receiver section to include pop3 details??
>     In the website [2] the comments seem to be in the wrong
> sections??? Also in the website [2] it has:
>    <transportSender name="mail"
> class="org.apache.axis2.transport.mail.MailTransportSender">
> and in all other axis2.xml files seems to have
>    <transportSender name="mailto"
> class="org.apache.axis2.transport.mail.MailTransportSender">
> *So should it be mail or mailto??
>
>
> 3. the only change in the client is the EndPointReference??
> 	//private static EndpointReference targetEPR =
> 	//	new EndpointReference("http://localhost:8080/axis2/services/ 
> MyService");
>
> 	private static EndpointReference targetEPR =
> 			new EndpointReference("mailto:service-account@some.server.de" +
> 									"/axis2/services/MyService/ping");
>
> 4. what change do i make on the service to get it to collect the
> mails/messages from the mail server??
>
>
>
> On 26/04/06, Chamil Thanthrimudalige <chamil@wso2.com> wrote:
>> Hi Jack,
>>
>> We do not have a sample in a box.
>>
>> Can you have a look at a test case[1] in the integration module in
>> the axis2 source checkout[svn checkout].
>>
>> To configure to work with the mail transport, have a look at the mail
>> transport configuration document[2] for information about how to
>> configure the mail transport. After the configuration you can just
>> copy and past the code in a sample to check things out.
>>
>> For examples on the configuration have a look at the configuration
>> files in the integration module.[3]
>>
>> Best Regards,
>> Chamil Thanthrimudalige
>>
>> [1] Have a look at axis2/modules/integration/test/org/apache/axis2/
>> mail/MailOneWayRawXMLTest.java
>> [2] http://ws.apache.org/axis2/0_95/mail-configuration.html
>> [3] axis2/modules/integration/test/org/apache/axis2/mai
>>
>> On Apr 26, 2006, at 3:50 PM, Jack wrote:
>>
>>> Hi Chamil,
>>>
>>> Thanks for the quick reply.
>>>
>>> I am still having difficulties. Is there a fully functional  
>>> example of
>>> SOAP via SMTP (ie a zip, jar, other that contains both client and
>>> source code that can be downloaded and run)?
>>>
>>> Also when building from WSDL into stubs / skeletons where do the
>>> changes have to be made to use SMTP as a transport?
>>>
>>> Cheers
>>> Jack...
>>>
>>>
>>> On 26/04/06, Chamil Thanthrimudalige <chamil@wso2.com> wrote:
>>>> Hi Jack,
>>>>
>>>> Thanks for finding the typo.
>>>>
>>>> UtilsMailServer is in the integration module which is not shipped
>>>> with any distribution. I think we need to move this to some other
>>>> module that will be shipped. If you can get the source from a svn
>>>> checkout[1] you will get UtilsMailServer[2].
>>>>
>>>> Also pleas make sure you are using Sun javamail and activation  
>>>> jars.
>>>>
>>>> Best Regards,
>>>> Chamil Thanthrimudalige
>>>>
>>>>
>>>> [1] http://ws.apache.org/axis2/svn.html
>>>> [2] It is at [Axis2 source dir]/modules/integration/test/org/ 
>>>> apache/
>>>> axis2/mail/UtilsMailServer.java
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I'm having real trouble setting up a working example of SOAP over
>>>> SMTP
>>>> - I've looked at the user guide but the example seems broken (see
>>>> below).
>>>>
>>>> Does anyone have a working example of this or any pointers?  
>>>> Would be
>>>> muchly appreciated.
>>>>
>>>>
>>>> Some specific issues for example:
>>>>
>>>> For example in Section 2. in the code you have:
>>>>         ConfigurationContext configContextbuilder
>>>>                 .buildConfigurationContext(file.getAbsolutePath());
>>>>
>>>> This is not even valid java and should probably read something  
>>>> like:
>>>>         ConfigurationContext configContext  =
>>>>                 builder.buildConfigurationContext
>>>> (file.getAbsolutePath
>>>> ());
>>>>
>>>> Also the UtilsMailServer that is mentioned cannot be found anywhere
>>>> (in the src or bin or doc distributions)?
>>>>
>>>> Is it possible that this section of the user guide is revised  
>>>> and if
>>>> so please make the source code for this section available
>>>> somewhere as
>>>> a zip / jar / other (or better still include it in the samples with
>>>> the bin or src distributions).
>>>>
>>>> Cheers
>>>> Jack...
>>>>
>>>> The claim "natural" is not synonymous with safe.
>>
>>
>
>
> --
> Cheers
> Jack...
>
> The claim "natural" is not synonymous with safe.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic