Re: WSDL2Java - Inheritance problem

2008-07-23 Thread Amila Suriarachchi
if you use Axis2 1.4 XMLBeans should also supports them.

thanks,
Amila.

On Wed, Jul 23, 2008 at 8:08 AM, Matt Wlazlo <[EMAIL PROTECTED]> wrote:

> Ah, I'm using XMLBeans and not ADB, would that have anything to do
> with my problem?
>
> 2008/7/22 Amila Suriarachchi <[EMAIL PROTECTED]>:
> > I generated with the following options and have this test
> >
> > -uri Pillar.wsdl -ss -sd -g -uw
> >
> > private void testTestClass(){
> > String xmlString = "  > xmlns:xsd=\"http://osr.nsw.gov.au/pillar/gen/xsd\">\n"
> +
> > "> 
> > "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\
> ">\n"
> > +
> > " SESSNUM\n" +
> > " 20004465\n" +
> > " 141\n" +
> > "   \n" +
> > "   \n" +
> > " INFNUM\n" +
> > " 7151999517\n" +
> > "   \n" +
> > " ";
> >
> > try {
> > XMLStreamReader xmlReader
> > = StAXUtils.createXMLStreamReader(new
> > ByteArrayInputStream(xmlString.getBytes()));
> > Get result = Get.Factory.parse(xmlReader);
> > IdSet[] ids = result.getId();
> > for (int i = 0; i < ids.length; i++) {
> > IdSet id = ids[i];
> > if (id.getIdtype() == IdType.SESSNUM) {
> > if (!(id instanceof IdSetSess)){
> >
> > }
> >
> > }
> > }
> >
> > System.out.println("OK");
> > } catch (XMLStreamException e) {
> > e.printStackTrace();  //To change body of catch statement use
> > File | Settings | File Templates.
> > } catch (Exception e) {
> > e.printStackTrace();  //To change body of catch statement use
> > File | Settings | File Templates.
> > }
> >
> > }
> >
> > and it worked fine.
> >
> > thanks,
> > Amila.
> >
> > On Tue, Jul 22, 2008 at 5:38 AM, Matt Wlazlo <[EMAIL PROTECTED]> wrote:
> >>
> >> Sure, it's attached.
> >>
> >> 2008/7/21 Amila Suriarachchi <[EMAIL PROTECTED]>:
> >> > Can you send your wsdl? I think you use only Axis2 at the server side.
> >> >
> >> > thanks,
> >> > Amila.
> >> >
> >> > On Mon, Jul 21, 2008 at 10:06 AM, Matt Wlazlo <[EMAIL PROTECTED]>
> wrote:
> >> >>
> >> >> 2008/7/21 Amila Suriarachchi <[EMAIL PROTECTED]>:
> >> >> >
> >> >> >
> >> >> > On Mon, Jul 21, 2008 at 8:26 AM, Matt Wlazlo <[EMAIL PROTECTED]>
> >> >> > wrote:
> >> >> >>
> >> >> >> Hi,
> >> >> >>
> >> >> >> I'm having trouble with passing inheritance types. I've followed
> >> >> >> this
> >> >> >> url:
> >> >> >>
> >> >> >>
> >> >> >>
> http://www.ibm.com/developerworks/websphere/techjournal/0401_brown/brown.html
> >> >> >> as a guide to WSDL inheritance, and everything seems to be working
> >> >> >> except that when it comes time to do a typecast, there doesn't
> >> >> >> appear
> >> >> >> to be any relationship of the objects...
> >> >> >>
> >> >> >> I think it will be easier to explain the situation in code:
> >> >> >>
> >> >> >> In my WSDL I have the following:
> >> >> >>
> >> >> >> 
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> 
> >> >> >> 
> >> >> >>
> >> >> >> >> >> >> type="xsd1:idType" />
> >> >> >> >> >> >> type="xsd:string" />
> >> >> >>
> >> >> >> 
> >> >> >> 
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> >> >> >> type="xsd:string"
> >> >> >> />
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> 
> >> >> >> .
> >> >> >> .
> >> >> >> 
> >> >> >>
> >> >> >>
> >> >> >> maxOccurs="unbounded"
> >> >> >> name="id"
> >> >> >>nillable="true"
> >> >> >> type="xsd1:idSet"
> >> >> >> />
> >> >> >>
> >> >> >>
> >> >> >> 
> >> >> >>
> >> >> >>
> >> >> >> Then in my server code (the error is here):
> >> >> >>  public get(IdSet[] ids) {
> >> >> >>...
> >> >> >>for(int i = 0; i < id.length; i++) {
> >> >> >>   IdSet id = ids[i];
> >> >> >>if(id.getIdtype() == IdType.SESSNUM) {
> >> >> >>   if(!(id instanceof IdSetSess))
> >> >> >>throw new Exception("IdSetSess not used when IdType
> >> >> >> set
> >> >> >> to
> >> >> >> SESSNUM!"); // XXX id should be an instance of IdSetSess
> >> >> >>   .
> >> >> >>   .
> >> >> >>}
> >> >> >>}
> >> >> >>  }
> >> >> >>
> >> >> >> On the wire, an example request is:
> >> >> >>   >> >> >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
> >> >> >>
> >> >> >>  http://osr.n

Re: WSDL2Java - Inheritance problem

2008-07-22 Thread Matt Wlazlo
Ah, I'm using XMLBeans and not ADB, would that have anything to do
with my problem?

2008/7/22 Amila Suriarachchi <[EMAIL PROTECTED]>:
> I generated with the following options and have this test
>
> -uri Pillar.wsdl -ss -sd -g -uw
>
> private void testTestClass(){
> String xmlString = "  xmlns:xsd=\"http://osr.nsw.gov.au/pillar/gen/xsd\";>\n" +
> ""xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\";>\n"
> +
> " SESSNUM\n" +
> " 20004465\n" +
> " 141\n" +
> "   \n" +
> "   \n" +
> " INFNUM\n" +
> " 7151999517\n" +
> "   \n" +
> " ";
>
> try {
> XMLStreamReader xmlReader
> = StAXUtils.createXMLStreamReader(new
> ByteArrayInputStream(xmlString.getBytes()));
> Get result = Get.Factory.parse(xmlReader);
> IdSet[] ids = result.getId();
> for (int i = 0; i < ids.length; i++) {
> IdSet id = ids[i];
> if (id.getIdtype() == IdType.SESSNUM) {
> if (!(id instanceof IdSetSess)){
>
> }
>
> }
> }
>
> System.out.println("OK");
> } catch (XMLStreamException e) {
> e.printStackTrace();  //To change body of catch statement use
> File | Settings | File Templates.
> } catch (Exception e) {
> e.printStackTrace();  //To change body of catch statement use
> File | Settings | File Templates.
> }
>
> }
>
> and it worked fine.
>
> thanks,
> Amila.
>
> On Tue, Jul 22, 2008 at 5:38 AM, Matt Wlazlo <[EMAIL PROTECTED]> wrote:
>>
>> Sure, it's attached.
>>
>> 2008/7/21 Amila Suriarachchi <[EMAIL PROTECTED]>:
>> > Can you send your wsdl? I think you use only Axis2 at the server side.
>> >
>> > thanks,
>> > Amila.
>> >
>> > On Mon, Jul 21, 2008 at 10:06 AM, Matt Wlazlo <[EMAIL PROTECTED]> wrote:
>> >>
>> >> 2008/7/21 Amila Suriarachchi <[EMAIL PROTECTED]>:
>> >> >
>> >> >
>> >> > On Mon, Jul 21, 2008 at 8:26 AM, Matt Wlazlo <[EMAIL PROTECTED]>
>> >> > wrote:
>> >> >>
>> >> >> Hi,
>> >> >>
>> >> >> I'm having trouble with passing inheritance types. I've followed
>> >> >> this
>> >> >> url:
>> >> >>
>> >> >>
>> >> >> http://www.ibm.com/developerworks/websphere/techjournal/0401_brown/brown.html
>> >> >> as a guide to WSDL inheritance, and everything seems to be working
>> >> >> except that when it comes time to do a typecast, there doesn't
>> >> >> appear
>> >> >> to be any relationship of the objects...
>> >> >>
>> >> >> I think it will be easier to explain the situation in code:
>> >> >>
>> >> >> In my WSDL I have the following:
>> >> >>
>> >> >> 
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> 
>> >> >> 
>> >> >>
>> >> >>> >> >> type="xsd1:idType" />
>> >> >>> >> >> type="xsd:string" />
>> >> >>
>> >> >> 
>> >> >> 
>> >> >>
>> >> >>
>> >> >>
>> >> >>> >> >> type="xsd:string"
>> >> >> />
>> >> >>
>> >> >>
>> >> >>
>> >> >> 
>> >> >> .
>> >> >> .
>> >> >> 
>> >> >>
>> >> >>
>> >> >>> >> >> name="id"
>> >> >>nillable="true"
>> >> >> type="xsd1:idSet"
>> >> >> />
>> >> >>
>> >> >>
>> >> >> 
>> >> >>
>> >> >>
>> >> >> Then in my server code (the error is here):
>> >> >>  public get(IdSet[] ids) {
>> >> >>...
>> >> >>for(int i = 0; i < id.length; i++) {
>> >> >>   IdSet id = ids[i];
>> >> >>if(id.getIdtype() == IdType.SESSNUM) {
>> >> >>   if(!(id instanceof IdSetSess))
>> >> >>throw new Exception("IdSetSess not used when IdType
>> >> >> set
>> >> >> to
>> >> >> SESSNUM!"); // XXX id should be an instance of IdSetSess
>> >> >>   .
>> >> >>   .
>> >> >>}
>> >> >>}
>> >> >>  }
>> >> >>
>> >> >> On the wire, an example request is:
>> >> >>  > >> >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>> >> >>
>> >> >>  http://osr.nsw.gov.au/pillar/gen/xsd";>
>> >> >>> >> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>> >> >>  SESSNUM
>> >> >>  20004465
>> >> >>  141
>> >> >>
>> >> >>
>> >> >>  INFNUM
>> >> >>  7151999517
>> >> >>
>> >> >>  
>> >> >>
>> >> >>  
>> >> >>
>> >> >>
>> >> >>
>> >> >> The request on the wire looks to be to be OK. The expression "id
>> >> >> instanceof IdSetSess" is always false, whereas I would expect it to
>> >> >> be
>> >> >> true.
>> >> >>
>> >> >> Do I need to do something s

Re: WSDL2Java - Inheritance problem

2008-07-22 Thread Amila Suriarachchi
I generated with the following options and have this test

-uri Pillar.wsdl -ss -sd -g -uw

private void testTestClass(){
String xmlString = " http://osr.nsw.gov.au/pillar/gen/xsd\";>\n" +
"   http://www.w3.org/2001/XMLSchema-instance\";>\n"
+
" SESSNUM\n" +
" 20004465\n" +
" 141\n" +
"   \n" +
"   \n" +
" INFNUM\n" +
" 7151999517\n" +
"   \n" +
" ";

try {
XMLStreamReader xmlReader
= StAXUtils.createXMLStreamReader(new
ByteArrayInputStream(xmlString.getBytes()));
Get result = Get.Factory.parse(xmlReader);
IdSet[] ids = result.getId();
for (int i = 0; i < ids.length; i++) {
IdSet id = ids[i];
if (id.getIdtype() == IdType.SESSNUM) {
if (!(id instanceof IdSetSess)){

}

}
}

System.out.println("OK");
} catch (XMLStreamException e) {
e.printStackTrace();  //To change body of catch statement use
File | Settings | File Templates.
} catch (Exception e) {
e.printStackTrace();  //To change body of catch statement use
File | Settings | File Templates.
}

}

and it worked fine.

thanks,
Amila.

On Tue, Jul 22, 2008 at 5:38 AM, Matt Wlazlo <[EMAIL PROTECTED]> wrote:

> Sure, it's attached.
>
> 2008/7/21 Amila Suriarachchi <[EMAIL PROTECTED]>:
> > Can you send your wsdl? I think you use only Axis2 at the server side.
> >
> > thanks,
> > Amila.
> >
> > On Mon, Jul 21, 2008 at 10:06 AM, Matt Wlazlo <[EMAIL PROTECTED]> wrote:
> >>
> >> 2008/7/21 Amila Suriarachchi <[EMAIL PROTECTED]>:
> >> >
> >> >
> >> > On Mon, Jul 21, 2008 at 8:26 AM, Matt Wlazlo <[EMAIL PROTECTED]>
> wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> I'm having trouble with passing inheritance types. I've followed this
> >> >> url:
> >> >>
> >> >>
> http://www.ibm.com/developerworks/websphere/techjournal/0401_brown/brown.html
> >> >> as a guide to WSDL inheritance, and everything seems to be working
> >> >> except that when it comes time to do a typecast, there doesn't appear
> >> >> to be any relationship of the objects...
> >> >>
> >> >> I think it will be easier to explain the situation in code:
> >> >>
> >> >> In my WSDL I have the following:
> >> >>
> >> >> 
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> 
> >> >> 
> >> >>
> >> >> >> >> type="xsd1:idType" />
> >> >> >> >> type="xsd:string" />
> >> >>
> >> >> 
> >> >> 
> >> >>
> >> >>
> >> >>
> >> >> type="xsd:string"
> >> >> />
> >> >>
> >> >>
> >> >>
> >> >> 
> >> >> .
> >> >> .
> >> >> 
> >> >>
> >> >>
> >> >> >> >> name="id"
> >> >>nillable="true"
> >> >> type="xsd1:idSet"
> >> >> />
> >> >>
> >> >>
> >> >> 
> >> >>
> >> >>
> >> >> Then in my server code (the error is here):
> >> >>  public get(IdSet[] ids) {
> >> >>...
> >> >>for(int i = 0; i < id.length; i++) {
> >> >>   IdSet id = ids[i];
> >> >>if(id.getIdtype() == IdType.SESSNUM) {
> >> >>   if(!(id instanceof IdSetSess))
> >> >>throw new Exception("IdSetSess not used when IdType
> set
> >> >> to
> >> >> SESSNUM!"); // XXX id should be an instance of IdSetSess
> >> >>   .
> >> >>   .
> >> >>}
> >> >>}
> >> >>  }
> >> >>
> >> >> On the wire, an example request is:
> >> >>   >> >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
> >> >>
> >> >>  http://osr.nsw.gov.au/pillar/gen/xsd";>
> >> >> >> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> >> >>  SESSNUM
> >> >>  20004465
> >> >>  141
> >> >>
> >> >>
> >> >>  INFNUM
> >> >>  7151999517
> >> >>
> >> >>  
> >> >>
> >> >>  
> >> >>
> >> >>
> >> >>
> >> >> The request on the wire looks to be to be OK. The expression "id
> >> >> instanceof IdSetSess" is always false, whereas I would expect it to
> be
> >> >> true.
> >> >>
> >> >> Do I need to do something special to be able to cast an IdSet to an
> >> >> IdSetSess? Is this even possible?
> >> >>
> >> >>
> >> >> Cheers,
> >> >> Matt.
> >> >>
> >> >>
> >> >> --
> >> >> Reclaim your digital rights, eliminate DRM, learn more at
> >> >> http://www.defectivebydesign.org/what_is_drm
> >> >>
> >> >> -BEGIN GEEK CODE BLOCK-
> >> >> Version: 3.12
> >> >> GCS d--- s: a C UL+++ P+++ L+ E--- W++ N o-- K- w--
> >> >> O M+ V PS+++ P

Re: WSDL2Java - Inheritance problem

2008-07-21 Thread Matt Wlazlo
Sure, it's attached.

2008/7/21 Amila Suriarachchi <[EMAIL PROTECTED]>:
> Can you send your wsdl? I think you use only Axis2 at the server side.
>
> thanks,
> Amila.
>
> On Mon, Jul 21, 2008 at 10:06 AM, Matt Wlazlo <[EMAIL PROTECTED]> wrote:
>>
>> 2008/7/21 Amila Suriarachchi <[EMAIL PROTECTED]>:
>> >
>> >
>> > On Mon, Jul 21, 2008 at 8:26 AM, Matt Wlazlo <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Hi,
>> >>
>> >> I'm having trouble with passing inheritance types. I've followed this
>> >> url:
>> >>
>> >> http://www.ibm.com/developerworks/websphere/techjournal/0401_brown/brown.html
>> >> as a guide to WSDL inheritance, and everything seems to be working
>> >> except that when it comes time to do a typecast, there doesn't appear
>> >> to be any relationship of the objects...
>> >>
>> >> I think it will be easier to explain the situation in code:
>> >>
>> >> In my WSDL I have the following:
>> >>
>> >> 
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> 
>> >> 
>> >>
>> >>> >> type="xsd1:idType" />
>> >>> >> type="xsd:string" />
>> >>
>> >> 
>> >> 
>> >>
>> >>
>> >>
>> >>> >> />
>> >>
>> >>
>> >>
>> >> 
>> >> .
>> >> .
>> >> 
>> >>
>> >>
>> >>> >> name="id"
>> >>nillable="true"
>> >> type="xsd1:idSet"
>> >> />
>> >>
>> >>
>> >> 
>> >>
>> >>
>> >> Then in my server code (the error is here):
>> >>  public get(IdSet[] ids) {
>> >>...
>> >>for(int i = 0; i < id.length; i++) {
>> >>   IdSet id = ids[i];
>> >>if(id.getIdtype() == IdType.SESSNUM) {
>> >>   if(!(id instanceof IdSetSess))
>> >>throw new Exception("IdSetSess not used when IdType set
>> >> to
>> >> SESSNUM!"); // XXX id should be an instance of IdSetSess
>> >>   .
>> >>   .
>> >>}
>> >>}
>> >>  }
>> >>
>> >> On the wire, an example request is:
>> >>  > >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>> >>
>> >>  http://osr.nsw.gov.au/pillar/gen/xsd";>
>> >>> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>> >>  SESSNUM
>> >>  20004465
>> >>  141
>> >>
>> >>
>> >>  INFNUM
>> >>  7151999517
>> >>
>> >>  
>> >>
>> >>  
>> >>
>> >>
>> >>
>> >> The request on the wire looks to be to be OK. The expression "id
>> >> instanceof IdSetSess" is always false, whereas I would expect it to be
>> >> true.
>> >>
>> >> Do I need to do something special to be able to cast an IdSet to an
>> >> IdSetSess? Is this even possible?
>> >>
>> >>
>> >> Cheers,
>> >> Matt.
>> >>
>> >>
>> >> --
>> >> Reclaim your digital rights, eliminate DRM, learn more at
>> >> http://www.defectivebydesign.org/what_is_drm
>> >>
>> >> -BEGIN GEEK CODE BLOCK-
>> >> Version: 3.12
>> >> GCS d--- s: a C UL+++ P+++ L+ E--- W++ N o-- K- w--
>> >> O M+ V PS+++ PE Y PGP t+ 5 X++ R !tv b+++ DI+ D++
>> >> G-- e++ h+ r+ y+
>> >> --END GEEK CODE BLOCK--
>> >>
>> >>
>> >> Today's lucky number is: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88
>> >> C0
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> > What is the Axis version you use? Axis1.x or Axis2.x
>>
>> Axis2 1.4
>>
>> Cheers,
>> Matt.
>>
>>
>>
>> --
>> Reclaim your digital rights, eliminate DRM, learn more at
>> http://www.defectivebydesign.org/what_is_drm
>>
>> -BEGIN GEEK CODE BLOCK-
>> Version: 3.12
>> GCS d--- s: a C UL+++ P+++ L+ E--- W++ N o-- K- w--
>> O M+ V PS+++ PE Y PGP t+ 5 X++ R !tv b+++ DI+ D++
>> G-- e++ h+ r+ y+
>> --END GEEK CODE BLOCK--
>>
>>
>> Today's lucky number is: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.



-- 
Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCS d--- s: a C UL+++ P+++ L+ E--- W++ N o-- K- w--
O M+ V PS+++ PE Y PGP t+ 5 X++ R !tv b+++ DI+ D++
G-- e++ h+ r+ y+
--END GEEK CODE BLOCK--


Today's lucky number is: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

http://osr.nsw.gov.au/pillar/gen";
	xmlns:tns="http://osr.nsw.gov.au/pillar/gen"; xmlns:xsd1="http://osr.nsw.gov.au/pillar/gen/xsd";
	xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; xmlns="http://schemas.xmlsoap.org/wsdl/";
	xmlns:xmime="http://www.w3.org/2005/05/xmlmi

Re: WSDL2Java - Inheritance problem

2008-07-20 Thread Amila Suriarachchi
Can you send your wsdl? I think you use only Axis2 at the server side.

thanks,
Amila.

On Mon, Jul 21, 2008 at 10:06 AM, Matt Wlazlo <[EMAIL PROTECTED]> wrote:

> 2008/7/21 Amila Suriarachchi <[EMAIL PROTECTED]>:
> >
> >
> > On Mon, Jul 21, 2008 at 8:26 AM, Matt Wlazlo <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi,
> >>
> >> I'm having trouble with passing inheritance types. I've followed this
> >> url:
> >>
> http://www.ibm.com/developerworks/websphere/techjournal/0401_brown/brown.html
> >> as a guide to WSDL inheritance, and everything seems to be working
> >> except that when it comes time to do a typecast, there doesn't appear
> >> to be any relationship of the objects...
> >>
> >> I think it will be easier to explain the situation in code:
> >>
> >> In my WSDL I have the following:
> >>
> >> 
> >>
> >>
> >>
> >>
> >>
> >> 
> >> 
> >>
> >> >> type="xsd1:idType" />
> >> >> type="xsd:string" />
> >>
> >> 
> >> 
> >>
> >>
> >>
> >> />
> >>
> >>
> >>
> >> 
> >> .
> >> .
> >> 
> >>
> >>
> >> >> name="id"
> >>nillable="true" type="xsd1:idSet"
> >> />
> >>
> >>
> >> 
> >>
> >>
> >> Then in my server code (the error is here):
> >>  public get(IdSet[] ids) {
> >>...
> >>for(int i = 0; i < id.length; i++) {
> >>   IdSet id = ids[i];
> >>if(id.getIdtype() == IdType.SESSNUM) {
> >>   if(!(id instanceof IdSetSess))
> >>throw new Exception("IdSetSess not used when IdType set
> to
> >> SESSNUM!"); // XXX id should be an instance of IdSetSess
> >>   .
> >>   .
> >>}
> >>}
> >>  }
> >>
> >> On the wire, an example request is:
> >>   >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
> >>
> >>  http://osr.nsw.gov.au/pillar/gen/xsd";>
> >> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> >>  SESSNUM
> >>  20004465
> >>  141
> >>
> >>
> >>  INFNUM
> >>  7151999517
> >>
> >>  
> >>
> >>  
> >>
> >>
> >>
> >> The request on the wire looks to be to be OK. The expression "id
> >> instanceof IdSetSess" is always false, whereas I would expect it to be
> >> true.
> >>
> >> Do I need to do something special to be able to cast an IdSet to an
> >> IdSetSess? Is this even possible?
> >>
> >>
> >> Cheers,
> >> Matt.
> >>
> >>
> >> --
> >> Reclaim your digital rights, eliminate DRM, learn more at
> >> http://www.defectivebydesign.org/what_is_drm
> >>
> >> -BEGIN GEEK CODE BLOCK-
> >> Version: 3.12
> >> GCS d--- s: a C UL+++ P+++ L+ E--- W++ N o-- K- w--
> >> O M+ V PS+++ PE Y PGP t+ 5 X++ R !tv b+++ DI+ D++
> >> G-- e++ h+ r+ y+
> >> --END GEEK CODE BLOCK--
> >>
> >>
> >> Today's lucky number is: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> > What is the Axis version you use? Axis1.x or Axis2.x
>
> Axis2 1.4
>
> Cheers,
> Matt.
>
>
>
> --
> Reclaim your digital rights, eliminate DRM, learn more at
> http://www.defectivebydesign.org/what_is_drm
>
> -BEGIN GEEK CODE BLOCK-
> Version: 3.12
> GCS d--- s: a C UL+++ P+++ L+ E--- W++ N o-- K- w--
> O M+ V PS+++ PE Y PGP t+ 5 X++ R !tv b+++ DI+ D++
> G-- e++ h+ r+ y+
> --END GEEK CODE BLOCK--
>
>
> Today's lucky number is: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.


Re: WSDL2Java - Inheritance problem

2008-07-20 Thread Matt Wlazlo
2008/7/21 Amila Suriarachchi <[EMAIL PROTECTED]>:
>
>
> On Mon, Jul 21, 2008 at 8:26 AM, Matt Wlazlo <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I'm having trouble with passing inheritance types. I've followed this
>> url:
>> http://www.ibm.com/developerworks/websphere/techjournal/0401_brown/brown.html
>> as a guide to WSDL inheritance, and everything seems to be working
>> except that when it comes time to do a typecast, there doesn't appear
>> to be any relationship of the objects...
>>
>> I think it will be easier to explain the situation in code:
>>
>> In my WSDL I have the following:
>>
>> 
>>
>>
>>
>>
>>
>> 
>> 
>>
>>> type="xsd1:idType" />
>>> type="xsd:string" />
>>
>> 
>> 
>>
>>
>>
>>
>>
>>
>>
>> 
>> .
>> .
>> 
>>
>>
>>> name="id"
>>nillable="true" type="xsd1:idSet"
>> />
>>
>>
>> 
>>
>>
>> Then in my server code (the error is here):
>>  public get(IdSet[] ids) {
>>...
>>for(int i = 0; i < id.length; i++) {
>>   IdSet id = ids[i];
>>if(id.getIdtype() == IdType.SESSNUM) {
>>   if(!(id instanceof IdSetSess))
>>throw new Exception("IdSetSess not used when IdType set to
>> SESSNUM!"); // XXX id should be an instance of IdSetSess
>>   .
>>   .
>>}
>>}
>>  }
>>
>> On the wire, an example request is:
>>  > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>>
>>  http://osr.nsw.gov.au/pillar/gen/xsd";>
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>>  SESSNUM
>>  20004465
>>  141
>>
>>
>>  INFNUM
>>  7151999517
>>
>>  
>>
>>  
>>
>>
>>
>> The request on the wire looks to be to be OK. The expression "id
>> instanceof IdSetSess" is always false, whereas I would expect it to be
>> true.
>>
>> Do I need to do something special to be able to cast an IdSet to an
>> IdSetSess? Is this even possible?
>>
>>
>> Cheers,
>> Matt.
>>
>>
>> --
>> Reclaim your digital rights, eliminate DRM, learn more at
>> http://www.defectivebydesign.org/what_is_drm
>>
>> -BEGIN GEEK CODE BLOCK-
>> Version: 3.12
>> GCS d--- s: a C UL+++ P+++ L+ E--- W++ N o-- K- w--
>> O M+ V PS+++ PE Y PGP t+ 5 X++ R !tv b+++ DI+ D++
>> G-- e++ h+ r+ y+
>> --END GEEK CODE BLOCK--
>>
>>
>> Today's lucky number is: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> What is the Axis version you use? Axis1.x or Axis2.x

Axis2 1.4

Cheers,
Matt.



-- 
Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCS d--- s: a C UL+++ P+++ L+ E--- W++ N o-- K- w--
O M+ V PS+++ PE Y PGP t+ 5 X++ R !tv b+++ DI+ D++
G-- e++ h+ r+ y+
--END GEEK CODE BLOCK--


Today's lucky number is: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WSDL2Java - Inheritance problem

2008-07-20 Thread Amila Suriarachchi
On Mon, Jul 21, 2008 at 8:26 AM, Matt Wlazlo <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I'm having trouble with passing inheritance types. I've followed this
> url:
> http://www.ibm.com/developerworks/websphere/techjournal/0401_brown/brown.html
> as a guide to WSDL inheritance, and everything seems to be working
> except that when it comes time to do a typecast, there doesn't appear
> to be any relationship of the objects...
>
> I think it will be easier to explain the situation in code:
>
> In my WSDL I have the following:
>
> 
>
>
>
>
>
> 
> 
>
> type="xsd1:idType" />
> type="xsd:string" />
>
> 
> 
>
>
>
>
>
>
>
> 
> .
> .
> 
>
>
> name="id"
>nillable="true" type="xsd1:idSet" />
>
>
> 
>
>
> Then in my server code (the error is here):
>  public get(IdSet[] ids) {
>...
>for(int i = 0; i < id.length; i++) {
>   IdSet id = ids[i];
>if(id.getIdtype() == IdType.SESSNUM) {
>   if(!(id instanceof IdSetSess))
>throw new Exception("IdSetSess not used when IdType set to
> SESSNUM!"); // XXX id should be an instance of IdSetSess
>   .
>   .
>}
>}
>  }
>
> On the wire, an example request is:
>  http://schemas.xmlsoap.org/soap/envelope/";>
>
>  http://osr.nsw.gov.au/pillar/gen/xsd";>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>  SESSNUM
>  20004465
>  141
>
>
>  INFNUM
>  7151999517
>
>  
>
>  
>
>
>
> The request on the wire looks to be to be OK. The expression "id
> instanceof IdSetSess" is always false, whereas I would expect it to be
> true.
>
> Do I need to do something special to be able to cast an IdSet to an
> IdSetSess? Is this even possible?
>
>
> Cheers,
> Matt.
>
>
> --
> Reclaim your digital rights, eliminate DRM, learn more at
> http://www.defectivebydesign.org/what_is_drm
>
> -BEGIN GEEK CODE BLOCK-
> Version: 3.12
> GCS d--- s: a C UL+++ P+++ L+ E--- W++ N o-- K- w--
> O M+ V PS+++ PE Y PGP t+ 5 X++ R !tv b+++ DI+ D++
> G-- e++ h+ r+ y+
> --END GEEK CODE BLOCK--
>
>
> Today's lucky number is: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> What is the Axis version you use? Axis1.x or Axis2.x

thanks,
Amila.

-- 
Amila Suriarachchi,
WSO2 Inc.