axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "cheng liang" <chengliang2...@hotmail.com>
Subject Re: HTTP chunked problem
Date Sun, 02 May 2004 23:51:21 GMT
Hi, John,

I think you should put HTTPChunking resolution code in the channel layer.
This will make the httptransport code seems more consistent since the 
difference will be solved in the below layer.

As for libwww, I have not used it yet. If it is strong enough, it would be
a good choice.

My major concern is the Class Object Deserialization problem. As I 
mentioned,
the existing code could not deal with it correctly. The code could not 
recognize
the "href" attribute, and treat it correctly.

The payload is as follows:
------------------------------------------------------------
<?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/XMLSc
hema-instance">
  <soapenv:Body>
   <ns1:getUserResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/en
coding/" xmlns:ns1="http://10.7.0.237:8080/SysPlatform/services/UserClass">
    <ns1:getUserReturn href="#id0"/>
   </ns1:getUserResponse>
   <multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmls
oap.org/soap/encoding/" xsi:type="ns2:UsersWS"
xmlns:soapenc="http://schemas.xml
soap.org/soap/encoding/" xmlns:ns2="urn:BeanService">
    <address xsi:type="xsd:string"></address>
    <birthday xsi:type="xsd:date">1986-01-01</birthday>
    <certificateCategory
xsi:type="xsd:string">category</certificateCategory>
    <certificateNumber xsi:type="xsd:string"></certificateNumber>
    <collaboratorId xsi:type="xsd:int">0</collaboratorId>
    <country xsi:type="xsd:string">cn</country>
    <description xsi:type="xsd:string"></description>
    <email xsi:type="xsd:string"></email>
    <handset xsi:type="xsd:string"></handset>
    <handsetBand xsi:type="xsd:string" xsi:nil="true"/>
    <msn xsi:type="xsd:string"></msn>
    <nickName xsi:type="xsd:string">test2</nickName>
    <password xsi:type="xsd:string">111111</password>
    <postalcode xsi:type="xsd:string"></postalcode>
    <province xsi:type="xsd:string">31</province>
    <qq xsi:type="xsd:string"></qq>
    <question xsi:type="xsd:string">hello</question>
    <realName xsi:type="xsd:string"></realName>
    <registerIp xsi:type="xsd:string">10.7.0.10</registerIp>
    <registerTime
xsi:type="xsd:dateTime">2004-04-27T19:57:17.000Z</registerTime>

    <result xsi:type="xsd:string"></result>
    <secondPassword xsi:type="xsd:string" xsi:nil="true"/>
    <sex xsi:type="xsd:string">0</sex>
    <telephone xsi:type="xsd:string"></telephone>
    <userId xsi:type="xsd:long">23</userId>
    <userName xsi:type="xsd:string">test2</userName>
    <website xsi:type="xsd:string"></website>
   </multiRef>
  </soapenv:Body>
</soapenv:Envelope>
------------------------------------------------------------

I use the following code in client stub:

Ret = (UsersWS*)m_pCall->GetCmplxObject((void*) Axis_DeSerialize_UsersWS,
                                         (void*) Axis_Create_UsersWS,
                                         (void*) Axis_Delete_UsersWS,
                                          "return", 0);

I get that Ret equal NULL.

best,
Cheng Liang




>From: John Hawkins <HAWKINSJ@uk.ibm.com>
>Reply-To: "Apache AXIS C Developers List" <axis-c-dev@ws.apache.org>
>To: "Apache AXIS C Developers List" <axis-c-dev@ws.apache.org>
>CC: axis-c-dev@ws.apache.org
>Subject: Re: HTTP chunked problem
>Date: Fri, 30 Apr 2004 07:40:38 +0100
>
>
>
>
>
>Hi Cheng,
>
>fyi: Adrian, Fred Preston and I all work together so we answer questions 
on
>behalf of each other :-)
>
>Yes, I saw the HTTP Content length problem but it doesn't appear to be 
used
>in the code for now so I left it. However, we'll raise it on JIRA so it is
>not lost.
>
>The HTTP Transport in general has a few issues in its logic. The 
underlying
>channel object isn't as good as it could be.. We had to put in some hacky
>looking code for the HTTPChunking fix. I think that a better resolution
>would be to change the underlying channel object to work properly then we
>could change the HTTPTransport to look nicer. But, we needed a fix quickly
>so we didn't do this. Again we will raise a JIRA bug report to not lose 
it.
>
>
>In General - I thought that there was discussion around removing the
>HTTPTransport layer and replacing it with libwww? I think that this would
>be a really good idea. We get so much for free with that library. It is
>nice and modular and seems to not have had any new fixes for over two 
years
>which (I think) shows how stable it must be.
>
>What does the dev community think to this?
>
>
>
>
>John Hawkins,
>
>
>
>
>              "cheng liang"
>              <chengliang2004@h
>              otmail.com>                                                
To
>                                        axis-c-dev@ws.apache.org
>              30/04/2004 04:28                                           
cc
>
>                                                                    
Subject
>              Please respond to         Re: HTTP chunked problem
>               "Apache AXIS C
>              Developers List"
>
>
>
>
>
>
>
>
>hi, Adrian Dick,
>
>Thanks.
>
>I used this code and it work fine on windows.
>
>But I want to point that in the following code in httptransport.cpp:
>
>if((pos = strLine.find("Content-Length:")) !=
>    std::string::npos)
>{
>    m_intBodyLength = atoi(strLine.substr
>                      (pos + strlen("Content-Length: ")).c_str());
>}
>
>there is some exception.
>
>The message got from the server (apache+axis(java)+tomcat) does not 
contain
>
>the
>code "Content-Length:".
>
>The http header is as follows:
>
>-------------------------------------------------------------
>HTTP/1.1 200 OK
>Content-Type: text/xml;charset=utf-8
>Transfer-Encoding: chunked
>Date: Fri, 30 Apr 2004 03:06:52 GMT
>Server: Apache-Coyote/1.1
>-------------------------------------------------------------

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  


Mime
View raw message