Brocade Virtual ADX XML API Programmer’s Guide (Supporting Manual do Utilizador Página 835

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 878
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 834
Brocade Virtual ADX XML API Programmer’s Guide 825
53-1003248-01
Example: Adding and binding a real server and a VIP
B
/////////////////////////////////////////////////////////////////////////////
protected override WebRequest GetWebRequest(Uri uri)
{
// call the base class to get the underlying WebRequest object
HttpWebRequest req = (HttpWebRequest)base.GetWebRequest(uri);
if (null != this.m_HeaderName)
{
// set the header
req.Headers.Add(this.m_HeaderName, this.m_HeaderValue);
}
// return the WebRequest to the caller
return (WebRequest)req;
}
/////////////////////////////////////////////////////////////////////////////
// Name: SetRequestHeader
//
// Description: Sets the header name and value that GetWebRequest will add
to
// the authorization header to the outgoing webrequest.
//
// Parameters: headerName - The Authorization tag. headerValue - the
encrypted
// username and password
/////////////////////////////////////////////////////////////////////////////
public void SetRequestHeader(String headerName, String headerValue)
{
this.m_HeaderName = headerName;
this.m_HeaderValue = headerValue;
}
}
/////////////////////////////////////////////////////////////////////////////
// Name: SlbService
//
// Description: This class is being derived from AdcSysInfo class which is the
// autogenerated class after adding slb_service.WSDL
//
// Parameters: -
//
/////////////////////////////////////////////////////////////////////////////
public class SlbService : AdcSlb
{
private String m_HeaderName;
private String m_HeaderValue;
/////////////////////////////////////////////////////////////////////////////
// Name: GetWebRequest
//
// Description: Called by the SOAP client class library, GetWebRequest
will
// add to the underlying request used by the SOAP client when
// making the web method call
//
// Parameters: Uri - the webservice url
//
/////////////////////////////////////////////////////////////////////////////
Vista de página 834
1 2 ... 830 831 832 833 834 835 836 837 838 839 840 ... 877 878

Comentários a estes Manuais

Sem comentários