%@ page import="java.util.*"%> <%@ page contentType="text/html;charset=UTF-8" language="java"%> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> <%! public String[] parseKey(String str) { // Sample: asyncSenderLink/{http://localhost:9090/axis/services/AxisAsyncSenderService}AsyncSender/send String [] res = new String [3]; String ns = ""; int bopen = str.indexOf("{"); int bclose = str.indexOf("}"); if(bopen > 0) { // get ns ns = str.substring( bopen , bclose + 1 ); // remove ns form string str = str.substring(0, bopen) + str.substring(bclose + 1 ,str.length()); } StringTokenizer st = new StringTokenizer(str,"/"); for(int i = 0 ; i < res.length ; i++) { res[i] = st.nextToken(); if(i == 1) { res[i] += ns; } } return res; } %>
partner = <%=token[0]%> | portType = <%=token[1]%> | operation = <%=token[2]%> |
---|