我看了一下axis2-1.5.4的sample,其生产webservice的客户端中几乎都没有CallbackHandler这个抽象类和stub了,客户端很简洁。
CallbackHandler 和stub的作用是什么,用axis2可以实现哪些webservice调用方式?
初次接触webservice和axis2,请朋友们指点一下,谢谢!
CallbackHandler 和stub的作用是什么,用axis2可以实现哪些webservice调用方式?
初次接触webservice和axis2,请朋友们指点一下,谢谢!
解决方案 »
- 有没有前辈在weblogic上成功配置域信任的??请各位前辈帮帮忙啊
- String类型怎么转换为blob类型
- Hibernate一对多关联,能查询,但不能联结插入
- 高分求教菜鸟问题:《精通EJB(第二版)》上的例子,调用ejbFindByPrimaryKey的时候出现“ removing bean lock and it has tx set!”
- -----》『提问』Hibernate 的查询问题,焦急等待
- hibernate 里是怎么判断用户登陆失效的
- 用Dom4j生成xml文档遇到的特殊字符问题
- 我这里bea的官网进不去,速求weblogic8谢谢!
- javax.xml.parsers类DocumentBuilder神奇的事情,解析不了中文"版"?
- w10系统如何连接access数据库
- Spring MVC的demo
- mysql插入新纪录时,字段的not null属性没起作用,然后……
package example.client;import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;public class TestClient {
private static EndpointReference targetEPR = new EndpointReference(
"http://localhost:8080/axis2/services/HelloWorld"); public static OMElement getSayHelloOMElement(String name) {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac
.createOMNamespace("http://sample/xsd", "hw");
OMElement method = fac.createOMElement("sayHello", omNs);
OMElement value = fac.createOMElement("name", omNs);
value.addChild(fac.createOMText(value, name));
method.addChild(value);
return method;
} public static void main(String[] args) {
try {
Options options = new Options();
options.setTo(targetEPR);
ServiceClient sender = new ServiceClient();
sender.setOptions(options);
OMElement sayHello = getSayHelloOMElement("ZJ");
OMElement result = sender.sendReceive(sayHello);
System.out.println(result);
} catch (Exception e) {
e.printStackTrace();
}
}
}
新手求教!