RE: Axis skips generating type if it thinks it can just make an array

2009-07-14 Thread KARR, DAVID (ATTCINW)
 -Original Message-
 From: KARR, DAVID (ATTCINW)
 Sent: Monday, July 13, 2009 3:51 PM
 To: axis-user@ws.apache.org
 Subject: Axis skips generating type if it thinks it can just make an
 array
 
 I'm using Axis 1.3.  I have a schema with a complexType which has a
 single sequence of one element (unbounded count on that one element).
 It looks something like this (the commented element will come up
 later):
 
   xs:complexType name=SomethingItemPropertyListInfo
   xs:sequence
   xs:element name=PropertyData
 type=SomethingPropertyInfo minOccurs=0 maxOccurs=unbounded/
   !--xs:element name=Dummy type=xs:boolean
 minOccurs=0/  --
   /xs:sequence
   /xs:complexType
 
 When we generate code from this schema, the generated class
 corresponding to this type is, well, nonexistent.  It generates
nothing
 for it.
 
 If we instead comment in the Dummy element, it generates the
 SomethingItemPropertyListInfo class.  This is a workaround, but an
 annoying one.  We'd really like to have the schema definition not
 include Dummy, but still generate the
SomethingItemPropertyListInfo
 type.
 
 At this point, we haven't attempted to inject Castor or XMLBeans into
 the picture to customize our code generation.  We would definitely
 consider that if that's the only viable way to resolve this issue.

If it helps, I've been setting up a little testbed to give me more
diagnostics for this problem.  I tried adding the -D (debug) flag to
the command line, and I've compared the output when I have Dummy and
when I don't.

When I have Dummy, I see this (relevant excerpts):

-
org.apache.axis.wsdl.symbolTable.DefinedType
QName:
{http://csi.cingular.com/CSI/Namespaces/Types/Public/CingularDataModel.x
sd}SomethingItemPropertyListInfo
name:
com.cingular.csi.CSI.Namespaces.Types.Public.CingularDataModel_xsd.Somet
hingItemPropertyListInfo
isReferenced?  true
Class: org.apache.axis.wsdl.symbolTable.DefinedType
Base?: false
Undefined?:false
isSimpleType?  false
Node:  [xs:complexType: null]
Dims:  
isOnlyLiteralReferenced: false
RefType:   null 

org.apache.axis.wsdl.symbolTable.CollectionType
QName:
{http://csi.cingular.com/CSI/Namespaces/Types/Public/CingularDataModel.x
sd}SomethingItemPropertyListInfo[0,unbounded]
name:
com.cingular.csi.CSI.Namespaces.Types.Public.CingularDataModel_xsd.Somet
hingItemPropertyListInfo[]
isReferenced?  true
Class: org.apache.axis.wsdl.symbolTable.CollectionType
Base?: false
Undefined?:false
isSimpleType?  false
Node:  [xs:element: null]
Dims:  []
isOnlyLiteralReferenced: false
RefType:
  QName:
{http://csi.cingular.com/CSI/Namespaces/Types/Public/CingularDataModel.x
sd}SomethingItemPropertyListInfo
  name:
com.cingular.csi.CSI.Namespaces.Types.Public.CingularDataModel_xsd.Somet
hingItemPropertyListInfo
  isReferenced?  true
  Class: org.apache.axis.wsdl.symbolTable.DefinedType
  Base?: false
  Undefined?:false
  isSimpleType?  false
  Node:  [xs:complexType: null]
  Dims:  
  isOnlyLiteralReferenced: false
  RefType:   null 

Generating
gen\com\cingular\csi\CSI\Namespaces\Types\Public\CingularDataModel_xsd\S
omethingItemPropertyListInfo.java
-

When I don't have Dummy, I see this:

-
org.apache.axis.wsdl.symbolTable.DefinedType
QName:
{http://csi.cingular.com/CSI/Namespaces/Types/Public/CingularDataModel.x
sd}SomethingItemPropertyListInfo
name:
com.cingular.csi.CSI.Namespaces.Types.Public.CingularDataModel_xsd.Somet
hingPropertyInfo[]
isReferenced?  true
Class: org.apache.axis.wsdl.symbolTable.DefinedType
Base?: false
Undefined?:false
isSimpleType?  false
Node:  [xs:complexType: null]
Dims:  []
isOnlyLiteralReferenced: false
RefType:
  QName:
{http://csi.cingular.com/CSI/Namespaces/Types/Public/CingularDataModel.x
sd}SomethingPropertyInfo
  name:
com.cingular.csi.CSI.Namespaces.Types.Public.CingularDataModel_xsd.Somet
hingPropertyInfo
  isReferenced?  true
  Class: org.apache.axis.wsdl.symbolTable.DefinedType
  Base?: false
  Undefined?:false
  isSimpleType?  false
  Node:  [xs:complexType: null]
  Dims:  
  isOnlyLiteralReferenced: false
  RefType:   null 

org.apache.axis.wsdl.symbolTable.CollectionType
QName:
{http://csi.cingular.com/CSI/Namespaces/Types/Public/CingularDataModel.x
sd}SomethingItemPropertyListInfo[0,unbounded]
name:
com.cingular.csi.CSI.Namespaces.Types.Public.CingularDataModel_xsd.Somet
hingPropertyInfo[][]
isReferenced?  true
Class: org.apache.axis.wsdl.symbolTable.CollectionType
Base?: false
Undefined?:false
isSimpleType?  false
Node:  [xs:element: null]
Dims:  []
isOnlyLiteralReferenced: false
RefType:
  QName:
{http://csi.cingular.com/CSI/Namespaces/Types/Public/CingularDataModel.x
sd}SomethingItemPropertyListInfo
  name:

Axis skips generating type if it thinks it can just make an array

2009-07-13 Thread KARR, DAVID (ATTCINW)
I'm using Axis 1.3.  I have a schema with a complexType which has a
single sequence of one element (unbounded count on that one element).
It looks something like this (the commented element will come up later):

xs:complexType name=SomethingItemPropertyListInfo
xs:sequence
xs:element name=PropertyData
type=SomethingPropertyInfo minOccurs=0 maxOccurs=unbounded/
!--xs:element name=Dummy type=xs:boolean
minOccurs=0/  --
/xs:sequence
/xs:complexType

When we generate code from this schema, the generated class
corresponding to this type is, well, nonexistent.  It generates nothing
for it.

If we instead comment in the Dummy element, it generates the
SomethingItemPropertyListInfo class.  This is a workaround, but an
annoying one.  We'd really like to have the schema definition not
include Dummy, but still generate the SomethingItemPropertyListInfo
type.

At this point, we haven't attempted to inject Castor or XMLBeans into
the picture to customize our code generation.  We would definitely
consider that if that's the only viable way to resolve this issue.


Re: Axis skips generating type if it thinks it can just make an array

2009-07-13 Thread Yashvant chauhan
I think you dont required to declare SomethingItemPropertyListInfo as
complex element use simple element only



On Tue, Jul 14, 2009 at 4:21 AM, KARR, DAVID (ATTCINW) dk0...@att.comwrote:

 I'm using Axis 1.3.  I have a schema with a complexType which has a
 single sequence of one element (unbounded count on that one element).
 It looks something like this (the commented element will come up later):

xs:complexType name=SomethingItemPropertyListInfo
xs:sequence
xs:element name=PropertyData
 type=SomethingPropertyInfo minOccurs=0 maxOccurs=unbounded/
!--xs:element name=Dummy type=xs:boolean
 minOccurs=0/  --
/xs:sequence
/xs:complexType

 When we generate code from this schema, the generated class
 corresponding to this type is, well, nonexistent.  It generates nothing
 for it.

 If we instead comment in the Dummy element, it generates the
 SomethingItemPropertyListInfo class.  This is a workaround, but an
 annoying one.  We'd really like to have the schema definition not
 include Dummy, but still generate the SomethingItemPropertyListInfo
 type.

 At this point, we haven't attempted to inject Castor or XMLBeans into
 the picture to customize our code generation.  We would definitely
 consider that if that's the only viable way to resolve this issue.




-- 

Yashvant Singh Chauhan
Mobile- 09845277271
Bangalore

*