axis2调用c#WebService
2014-06-12 11:32
453 查看
用到axis2与axiom的jar
![](http://img.blog.csdn.net/20140612112917453)
示例代码:
示例代码:
import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axis2.Constants; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; Options options = new Options(); options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); options.setAction(namespace + method); options.setTo(new EndpointReference(uri)); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(namespace, ""); OMElement data = fac.createOMElement(method, omNs); OMElement inner = fac.createOMElement("flightinfoid", omNs); inner.setText(legId); data.addChild(inner); ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(data);
相关文章推荐
- Axis2调用C# WebService方法
- C#调用Axis2发布的带SoapHeader用户验证的WebService(通过测试)
- 关于java中Axis2客户端调用C#webservice服务端包含Cookie问题
- Axis2调用C# WebService方法
- C#.net调用axis2webService
- C#调用Axis2发布的带SoapHeader用户验证的WebService
- Axis2调用C#写的WebService(转自网易http://blog.163.com/cjd_cd/blog/static/46115565200811239239831/)
- C#.net调用axis2webService
- 一个能动态调用webservice的类 (c#)
- Dephi调用C#编写的WebService的一些问题与解决方法
- C# SOAP 调用WebService
- C#:如何动态调用WebService?
- .Net下采用GET/POST/SOAP方式动态调用WebService的简易灵活方法(C#)
- 图文并茂——使用xfire编写webservice,并通过C#调用
- 使用Java客户端类调用c# WebService和xml rpc server
- C#调用PHP写的WebService
- delphi7调用c#写的webservice(.net2.0)
- Axis2 调用微软WCF架构下发布的webservice经历
- 使用C#创建webservice及三种调用方式
- 使用C#创建webservice及三种调用方式