Commit b7dd0a90 authored by Quxl's avatar Quxl

修改命名空间

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