JSR-181 question

Hello there! I'm creating some webservices that will be called on a BPEL process. All webservices have the same method signature, only differ in their implementation (ok, I'm creating a loan broker app, and the webservices are the banks endpoints ;) ).

Ok, so far so good. Since all webservices have the same message parts, I defined a schema for the return value. The problem when using the JSR-181 metadata is that all WSDLs generate a diferent namespace for each message part. What I'd like to have is all WSDLs importing my schema and hence, all webservices having the same message parts.

I don't know if this is the best way, but it seems that for the BPEL process it will be much shorter since I've only one namespace to import, and all my internal variables will be the same type.

How can I do that using annotations? Do I need to annotate my InterestRate class using JAXB? I'm pretty confused with that.

Any ideas?

Best regards

[979 byte] By [vcarvalhoa] at [2007-11-27 10:23:51]
# 1

Have you tried using the "endpointINterface" attribute?

Something like:

package broker;

@WebService

public interface Broker {

public List<Account> getAccounts();

}

package banks;

@WebService(endpointInterface="broker.Broker")

public class BankA {

public List<Accounts> getAccounts() {..}

}

@WebService(endpointInterface="broker.Broker")

public class BankB {

public List<Accounts> getAccounts() {..}

}

dkohlerta at 2007-7-28 17:24:17 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Thanks, I solved it by annotating the taget class with @XMLType

for instance:

@WebMethod

public InterestRate getRate() ...

@XMLType

public class InterestRate

regards

vcarvalhoa at 2007-7-28 17:24:17 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...