axis2 客户端

xml:

POST /PIPsIntegration/PIPsIntegration_Btarn_To_UI_Configure_orch_WS_Btarn_Configure_Port.asmx HTTP/1.1
Host: 55.55.55.55
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.rosettanet.org/PIPsIntegration/PIPsIntegration_Btarn_To_UI_Configure_orch_WS_Btarn_Configure_Port/Get_Btarn_Configure"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Get_Btarn_Configure xmlns="http://www.rosettanet.org/PIPsIntegration">
<Req_Get_BTARNCONFIG xmlns="http://PIPsIntegrationSchema.Get_BTARNCONFIG">
<Get_BTARNCONFIG />
</Req_Get_BTARNCONFIG>
</Get_Btarn_Configure>
</soap:Body>
</soap:Envelope>




axis2

private static EndpointReference reference = new EndpointReference("http://55.55.55.55/PIPsIntegration/PIPsIntegration_Btarn_To_UI_Configure_orch_WS_Btarn_Configure_Port.asmx");


public static OMElement getOMElement() throws ParseException, AxisFault {


ServiceClient sc = new ServiceClient();
Options op = new Options();

op.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);
op.setTo(reference);
op.setAction("http://www.rosettanet.org/PIPsIntegration/PIPsIntegration_Btarn_To_UI_Configure_orch_WS_Btarn_Configure_Port/Get_Btarn_Configure");
sc.setOptions(op);
System.out.println(getOm1());
OMElement om = sc.sendReceive(getOm1());
System.out.println("xml:\n"+om);
return om;
}
public static OMElement getOm1() throws ParseException{
OMFactory omf = OMAbstractFactory.getOMFactory();
OMNamespace omn = omf.createOMNamespace("http://www.rosettanet.org/PIPsIntegration", "");
OMNamespace omn1 = omf.createOMNamespace("http://PIPsIntegrationSchema.Get_BTARNCONFIG", "");
OMElement method = omf.createOMElement("Get_Btarn_Configure",omn);
OMElement method1 = omf.createOMElement("Req_Get_BTARNCONFIG",omn1);
OMElement method2 = omf.createOMElement("Get_BTARNCONFIG",omn1);

method1.addChild(method2);
method.addChild(method1);
return method;
}

public static void main(String args[]) throws AxisFault, ParseException{
getOMElement();
}


httpclient 如果不用多线程,需要清除,axis2默认连接数两个...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值