axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Hawkins (JIRA)" <>
Subject [jira] Commented: (AXISCPP-404) getTransportProtocol() returns wrong Protocol for unsupported protocols.
Date Tue, 08 Feb 2005 16:20:11 GMT
     [ ]
John Hawkins commented on AXISCPP-404:

I can see why this is failing and can fix. Do you havea test please so that I can verify it
works for your scenario.

int Call::setProtocol (AXIS_PROTOCOL_TYPE protocol)
    m_nTransportType = protocol;
    if (m_pTransport)
    return AXIS_SUCCESS;
should be returning         m_pTransport->setProtocol(m_nTransportType);
instead of AXIS-SUCCESS. This way you would get AXIS_FAIL when you set the protocol to ftp
i.e. it would not have been set.

You would not see this in your test case becuase you do not check the return result.
So, a) you need to change the test (nevr like those words but I hope you agree :-)
b) i'll change the code.

> getTransportProtocol() returns wrong Protocol for unsupported protocols.
> ------------------------------------------------------------------------
>          Key: AXISCPP-404
>          URL:
>      Project: Axis-C++
>         Type: Bug
>     Reporter: Manohar

> I've used the following the code to try setTransportProtocol and getTransportProtocol()
APIs of Stub class.
> Calculator ws(endpoint);
> ws.setTransportProtocol(APTFTP);
> cout << "Protocol used by the transport is  = " << ws.getTransportProtocol()
<< endl;
> iResult = ws.add(2,3);
> cout << "Result is = " << iResult << endl;
> Output of above code is 
> Protocol used by the transport is  = 2
> Result is = 5
> I know that currently only HTTP 1.0 and 1.1 are supported and the above APIs work properly
for APTHTTP1.0 and APTHTTP1.1 values. When I set the protocol as  "APTFTP", since it FTP is
not supported, default protocol HTTP1.1 is used. But the output shows that getTransportProtocol()
returns APTFTP. This misleads the user. By looking at the output, user thinks that FTP protocol
is used where as it's not. In case of unsupported protocols I feel getTransportProtocol()
should return the protocol which is actually used rather than returning the one which is set.
There are two things to notice here.
> 1. setTransportProtocol() should warn about protocols which are not supported.
> 2. Incase of unsupported protocols, getTrnasportProtocol() should return the actual protocol
> Regards
> Manohar

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message