axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Armbrust (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-2021) String Array Regression causes SAXException: Found character data ...
Date Thu, 09 Jun 2005 21:03:15 GMT
    [ http://issues.apache.org/jira/browse/AXIS-2021?page=comments#action_12313191 ] 

Dan Armbrust commented on AXIS-2021:
------------------------------------

Thank you for your research - I will try the manual fix you metioned above today.

The code that I run the Java2WSDL program on is actually code that is output by a IDL ->
Java converter (to complicate things even more)

Here are the parts of the class that I believe you are interested in:

public interface BrowserOperations  extends org.hl7.CTSVAPI.IdentificationOperations
{
....

  org.hl7.CTSVAPI.ConceptId[] lookupConceptCodesByProperty (String codeSystem_id, String matchText,
String matchAlgorithm_code, String language_code, boolean activeConceptsOnly, String[] properties,
String[] mimeTypes, int timeout, int sizeLimit) throws org.hl7.CTSVAPI.UnknownCodeSystem,
org.hl7.CTSVAPI.BadlyFormedMatchText, org.hl7.CTSVAPI.UnknownMatchAlgorithm, org.hl7.CTSVAPI.UnknownLanguageCode,
org.hl7.CTSVAPI.UnknownPropertyCode, org.hl7.CTSVAPI.UnknownMimeTypeCode, org.hl7.CTSVAPI.TimeoutError,
org.hl7.CTSVAPI.UnexpectedError;


....

  org.hl7.CTSVAPI.ConceptProperty[] lookupProperties (org.hl7.CTSVAPI.ConceptId concept_id,
String[] properties, String matchText, String matchAlgorithm_code, String language_code, String[]
mimeTypes) throws org.hl7.CTSVAPI.UnknownCodeSystem, org.hl7.CTSVAPI.UnknownConceptCode, org.hl7.CTSVAPI.BadlyFormedMatchText,
org.hl7.CTSVAPI.UnknownLanguageCode, org.hl7.CTSVAPI.UnknownPropertyCode, org.hl7.CTSVAPI.UnknownMatchAlgorithm,
org.hl7.CTSVAPI.UnknownMimeTypeCode, org.hl7.CTSVAPI.UnexpectedError;

}

I can zip up the entire java package of code, and attach it if you would like.



> String Array Regression causes SAXException: Found character data ...
> ---------------------------------------------------------------------
>
>          Key: AXIS-2021
>          URL: http://issues.apache.org/jira/browse/AXIS-2021
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2
>  Environment: Server - Tomcat 5.0.25 on Java 1.4.2_01 on Fedora Core 3
> Client - Axis running on Java 1.4.2_05 On Window XP SP2
>     Reporter: Dan Armbrust
>     Priority: Blocker
>  Attachments: VocabBrowser.wsdl, VocabBrowser.wsdl
>
> This seems to be a serious regression bug... But maybe I'm doing something wrong...
> I was using 1.2 RC2, and everything was working for me.  Now under 1.2 final, the handling
of arrays appears broken.
> Here is the error:
> org.apache.axis.AxisFaultorg.xml.sax.SAXException: Found character data inside an array
element while deserializing
> Here is the message that it choked on:
> <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>
>    <getSupportedMatchAlgorithmsResponse xmlns="urn://hl7.org/CTSVAPI">
>      <getSupportedMatchAlgorithmsReturn xmlns:ns1="urn://hl7.org/CTSVAPI" xsi:type="ns1:ArrayOf_xsd_string">IdenticalIgnoreCase</getSupportedMatchAlgorithmsReturn>
>      <getSupportedMatchAlgorithmsReturn>StartsWithIgnoreCase</getSupportedMatchAlgorithmsReturn>
>      <getSupportedMatchAlgorithmsReturn>EndsWithIgnoreCase</getSupportedMatchAlgorithmsReturn>
>      <getSupportedMatchAlgorithmsReturn>ContainsPhraseIgnoreCase</getSupportedMatchAlgorithmsReturn>
>    </getSupportedMatchAlgorithmsResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> What it is supposed to be returning is a simple String[].
> A snippit  from the wsdl file:
>   <element name="getSupportedMatchAlgorithms">
>    <complexType/>
>   </element>
>   <element name="getSupportedMatchAlgorithmsResponse">
>    <complexType>
>     <sequence>
>      <element maxOccurs="unbounded" name="getSupportedMatchAlgorithmsReturn" type="xsd:string"/>
>     </sequence>
>    </complexType>
>   </element>
> So I don't know why that ArrayOf_xsd_string gunk is in the response.
> My build process is kind of complicated - my initial definition of the API is in IDL.
 The idl is compiled into Java.  Then, my WSDL is generated by the java2wsdl tool, using the
"-y WRAPPED"  option.
> Then, I generate java using wsdl2java tool - and I implement my API using the resulting
java classes.  One thing that I noted here, was that 1.2 rc2 generated  "ArrayOf_X" classes
 for each array object, while 1.2 final does not generate any ArrayOf_X classes.
> Finally I install the code into my Axis server, and try it out.  I can call most of the
methods in my API - but anything that returns an a String Array throws the SAXException (as
noted above) while trying to parse the response, which has stuff in it it shouldn't.
> Dan

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message