Prizm 3.00r1: NetworkIfService: Invalid Service Name

Having upgraded to Prizm 3.00r1, my (C#) applications using the northbound SOAP interface are failing.

I have regenerated the client proxy code from the WSDL files and can successfully call methods on the Version, Customer and Server interfaces, but any call to a method on the Network interface generates the following exception:

java.rmi.RemoteException: Northbound Interface Not Available.; nested exception is:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: Invalid Service Name: Canopy.Prizm.NorthboundInterface
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse( SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke( String methodName, Object[] parameters)



The key message here is
       java.rmi.RemoteException: Invalid Service Name: Canopy.Prizm.NorthboundInterface


Have you seen this problem? If so, how did you work around it?

Dave.

I had something that didn’t work, but we figured it was a certificate problem accessing a method.

Don’t know if that is your problem.

I will have to get the code and give you what I’ve got.

We are successfully using C# to access Prizm 3.0 so I could probably give you something that will help.

Thanks Sterling,

The problem is not related to the certificate, we nailed that issue with the previous version.

Curiously, we only have trouble with NetworkIfService. The other interfaces work fine.

If your code can successfully call NetworkIfService.getPrizmElementSearchFields (just picking the simplest method) then I’d like to have a look at it.

Dave.

Here is what our c# code looks like.
Let me know if this helps or if someone ever converts something like this to PHP because we could use it…


using System;
using System.Net;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Security.Cryptography.X509Certificates;
using CustomerIfService;
using ServerIfService;
using NetworkIfService;
using LogEventIfService;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
_textBoxSearchParam.Focus();
if (!IsPostBack)
{
ViewState[“SelectMethod”] = _odsCustomerGridData.SelectMethod;
}
else
{
_odsCustomerGridData.SelectMethod = ViewState[“SelectMethod”].ToString();
}
}

protected void _buttonSearch_Click(object sender, EventArgs e)
{
_odsCustomerGridData.SelectParameters.Clear();
_odsCustomerGridData.SelectMethod = “GetCustomerDataBySearchParams”;
ViewState[“SelectMethod”] = _odsCustomerGridData.SelectMethod;
_odsCustomerGridData.SelectParameters.Add(“sc”, TypeCode.String, _dropDownListSeachCatagory.SelectedValue);
_odsCustomerGridData.SelectParameters.Add(“sp”, TypeCode.String, _textBoxSearchParam.Text.Replace("’", “’’”).Trim());
_gridViewCustomers.DataBind();
}

protected void _buttonCloseDetails_OnClick(object sender, EventArgs e)
{
_detailsViewCustomers.Visible = false;
}
protected void _gridViewCustomers_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == “Select”)
{
_detailsViewCustomers.Visible = true;
}
}
protected void _linkButtonIPAddress_Click(object sender, CommandEventArgs e)
{
System.Net.ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();

//CustomerIfService.CustomerIfService cIS = new CustomerIfService.CustomerIfService();
//ServerIfService.ServerIfService sIS = new ServerIfService.ServerIfService();
NetworkIfService.NetworkIfService nIS = new NetworkIfService.NetworkIfService();
//LogEventIfService.LogEventIfService lIS = new LogEventIfService.LogEventIfService();

System.Net.NetworkCredential cred = new NetworkCredential();
cred.Password = “phred”;
cred.UserName = “prizmadmin”;
try
{
//cIS.Credentials = cred;
//cIS.Url = “https://192.168.10.18:8443/prizm/nbi/CustomerIfService”;
//sIS.Credentials = cred;
//sIS.Url = “https://192.168.10.18:8443/prizm/nbi/ServerIfService”;
nIS.Credentials = cred;
nIS.Url = “https://192.168.10.18:8443/prizm/nbi/NetworkIfService”;
//lIS.Credentials = cred;
//lIS.Url = “https://192.168.10.18:8443/prizm/nbi/LogEventIfService”;
}
catch (Exception ex)
{
_labelIPResult.Text = ex.Message;
_labelIPResult.ForeColor = System.Drawing.Color.Red;
}
string IP = e.CommandArgument.ToString();
ClientDevice[] devices = nIS.searchClientDeviceByIp(IP, true);
if (devices.Length == 0)
{
_labelIPResult.Text = “Client device was not found.”;
_labelIPResult.ForeColor = System.Drawing.Color.Red;
return;
}
string MAC = devices[0].macAddress;
string[] fieldNames = new string[1] { “MAC Address” };
string[] fieldValues = new string[1] { MAC };
string[] operators = new string[1] { “=” };
PrizmElement[] elements = nIS.getPrizmElements(fieldNames, fieldValues, operators);
_labelIPResult.ForeColor = System.Drawing.Color.Black;

_labelIPResult.Text = "Device Name = " + elements[0].elementName + “<br>”;
Dictionary<string, string> elementAttributeValuesbyAttributeName = new Dictionary<string, string>();
Dictionary<string, string> elementStatValuesbyStatName = new Dictionary<string, string>();
int count = 0;
foreach (string s in elements[0].attributeNames)
{
elementAttributeValuesbyAttributeName.Add(elements[0].attributeNames[count], elements[0].attributeValues[count]);
count++;
}
count = 0;
foreach (string s in elements[0].statsNames)
{
elementStatValuesbyStatName.Add(elements[0].statsNames[count], elements[0].statsValues[count].ToString());
count++;
}
_labelIPResult.Text = _labelIPResult.Text + "Poll Status = " + elementAttributeValuesbyAttributeName[“Poll Status”] + “<br>”;
_labelIPResult.Text = _labelIPResult.Text + "Device Reboot Required = " + elementAttributeValuesbyAttributeName[“Device Reboot Required”] + “<br>”;
_labelIPResult.Text = _labelIPResult.Text + "Ethernet Status = " + elementStatValuesbyStatName[“Ethernet Status”] + “<br>”;
_labelIPResult.Text = _labelIPResult.Text + "Jitter = " + elementStatValuesbyStatName[“Jitter”] + “<br>”;
_labelIPResult.Text = _labelIPResult.Text + "Power Level = " + elementStatValuesbyStatName[“Radio Power Level”] + “<br>”;
_labelIPResult.Text = _labelIPResult.Text + "RF Link Distance Mi = " + elementStatValuesbyStatName[“RF Link Distance Mi”] + “<br>”;
_labelIPResult.Text = _labelIPResult.Text + "Temperature F = " + elementStatValuesbyStatName[“Temperature F”] + “<br>”;
_labelIPResult.Text = _labelIPResult.Text + "Registered to AP = " + elementAttributeValuesbyAttributeName[“Registered To”] + “<br>”;
_labelIPResult.Text = _labelIPResult.Text + "NAT Enabled = " + elementAttributeValuesbyAttributeName[“NAT Enabled”] + “<br>”;
_labelIPResult.Text = _labelIPResult.Text + "Last Poll Time = " + elementAttributeValuesbyAttributeName[“Last Poll Time”] + “<br>”;
_labelIPResult.Text = _labelIPResult.Text + "Uptime = " + elementAttributeValuesbyAttributeName[“Up Time”] + “<br><hr>”;
/*
fieldNames[0] = “Poll Status”;
fieldValues[0] = “OK”;
operators[0] = “!=”;
PrizmElement[] allElements = nIS.getPrizmElements(fieldNames, fieldValues, operators);
string[] blah = nIS.getPrizmElementSearchFields();
foreach (PrizmElement element in allElements)
{
_labelIPResult.Text = _labelIPResult.Text + "Poll Status Not OK = " + element.elementName + “<br>”;
} */



}
}
[/code]

Dave Wilson wrote:
Thanks Sterling,

The problem is not related to the certificate, we nailed that issue with the previous version.

Curiously, we only have trouble with NetworkIfService. The other interfaces work fine.

If your code can successfully call NetworkIfService.getPrizmElementSearchFields (just picking the simplest method) then I'd like to have a look at it.

Dave.


How did you resolve the certificate issue?

I continue to get errors that point directly (according to MSDN) to issues with certificates, but changing soap:address information did not change anything. Something dealing with certificates... still trying to invoke a simple GetAllCustomers() using VBScript & SOAP and having authority issues.