Re: T5.2 and Metro / SOAP

2011-10-06 Thread Lenny Primak
SoapSessionFactory() {
>   return soapSessionFactory_;
>   }
> 
>   public WsFundQueryImpl(FundsService fundData,
>   SOAPSessionFactory soapSessionFactory,
>   WsAuthenticationImpl wsAuthentication,
>   FundClassRepository 
> fundClassRepository,TimeSeriesRepository timeSeriesRepository) throws 
> IOException {
>   fundData_ = fundData;
>   soapSessionFactory_ = soapSessionFactory;
>   castleWsAuthentication_ = wsAuthentication;
>   fundClassRepository_ = fundClassRepository;
>   timeSeriesRepository_ = timeSeriesRepository;
>   
>   }
> 
>   
>   
>   @WebMethod
>   public synchronized List 
> getFundReturnsForClient(
>   String username, String password) {
> 
>   ...
> 
>   }
> 
> 5. You als need Metro of course, I use a profile to include it in my pom:
> 
>   Metro 
>   
>   2.2.1 
>   
>   
>   true
>   
>   
>   
>   maven2-repository.dev.java.net
>   Java.net Maven 2 Repository
>   http://download.java.net/maven/2/
>   
>   
>   
>   
>   
>   com.sun.xml.ws
>   jaxws-rt
>   ${metro.version}
>   
>   
>   javax.jws
>   jsr181-api
>   1.0-MR1
>
>   
>   
>   
> 
> I am running all this on Tomcat 6, I am pretty happy with this solution. One 
> thing I have noticed though is that deploying a new version requires a 
> restart of Tomcat. Of course if you wanted more stateful web services I could 
> recommend using glassfish instead of Tomcat, as it is also an EJB container 
> and has built in support for Metro, and good tools in Netbeans, (I am using 
> eclipse though).
> 
> As you can see integration is trivial in Tapestry, but unfortunately this 
> stuff is not documented... Hope this helps u out!
> 
> Kind regards,
> Peter
> 
> 
> - Original Message -
> From: "Lenny Primak" 
> To: "Tapestry users" 
> Sent: Thursday, 22 September, 2011 19:23:52 GMT +02:00 Athens, Bucharest, 
> Istanbul
> Subject: Re: T5.2 and Metro / SOAP
> 
> I would love to see metro integration. Just because it's the default in 
> glassfish and I am already using it. Or any thoughts on how to implement it. 
> 
> 
> 
> On Sep 22, 2011, at 12:12 PM, Norman Franke  wrote:
> 
>> I know Metros quite Windows .NET friendly. Not sure about CXF, but if so, I 
>> could go that way, too. The question would still remain. Can you integrate 
>> Tapestry IoC with CXF relatively easily?
>> 
>> Norman Franke
>> Answering Service for Directors, Inc.
>> www.myasd.com
>> 
>> 
>> 
>> On Sep 21, 2011, at 6:35 PM, Daniel Honig wrote:
>> 
>>> Why use metro when you can use CXF?
>>> 
>>> Metro is good, but I don't think there is as much activity as CXF post the
>>> Sun/Oracle merger.
>>> 
>>> On Wed, Sep 21, 2011 at 6:31 PM, Norman Franke  wrote:
>>> 
>>>> I have a need to create some web services to provide SOAP access. I'm
>>>> already using Tapestry 5.2 for our web applications, so I think it would be
>>>> natural to be able to use Tapestry's IoC with Metro, if possible. This 
>>>> would
>>>> save me from having to re-implement all the DAO functionality.
>>>> 
>>>> Has anyone done this? Any thoughts on how to approach this? I'm new to
>>>> Metro, but I'm pretty comfortable with Tapestry 5.2.
>>>> 
>>>> Norman Franke
>>>> Answering Service for Directors, Inc.
>>>> www.myasd.com
>>>> 
>>>> 
>>>> 
>>>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5.2 and Metro / SOAP

2011-10-05 Thread Thiago H. de Paula Figueiredo
On Wed, 05 Oct 2011 10:46:03 -0300, Peter Stavrinides  
 wrote:


Registry is an ObjectLocator. Registry is a subinterface of  
ObjectLocator.

What do you need in Registry that ObjectLocator doesn't have?
Okay I get it now, wrap it all in an IoC service that uses ObjectLocator  
to lookup the services, and contribute this service to RegistryStartup  
so there would be no need for a reference to the Registry...


Exactly. It doesn't even need to be a service, as you can inject  
ObjectLocator in your contributeRegistryStartup() method.


As I said before, I am fine with my approach, much of a muchness but  
this could be a better way for others.


I'm not saying it was wrong: it isn't. I just prefer solutions that don't  
involve web.xml. :)


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Fwd: T5.2 and Metro / SOAP

2011-10-05 Thread Peter Stavrinides
> Registry is an ObjectLocator. Registry is a subinterface of ObjectLocator.  
> What do you need in Registry that ObjectLocator doesn't have?
Okay I get it now, wrap it all in an IoC service that uses ObjectLocator to 
lookup the services, and contribute this service to RegistryStartup so there 
would be no need for a reference to the Registry... As I said before, I am fine 
with my approach, much of a muchness but this could be a better way for others.

Regards,
Peter
- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Peter Stavrinides" 
Sent: Wednesday, 5 October, 2011 16:37:31 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: T5.2 and Metro / SOAP

On Wed, 05 Oct 2011 10:30:10 -0300, Peter Stavrinides  
 wrote:

> The ObjectLocator provides access to services defined within a Registry,  
> but I haven't seen an example of using it to get hold of a reference to  
> the actual registry?

Registry is an ObjectLocator. Registry is a subinterface of ObjectLocator.  
What do you need in Registry that ObjectLocator doesn't have?

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5.2 and Metro / SOAP

2011-10-05 Thread Peter Stavrinides
The ObjectLocator provides access to services defined within a Registry, but I 
haven't seen an example of using it to get hold of a reference to the actual 
registry? is that possible? if so pls provide a code example, I have only seen 
this from the Context. ie: Registry registry = (Registry) 
context.getAttribute(TapestryFilter.REGISTRY_CONTEXT_NAME); Am I missing 
something, perhaps show us what you are referring to in some code.

- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" , "P Stavrinides" 

Sent: Wednesday, 5 October, 2011 15:32:51 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: T5.2 and Metro / SOAP

On Wed, 05 Oct 2011 09:08:21 -0300,  wrote:

> I don't know Thiago, I suppose that may be true, but I never tried it...  
> In theory, the only thing you really need is a reference to the Tapestry  
> registry in order to publish the endpoints, this was the best solution I  
> found at the time, I am still not convinced I would do it any other way.

You can inject an ObjectLocator (which is the interface that provides the  
getService() and autobuild() methods of Registry) in any service. This  
avoids the need of web.xml changes.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5.2 and Metro / SOAP

2011-10-05 Thread Thiago H. de Paula Figueiredo

On Wed, 05 Oct 2011 09:08:21 -0300,  wrote:

I don't know Thiago, I suppose that may be true, but I never tried it...  
In theory, the only thing you really need is a reference to the Tapestry  
registry in order to publish the endpoints, this was the best solution I  
found at the time, I am still not convinced I would do it any other way.


You can inject an ObjectLocator (which is the interface that provides the  
getService() and autobuild() methods of Registry) in any service. This  
avoids the need of web.xml changes.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5.2 and Metro / SOAP

2011-10-05 Thread P . Stavrinides
I don't know Thiago, I suppose that may be true, but I never tried it... In 
theory, the only thing you really need is a reference to the Tapestry registry 
in order to publish the endpoints, this was the best solution I found at the 
time, I am still not convinced I would do it any other way.



- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Wednesday, 5 October, 2011 14:41:16 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: T5.2 and Metro / SOAP

On Wed, 05 Oct 2011 08:03:50 -0300,  wrote:

> Hello!

Hi!

I haven't tried what you've done, but I don't think you need to subclass
TapestryFilter. Couldn't the logic inside publicEndpointSingletonServices
be replaced by a class contributed to the RegistryStartup service? I can't
see anything that needs to be in a servlet filter.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5.2 and Metro / SOAP

2011-10-05 Thread Thiago H. de Paula Figueiredo

On Wed, 05 Oct 2011 08:03:50 -0300,  wrote:


Hello!


Hi!

I haven't tried what you've done, but I don't think you need to subclass
TapestryFilter. Couldn't the logic inside publicEndpointSingletonServices
be replaced by a class contributed to the RegistryStartup service? I can't
see anything that needs to be in a servlet filter.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5.2 and Metro / SOAP

2011-10-05 Thread P . Stavrinides
ndClassRepository;
timeSeriesRepository_ = timeSeriesRepository;

}



@WebMethod
public synchronized List 
getFundReturnsForClient(
String username, String password) {

...

}

5. You als need Metro of course, I use a profile to include it in my pom:

Metro 

2.2.1 


true



maven2-repository.dev.java.net
Java.net Maven 2 Repository
http://download.java.net/maven/2/





com.sun.xml.ws
jaxws-rt
${metro.version}


javax.jws
jsr181-api
1.0-MR1





I am running all this on Tomcat 6, I am pretty happy with this solution. One 
thing I have noticed though is that deploying a new version requires a restart 
of Tomcat. Of course if you wanted more stateful web services I could recommend 
using glassfish instead of Tomcat, as it is also an EJB container and has built 
in support for Metro, and good tools in Netbeans, (I am using eclipse though).

As you can see integration is trivial in Tapestry, but unfortunately this stuff 
is not documented... Hope this helps u out!

Kind regards,
Peter


- Original Message -
From: "Lenny Primak" 
To: "Tapestry users" 
Sent: Thursday, 22 September, 2011 19:23:52 GMT +02:00 Athens, Bucharest, 
Istanbul
Subject: Re: T5.2 and Metro / SOAP

I would love to see metro integration. Just because it's the default in 
glassfish and I am already using it. Or any thoughts on how to implement it. 



On Sep 22, 2011, at 12:12 PM, Norman Franke  wrote:

> I know Metros quite Windows .NET friendly. Not sure about CXF, but if so, I 
> could go that way, too. The question would still remain. Can you integrate 
> Tapestry IoC with CXF relatively easily?
> 
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
> 
> 
> 
> On Sep 21, 2011, at 6:35 PM, Daniel Honig wrote:
> 
>> Why use metro when you can use CXF?
>> 
>> Metro is good, but I don't think there is as much activity as CXF post the
>> Sun/Oracle merger.
>> 
>> On Wed, Sep 21, 2011 at 6:31 PM, Norman Franke  wrote:
>> 
>>> I have a need to create some web services to provide SOAP access. I'm
>>> already using Tapestry 5.2 for our web applications, so I think it would be
>>> natural to be able to use Tapestry's IoC with Metro, if possible. This would
>>> save me from having to re-implement all the DAO functionality.
>>> 
>>> Has anyone done this? Any thoughts on how to approach this? I'm new to
>>> Metro, but I'm pretty comfortable with Tapestry 5.2.
>>> 
>>> Norman Franke
>>> Answering Service for Directors, Inc.
>>> www.myasd.com
>>> 
>>> 
>>> 
>>> 
> 

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5.2 and Metro / SOAP

2011-09-22 Thread Lenny Primak
I would love to see metro integration. Just because it's the default in 
glassfish and I am already using it. Or any thoughts on how to implement it. 



On Sep 22, 2011, at 12:12 PM, Norman Franke  wrote:

> I know Metros quite Windows .NET friendly. Not sure about CXF, but if so, I 
> could go that way, too. The question would still remain. Can you integrate 
> Tapestry IoC with CXF relatively easily?
> 
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
> 
> 
> 
> On Sep 21, 2011, at 6:35 PM, Daniel Honig wrote:
> 
>> Why use metro when you can use CXF?
>> 
>> Metro is good, but I don't think there is as much activity as CXF post the
>> Sun/Oracle merger.
>> 
>> On Wed, Sep 21, 2011 at 6:31 PM, Norman Franke  wrote:
>> 
>>> I have a need to create some web services to provide SOAP access. I'm
>>> already using Tapestry 5.2 for our web applications, so I think it would be
>>> natural to be able to use Tapestry's IoC with Metro, if possible. This would
>>> save me from having to re-implement all the DAO functionality.
>>> 
>>> Has anyone done this? Any thoughts on how to approach this? I'm new to
>>> Metro, but I'm pretty comfortable with Tapestry 5.2.
>>> 
>>> Norman Franke
>>> Answering Service for Directors, Inc.
>>> www.myasd.com
>>> 
>>> 
>>> 
>>> 
> 

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5.2 and Metro / SOAP

2011-09-22 Thread Norman Franke
I know Metros quite Windows .NET friendly. Not sure about CXF, but if  
so, I could go that way, too. The question would still remain. Can you  
integrate Tapestry IoC with CXF relatively easily?


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Sep 21, 2011, at 6:35 PM, Daniel Honig wrote:


Why use metro when you can use CXF?

Metro is good, but I don't think there is as much activity as CXF  
post the

Sun/Oracle merger.

On Wed, Sep 21, 2011 at 6:31 PM, Norman Franke   
wrote:



I have a need to create some web services to provide SOAP access. I'm
already using Tapestry 5.2 for our web applications, so I think it  
would be
natural to be able to use Tapestry's IoC with Metro, if possible.  
This would

save me from having to re-implement all the DAO functionality.

Has anyone done this? Any thoughts on how to approach this? I'm new  
to

Metro, but I'm pretty comfortable with Tapestry 5.2.

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com








Re: T5.2 and Metro / SOAP

2011-09-21 Thread Daniel Honig
Why use metro when you can use CXF?

Metro is good, but I don't think there is as much activity as CXF post the
Sun/Oracle merger.

On Wed, Sep 21, 2011 at 6:31 PM, Norman Franke  wrote:

> I have a need to create some web services to provide SOAP access. I'm
> already using Tapestry 5.2 for our web applications, so I think it would be
> natural to be able to use Tapestry's IoC with Metro, if possible. This would
> save me from having to re-implement all the DAO functionality.
>
> Has anyone done this? Any thoughts on how to approach this? I'm new to
> Metro, but I'm pretty comfortable with Tapestry 5.2.
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
>
>
>


T5.2 and Metro / SOAP

2011-09-21 Thread Norman Franke
I have a need to create some web services to provide SOAP access. I'm  
already using Tapestry 5.2 for our web applications, so I think it  
would be natural to be able to use Tapestry's IoC with Metro, if  
possible. This would save me from having to re-implement all the DAO  
functionality.


Has anyone done this? Any thoughts on how to approach this? I'm new to  
Metro, but I'm pretty comfortable with Tapestry 5.2.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com