You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Samisa Abeysinghe <sa...@yahoo.com> on 2004/04/09 04:50:53 UTC
"Transfer-Encoding: chunked" and Whiteapcase Problems: Patch
Hi,
Here is a quick patch for the problems.
I assume that numbers in chunk message in HTTP 1.1 has no impact on XML payload and simply
ignore them.
Also I rip off white spaces to solve Xerces paser failing to deserialize messages with spaces
within thags.
Add this patch for the time being (so that r 1.1 would be able to interoperate with Axis Java)
Please fix the problem by improving the SoapDeserializer when somebody have enough time to study
the problem in detail.
The patch
--------------------------------------------------------------------------------------------------
diff -u cpp/original/src/transport/axis/HttpTransport.cpp
cpp/ws-axis/c/src/transport/axis/HttpTransport.cpp
--- cpp/original/src/transport/axis/HttpTransport.cpp 2004-04-09 08:43:45.000000000 +0600
+++ cpp/ws-axis/c/src/transport/axis/HttpTransport.cpp 2004-04-08 17:09:56.000000000 +0600
@@ -465,8 +465,26 @@
//{
//m_bStatus = false; // we have the payload
// Extract the SOAP message
- //m_PayLoad = m_PayLoad.substr(m_PayLoad.find('<'));
- //m_PayLoad = m_PayLoad.substr(0, m_PayLoad.rfind('>') + 1);
+ //samisa
+ m_PayLoad = m_PayLoad.substr(m_PayLoad.find('<'));
+ m_PayLoad = m_PayLoad.substr(0, m_PayLoad.rfind('>') + 1);
+ 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));
+ }
+
+ }
+ printf( "%s\n", m_PayLoad.c_str() );
+ //samisa
//}
//}
----------------------------------------------------------------------------------------------
Thanks,
Samisa...
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/