Apache Geronimo > Discussion Forums  User List | Dev List | Wiki | Issue Tracker  

JAX-WS and external classes

View: New views
2 Messages — Rating Filter:   Alert me  

JAX-WS and external classes

by Łukasz Budnik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I'm using G 2.1.3 and I have a following problem with JAX-WS Web
Service. I have a Web Service which expects an custom object, say
Person or Animal:

@WebMethod
public String sayHello(Person person) {
...
}

This class resides in org.xyz.interfaces package and is external to
the application.

When I install interfaces.jar in Geronimo's repository and in Geronimo
descriptor I include it using <dependency /> element there is an error
during WSDL generation.

When I take the very same package(!), add empty ejb-jar.xml descriptor
and add it into EAR:

  <module>
    <ejb>interfaces.jar</ejb>
  </module>

all works fine.

I guess it's something to do with class loader... or I may be wrong.

Any thoughts/tips/tricks?

Eventually I can live with that, but I prefer not to create mock ejb modules...

thanks
Łukasz

Re: JAX-WS and external classes

by djencks :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 22, 2009, at 5:31 AM, Łukasz Budnik wrote:

> Hi all,
>
> I'm using G 2.1.3 and I have a following problem with JAX-WS Web
> Service. I have a Web Service which expects an custom object, say
> Person or Animal:
>
> @WebMethod
> public String sayHello(Person person) {
> ...
> }
>
> This class resides in org.xyz.interfaces package and is external to
> the application.
>
> When I install interfaces.jar in Geronimo's repository and in Geronimo
> descriptor I include it using <dependency /> element there is an error
> during WSDL generation.
>
> When I take the very same package(!), add empty ejb-jar.xml descriptor
> and add it into EAR:
>
>  <module>
>    <ejb>interfaces.jar</ejb>
>  </module>
>
> all works fine.
>
> I guess it's something to do with class loader... or I may be wrong.
>
> Any thoughts/tips/tricks?
>
> Eventually I can live with that, but I prefer not to create mock ejb  
> modules...

I'd guess that the problem with the wsdl generation might be due to  
it's not understanding the geronimo dependencies, but I don't really  
know how it works, maybe Jarek can give some hints.

I'd recommend the dependency solution if it can possibly be made to  
work, but if it can't, you don't need a fake <ejb> module, you can  
just put your jar in the ear as lib/interfaces.jar and it will be  
picked up -- a javaee 5 feature that is really handy :-)

thanks
david jencks
>
> thanks
> Łukasz