android ksoap2调用wcf出错,急。。。。

mengbo2008bj 2012-03-07 07:00:24
String result = "";
SoapObject rpc = new SoapObject("http://tempuri.org/", "UserLogin");
rpc.addProperty("loginName", "aaa");
rpc.addProperty("pwd", "bbb");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10);
envelope.bodyOut = rpc;
envelope.dotNet = true;
envelope.setOutputSoapObject(rpc);
HttpTransportSE ht = new HttpTransportSE("http://192.168.200.31:8022/HuoYanAgentVehicleService.svc");
ht.debug = true;
try {
ht.call("http://tempuri.org/IHuoYanAgentVehicleService/UserLogin", envelope);//这里出错
if(envelope.getResponse()!=null){
SoapPrimitive response = (SoapPrimitive) envelope.getResponse();
result = response.toString();
}
System.out.println("detail" + result);
return result;
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
System.out.println("*******"+ ht.requestDump.toString());
System.out.println("*******"+ ht.responseDump.toString());
e.printStackTrace();
}

错误描述:
org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:1 in java.io.InputStreamReader@40890440)
http://192.168.200.31:8022/HuoYanAgentVehicleService.svc为webservice可访问
那位大侠帮看看啊
...全文
483 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Gongqingshuai 2012-06-11
  • 打赏
  • 举报
回复
大哥 这问题解决了吗??解决了麻烦告诉一下,会死人的
hohaiuhsx 2012-04-13
  • 打赏
  • 举报
回复
看看你 服务端的协议是不是 basicHttpBinding
mengbo2008bj 2012-03-08
  • 打赏
  • 举报
回复
xml:


<?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://tempuri.org/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://tempuri.org/" name="HuoYanAgentVehicleService">-<wsp:Policy wsu:Id="WSHttpBinding_IHuoYanAgentVehicleService_policy">-<wsp:ExactlyOne>-<wsp:All><wsaw:UsingAddressing/></wsp:All></wsp:ExactlyOne></wsp:Policy>-<wsdl:types>-<xsd:schema targetNamespace="http://tempuri.org/Imports"><xsd:import namespace="http://tempuri.org/" schemaLocation="http://uxinwebtest1.uxin.youxinpai.com:8022/HuoYanAgentVehicleService.svc?xsd=xsd0"/><xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" schemaLocation="http://uxinwebtest1.uxin.youxinpai.com:8022/HuoYanAgentVehicleService.svc?xsd=xsd1"/></xsd:schema></wsdl:types>-<wsdl:message name="IHuoYanAgentVehicleService_UserLogin_InputMessage"><wsdl:part name="parameters" element="tns:UserLogin"/></wsdl:message>-<wsdl:message name="IHuoYanAgentVehicleService_UserLogin_OutputMessage"><wsdl:part name="parameters" element="tns:UserLoginResponse"/></wsdl:message>-<wsdl:message name="IHuoYanAgentVehicleService_GetAgentVehicleListByUserId_InputMessage"><wsdl:part name="parameters" element="tns:GetAgentVehicleListByUserId"/></wsdl:message>-<wsdl:message name="IHuoYanAgentVehicleService_GetAgentVehicleListByUserId_OutputMessage"><wsdl:part name="parameters" element="tns:GetAgentVehicleListByUserIdResponse"/></wsdl:message>-<wsdl:portType name="IHuoYanAgentVehicleService">-<wsdl:operation name="UserLogin"><wsdl:input message="tns:IHuoYanAgentVehicleService_UserLogin_InputMessage" wsaw:Action="http://tempuri.org/IHuoYanAgentVehicleService/UserLogin"/><wsdl:output message="tns:IHuoYanAgentVehicleService_UserLogin_OutputMessage" wsaw:Action="http://tempuri.org/IHuoYanAgentVehicleService/UserLoginResponse"/></wsdl:operation>-<wsdl:operation name="GetAgentVehicleListByUserId"><wsdl:input message="tns:IHuoYanAgentVehicleService_GetAgentVehicleListByUserId_InputMessage" wsaw:Action="http://tempuri.org/IHuoYanAgentVehicleService/GetAgentVehicleListByUserId"/><wsdl:output message="tns:IHuoYanAgentVehicleService_GetAgentVehicleListByUserId_OutputMessage" wsaw:Action="http://tempuri.org/IHuoYanAgentVehicleService/GetAgentVehicleListByUserIdResponse"/></wsdl:operation></wsdl:portType>-<wsdl:binding name="WSHttpBinding_IHuoYanAgentVehicleService" type="tns:IHuoYanAgentVehicleService"><wsp:PolicyReference URI="#WSHttpBinding_IHuoYanAgentVehicleService_policy"/><soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>-<wsdl:operation name="UserLogin"><soap12:operation style="document" soapAction="http://tempuri.org/IHuoYanAgentVehicleService/UserLogin"/>-<wsdl:input><soap12:body use="literal"/></wsdl:input>-<wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation>-<wsdl:operation name="GetAgentVehicleListByUserId"><soap12:operation style="document" soapAction="http://tempuri.org/IHuoYanAgentVehicleService/GetAgentVehicleListByUserId"/>-<wsdl:input><soap12:body use="literal"/></wsdl:input>-<wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding>-<wsdl:service name="HuoYanAgentVehicleService">-<wsdl:port name="WSHttpBinding_IHuoYanAgentVehicleService" binding="tns:WSHttpBinding_IHuoYanAgentVehicleService"><soap12:address location="http://uxinwebtest1.uxin.youxinpai.com:8022/HuoYanAgentVehicleService.svc"/>-<wsa10:EndpointReference><wsa10:Address>http://uxinwebtest1.uxin.youxinpai.com:8022/HuoYanAgentVehicleService.svc</wsa10:Address>-<Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"><Dns>localhost</Dns></Identity></wsa10:EndpointReference></wsdl:port></wsdl:service></wsdl:definitions>
内容概要:本文聚焦风电出力的不确定性问题,采用拉丁超立方抽样(Latin Hypercube Sampling, LHS)方法生成具有统计代表性的风电出力初始场景集,有效克服传统蒙特卡洛抽样存在的样本冗余与收敛速度慢的缺陷。为进一步降低场景数量以提升电力系统优化调度的计算效率,研究结合K-means聚类、快速前向选择等场景缩减技术,对生成的高维场景进行聚合与概率修正,保留最具代表性的典型场景及其对应概率分布。整个建模流程在Matlab平台上编程实现,形成一套完整的“抽样—生成—缩减—验证”的不确定性建模框架,为含高比例风电的电力系统提供高质量、低冗余的输入场景集,显著增强随机优化、鲁棒优化等模型的求解效率与工程实用性。; 适合人群:具备电力系统分析、概率统计基础及Matlab编程能力,从事新能源并网、电力系统优化调度、不确定性建模与风险评估等方向的科研人员、工程技术人员及研究生。; 使用场景及目标:①应用于风电主导的电力系统随机优化调度、机会约束规划、鲁棒经济调度等场景,提升模型对不确定性的刻画能力;②帮助研究者深入掌握拉丁超立方抽样与场景缩减的核心原理与实现方法,构建高精度的不确定性输入模型;③为复杂电力系统仿真提供经过科学约简的典型场景集,平衡计算精度与效率,支撑实际工程决策。; 阅读建议:建议读者结合提供的Matlab代码逐模块调试与运行,重点理解LHS在多维空间中的分层抽样机制、场景距离度量方式及聚类缩减过程中的概率守恒原则,关注缩减前后场景集的分布保真性与计算效率提升效果,以全面掌握风电不确定性建模的关键技术路径。

80,491

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧