users@glassfish.java.net

Re: Multiple EJBs into one web service

From: Vijay Ramachandran <Vijay.Ramachandran_at_Sun.COM>
Date: Thu, 19 Apr 2007 08:26:17 -0700

I am CCing the jaxws alias to get their input on this.

glassfish_at_javadesktop.org wrote:
> Hi folks.
>
> I am working on a demo, which has 2 stateless session beans. BankTeller and InsuranceBroker.
>
> These are marked with @WebService, which I can compile and deploy on Glassfish. All is well.
>
>
> Now I would like to package the 2 beans as one service (one WSDL). I have tried messing with all the parameters of the @WebService annotation, to no avail.
>
> The reason I want todo this, is that the 2 session beans have functions named the same, which seems to break wsimport.
>
> example code.
>
> [code]
> @Stateless
> @WebService(
> name="BankTeller",
> portName="BankTellerPort",
> serviceName="FinancialService",
> targetNamespace="com.starjar.test.testwebservice")
> public class BankTellerBean implements BankTellerLocal {
>
> public List<BankAccount> find(String name) {
> return null;
> }
> }
>
>
>
> @Stateless
> @WebService(
> name="InsuranceBroker",
> portName="InsuranceBrokerPort",
> serviceName="FinancialService",
> targetNamespace="com.starjar.test.testwebservice")
> public class InsuranceBrokerBean implements testwebservice.InsuranceBrokerLocal {
>
> public List<InsurancePolicy> find(String name) {
> return null;
> }
> }
>
>
>
> [/code]
>
>
> When wsimport is run against the Insurance broker wsdl a class called FindResponse is created.
> When I run wsimport again, FindResponse is over written.
>
> To me this seems like a bug, but it could well be how it is supposed to work.
>
> Thanks for any replies.
> [Message sent by forum member 'phenderson' (phenderson)]
>
> http://forums.java.net/jive/thread.jspa?messageID=212887
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>