Problem with local complex or simple types in Apache Axis

M

mjcsfo

I can't seem to find a reference nor any helpful threads on this
topic.

I've gotten the following error in two circumstances:
1. A complex type has nested within it another complex type, in the
"Russian doll" style of schema design, where the nested type is
local
and anonymous (not a separate global type).
2. A complex type has nested within it a simple type which is derived
through restriction with at least one facet, again nested, local
and
anonymous.

Are these two schema features just not supported? It seems to generate
the classes and build the service and the service deploys just fine.
It is only when I attempt to generate a wsdl file automatically does
it bomb.

Any help or configuration assistance would be greatly appreciated!

Thanks,

Mike


The error I get (when attempting to generate the wsdl from the Axis
Servlet's list of services) looks like:

AXIS error
Sorry, something seems to have gone wrong... here are the details:

Fault - makeTypeElement() was told to create a type "{http://
10.0.0.1/xsd/account/}AccountType>held", with no containing element
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: makeTypeElement() was told to create a type
"{http://10.0.0.1/xsd/account/}AccountType>held", with no containing
element
faultActor:
faultNode:
faultDetail:

-------------------------------------------------

Schema subset looks like:
- accountId, a global type, works fine, nested to any level.
- name, a local simple type with facets, doesn't work
- held, a local complex type, doesn't work
- error above is from this example

<xsd:complexType name="AccountType">
<xsd:sequence>
<!-- global complex or simple type OK -->
<xsd:element name="accountId" type="a:IdType"/>
. . .
<!-- local simple type, derived via restriction with facet BAD -->
<xsd:element name="name" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:token">
<xsd:length value="50"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
. . .
<!-- local complex type BAD -->
<xsd:element name="held" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="reason" type="a:HoldReasonCodeType"/>
<xsd:element name="timestamp" type="a:DateTimeType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
. . .
</xsd:sequence>
</xsd:complexType>

-------------------------------------------------

Subset of Ant build.xml:
- used to generate AccountType_held class

<wsdl2java url="wsdl/${wsh-account-service.wsdl}"
output="../build/work"
deployscope="session"
serverside="yes"
skeletondeploy="yes"
noimports="no"
verbose="yes"
typemappingversion="1.2"
testcase="no">
<mapping namespace=http://10.0.0.1/wsdl/account/
package="uk.co.bbc.wsh.service.account"/>
<mapping namespace=http://10.0.0.1/xsd/account/
package="uk.co.bbc.wsh.type.account"/>
</wsdl2java>

-------------------------------------------------

Subset of generated deploy.wsdd defining type:
- Why is ">" used instead of "_" as in classname? Bug?

<typeMapping
xmlns:ns="http://10.0.0.1/xsd/account/"
qname="ns:AccountType>held"
type="java:uk.co.bbc.wsh.type.account.AccountType_held"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>

Michael Crawford | Senior Architect, Digital Media Solutions
BBC Technology | 650 California Street | 2nd Floor | San Francisco, CA
94108
E: Michael.Crawford (@) bbc.co.uk W: http://www.bbctechnology.com
E: mjcsfo (@) yahoo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top