Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Passing parameters in a web service

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Passing parameters in a web service
 Login/Join
 
Member
posted
Hello,

I am trying to use web services to run a report and pass in a parameter. The problem I have is I'm using C# and the code examples are in VB. For this reason I'm getting a casting error and can't work out how to resolve it.

The code is here (I've highlighted the offending line that I can't resolve):

WebFocusWs.WebFocus wfs = new WebFocusWs.WebFocus();
WebFocusWs.LogOnInfo logon = new WebFocusWs.LogOnInfo();
WebFocusWs.WebFocusReturn ret = new WebFocusWs.WebFocusReturn();
WebFocusWs.FexInfo report = new WebFocusWs.FexInfo();
WebFocusWs.ValuesArrayEntry param = new WebFocusWs.ValuesArrayEntry();
string newOutput = String.Empty;

// create parameter value
Array paramList = Array.CreateInstance(typeof(WebFocusWs.ValuesArrayEntry), 2);
param.name = "CUSTOMERACCOUNTNUMBER";
param.val = "111111111";
paramList.SetValue(param, 0);

report.server = "EDASERVE";
report.app = "MBC";
report.name = "billingData1";
report.IBIWS_arrayvalues = paramList.GetValue(0);

logon = wfs.WebFocusLogOn("[userId]", "[password]", "", "");
ret = wfs.WebFocusRunFex(logon, report);

newOutput = ret.output;

litReport.Text = newOutput;

I would be grateful for any advice on solving this.

thanks

Micheal
 
Posts: 12 | Registered: August 17, 2007Report This Post
Virtuoso
posted Hide Post
I'm no .Net guy, but shouldn't the report.IBIWS_arrayvalues be done after the logon action?


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Member
posted Hide Post
Hello,

I've worked it out. The following line does the trick:

report.IBIWS_arrayvalues = (WebFocusWs.ValuesArrayEntry[])paramList;

Micheal
 
Posts: 12 | Registered: August 17, 2007Report This Post
<JimW>
posted
This is a good resource for converting VB.NET code to C#...

http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspx
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Passing parameters in a web service

Copyright © 1996-2020 Information Builders