• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

AXis 2 and Array in doc literal wsdl

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am writing a doc literal wsdl. I have an issue with creating an array of objects. I have an element 'a' and another element 'b' which is an array of objects 'a'. WSDL2JAVA gives me

WARNING: Type {http://sample.com/}a missing!

Here are the wsdl snippets:

<xsd:element name="a">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="str" type="xsd:string" />
<xsd:element minOccurs="0" name="num" type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="b">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="p" type="ns1:a"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

ns1 is defined in the definitions as xmlns:ns1="http://mysample.com/"

If I specify type="a", that doesn't work either and I get the same warning.

ANy help will be appreciated.

Thanks
Cris
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cris

I thought that in order to create a new type based on another you had to extend or restrict from a "base" type. Take a look at this ...
http://www.xml.com/pub/a/2001/08/22/easyschema.html
 
Christina Shah
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is what I had to do :

Change
<xsd:element name="a">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="str" type="xsd:string" />
<xsd:element minOccurs="0" name="num" type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>

to
<xsd:complexType name="a">>
<xsd:sequence>
<xsd:element minOccurs="0" name="str" type="xsd:string" />
<xsd:element minOccurs="0" name="num" type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
 
Let's go to the waterfront with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic