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 "John Hawkins (JIRA)" <ax...@ws.apache.org> on 2005/02/08 17:20:11 UTC

[jira] Commented: (AXISCPP-404) getTransportProtocol() returns wrong Protocol for unsupported protocols.

     [ http://issues.apache.org/jira/browse/AXISCPP-404?page=comments#action_58763 ]
     
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)
        m_pTransport->setProtocol(m_nTransportType);
    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: http://issues.apache.org/jira/browse/AXISCPP-404
>      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 used.
> Regards
> Manohar

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira