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     [CASE-OPENED] Java API and site.wfs

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE-OPENED] Java API and site.wfs
 Login/Join
 
Member
posted
Hey all:

I'm attempting to use the WF Java API to implement a SSO login for our product. I need to issue a WF_SIGNON request to Focus via the API and then redirect to the location specified by WF_SIGNON_MESSAGE. We set our WF_SIGNON_MESSAGE in site.wfs, but when I issue the request, it doesn't appear that site.wfs is being run. Instead, I get the value of WF_SIGNON_MESSAGE as set in cgivars.wfs.

The following is the relevant code:
ServletContext SC = request.getSession().getServletContext();
// webfocus_client_root comes from web.xml and is set to C:\ibi\WebFOCUS76\client\wfc
String CGILocation = SC.getInitParameter("webfocus_client_root") + File.separator + "web" + File.separator + "cgi";
WFApplicationRequest WFReq = new WFApplicationRequest();
WFResponse WFResp = new WFApplicationResponse(new ByteArrayOutputStream(4096));

WFServletVariableTableExtension wfSrvTabExt=
    new WFServletVariableTableExtension(request, SC);

WFReq.addParameter("IBIC_user", IBIC_user);
WFReq.addParameter("IBIC_pass", IBIC_pass);
WFReq.addParameter("IBIC_server", "EDASERVE");
WFReq.addParameter("IBIWF_action", "WF_SIGNON");
WFReq.addParameter("IBIWF_format", "XML");

WFContext context = new WFContext(CGILocation, wfSrvTabExt, null, null, request, "SSOLogin", WFReq.getSession(true));
WFRequestWorker WFReqWorker = new WFRequestWorker(context, WFReq, true, -1);
WFResponseWorker WFRespWorker = new WFResponseWorker(context, WFResp, true);
WFPresentationInterface presentation = WFReqWorker.processRequest();
if(presentation != null){
	WFRespWorker.processResponse(presentation, null);
}

String RedirectLoc = context.getValue("WF_SIGNON_MESSAGE");

// Prints out:
// RedirectLoc: /ibi_html/default.htm
// Should be: /ibi_apps/WFServlet?IBIF_ex=SomeFex
System.out.println("RedirectLoc: " + RedirectLoc);

/* Prints out:
 * <ibwfrpc name="WF_SIGNON">
 * <returncode>1000</returncode>
 * </ibwfrpc>
 */
System.out.println(WFResp.getOutputStream());

context.closeContext();

// Add cookies from WF to response.
Cookie[] cookies = WFResp.getCookies();
for(int i = 0, len = cookies.length; i < len; i++){
	response.addCookie(cookies[i]);
}

// Do the redirect.
response.sendRedirect(RedirectLoc);


Can anyone give me some hints as to why site.wfs is not getting executed and what I should do to change that?

Thanks!

This message has been edited. Last edited by: Kerry,


WF 7.6.7/Win 2k3 Server
 
Posts: 1 | Registered: July 28, 2006Report This Post
Platinum Member
posted Hide Post
Site.wfs should always be executed on an API call.

Are you using IF logic in your site.wfs to set the WF_SIGNON_MESSAGE syntax?

If so getting a WFServlet trace and searching for site.wfs will allow you to look at how the logic is being executed and see if its being processed as you expect.
 
Posts: 203 | Registered: November 19, 2007Report 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     [CASE-OPENED] Java API and site.wfs

Copyright © 1996-2020 Information Builders