Commit b7dd0a90 authored by Quxl's avatar Quxl

修改命名空间

parent f211944b
...@@ -3,7 +3,7 @@ package com.egolm.sso.service; ...@@ -3,7 +3,7 @@ package com.egolm.sso.service;
import javax.jws.WebMethod; import javax.jws.WebMethod;
import javax.jws.WebService; import javax.jws.WebService;
@WebService(targetNamespace = "http://service.sso.egolm.com") @WebService(targetNamespace = "http://material_master.sso.egolm.com")
public interface MaterialMasterService { public interface MaterialMasterService {
@WebMethod @WebMethod
......
...@@ -3,7 +3,7 @@ package com.egolm.sso.service; ...@@ -3,7 +3,7 @@ package com.egolm.sso.service;
import javax.jws.WebMethod; import javax.jws.WebMethod;
import javax.jws.WebService; import javax.jws.WebService;
@WebService(targetNamespace = "http://service.sso.egolm.com") @WebService(targetNamespace = "http://price_list.sso.egolm.com")
public interface PriceListService { public interface PriceListService {
@WebMethod @WebMethod
......
...@@ -20,7 +20,7 @@ import com.egolm.sso.util.DateUtil; ...@@ -20,7 +20,7 @@ import com.egolm.sso.util.DateUtil;
import com.egolm.sso.util.StringUtil; import com.egolm.sso.util.StringUtil;
@Component @Component
@WebService(serviceName = "MaterialMasterService", targetNamespace = "http://service.sso.egolm.com", endpointInterface = "com.egolm.sso.service.MaterialMasterService") @WebService(serviceName = "MaterialMasterService", targetNamespace = "http://material_master.sso.egolm.com", endpointInterface = "com.egolm.sso.service.MaterialMasterService")
public class MaterialMasterServiceImpl implements MaterialMasterService { public class MaterialMasterServiceImpl implements MaterialMasterService {
@Autowired @Autowired
......
...@@ -14,14 +14,13 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -14,14 +14,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSON;
import com.egolm.sso.service.CommonService; import com.egolm.sso.service.CommonService;
import com.egolm.sso.service.PriceListService; import com.egolm.sso.service.PriceListService;
import com.egolm.sso.util.DateUtil; import com.egolm.sso.util.DateUtil;
import com.egolm.sso.util.StringUtil; import com.egolm.sso.util.StringUtil;
@Component @Component
@WebService(serviceName = "PriceListService", targetNamespace = "http://service.sso.egolm.com", endpointInterface = "com.egolm.sso.service.PriceListService") @WebService(serviceName = "PriceListService", targetNamespace = "http://price_list.sso.egolm.com", endpointInterface = "com.egolm.sso.service.PriceListService")
public class PriceListServiceImpl implements PriceListService { public class PriceListServiceImpl implements PriceListService {
@Autowired @Autowired
......
...@@ -25,15 +25,14 @@ public class MaterialMasterServiceTest { ...@@ -25,15 +25,14 @@ public class MaterialMasterServiceTest {
private static final String username = "test"; private static final String username = "test";
private static final String password = "78258c537d6e4d5fb210a57d05619fb6"; private static final String password = "78258c537d6e4d5fb210a57d05619fb6";
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance(); JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
ClientImpl client = (ClientImpl) factory.createClient("http://localhost:8080/sso/services/material_master?wsdl"); ClientImpl client = (ClientImpl) factory.createClient("http://localhost:8080/sso/services/material_master?wsdl");
Map<String, Object> properties = new HashMap<String, Object>(); Map<String, Object> pro = new HashMap<String, Object>();
properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN); pro.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
properties.put(WSHandlerConstants.USER, username); pro.put(WSHandlerConstants.USER, username);
properties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST); pro.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
properties.put(WSHandlerConstants.PW_CALLBACK_REF, new CallbackHandler() { pro.put(WSHandlerConstants.PW_CALLBACK_REF, new CallbackHandler() {
public void handle(Callback[] callbacks) { public void handle(Callback[] callbacks) {
for (int i = 0; i < callbacks.length; i++) { for (int i = 0; i < callbacks.length; i++) {
WSPasswordCallback pc = (WSPasswordCallback) callbacks[i]; WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
...@@ -42,10 +41,9 @@ public class MaterialMasterServiceTest { ...@@ -42,10 +41,9 @@ public class MaterialMasterServiceTest {
} }
}); });
WSS4JOutInterceptor interceptor = new WSS4JOutInterceptor(); WSS4JOutInterceptor interceptor = new WSS4JOutInterceptor();
interceptor.setProperties(properties); interceptor.setProperties(pro);
client.setOutInterceptors(Arrays.asList(interceptor)); client.setOutInterceptors(Arrays.asList(interceptor));
String xml = readText("D:/data/sso/001.XML"); client.invoke("execute", "XML");
System.out.println(JSON.toJSONString(client.invoke("execute", xml)));
} }
private static String readText(String path) throws IOException { private static String readText(String path) throws IOException {
...@@ -62,5 +60,5 @@ public class MaterialMasterServiceTest { ...@@ -62,5 +60,5 @@ public class MaterialMasterServiceTest {
br.close(); br.close();
} }
} }
} }
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