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 bu...@apache.org on 2003/10/03 15:29:18 UTC
DO NOT REPLY [Bug 23592] New: -
No deserializer defined for array type {http://www.w3.org/2001/XMLSchema}string
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23592>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23592
No deserializer defined for array type {http://www.w3.org/2001/XMLSchema}string
Summary: No deserializer defined for array type
{http://www.w3.org/2001/XMLSchema}string
Product: Axis
Version: 1.1
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Serialization/Deserialization
AssignedTo: axis-dev@ws.apache.org
ReportedBy: the_steve_reed@yahoo.com
I can produce this AxisFault when using a Stub&Impl generated by the
WSDL2Java/Java2WSDL process. I have posted to the user/dev groups, but have not
received any feedback that this is not a bug, so I will assume it is.
The Process
------------
I have a simple Java class.
public class Test
{
public TestResponse callMethod( String method,
String[] params )
{
return( null );
}
}
The wsdl for this Java class was produced using org.apache.axis.wsdl.Java2WSDL,
the options --style WRAPPED --use LITERAL specified.
The client stub and server impl were produced using
org.apache.axis.wsdl.WSDL2Java. I have deployed the server to Axis Embedded in
JBOSS.
When the service is called, the following SOAP request and Axis fault response
are produced :-
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<callMethod xmlns="http://wrapped.test.com">
<method xmlns="">test</method>
<params xsi:type="Array"
soapenc:arrayType="xsd:string[0]"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns=""/>
</callMethod>
</soapenv:Body>
</soapenv:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: No
deserializer defined for array type
{http://www.w3.org/2001/XMLSchema}string</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
My Theory
------------
The Axis Fault appears to be caused by the attribute xsi:type="Array" on the
<params> element. The value "Array" is not indicated to be in
the "http://schemas.xmlsoap.org/soap/encoding/" namespace using the
defined "soapenc" prefix.
On further investigation this may be a problem in the class
org.apache.axis.utils.NStack. The stack believes
that "http://schemas.xmlsoap.org/soap/encoding/" namespace is the default
namespace and hence does not require a prefix. This only occurs at the point
when this attribute is serialized.
You should check what happens when the current frame is popped from the NStack,
and this frame contains the current default namespace. The currentDefaultNS
index is not reset as I would have expected. Therefore, if a new (Non-Default)
NameSpace just happens to be added to the stack at the currentDefaultNS index
then it is assumed that this is now the default NameSpace. A call to getPrefix(
nameSpaceURI ) for this nameSpace will incorrectly return the default prefix "".
Hope this helps, please let me know if you need any more info.
Steve