Commit 0b5f4281 authored by Quxl's avatar Quxl

x

parent 09225d94
...@@ -98,5 +98,5 @@ public class WsConfig { ...@@ -98,5 +98,5 @@ public class WsConfig {
WSS4JInInterceptor interceptor = new WSS4JInInterceptor(properties); WSS4JInInterceptor interceptor = new WSS4JInInterceptor(properties);
return interceptor; return interceptor;
} }
} }
...@@ -15,14 +15,14 @@ public class XMLUtil { ...@@ -15,14 +15,14 @@ public class XMLUtil {
public static <T> T toBean(String XML, Class<T> requireType) { public static <T> T toBean(String XML, Class<T> requireType) {
XStream xStream = new XStream(); XStream xStream = new XStream();
XStream.setupDefaultSecurity(xStream); XStream.setupDefaultSecurity(xStream);
xStream.allowTypesByWildcard(new String[] {"com.egolm.sso.bean.**"}); xStream.allowTypesByWildcard(new String[] { "com.egolm.sso.bean.**" });
xStream.autodetectAnnotations(true); xStream.autodetectAnnotations(true);
xStream.processAnnotations(requireType); xStream.processAnnotations(requireType);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
T bean = (T)xStream.fromXML(XML); T bean = (T) xStream.fromXML(XML);
return bean; return bean;
} }
public static <T> T toBeanByJxab(String XML, Class<T> requireType) { public static <T> T toBeanByJxab(String XML, Class<T> requireType) {
try { try {
JAXBContext jc = JAXBContext.newInstance(requireType); JAXBContext jc = JAXBContext.newInstance(requireType);
...@@ -36,5 +36,4 @@ public class XMLUtil { ...@@ -36,5 +36,4 @@ public class XMLUtil {
} }
} }
} }
...@@ -9,7 +9,7 @@ import com.egolm.sso.util.XMLUtil; ...@@ -9,7 +9,7 @@ import com.egolm.sso.util.XMLUtil;
public class MaterialMasterServiceTest { public class MaterialMasterServiceTest {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
String wsdlLocation = "http://localhost:8080/sso/services/material_master?wsdl"; String wsdlLocation = "http://localhost:8080/api/services/material_master?wsdl";
String namespace = "http://material_master.sso.egolm.com"; String namespace = "http://material_master.sso.egolm.com";
String serviceName = "MaterialMasterService"; String serviceName = "MaterialMasterService";
MaterialMasterService service = ServiceFactory.create(wsdlLocation, namespace, serviceName, MaterialMasterService.class); MaterialMasterService service = ServiceFactory.create(wsdlLocation, namespace, serviceName, MaterialMasterService.class);
......
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