You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ji...@apache.org on 2004/03/11 14:50:32 UTC
[jira] Commented: (AXIS-1249) org.apache.axis.types.Language translating to unknown type "lang" in WSDL
The following comment has been added to this issue:
Author: Ias
Created: Thu, 11 Mar 2004 5:49 AM
Body:
This problem comes from the order of Java/XML type mappings in DefaultTypeMappingImpl. Currently,
...
// a xsd:language
myRegister(Constants.XSD_LANGUAGE, org.apache.axis.types.Language.class,
new SimpleSerializerFactory(org.apache.axis.types.Language.class,
Constants.XSD_LANGUAGE),
new SimpleDeserializerFactory(org.apache.axis.types.Language.class,
Constants.XSD_LANGUAGE)
);
// a xml:lang
myRegister(Constants.XML_LANG, org.apache.axis.types.Language.class,
new SimpleSerializerFactory(org.apache.axis.types.Language.class,
Constants.XML_LANG),
new SimpleDeserializerFactory(org.apache.axis.types.Language.class,
Constants.XML_LANG)
);
...
and if you try to get a XML type mapped to org.apache.axis.types.Language, you will see "lang".
I suggest reversing this order like
// a xml:lang
myRegister(Constants.XML_LANG, org.apache.axis.types.Language.class,
new SimpleSerializerFactory(org.apache.axis.types.Language.class,
Constants.XML_LANG),
new SimpleDeserializerFactory(org.apache.axis.types.Language.class,
Constants.XML_LANG)
);
// a xsd:language
myRegister(Constants.XSD_LANGUAGE, org.apache.axis.types.Language.class,
new SimpleSerializerFactory(org.apache.axis.types.Language.class,
Constants.XSD_LANGUAGE),
new SimpleDeserializerFactory(org.apache.axis.types.Language.class,
Constants.XSD_LANGUAGE)
);
. In this order, both xsd:language and xml:lang map to org.apache.axis.types.Language, and org.apache.axis.types.Language maps to xsd:language.
What do you think of that?
Thanks for your response in advance,
Ias
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-1249&page=comments#action_20998
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-1249
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1249
Summary: org.apache.axis.types.Language translating to unknown type "lang" in WSDL
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
WSDL processing
Versions:
1.1
Assignee:
Reporter: S Uppaluri
Created: Tue, 9 Mar 2004 8:22 AM
Updated: Thu, 11 Mar 2004 5:49 AM
Environment: Same behavior tested on Unix and Windows 2K servers using WebLogic 7.1 application server.
Description:
1. Started with WSDL and XML schemas. The relevant part of the XML schema is listed as follows (note the xs:language defn):
<xs:complexType name="LanguageCodeList_Type">
<xs:annotation>
<xs:documentation>An list of langauge codes.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="languageCode" type="xs:language" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
2. Then using Axis' WSDL2Java utility created the Java code. The Java class had the following relevant code:
private Language[] languageCode;
3. Now when the client accesses the WSDL using AxisServlet to generate the client Java code they get an error as follows:
"undefined type - lang".
In looking at the WSDL that is being generated it looks as follows:
- <complexType name="LanguageCodeList_Type">
- <sequence>
<element maxOccurs="unbounded" name="languageCode" nillable="true" type="xsd:lang" />
</sequence>
</complexType>
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira