users@jax-rpc.java.net

Re: Confused and need help....

From: BJ <robl29_at_yahoo.com>
Date: Fri, 17 Aug 2007 10:17:57 -0700 (PDT)

Vivek, thanks for the response. Yes, I am using wscompile given wsdl to
generate java class but I am not using JAX-WS RI 2.1.1. Is it doable without
JAX-WS?

Thanks.


Vivek Pandey wrote:
>
> You mentioned wscompile, which was wsdl to java tool in JAX-RPC. If you
> are using JAX-WS RI 2.1.1 and beyond, you should not see this problem,
> provided your endpoint is either WSDL first, where wsimport will
> generate @XmlSeeAlso[1] with all the base and sub classes allowing base
> classes to be returned.
>
> If it is Java first case, then you need to annotate your endpoint class
> with @XmlSeeAlso, for example:
>
> @XmlSeeAlso(PaymentInfo.class, CreditCardPaymentInfo.class)
>
> Similarly you need to run wsimport on your client so that the stub is
> generated with @XmlSeeAlso annotations with all the relevant classes.
>
> -vivek.
> [1]https://jax-ws.dev.java.net/nonav/2.1.2m1/docs/UsersGuide.html#2.6.1_Type_Substitution
>
> BJ wrote:
>> In my webservice, I have a method called getPaymentInfo() that returns a
>> base
>> class PaymentInfo; it can also return CreditCardPaymentInfo class because
>> this class extends the PaymenInfo class.
>>
>> My question is when I call this method, it always return the PaymentInfo
>> class and I know for sure it should return CreditCardPaymentInfo class.
>>
>> I am using wscompile to generate the client stub. Is there any switch in
>> wscompile I need to turn on/off to be able to get the right class back.
>>
>> Thanks in advance.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>
>

-- 
View this message in context: http://www.nabble.com/Confused-and-need-help....-tf4286789.html#a12203645
Sent from the JAX-RPC - User mailing list archive at Nabble.com.