Browse Source

提交开源任务源码

10.0
LAPTOP-SB56SG4Q\86185 3 years ago
parent
commit
44800a5bb5
  1. 5
      README.md
  2. BIN
      jsd 9445插件配置文档.docx
  3. BIN
      jsd-9445需求评估文档.docx
  4. BIN
      lib/am5-saml.jar
  5. BIN
      lib/axis.jar
  6. BIN
      lib/ceibs-sso.jar
  7. BIN
      lib/commons-collections-3.1.jar
  8. BIN
      lib/commons-discovery-0.2.jar
  9. BIN
      lib/commons-httpclient-3.1.jar
  10. BIN
      lib/commons-lang-2.1.jar
  11. BIN
      lib/commons-logging-1.0.4.jar
  12. BIN
      lib/commons-logging.jar
  13. BIN
      lib/finekit-10.0-20200828.jar
  14. BIN
      lib/jackson-all-1.9.1.jar
  15. BIN
      lib/jaxrpc.jar
  16. BIN
      lib/joda-time-1.6.jar
  17. BIN
      lib/log4j-1.2.14.jar
  18. BIN
      lib/log4j-1.2.8.jar
  19. BIN
      lib/opensaml-2.3.1.jar
  20. BIN
      lib/openws-1.3.0.jar
  21. BIN
      lib/oss-org-apache-log4j-rolling-appender-20100605-1200-1.2.15.jar
  22. BIN
      lib/oss-org-xalan-2.7.1.jar
  23. BIN
      lib/saaj.jar
  24. BIN
      lib/slf4j-api-1.5.8.jar
  25. BIN
      lib/slf4j-log4j12-1.5.8.jar
  26. BIN
      lib/velocity-1.5.jar
  27. BIN
      lib/wsdl4j-1.5.1.jar
  28. BIN
      lib/xercesImpl-2.9.1.jar
  29. BIN
      lib/xml-apis-2.9.1.jar
  30. BIN
      lib/xmlsec-1.4.4.jar
  31. BIN
      lib/xmltooling-1.2.1.jar
  32. 25
      plugin.xml
  33. 16
      src/main/java/com/fr/plugin/core/CKLifeCycleMonitor.java
  34. 125
      src/main/java/com/fr/plugin/core/CKLoginFilter.java
  35. 110
      src/main/java/com/fr/plugin/core/CKlobalRequestFilterPlaceHolder.java
  36. 176
      src/main/java/com/fr/plugin/core/ws/BizService.wsdl
  37. 14
      src/main/java/com/fr/plugin/core/ws/BizServiceAxis.java
  38. 16
      src/main/java/com/fr/plugin/core/ws/BizServiceAxisService.java
  39. 142
      src/main/java/com/fr/plugin/core/ws/BizServiceAxisServiceLocator.java
  40. 214
      src/main/java/com/fr/plugin/core/ws/BizServiceSoapBindingStub.java

5
README.md

@ -1,3 +1,6 @@
# open-JSD-9445
JSD-9445 基于WS的单点登录
JSD-9445 基于WS的单点登录\
免责说明:该源码为第三方爱好者提供,不保证源码和方案的可靠性,也不提供任何形式的源码教学指导和协助!\
仅作为开发者学习参考使用!禁止用于任何商业用途!\
为保护开发者隐私,开发者信息已隐去!若原开发者希望公开自己的信息,可联系hugh处理。

BIN
jsd 9445插件配置文档.docx

Binary file not shown.

BIN
jsd-9445需求评估文档.docx

Binary file not shown.

BIN
lib/am5-saml.jar

Binary file not shown.

BIN
lib/axis.jar

Binary file not shown.

BIN
lib/ceibs-sso.jar

Binary file not shown.

BIN
lib/commons-collections-3.1.jar

Binary file not shown.

BIN
lib/commons-discovery-0.2.jar

Binary file not shown.

BIN
lib/commons-httpclient-3.1.jar

Binary file not shown.

BIN
lib/commons-lang-2.1.jar

Binary file not shown.

BIN
lib/commons-logging-1.0.4.jar

Binary file not shown.

BIN
lib/commons-logging.jar

Binary file not shown.

BIN
lib/finekit-10.0-20200828.jar

Binary file not shown.

BIN
lib/jackson-all-1.9.1.jar

Binary file not shown.

BIN
lib/jaxrpc.jar

Binary file not shown.

BIN
lib/joda-time-1.6.jar

Binary file not shown.

BIN
lib/log4j-1.2.14.jar

Binary file not shown.

BIN
lib/log4j-1.2.8.jar

Binary file not shown.

BIN
lib/opensaml-2.3.1.jar

Binary file not shown.

BIN
lib/openws-1.3.0.jar

Binary file not shown.

BIN
lib/oss-org-apache-log4j-rolling-appender-20100605-1200-1.2.15.jar

Binary file not shown.

BIN
lib/oss-org-xalan-2.7.1.jar

Binary file not shown.

BIN
lib/saaj.jar

Binary file not shown.

BIN
lib/slf4j-api-1.5.8.jar

Binary file not shown.

BIN
lib/slf4j-log4j12-1.5.8.jar

Binary file not shown.

BIN
lib/velocity-1.5.jar

Binary file not shown.

BIN
lib/wsdl4j-1.5.1.jar

Binary file not shown.

BIN
lib/xercesImpl-2.9.1.jar

Binary file not shown.

BIN
lib/xml-apis-2.9.1.jar

Binary file not shown.

BIN
lib/xmlsec-1.4.4.jar

Binary file not shown.

BIN
lib/xmltooling-1.2.1.jar

Binary file not shown.

25
plugin.xml

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<plugin>
<id>com.eco.plugin.xxxx.dddl</id>
<name><![CDATA[单点登录]]></name>
<active>yes</active>
<version>1.0.5</version>
<env-version>10.0</env-version>
<jartime>2020-10-10</jartime>
<vendor>fr.open</vendor>
<description><![CDATA[]]></description>
<function-recorder class="com.fr.plugin.core.CKLoginFilter"/>
<change-notes>
<![CDATA[
<p>[2019-11-6]项目启动</p>
<p>[2020-01-14]修复推送问题</p>
]]>
</change-notes>
<main-package>com.fr.plugin.core</main-package>
<extra-decision>
<GlobalRequestFilterProvider class="com.fr.plugin.core.CKLoginFilter"/>
<GlobalRequestFilterProvider class="com.fr.plugin.core.CKlobalRequestFilterPlaceHolder"/>
</extra-decision>
</plugin>

16
src/main/java/com/fr/plugin/core/CKLifeCycleMonitor.java

@ -0,0 +1,16 @@
package com.fr.plugin.core;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.observer.inner.AbstractPluginLifecycleMonitor;
public class CKLifeCycleMonitor extends AbstractPluginLifecycleMonitor {
@Override
public void afterRun(PluginContext pluginContext) {
}
@Override
public void beforeStop(PluginContext pluginContext) {
}
}

125
src/main/java/com/fr/plugin/core/CKLoginFilter.java

@ -0,0 +1,125 @@
package com.fr.plugin.core;
import com.fr.decision.authority.data.User;
import com.fr.decision.fun.impl.AbstractGlobalRequestFilterProvider;
import com.fr.decision.webservice.v10.login.LoginService;
import com.fr.decision.webservice.v10.user.UserService;
import com.fr.log.FineLoggerFactory;
import com.fr.log.FineLoggerProvider;
import com.fr.plugin.core.ws.BizServiceAxis;
import com.fr.plugin.core.ws.BizServiceAxisServiceLocator;
import com.fr.plugin.transform.ExecuteFunctionRecord;
import com.fr.plugin.transform.FunctionRecorder;
import com.fr.stable.StringUtils;
import com.fr.web.utils.WebUtils;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayInputStream;
import java.net.URL;
import java.nio.charset.StandardCharsets;
@FunctionRecorder
public class CKLoginFilter extends AbstractGlobalRequestFilterProvider {
@Override
public String filterName() {
return "ckfilter";
}
@Override
public String[] urlPatterns() {
return new String[]{
"/rewrewrewrw321"
};
}
@Override
@ExecuteFunctionRecord
public void init(FilterConfig filterConfig) {
super.init(filterConfig);
}
@Override
public void doFilter(HttpServletRequest req, HttpServletResponse res, FilterChain filterChain) {
try {
FineLoggerProvider logger = FineLoggerFactory.getLogger();
String userID = req.getParameter("userID");
String userName = req.getParameter("userName");
String PID = req.getParameter("PID");
String sessionID = req.getParameter("sessionID");
String WSUrl = req.getParameter("WSUrl");
String verifySSO = req.getParameter("verifySSO");
if (StringUtils.isNotBlank(userID) && StringUtils.isNotBlank(userName) && StringUtils.isNotBlank(PID) && StringUtils.isNotBlank(sessionID) && StringUtils.isNotBlank(WSUrl)) {
String projectDetails = "<?xml version=\"1.0\" encoding=\"GB2312\"?>" + "<root>" + "<data>" + "<sessionID>" + sessionID + "</sessionID>" + "<userID>" + userID + "</userID>" + "<PID>" + PID + "</PID>" + "<verifySSO>" + verifySSO + "</verifySSO>" + "</data>" + "</root>";
logger.info(projectDetails);
if (!WSUrl.contains("wsdl")) {
WSUrl = WSUrl + "?wsdl";
}
logger.info("服务端验证地址为++++++++++++++:{} 参数:{}", WSUrl, projectDetails);
// DynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
// URL wsdlURL = new URL(WSUrl);
// org.apache.cxf.endpoint.Client client = dcf.createClient(wsdlURL);
// Object[] objArray = new Object[1];
// objArray[0] = projectDetails;
// //bizCheckSSO 为webservice 服务方法名称 bizCheckSSO 请确定是否修改
// Object[] result = client.invoke("runBiz", objArray);
// logger.info(result.toString());
// //解析result :<root><data><msg>1</msg></data></root>
// String msgXml = (String) result[0];
// logger.info("验证接口返回的xml:{}", msgXml);
// Document doc = getAccountFromXML(msgXml);
// Element root = doc.getRootElement();
// Element data = root.element("data");
// Element msele = data.element("msg");
BizServiceAxisServiceLocator bizServiceAxisServiceLocator = new BizServiceAxisServiceLocator();
BizServiceAxis bizService = bizServiceAxisServiceLocator.getBizService(new URL(WSUrl));
String msgXml = bizService.checkSessionID(projectDetails);
String checkSSO = bizService.checkSSO(projectDetails);
logger.info("验证接口返回的xml:{} 错误的checkSSO:{}", msgXml, checkSSO);
if (StringUtils.equals(msgXml, "1") && StringUtils.equals(checkSSO, "1")) {
UserService userService = UserService.getInstance();
User user = userService.getUserByUserName(PID);
if (user != null) {
login(req, res, PID);
} else {
FineLoggerFactory.getLogger().error("获取的用户 :{} 在帆软系统中不存在", PID);
WebUtils.printAsString(res, "获取的用户 : " + PID + "在帆软系统中不存在");
return;
}
} else {
FineLoggerFactory.getLogger().error("去统一认证中心认证失败 {}", msgXml);
WebUtils.printAsString(res, "去统一认证中心认证失败 " + msgXml);
return;
}
}
filterChain.doFilter(req, res);
} catch (Exception e) {
e.printStackTrace();
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
private void login(HttpServletRequest req, HttpServletResponse res, String username) {
String token = null;
try {
token = LoginService.getInstance().login(req, res, username);
req.setAttribute("fine_auth_token", token);
} catch (Exception e) {
}
}
private static Document getAccountFromXML(String xml) throws DocumentException {
//1.创建Reader对象
SAXReader reader = new SAXReader();
//2.加载xml
return reader.read(new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8)));
}
}

110
src/main/java/com/fr/plugin/core/CKlobalRequestFilterPlaceHolder.java

@ -0,0 +1,110 @@
package com.fr.plugin.core;
import com.fr.decision.ExtraDecisionClassManager;
import com.fr.decision.fun.GlobalRequestFilterProvider;
import com.fr.decision.fun.impl.AbstractGlobalRequestFilterProvider;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import com.fr.event.Listener;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.observer.PluginEventType;
import com.fr.stable.StringUtils;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Set;
/**
* @author fr.open
*/
public class CKlobalRequestFilterPlaceHolder extends AbstractGlobalRequestFilterProvider {
private static final String CURRENT_PLUGIN_ID = "com.eco.plugin.xxxx.dddl";//需要求个这两个配置
private static final String CURRENT_FILTER_NAME = "ckfilter";
private static GlobalRequestFilterProvider PLACE_HOLDER_IMPL_FILTER;
@Override
public void init(FilterConfig filterConfig) {
Set<GlobalRequestFilterProvider> providers = ExtraDecisionClassManager.getInstance().getArray(GlobalRequestFilterProvider.MARK_STRING);
if (providers != null) {
for (GlobalRequestFilterProvider provider : providers) {
String filterName = provider.filterName();
if (StringUtils.isNotEmpty(filterName) && CURRENT_FILTER_NAME.equals(filterName)) {
PLACE_HOLDER_IMPL_FILTER = provider;
break;
}
}
}
com.fr.stable.Filter<PluginContext> filter = new com.fr.stable.Filter<PluginContext>() {
@Override
public boolean accept(PluginContext context) {
String pluginId = context.getID();
return context.contain(PluginModule.ExtraDecision, GlobalRequestFilterProvider.MARK_STRING) && CURRENT_PLUGIN_ID.equals(pluginId);
}
};
Listener<PluginContext> listener = new Listener<PluginContext>() {
@Override
public void on(Event event, PluginContext context) {
Set<GlobalRequestFilterProvider> providers = context.getRuntime().get(PluginModule.ExtraDecision, GlobalRequestFilterProvider.MARK_STRING);
if (providers != null) {
for (GlobalRequestFilterProvider provider : providers) {
String filterName = provider.filterName();
if (StringUtils.isNotEmpty(filterName) && CURRENT_FILTER_NAME.equals(filterName)) {
PLACE_HOLDER_IMPL_FILTER = provider;
break;
}
}
}
}
};
EventDispatcher.listen(PluginEventType.AfterRun, listener, filter);
EventDispatcher.listen(PluginEventType.AfterActive, listener, filter);
EventDispatcher.listen(PluginEventType.BeforeStop, new Listener<PluginContext>() {
@Override
public void on(Event event, PluginContext context) {
PLACE_HOLDER_IMPL_FILTER = null;
}
}, filter);
}
@Override
public String filterName() {
return "HSGlobalRequestFilterPlaceHolder";
}
@Override
public String[] urlPatterns() {
return new String[]{
"/*"
};
}
@Override
public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) {
try {
process(request, response, filterChain);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e, e.getMessage());
try {
filterChain.doFilter(request, response);
} catch (Exception ex) {
FineLoggerFactory.getLogger().error(ex, ex.getMessage());
}
}
}
public void process(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws Exception {
if (PLACE_HOLDER_IMPL_FILTER == null) {
if(FineLoggerFactory.getLogger().isDebugEnabled()) {
FineLoggerFactory.getLogger().debug("[GlobalRequestFilterPlaceHolder] placeHolderImplFilter 为 null");
}
filterChain.doFilter(request, response);
} else {
PLACE_HOLDER_IMPL_FILTER.doFilter(request, response, filterChain);
}
}
}

176
src/main/java/com/fr/plugin/core/ws/BizService.wsdl

@ -0,0 +1,176 @@
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://10.152.101.5:8080/adp/services/BizService" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://10.152.101.5:8080/adp/services/BizService" xmlns:intf="http://10.152.101.5:8080/adp/services/BizService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:message name="runBizRequest">
<wsdl:part name="packageName" type="xsd:string">
</wsdl:part>
<wsdl:part name="unitId" type="xsd:string">
</wsdl:part>
<wsdl:part name="processName" type="xsd:string">
</wsdl:part>
<wsdl:part name="bizDataXML" type="xsd:string">
</wsdl:part>
</wsdl:message>
<wsdl:message name="runBizResponse">
<wsdl:part name="runBizReturn" type="xsd:string">
</wsdl:part>
</wsdl:message>
<wsdl:message name="checkSSORequest">
<wsdl:part name="dataXML" type="xsd:string">
</wsdl:part>
</wsdl:message>
<wsdl:message name="checkSSOResponse">
<wsdl:part name="checkSSOReturn" type="xsd:string">
</wsdl:part>
</wsdl:message>
<wsdl:message name="checkSessionIDResponse">
<wsdl:part name="checkSessionIDReturn" type="xsd:string">
</wsdl:part>
</wsdl:message>
<wsdl:message name="checkSessionIDRequest">
<wsdl:part name="dataXML" type="xsd:string">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="BizServiceAxis">
<wsdl:operation name="checkSessionID" parameterOrder="dataXML">
<wsdl:input message="impl:checkSessionIDRequest" name="checkSessionIDRequest">
</wsdl:input>
<wsdl:output message="impl:checkSessionIDResponse" name="checkSessionIDResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="checkSSO" parameterOrder="dataXML">
<wsdl:input message="impl:checkSSORequest" name="checkSSORequest">
</wsdl:input>
<wsdl:output message="impl:checkSSOResponse" name="checkSSOResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="runBiz" parameterOrder="packageName unitId processName bizDataXML">
<wsdl:input message="impl:runBizRequest" name="runBizRequest">
</wsdl:input>
<wsdl:output message="impl:runBizResponse" name="runBizResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BizServiceSoapBinding" type="impl:BizServiceAxis">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="checkSessionID">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="checkSessionIDRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://impl.webService.portal.casic.com" use="encoded"/>
</wsdl:input>
<wsdl:output name="checkSessionIDResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.152.101.5:8080/adp/services/BizService" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="checkSSO">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="checkSSORequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://impl.webService.portal.casic.com" use="encoded"/>
</wsdl:input>
<wsdl:output name="checkSSOResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.152.101.5:8080/adp/services/BizService" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="runBiz">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="runBizRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://impl.webService.portal.casic.com" use="encoded"/>
</wsdl:input>
<wsdl:output name="runBizResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.152.101.5:8080/adp/services/BizService" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="BizServiceAxisService">
<wsdl:port binding="impl:BizServiceSoapBinding" name="BizService">
<wsdlsoap:address location="http://10.152.101.5:8080/adp/services/BizService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

14
src/main/java/com/fr/plugin/core/ws/BizServiceAxis.java

@ -0,0 +1,14 @@
/**
* BizServiceAxis.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.fr.plugin.core.ws;
public interface BizServiceAxis extends java.rmi.Remote {
public java.lang.String checkSessionID(java.lang.String dataXML) throws java.rmi.RemoteException;
public java.lang.String checkSSO(java.lang.String dataXML) throws java.rmi.RemoteException;
public java.lang.String runBiz(java.lang.String packageName, java.lang.String unitId, java.lang.String processName, java.lang.String bizDataXML) throws java.rmi.RemoteException;
}

16
src/main/java/com/fr/plugin/core/ws/BizServiceAxisService.java

@ -0,0 +1,16 @@
/**
* BizServiceAxisService.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.fr.plugin.core.ws;
public interface BizServiceAxisService extends javax.xml.rpc.Service {
public java.lang.String getBizServiceAddress();
public com.fr.plugin.core.ws.BizServiceAxis getBizService() throws javax.xml.rpc.ServiceException;
public com.fr.plugin.core.ws.BizServiceAxis getBizService(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
}

142
src/main/java/com/fr/plugin/core/ws/BizServiceAxisServiceLocator.java

@ -0,0 +1,142 @@
/**
* BizServiceAxisServiceLocator.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.fr.plugin.core.ws;
public class BizServiceAxisServiceLocator extends org.apache.axis.client.Service implements com.fr.plugin.core.ws.BizServiceAxisService {
public BizServiceAxisServiceLocator() {
}
public BizServiceAxisServiceLocator(org.apache.axis.EngineConfiguration config) {
super(config);
}
public BizServiceAxisServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
super(wsdlLoc, sName);
}
// Use to get a proxy class for BizService
private java.lang.String BizService_address = "http://10.152.101.5:8080/adp/services/BizService";
public java.lang.String getBizServiceAddress() {
return BizService_address;
}
// The WSDD service name defaults to the port name.
private java.lang.String BizServiceWSDDServiceName = "BizService";
public java.lang.String getBizServiceWSDDServiceName() {
return BizServiceWSDDServiceName;
}
public void setBizServiceWSDDServiceName(java.lang.String name) {
BizServiceWSDDServiceName = name;
}
public com.fr.plugin.core.ws.BizServiceAxis getBizService() throws javax.xml.rpc.ServiceException {
java.net.URL endpoint;
try {
endpoint = new java.net.URL(BizService_address);
}
catch (java.net.MalformedURLException e) {
throw new javax.xml.rpc.ServiceException(e);
}
return getBizService(endpoint);
}
public com.fr.plugin.core.ws.BizServiceAxis getBizService(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
try {
com.fr.plugin.core.ws.BizServiceSoapBindingStub _stub = new com.fr.plugin.core.ws.BizServiceSoapBindingStub(portAddress, this);
_stub.setPortName(getBizServiceWSDDServiceName());
return _stub;
}
catch (org.apache.axis.AxisFault e) {
return null;
}
}
public void setBizServiceEndpointAddress(java.lang.String address) {
BizService_address = address;
}
/**
* For the given interface, get the stub implementation.
* If this service has no port for the given interface,
* then ServiceException is thrown.
*/
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
try {
if (com.fr.plugin.core.ws.BizServiceAxis.class.isAssignableFrom(serviceEndpointInterface)) {
com.fr.plugin.core.ws.BizServiceSoapBindingStub _stub = new com.fr.plugin.core.ws.BizServiceSoapBindingStub(new java.net.URL(BizService_address), this);
_stub.setPortName(getBizServiceWSDDServiceName());
return _stub;
}
}
catch (java.lang.Throwable t) {
throw new javax.xml.rpc.ServiceException(t);
}
throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
}
/**
* For the given interface, get the stub implementation.
* If this service has no port for the given interface,
* then ServiceException is thrown.
*/
public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
if (portName == null) {
return getPort(serviceEndpointInterface);
}
java.lang.String inputPortName = portName.getLocalPart();
if ("BizService".equals(inputPortName)) {
return getBizService();
}
else {
java.rmi.Remote _stub = getPort(serviceEndpointInterface);
((org.apache.axis.client.Stub) _stub).setPortName(portName);
return _stub;
}
}
public javax.xml.namespace.QName getServiceName() {
return new javax.xml.namespace.QName("http://10.152.101.5:8080/adp/services/BizService", "BizServiceAxisService");
}
private java.util.HashSet ports = null;
public java.util.Iterator getPorts() {
if (ports == null) {
ports = new java.util.HashSet();
ports.add(new javax.xml.namespace.QName("http://10.152.101.5:8080/adp/services/BizService", "BizService"));
}
return ports.iterator();
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("BizService".equals(portName)) {
setBizServiceEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
setEndpointAddress(portName.getLocalPart(), address);
}
}

214
src/main/java/com/fr/plugin/core/ws/BizServiceSoapBindingStub.java

@ -0,0 +1,214 @@
/**
* BizServiceSoapBindingStub.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.fr.plugin.core.ws;
public class BizServiceSoapBindingStub extends org.apache.axis.client.Stub implements com.fr.plugin.core.ws.BizServiceAxis {
private java.util.Vector cachedSerClasses = new java.util.Vector();
private java.util.Vector cachedSerQNames = new java.util.Vector();
private java.util.Vector cachedSerFactories = new java.util.Vector();
private java.util.Vector cachedDeserFactories = new java.util.Vector();
static org.apache.axis.description.OperationDesc [] _operations;
static {
_operations = new org.apache.axis.description.OperationDesc[3];
_initOperationDesc1();
}
private static void _initOperationDesc1(){
org.apache.axis.description.OperationDesc oper;
org.apache.axis.description.ParameterDesc param;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("checkSessionID");
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "dataXML"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
oper.addParameter(param);
oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
oper.setReturnClass(java.lang.String.class);
oper.setReturnQName(new javax.xml.namespace.QName("", "checkSessionIDReturn"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[0] = oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("checkSSO");
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "dataXML"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
oper.addParameter(param);
oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
oper.setReturnClass(java.lang.String.class);
oper.setReturnQName(new javax.xml.namespace.QName("", "checkSSOReturn"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[1] = oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("runBiz");
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "packageName"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
oper.addParameter(param);
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "unitId"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
oper.addParameter(param);
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "processName"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
oper.addParameter(param);
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "bizDataXML"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
oper.addParameter(param);
oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
oper.setReturnClass(java.lang.String.class);
oper.setReturnQName(new javax.xml.namespace.QName("", "runBizReturn"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[2] = oper;
}
public BizServiceSoapBindingStub() throws org.apache.axis.AxisFault {
this(null);
}
public BizServiceSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
this(service);
super.cachedEndpoint = endpointURL;
}
public BizServiceSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
if (service == null) {
super.service = new org.apache.axis.client.Service();
} else {
super.service = service;
}
((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.1");
}
protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
try {
org.apache.axis.client.Call _call = super._createCall();
if (super.maintainSessionSet) {
_call.setMaintainSession(super.maintainSession);
}
if (super.cachedUsername != null) {
_call.setUsername(super.cachedUsername);
}
if (super.cachedPassword != null) {
_call.setPassword(super.cachedPassword);
}
if (super.cachedEndpoint != null) {
_call.setTargetEndpointAddress(super.cachedEndpoint);
}
if (super.cachedTimeout != null) {
_call.setTimeout(super.cachedTimeout);
}
if (super.cachedPortName != null) {
_call.setPortName(super.cachedPortName);
}
java.util.Enumeration keys = super.cachedProperties.keys();
while (keys.hasMoreElements()) {
java.lang.String key = (java.lang.String) keys.nextElement();
_call.setProperty(key, super.cachedProperties.get(key));
}
return _call;
}
catch (java.lang.Throwable _t) {
throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
}
}
public java.lang.String checkSessionID(java.lang.String dataXML) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[0]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://impl.webService.portal.casic.com", "checkSessionID"));
setRequestHeaders(_call);
setAttachments(_call);
try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {dataXML});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (java.lang.String) _resp;
} catch (java.lang.Exception _exception) {
return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
}
}
} catch (org.apache.axis.AxisFault axisFaultException) {
throw axisFaultException;
}
}
public java.lang.String checkSSO(java.lang.String dataXML) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[1]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://impl.webService.portal.casic.com", "checkSSO"));
setRequestHeaders(_call);
setAttachments(_call);
try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {dataXML});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (java.lang.String) _resp;
} catch (java.lang.Exception _exception) {
return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
}
}
} catch (org.apache.axis.AxisFault axisFaultException) {
throw axisFaultException;
}
}
public java.lang.String runBiz(java.lang.String packageName,
java.lang.String unitId,
java.lang.String processName,
java.lang.String bizDataXML) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[2]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://impl.webService.portal.casic.com", "runBiz"));
setRequestHeaders(_call);
setAttachments(_call);
try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {packageName, unitId, processName, bizDataXML});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (java.lang.String) _resp;
} catch (java.lang.Exception _exception) {
return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
}
}
} catch (org.apache.axis.AxisFault axisFaultException) {
throw axisFaultException;
}
}
}
Loading…
Cancel
Save