Commit 56149160 by yanxiaofei

顺义中医

parent 3d20e7ee
......@@ -40,6 +40,11 @@
</dependency>
<!-- axis -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
......@@ -51,6 +56,11 @@
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.spk.zyse.config;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
@Component
public class ApplicationContextProvider implements ApplicationContextAware {
private static ApplicationContext context;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
context = applicationContext;
}
public static ApplicationContext getApplicationContext() {
return context;
}
// 获取Bean的辅助方法
@SuppressWarnings("unchecked")
public static <T> T getBean(String name) {
return (T) getApplicationContext().getBean(name);
}
public static <T> T getBean(Class<T> requiredType) {
return getApplicationContext().getBean(requiredType);
}
}
\ No newline at end of file
package com.spk.zyse.config;
import org.apache.axis.transport.http.AxisServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class AxisServiceConfig {
@Bean
public ServletRegistrationBean<AxisServlet> axisServletServletRegistrationBean() {
ServletRegistrationBean<AxisServlet> axisServletServletRegistrationBean =
new ServletRegistrationBean<>(new AxisServlet(),"/services/*");
axisServletServletRegistrationBean.setName("AxisServlet");
axisServletServletRegistrationBean.setLoadOnStartup(1);
return axisServletServletRegistrationBean;
}
}
package com.spk.zyse.utils;
import java.io.StringReader;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
public class XmlParseUtil {
public static void main(String[] args) {
String XMLString="<PRPM_IN401030UV01 xmlns=\"urn:hl7-org:v3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ITSVersion=\"XML_1.0\" xsi:schemaLocation=\"urn:hl7-org:v3 ../multicacheschemas/PRPM_IN401030UV01.xsd\">\r\n" +
"<!-- 消息ID extension请使用GUID生成 -->\r\n" +
"<id root=\"\" extension=\"8D73520B-D489-4B70-8F4B-7B5C2D7961B5\"/>\r\n" +
"<!-- 消息创建时间 -->\r\n" +
"<creationTime value=\"20130116112855\"/>\r\n" +
"<!-- 服务标识,extension为唯一事件编码,区分服务事件 -->\r\n" +
"<interactionId root=\"2.16.840.1.113883.1.6\" extension=\"JH0601\"/>\r\n" +
"<!-- 消息用途: P(Production); D(Debugging); T(Training) -->\r\n" +
"<processingCode code=\"P\"/>\r\n" +
"<!-- 消息处理模式: A(Archive); I(Initial load); R(Restore from archive); T(Current \r\n" +
" processing) -->\r\n" +
"<processingModeCode code=\"I\"/>\r\n" +
"<!-- 消息应答: AL(Always); ER(Error/reject only); NE(Never) -->\r\n" +
"<acceptAckCode code=\"AL\"/>\r\n" +
"<!-- 接受者 -->\r\n" +
"<receiver typeCode=\"RCV\">\r\n" +
"<!-- 接受设备/应用 -->\r\n" +
"<device classCode=\"DEV\" determinerCode=\"INSTANCE\">\r\n" +
"<!-- 接收系统ID -->\r\n" +
"<id>\r\n" +
"<item root=\"2.16.156.10011.2.5.1.3\" extension=\" \"/>\r\n" +
"</id>\r\n" +
"</device>\r\n" +
"</receiver>\r\n" +
"<!-- 发送者 -->\r\n" +
"<sender typeCode=\"SND\">\r\n" +
"<!-- 发送设备/应用 -->\r\n" +
"<device classCode=\"DEV\" determinerCode=\"INSTANCE\">\r\n" +
"<!-- 发送系统ID -->\r\n" +
"<id>\r\n" +
"<item root=\"2.16.156.10011.2.5.1.3\" extension=\" \"/>\r\n" +
"</id>\r\n" +
"</device>\r\n" +
"</sender>\r\n" +
"<controlActProcess classCode=\"CACT\" moodCode=\"EVN\">\r\n" +
"<code code=\"PRPM_TE401010UV01\" codeSystem=\"2.16.840.1.113883.1.6\"/>\r\n" +
"<subject typeCode=\"SUBJ\">\r\n" +
"<registrationRequest classCode=\"REG\" moodCode=\"RQO\">\r\n" +
"<statusCode code=\"active\"/>\r\n" +
"<subject1 typeCode=\"SBJ\">\r\n" +
"<qualifiedEntity classCode=\"QUAL\">\r\n" +
"<code/>\r\n" +
"<effectiveTime/>\r\n" +
"</qualifiedEntity>\r\n" +
"<assignedEntity classCode=\"ASSIGNED \">\r\n" +
"<!-- 医疗卫生机构(科室)标识-科室为例 -->\r\n" +
"<id root=\"2.16.156.10011.1.26\" extension=\"1234567890\"/>\r\n" +
"<!-- 医疗卫生机构(科室)类别-科室为例 -->\r\n" +
"<code code=\"A03.01\" displayName=\"呼吸内科专业\" codeSystem=\"2.16.156.10011.2.3.2.62\" codeSystemName=\"医疗卫生机构业务科室分类与代码表\"/>\r\n" +
"<!-- 医疗卫生机构(科室)名称及拼音码 -->\r\n" +
"<name flavorId=\"NK\">内科</name>\r\n" +
"<!-- 工作地址 -->\r\n" +
"<addr/>\r\n" +
"<!-- 联系电话 -->\r\n" +
"<telecom/>\r\n" +
"<!-- 角色状态RoleStatus -->\r\n" +
"<statusCode code=\"active\"/>\r\n" +
"<!-- 角色有效期间 -->\r\n" +
"<effectiveTime>\r\n" +
"<low value=\"20100101\"/>\r\n" +
"<high value=\"20501231\"/>\r\n" +
"</effectiveTime>\r\n" +
"<!-- 科室负责人信息 -->\r\n" +
"<assignedPrincipalPerson>\r\n" +
"<asAffiliate>\r\n" +
"<!-- 科室负责人编号 -->\r\n" +
"<id>123</id>\r\n" +
"<!-- 科室负责人姓名 -->\r\n" +
"<name>张XX</name>\r\n" +
"</asAffiliate>\r\n" +
"</assignedPrincipalPerson>\r\n" +
"<assignedPrincipalOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\r\n" +
"<!-- 医院编码 -->\r\n" +
"<id>\r\n" +
"<item root=\"2.16.156.10011.1.5\" extension=\"0001\"/>\r\n" +
"</id>\r\n" +
"<name>\r\n" +
"<!-- 院区名称 -->\r\n" +
"<item>\r\n" +
"<part code=\"院区名称\"/>\r\n" +
"</item>\r\n" +
"</name>\r\n" +
"<asAffiliate classCode=\"AFFL\">\r\n" +
"<code/>\r\n" +
"<effectiveTime/>\r\n" +
"<!-- 上级机构 -->\r\n" +
"<affiliatedPrincipalOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\r\n" +
"<!-- 上级医疗卫生机构(科室)标识 -->\r\n" +
"<id root=\"2.16.156.10011.1.26\" extension=\"0234567890\"/>\r\n" +
"<name>内科</name>\r\n" +
"</affiliatedPrincipalOrganization>\r\n" +
"</asAffiliate>\r\n" +
"</assignedPrincipalOrganization>\r\n" +
"</assignedEntity>\r\n" +
"</subject1>\r\n" +
"<!-- 注册人员信息 -->\r\n" +
"<author typeCode=\"AUT\">\r\n" +
"<assignedEntity classCode=\"ASSIGNED\">\r\n" +
"<!-- 医务人员ID -->\r\n" +
"<id root=\"2.16.156.10011.1.4\" extension=\"120109197706015518\"/>\r\n" +
"<assignedPerson classCode=\"PSN\" determinerCode=\"INSTANCE\">\r\n" +
"<!-- 医务人员名称 -->\r\n" +
"<name>李人事</name>\r\n" +
"</assignedPerson>\r\n" +
"<representedOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\r\n" +
"<!-- 科室号标识 -->\r\n" +
"<id root=\"2.16.156.10011.1.26\" extension=\"xxx12345-X\"/>\r\n" +
"<!-- 科室名称 -->\r\n" +
"<name>人事科</name>\r\n" +
"<contactParty classCode=\"CON\">\r\n" +
"<contactPerson classCode=\"PSN\" determinerCode=\"INSTANCE\">\r\n" +
"<!-- 科室联系人 -->\r\n" +
"<name>王联系</name>\r\n" +
"</contactPerson>\r\n" +
"</contactParty>\r\n" +
"</representedOrganization>\r\n" +
"</assignedEntity>\r\n" +
"</author>\r\n" +
"</registrationRequest>\r\n" +
"</subject>\r\n" +
"</controlActProcess>\r\n" +
"</PRPM_IN401030UV01>";
String expression = "/PRPM_IN401030UV01/interactionId/@root";
xmlParse(XMLString,expression);
}
public static String xmlParse(String XMLString,String expression) {
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(XMLString)));
XPathFactory xPathFactory = XPathFactory.newInstance();
XPath xpath = xPathFactory.newXPath();
// String expression = "/PRPM_IN401030UV01/controlActProcess/subject/registrationRequest/subject1/assignedEntity/id/@extension";
String extensionValue = (String) xpath.evaluate(expression, document, XPathConstants.STRING);
System.out.println("Extension value: " + extensionValue);
return extensionValue;
} catch (Exception e) {
e.printStackTrace();
return "";
}
}
}
package org.apache.axis.configuration;
import java.io.InputStream;
import javax.servlet.ServletConfig;
import org.apache.axis.AxisProperties;
import org.apache.axis.ConfigurationException;
import org.apache.axis.EngineConfiguration;
import org.apache.axis.EngineConfigurationFactory;
import org.apache.axis.components.logger.LogFactory;
import org.apache.axis.server.AxisServer;
import org.apache.axis.utils.ClassUtils;
import org.apache.axis.utils.Messages;
import org.apache.commons.logging.Log;
public class EngineConfigurationFactoryServlet extends EngineConfigurationFactoryDefault {
protected static Log log =
LogFactory.getLog(EngineConfigurationFactoryServlet.class.getName());
private ServletConfig cfg;
public static EngineConfigurationFactory newFactory(Object param) {
return (param instanceof ServletConfig)
? new EngineConfigurationFactoryServlet((ServletConfig) param)
: null;
}
protected EngineConfigurationFactoryServlet(ServletConfig conf) {
super();
this.cfg = conf;
}
@Override
public EngineConfiguration getServerEngineConfig() {
return getServerEngineConfig(cfg);
}
/**
* Get a default server engine configuration in a servlet environment.
*
* @param cfg a ServletContext
* @return a server EngineConfiguration
*/
private static EngineConfiguration getServerEngineConfig(ServletConfig cfg) {
String configFile = cfg.getInitParameter(OPTION_SERVER_CONFIG_FILE);
if (configFile == null) {
configFile = AxisProperties.getProperty(OPTION_SERVER_CONFIG_FILE);
}
if (configFile == null) {
configFile = SERVER_CONFIG_FILE;
}
String appWebInfPath = "/WEB-INF";
FileProvider config = null;
String realWebInfPath = EngineConfigurationFactoryServlet.class.getResource(appWebInfPath).getPath();
InputStream iss = ClassUtils.getResourceAsStream(EngineConfigurationFactoryServlet.class, appWebInfPath + "/" + SERVER_CONFIG_FILE);
if (iss != null) {
config = new FileProvider(iss);
}
if (config == null) {
log.error(Messages.getMessage("servletEngineWebInfError03", ""));
}
if (config == null && realWebInfPath != null) {
try {
config = new FileProvider(realWebInfPath, configFile);
} catch (ConfigurationException e) {
log.error(Messages.getMessage("servletEngineWebInfError00"), e);
}
}
/**
* Fall back to config file packaged with AxisEngine
*/
if (config == null) {
log.warn(Messages.getMessage("servletEngineWebInfWarn00"));
try {
InputStream is =
ClassUtils.getResourceAsStream(AxisServer.class,
SERVER_CONFIG_FILE);
config = new FileProvider(is);
} catch (Exception e) {
log.error(Messages.getMessage("servletEngineWebInfError02"), e);
}
}
return config;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<globalConfiguration>
<parameter name="sendMultiRefs" value="true"/>
<parameter name="disablePrettyXML" value="true"/>
<parameter name="adminPassword" value="admin"/>
<parameter name="attachments.Directory" value="D:\test2\apache-tomcat-8\webapps\zyse\WEB-INF\attachments"/>
<parameter name="dotNetSoapEncFix" value="true"/>
<parameter name="enableNamespacePrefixOptimization" value="false"/>
<parameter name="sendXMLDeclaration" value="true"/>
<parameter name="sendXsiTypes" value="true"/>
<parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
<requestFlow>
<handler type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="session"/>
</handler>
<handler type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="request"/>
<parameter name="extension" value=".jwr"/>
</handler>
</requestFlow>
</globalConfiguration>
<handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
<handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
<handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
<service name="AdminService" provider="java:MSG">
<parameter name="allowedMethods" value="AdminService"/>
<parameter name="enableRemoteAdmin" value="false"/>
<parameter name="className" value="org.apache.axis.utils.Admin"/>
<namespace>http://xml.apache.org/axis/wsdd/</namespace>
</service>
<service name="Version" provider="java:RPC">
<parameter name="allowedMethods" value="getVersion"/>
<parameter name="className" value="org.apache.axis.Version"/>
</service>
<service name="OrderService" provider="java:RPC">
<parameter name="allowedMethods" value="*"/>
<parameter name="className" value="com.spk.zyse.admin.IndexController"/>
<namespace>http://com.iambest.study.axis.service/OrderServiceHttpSoap11Endpoint</namespace>
</service>
<transport name="http">
<requestFlow>
<handler type="URLMapper"/>
<handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
</requestFlow>
<parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
<parameter name="qs.list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs.method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs.wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
</transport>
<transport name="local">
<responseFlow>
<handler type="LocalResponder"/>
</responseFlow>
</transport>
</deployment>
......@@ -62,7 +62,7 @@ server.session.cookie.http-only=false
#是否开启session超时检测
session.checkLoginEnable=true
#session拦截器会忽略这些地址
session.ExcludePathPatterns=/,/login.do,/logout.do,/getRandom.do,/zy/loginAjax.do,/reLogin.do,/remind,/checkUserOnline,/loginRegister.do,/loginPassword.do,/loginPasswords.do,/register.json,/zy/singLogin.json,/zy/singloginAjax.do,/error.html,/repeat.html
session.ExcludePathPatterns=/,/login.do,/logout.do,/getRandom.do,/zy/loginAjax.do,/reLogin.do,/remind,/checkUserOnline,/loginRegister.do,/loginPassword.do,/loginPasswords.do,/register.json,/zy/singLogin.json,/zy/singloginAjax.do,/error.html,/repeat.html,/zy/registerOrg.json,/zy/delOrgJh.json,/zy/updateOrgJh.json,/zy/registerUserJh.json,/zy/updateUserJh.json,/zy/deUserJh.json,/services/OrderService
#session拦截器只检测这些请求后缀
session.PathPatterns=.json,.do,.html
......
......@@ -245,7 +245,7 @@
//回调ca GetCertEntity方法,并回调getuser方法
GetCertEntity(strServerCert,getUser);
}
function severLogin(forceLogin){alert(forceLogin);
function severLogin(forceLogin){//alert(forceLogin);
if(check()){
var loginname = $("#loginname").val();
......
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<!-- name: 服务名随便写。 -->
<service name="OrderService" provider="java:RPC">
<parameter name="className" value="com.spk.zyse.admin.IndexController" />
<!-- value表示哪些方法需要发布,*表示全部的public方法。 -->
<!-- 如果想指定方法名,方法名与方法名用逗号隔开 -->
<parameter name="allowedMethods" value="*" />
<!-- 指定命名空间 -->
<namespace>http://com.iambest.study.axis.service/OrderServiceHttpSoap11Endpoint</namespace>
</service>
</deployment>
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<globalConfiguration>
<parameter name="sendMultiRefs" value="true"/>
<parameter name="disablePrettyXML" value="true"/>
<parameter name="adminPassword" value="admin"/>
<parameter name="attachments.Directory" value="D:\test2\apache-tomcat-8\webapps\zyse\WEB-INF\attachments"/>
<parameter name="dotNetSoapEncFix" value="true"/>
<parameter name="enableNamespacePrefixOptimization" value="false"/>
<parameter name="sendXMLDeclaration" value="true"/>
<parameter name="sendXsiTypes" value="true"/>
<parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
<requestFlow>
<handler type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="session"/>
</handler>
<handler type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="request"/>
<parameter name="extension" value=".jwr"/>
</handler>
</requestFlow>
</globalConfiguration>
<handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
<handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
<handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
<service name="AdminService" provider="java:MSG">
<parameter name="allowedMethods" value="AdminService"/>
<parameter name="enableRemoteAdmin" value="false"/>
<parameter name="className" value="org.apache.axis.utils.Admin"/>
<namespace>http://xml.apache.org/axis/wsdd/</namespace>
</service>
<service name="Version" provider="java:RPC">
<parameter name="allowedMethods" value="getVersion"/>
<parameter name="className" value="org.apache.axis.Version"/>
</service>
<service name="OrderService" provider="java:RPC">
<parameter name="allowedMethods" value="*"/>
<parameter name="className" value="com.spk.zyse.admin.IndexController"/>
<namespace>http://com.iambest.study.axis.service/OrderServiceHttpSoap11Endpoint</namespace>
</service>
<transport name="http">
<requestFlow>
<handler type="URLMapper"/>
<handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
</requestFlow>
<parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
<parameter name="qs.list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs.method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs.wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
</transport>
<transport name="local">
<responseFlow>
<handler type="LocalResponder"/>
</responseFlow>
</transport>
</deployment>
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment