Commit 0b5f4281 authored by Quxl's avatar Quxl

x

parent 09225d94
...@@ -15,11 +15,11 @@ public class XMLUtil { ...@@ -15,11 +15,11 @@ 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;
} }
...@@ -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