axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <>
Subject Re: RE : Xerces 2.2.0 and empty tag
Date Thu, 08 Apr 2004 11:43:13 GMT
Hi Jean-Yves,
    I aplied your pach but could not veryfy if it works.
    While I was trying to veryfy I identified yet another problem.
    When there are white spaces among differet tags in the XML payload (\r \n \t ' '), the
parser fails to give the result. 
    It identifies white spaces as CHARACTER_ELEMENT and fails to proceed futher. (all Axis
server responses are single line, they do not use '\n' or indenting, but other engines do)

    The fix has to be built into the SoapDeSerializer. However I applied an 'UGLY' patch in
src/transport/axis/HttpTransport.cpp to strip white spaces as shown below.
    I tested this with Calculator.jws of Java Axis and it worked.

    I also tested the Axis Java echo sample with Axis C++ client. 
    The C++ client works with single element responses.
        <return xsi:type="xsd:float">1.4214</return>
    But multi element responses do not wotk with C++ client.
        <return xsi:type="soapenc:Array" soapenc:arrayType="xsd:float[2]"
xmlns:ns2="" xmlns:soapenc="">
 (i.e. echoInt work; echoIntArray and echoStruct do not)

    I am looking for a solution.

Here is the patch for whitespaces. We got to fix this by rectifying deserialization code.

<                       for( int i = 0; i <= m_PayLoad.size(); i++)
<                       {
<                               //remove whitespaces except ' '
<                               if( m_PayLoad[i] == '\n' || m_PayLoad[i] == '\r' || m_PayLoad[i]
== '\t' )
<                               m_PayLoad.erase(i--, 1);
<                               //remove spaces within two different tags
<                               if( m_PayLoad[i] == '>' )
<                               {
<                                       int j = i+1;
<                                       while( isspace(m_PayLoad[j] )) j++;
<                                       m_PayLoad.erase(i+1, j-(i+1));
<                               }
<                       }

Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway

View raw message