Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Problem with local complex or simple types in Apache Axis

Reply
Thread Tools

Problem with local complex or simple types in Apache Axis

 
 
mjcsfo
Guest
Posts: n/a
 
      08-14-2003
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="aateTimeType"/>
</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.BeanSeria lizerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDes erializerFactory"
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can XSD simple types be derived from complex types? Soren Kuula XML 2 12-01-2005 07:51 PM
Simple custom return type in Apache Axis Jeffrey.Rodriguez@gmail.com Java 2 04-29-2005 04:51 PM
AXIS jars org.apache.axis.wsi.* and org.apache.axis.transport.jms.* unkwb@web.de Java 0 02-23-2005 04:02 PM
axis.jar does not contain org.apache.axis.client.ServiceClient? Joey Vendetta Java 0 04-01-2004 05:51 PM
Problem with local complex or simple types in Apache Axis mjcsfo XML 0 08-14-2003 03:53 PM



Advertisments