<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
<htmlb:page title="SSO test " >
<htmlb:form>
<%
DATA: lo_clientproxy TYPE REF TO zssopreco_sso_web_service_port,
lo_sys_exception TYPE REF TO cx_ai_system_fault,
ls_request_token TYPE zssopreget_token_request,
ls_response_token TYPE zssopreget_token_response,
ls_request_hello TYPE zssopresay_hello_request,
ls_response_hello TYPE zssopresay_hello_response,
lv_url TYPE string.
CREATE OBJECT lo_clientproxy.
BREAK con-zhaocf.
ls_request_token-in0 = 'CRM'.
ls_request_token-in1 = sy-uname.
ls_request_token-in2 = 'SOLAR'.
TRY.
TRY.
CALL METHOD lo_clientproxy->get_token
EXPORTING
get_token_request = ls_request_token
IMPORTING
get_token_response = ls_response_token.
CATCH cx_ai_system_fault INTO lo_sys_exception.
WRITE: / lo_sys_exception->errortext.
CATCH cx_ai_application_fault .
ENDTRY.
ENDTRY.
CLEAR: lv_url.
CONCATENATE 'http://10.100.93.113:8080/lenovo-ovp-web/SsoRedirectServlet?token=' ls_response_token-out-token INTO lv_url.
%>
<htmlb:inputField id = "SOLAR"
required = "true"
visible = " "
value = "<%= lv_url %>" />
<script language="javascript" type="text/javascript">
var jsurl = window.document.getElementById('SOLAR').value;
window.location.href=jsurl;
</script>
</htmlb:form>
</htmlb:page>
</htmlb:content>
调用Web Service 并进行页面跳转(一)

