最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Java 与 .NET 的基于 WS-Security的Web Services集成实现(下)
时间:2022-07-02 11:19:49 编辑:袖梨 来源:一聚教程网
Java 与 .NET 的基于 WS-Security的Web Services集成实现(下)
rottenapple
4. 打开Jbuilder9 ,新建一个java 类,命名为TestNetService。并将axis-wsse-1.0的jar包添加到Jbuilder的jdk中(Tools->configions jdks->class tab->add)代码如下:
package MyWebServiceJavaClient;
import java.util.Date;
import java.text.DateFormat;
import org.apache.axis.MessageContext;
import org.apache.axis.message.*;
import org.apache.axis.client.*;
import org.apache.axis.utils.*;
import javax.xml.namespace.QName;
import java.lang.Integer;
import javax.xml.rpc.ParameterMode;
import net.vitale.filippo.axis.handlers.WsseClientHandler;
/**
*
*
*
*
* @author not attributable
* @version 1.0
*/
public class TestNetService {
static String usernameS = null;
static String passwordS = null;
public TestNetService() {
}
public static void main(String[] args) {
try {
Integer i = new Integer(2);
Integer j = new Integer(2);
String endpoint="http://localhost/MyServices/WebServiceTest/SumService.asmx";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
rottenapple
4. 打开Jbuilder9 ,新建一个java 类,命名为TestNetService。并将axis-wsse-1.0的jar包添加到Jbuilder的jdk中(Tools->configions jdks->class tab->add)代码如下:
package MyWebServiceJavaClient;
import java.util.Date;
import java.text.DateFormat;
import org.apache.axis.MessageContext;
import org.apache.axis.message.*;
import org.apache.axis.client.*;
import org.apache.axis.utils.*;
import javax.xml.namespace.QName;
import java.lang.Integer;
import javax.xml.rpc.ParameterMode;
import net.vitale.filippo.axis.handlers.WsseClientHandler;
/**
*
Title:
*
Description:
*
Copyright: Copyright (c) 2004
*
Company:
* @author not attributable
* @version 1.0
*/
public class TestNetService {
static String usernameS = null;
static String passwordS = null;
public TestNetService() {
}
public static void main(String[] args) {
try {
Integer i = new Integer(2);
Integer j = new Integer(2);
String endpoint="http://localhost/MyServices/WebServiceTest/SumService.asmx";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
相关文章
- 云星穹铁道权益升级怎么玩 云崩铁权益升级活动介绍 12-03
- 以闪亮之名山中绘梦怎么玩 以闪亮之名滢然花梦套装活动介绍 12-03
- 以闪亮之名绿野梦歌礼包怎么样 以闪亮之名绿野梦歌拍照礼包介绍 12-03
- 光遇12.6有什么更新 光遇12月6日更新内容介绍 12-03
- 伍六七暗影交锋测试资格怎么获得 伍六七暗影交锋内测资格获取方法 12-03
- 无限暖暖晶莹诗集怎么样 12-03