Compare commits
8 Commits
master
...
nanfang_br
Author | SHA1 | Date |
---|---|---|
|
85a1e420e8 | 4 years ago |
|
e94b5d88fe | 4 years ago |
|
c30240a01f | 4 years ago |
|
7f8d75cf9c | 4 years ago |
|
583ffd0037 | 4 years ago |
|
f24f58ba7d | 4 years ago |
|
e0a949b785 | 4 years ago |
|
97f089761d | 4 years ago |
@ -1,3 +1,35 @@
|
||||
/target/
|
||||
/.idea/
|
||||
*.iml
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
*.iml
|
||||
# 直接在这里添加即可,注意加上备注,好知道是忽略什么文件 #
|
||||
|
||||
##############################
|
||||
## Folders ##
|
||||
##############################
|
||||
target
|
||||
out
|
||||
log
|
||||
configLog
|
||||
.idea
|
||||
.project
|
||||
**/.mvn
|
||||
**/mvnw
|
||||
**/mvnw.cmd
|
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="power-service" />
|
||||
<module name="power-admin" />
|
||||
<module name="power-dao" />
|
||||
<module name="power-foundaton" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="emr_record" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/power-admin/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/power-admin/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/power-admin/src/main/webapp/权限系统版本说明.txt" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/power-dao/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/power-dao/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/power-foundaton/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/power-service/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$/../../fs_hospital/EMR_Record_gm" />
|
||||
<file type="web" url="file://$PROJECT_DIR$/power-admin" />
|
||||
</component>
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
</project>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/../../fs_hospital/EMR_Record_gm" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -1,34 +0,0 @@
|
||||
package com.manage.config;
|
||||
|
||||
import com.manage.interfaces.webservice.PowerWebService;
|
||||
import com.manage.interfaces.webservice.impl.PowerWebServiceImpl;
|
||||
import org.apache.cxf.Bus;
|
||||
import org.apache.cxf.bus.spring.SpringBus;
|
||||
import org.apache.cxf.jaxws.EndpointImpl;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.xml.ws.Endpoint;
|
||||
|
||||
|
||||
@Configuration
|
||||
public class WebServiceConfig {
|
||||
|
||||
@Bean(name = Bus.DEFAULT_BUS_ID)
|
||||
public SpringBus springBus() {
|
||||
return new SpringBus();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public PowerWebService powerWebService() {
|
||||
return new PowerWebServiceImpl();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Endpoint endpoint(){
|
||||
EndpointImpl endpoint = new EndpointImpl(springBus(),powerWebService());
|
||||
endpoint.publish("PowerWebService");
|
||||
return endpoint;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.manage.controller;
|
||||
|
||||
import org.apache.cxf.Bus;
|
||||
import org.apache.cxf.bus.CXFBusFactory;
|
||||
import org.apache.cxf.endpoint.EndpointImplFactory;
|
||||
import org.apache.cxf.endpoint.dynamic.DynamicClientFactory;
|
||||
import org.apache.cxf.jaxws.support.JaxWsEndpointImplFactory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2019/9/11 16:15
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2019/9/11 16:15
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public class JAXDynamicClientFactory extends DynamicClientFactory {
|
||||
protected JAXDynamicClientFactory(Bus bus) {
|
||||
super(bus);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected EndpointImplFactory getEndpointImplFactory() {
|
||||
return JaxWsEndpointImplFactory.getSingleton();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean allowWrapperOps() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public static JAXDynamicClientFactory newInstance() {
|
||||
Bus bus = CXFBusFactory.getThreadDefaultBus();
|
||||
return new JAXDynamicClientFactory(bus);
|
||||
}
|
||||
@Override
|
||||
public boolean compileJavaSrc(String classPath, List srcList, String dest) {
|
||||
org.apache.cxf.common.util.Compiler javaCompiler
|
||||
= new org.apache.cxf.common.util.Compiler();
|
||||
javaCompiler.setEncoding("UTF-8");
|
||||
javaCompiler.setClassPath(classPath);
|
||||
javaCompiler.setOutputDir(dest);
|
||||
javaCompiler.setTarget("1.8");
|
||||
return javaCompiler.compileFiles(srcList);
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package com.manage.utils;
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentHelper;
|
||||
import org.dom4j.Element;
|
||||
|
||||
/**
|
||||
* 返回结果工具类
|
||||
*/
|
||||
public class ResultUtils {
|
||||
/**
|
||||
* 通过document对象返回节点对象
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
public static Element getElement(Document response){
|
||||
Element element = response.getRootElement();
|
||||
return element;
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功返回
|
||||
* @return
|
||||
*/
|
||||
public static Document success(){
|
||||
// 1、创建document对象
|
||||
Document document= DocumentHelper.createDocument();
|
||||
//2.创建根节点
|
||||
Element response=document.addElement("Response");
|
||||
// 3、生成子节点及子节点内容
|
||||
response.addElement("ResultCode").setText("0");
|
||||
response.addElement("ResultCount").setText("成功");
|
||||
return document;
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回
|
||||
* @return
|
||||
*/
|
||||
public static String fail(){
|
||||
// 1、创建document对象
|
||||
Document document= DocumentHelper.createDocument();
|
||||
//2.创建根节点
|
||||
Element response=document.addElement("Response");
|
||||
// 3、生成子节点及子节点内容
|
||||
response.addElement("ResultCode").setText("1");
|
||||
response.addElement("ResultCount").setText("失败");
|
||||
// //赋值
|
||||
// resCode.setText(String.valueOf(Codes.ERROR.getCode()));
|
||||
// retCon.setText(Codes.ERROR.getMessage());
|
||||
return document.asXML();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 失败返回
|
||||
// * @return
|
||||
// */
|
||||
// public static String fail(String message){
|
||||
// // 1、创建document对象
|
||||
// Document document= DocumentHelper.createDocument();
|
||||
// //2.创建根节点
|
||||
// Element response=document.addElement(Codes.RESPONSE.getMessage());
|
||||
// // 3、生成子节点及子节点内容
|
||||
// Element RetInfo = response.addElement(Codes.RET_INFO.getMessage());
|
||||
// //4.生成代码和描述节点
|
||||
// Element resCode = RetInfo.addElement(Codes.RET_CODE.getMessage());
|
||||
// Element retCon = RetInfo.addElement(Codes.RET_CON.getMessage());
|
||||
// //赋值
|
||||
// resCode.setText(String.valueOf(Codes.ERROR.getCode()));
|
||||
// retCon.setText(StringUtils.isNotBlank(message)?message: Codes.ERROR.getMessage());
|
||||
// return document.asXML();
|
||||
// }
|
||||
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
package com.manage.utils;
|
||||
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentException;
|
||||
import org.dom4j.Element;
|
||||
import org.dom4j.io.SAXReader;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class XmlUtils {
|
||||
//定义解析器和文档对象
|
||||
private SAXReader saxReader;
|
||||
private Document document;
|
||||
|
||||
public XmlUtils(String path) {
|
||||
//获取解析器
|
||||
saxReader = new SAXReader();
|
||||
try {
|
||||
//获取文档对象
|
||||
document = saxReader.read(path);
|
||||
} catch (DocumentException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public XmlUtils(InputStream path) {
|
||||
//获取解析器
|
||||
saxReader = new SAXReader();
|
||||
try {
|
||||
//获取文档对象
|
||||
document = saxReader.read(path);
|
||||
} catch (DocumentException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态获取节点内容
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getElement(String name) {
|
||||
//获取根节点
|
||||
Element root = document.getRootElement();
|
||||
// Object directory = FileUtils.getJsonByName(Codes.DIRECTORY.getMessage());
|
||||
// Element current = root;
|
||||
// if (directory == null) {
|
||||
// throw new RuntimeException("没有定义目录结构");
|
||||
// }
|
||||
// List<String> directoryArr = (List<String>) directory;
|
||||
// for (String dire : directoryArr) {
|
||||
// current = current.element(dire);
|
||||
// }
|
||||
return root.element(name) == null ? "" : root.element(name).getText();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 根据路径动态获取节点
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// public Element getElement(List<String> directory) {
|
||||
// //获取根节点
|
||||
// Element root = document.getRootElement();
|
||||
//
|
||||
// Element current = root;
|
||||
// List<String> directoryArr = directory;
|
||||
// for (String dire : directoryArr) {
|
||||
// current = current.element(dire);
|
||||
// }
|
||||
// if (current == null) {
|
||||
// throw new RuntimeException("未找到对应节点");
|
||||
// }
|
||||
// return current;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 返回存在的根节点
|
||||
// */
|
||||
// public List<Element> getJsonByName() {
|
||||
// //获取目录结构
|
||||
// String path = FileUtils.currentPath();
|
||||
// //解析json映射文件
|
||||
// String json = com.docus.bgts.utils.JsonUtils.readJsonFile(path + Codes.JSON_ADDRESS.getMessage());
|
||||
// Map jsonMap = JSON.parseObject(json, Map.class);
|
||||
// //判断是否多条
|
||||
// List<String> basicArr = (List<String>) jsonMap.get("doubleBasic");
|
||||
// List<String> directory = (List<String>) jsonMap.get("basicDirectory");
|
||||
// List<Element> elements = null;
|
||||
// Element root = this.getElement(directory);
|
||||
// for (String basic : basicArr) {
|
||||
// elements = root.elements(basic);
|
||||
// if (elements != null && elements.size() > 0) {
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (elements == null || elements.size() == 0) {
|
||||
// //只有一条
|
||||
// List<String> rootDirectory = (List<String>) jsonMap.get("directory");
|
||||
// root = this.getElement(rootDirectory);
|
||||
// elements = new ArrayList<>();
|
||||
// elements.add(root);
|
||||
// }
|
||||
// return elements;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据节点名称获取内容
|
||||
// *
|
||||
// * @param name 节点名称
|
||||
// * @return 节点内容
|
||||
// */
|
||||
// public String getElementText(String name) {
|
||||
// //定位根节点
|
||||
// Element root = document.getRootElement();
|
||||
// //根据名称定位节点
|
||||
// Element msg = root.element(Codes.MSG.getMessage());
|
||||
// if (msg == null) {
|
||||
// throw new RuntimeException("没有" + Codes.MSG.getMessage() + "节点");
|
||||
// }
|
||||
//// Element patInfo = msg.element(Codes.PAT_INFO.getMessage());
|
||||
//// if(patInfo==null){
|
||||
//// throw new RuntimeException("没有"+Codes.PAT_INFO.getMessage()+"节点");
|
||||
//// }
|
||||
// Element element = msg.element(name);
|
||||
// if (element == null) {
|
||||
// return null;
|
||||
// }
|
||||
// //返回节点内容
|
||||
// return element.getText();
|
||||
// }
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.manage.dao;
|
||||
|
||||
public class InvokeParam {
|
||||
private String url;
|
||||
private String method;
|
||||
private String xml;
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getXml() {
|
||||
return xml;
|
||||
}
|
||||
|
||||
public void setXml(String xml) {
|
||||
this.xml = xml;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,58 @@
|
||||
package com.manage.vo;
|
||||
|
||||
import org.simpleframework.xml.Element;
|
||||
import org.simpleframework.xml.Root;
|
||||
|
||||
@Root(name = "Request")
|
||||
public class AuthUserVO {
|
||||
private String SourceSystem;
|
||||
|
||||
@Element(required = false)
|
||||
private String TargetSystem;
|
||||
|
||||
private String username;
|
||||
|
||||
private String password;
|
||||
|
||||
public String getSourceSystem() {
|
||||
return SourceSystem;
|
||||
}
|
||||
|
||||
public void setSourceSystem(String sourceSystem) {
|
||||
SourceSystem = sourceSystem;
|
||||
}
|
||||
|
||||
public String getTargetSystem() {
|
||||
return TargetSystem;
|
||||
}
|
||||
|
||||
public void setTargetSystem(String targetSystem) {
|
||||
TargetSystem = targetSystem;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AuthUserVO{" +
|
||||
"SourceSystem='" + SourceSystem + '\'' +
|
||||
", TargetSystem='" + TargetSystem + '\'' +
|
||||
", username='" + username + '\'' +
|
||||
", password='" + password + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.manage.vo;
|
||||
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import java.io.Serializable;
|
||||
|
||||
@XmlRootElement(name = "Request")
|
||||
public class token implements Serializable {
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
public token() {
|
||||
super();
|
||||
}
|
||||
|
||||
public token(String username, String password) {
|
||||
super();
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "token{" +
|
||||
"username='" + username + '\'' +
|
||||
", password='" + password + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.manage.util;
|
||||
|
||||
|
||||
import org.simpleframework.xml.Serializer;
|
||||
import org.simpleframework.xml.core.Persister;
|
||||
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
||||
public class XmlUtil {
|
||||
|
||||
/**
|
||||
* 字符串转xml
|
||||
*/
|
||||
public static <T> T xmlToEntity(Class<T> clazz, String str) {
|
||||
try {
|
||||
Serializer serializer = new Persister();
|
||||
T entity = serializer.read(clazz, str);
|
||||
return entity;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.manage.service;
|
||||
|
||||
import javax.jws.WebMethod;
|
||||
import javax.jws.WebService;
|
||||
|
||||
@WebService
|
||||
public interface WeatherServiceInter {
|
||||
|
||||
@WebMethod
|
||||
public String getWeatherByCityname(String name);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.manage.service.ipml;
|
||||
|
||||
import com.manage.service.WeatherServiceInter;
|
||||
|
||||
public class WeatherServiceInterImpl implements WeatherServiceInter {
|
||||
@Override
|
||||
public String getWeatherByCityname(String name) {
|
||||
System.out.println(name+"");
|
||||
return name+"";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue