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 = " <xsd:get
> xmlns:xsd=\"http://osr.nsw.gov.au/pillar/gen/xsd\">\n" +
> " <xsd:id xsi:type=\"xsd:idSetSess\"\n" +
> "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n"
> +
> " <xsd:idtype>SESSNUM</xsd:idtype>\n" +
> " <xsd:idvalue>20004465</xsd:idvalue>\n" +
> " <xsd:seqNum>141</xsd:seqNum>\n" +
> " </xsd:id>\n" +
> " <xsd:id>\n" +
> " <xsd:idtype>INFNUM</xsd:idtype>\n" +
> " <xsd:idvalue>7151999517</xsd:idvalue>\n" +
> " </xsd:id>\n" +
> " </xsd:get>";
>
> 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:
>> >> >>
>> >> >> <simpleType name="idType">
>> >> >> <restriction base="xsd:string">
>> >> >> <enumeration value="INFNUM" />
>> >> >> <enumeration value="SESSNUM" />
>> >> >> <enumeration value="CLIENTCD" />
>> >> >> </restriction>
>> >> >> </simpleType>
>> >> >> <complexType name="idSet">
>> >> >> <sequence>
>> >> >> <element maxOccurs="1" minOccurs="1" name="idtype"
>> >> >> type="xsd1:idType" />
>> >> >> <element maxOccurs="1" minOccurs="1" name="idvalue"
>> >> >> type="xsd:string" />
>> >> >> </sequence>
>> >> >> </complexType>
>> >> >> <complexType name="idSetSess">
>> >> >> <complexContent>
>> >> >> <extension base="xsd1:idSet">
>> >> >> <sequence>
>> >> >> <element name="seqNum"
>> >> >> type="xsd:string"
>> >> >> />
>> >> >> </sequence>
>> >> >> </extension>
>> >> >> </complexContent>
>> >> >> </complexType>
>> >> >> .............
>> >> >> .............
>> >> >> <element name="get">
>> >> >> <complexType>
>> >> >> <sequence>
>> >> >> <element minOccurs="1" maxOccurs="unbounded"
>> >> >> name="id"
>> >> >> nillable="true"
>> >> >> type="xsd1:idSet"
>> >> >> />
>> >> >> </sequence>
>> >> >> </complexType>
>> >> >> </element>
>> >> >>
>> >> >>
>> >> >> 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:
>> >> >> <soapenv:Envelope
>> >> >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>> >> >> <soapenv:Body>
>> >> >> <xsd:get xmlns:xsd="http://osr.nsw.gov.au/pillar/gen/xsd">
>> >> >> <xsd:id xsi:type="xsd:idSetSess"
>> >> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>> >> >> <xsd:idtype>SESSNUM</xsd:idtype>
>> >> >> <xsd:idvalue>20004465</xsd:idvalue>
>> >> >> <xsd:seqNum>141</xsd:seqNum>
>> >> >> </xsd:id>
>> >> >> <xsd:id>
>> >> >> <xsd:idtype>INFNUM</xsd:idtype>
>> >> >> <xsd:idvalue>7151999517</xsd:idvalue>
>> >> >> </xsd:id>
>> >> >> </xsd:get>
>> >> >> </soapenv:Body>
>> >> >> </soapenv:Envelope>
>> >> >>
>> >> >>
>> >> >>
>> >> >> 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
>>
>> ---------------------------------------------------------------------
>> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]