- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我想知道如何在 android 源代码中应用 SOAP-Request 参数。
例子...
Q1。这是正确的吗 ? (<--)
private static final String SOAP_ACTION = " "; <-- ???
private static final String METHOD_NAME = "GetStationStats "; <-- Is this right?
private static final String NAMESPACE = " http://cisco/mse/location"; <-- Is this right?
private static final String URL = "https://192.168.100.231/location"; <-- Is this right?
Q2。从 Soap-xml 更改
<AesBusinessSession id="10510"/>
<AesMobileStation macAddress="00:01:02:03:04:05"/>
=> 到安卓源
request.addProperty("AesBusinessSession id" ,10510); <-- Is this right?
request.addProperty("AesMobileStation macAddress" ,00:01:02:03:04:05); <-- Is this right?
这是我的来源。
private void soapData(String searchData) {
SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME);
Log.e("dd", "Soap Created");
SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
request.addProperty("SQL" ,searchData);
HttpTransportSE androidHttpTransport=new HttpTransportSE(URL);
androidHttpTransport.debug = true;
try
{
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapPrimitive result = (SoapPrimitive)envelope.getResponse(); //String result1 = xmlPasing(result.toString()); //xml파싱
String re_xml = result.toString();
outPut.setText(re_xml); //결과값 출력
}
catch(Exception e)
{
Log.e("dd", "Soap Catch",e);
e.printStackTrace();
} //try-catch
}
============================================= =====例子方法:GetStationStats
根据各种搜索条件返回当前存储在 MSE 中的 AesMobileStation 统计记录。结果:一个 AesBaseStats 对象,如果找不到则返回 null 参数:AesBusinessSession、AesMobileStation Key
7.3.1 SOAP 请求
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<GetStationStats xmlns=” http://cisco.com/mse/location”>
<AesBusinessSession id="10510"/>
<AesMobileStation macAddress="00:01:02:03:04:05"/>
</GetStationStats>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
7.3.2 SOAP 响应 7.3.2.1 成功
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<Response xmlns=” http://cisco.com/mse/location”>
<AesBaseStats macAddress="00:01:02:03:04:05" packetsSent=”12” bytesSent=”1221111” packetsRecv=”1111” bytesRecv=”1212204” policyErrors=”0” changedOn=”1220324324”/>
</Response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
============================================= =============
最佳答案
SOAP_ACTION
- 你可以在 wsdl 中看到它,可能是这样的:"http://cisco/mse/location/GetStationStats"
. METHOD_NAME
和 NAMESPACE
似乎是正确的。 URL
- 服务网址,我不知道它是否正确。你也可以在 wsdl 中看到它。
request.addProperty("AesBusinessSession id" ,10510);
request.addProperty("AesMobileStation macAddress" ,00:01:02:03:04:05);
这是错误的(输出类似于:<AesBusinessSession id>10510</AesBusinessSession id>
。您可以使用 SoapObject
或 SoapPrimitive
用于添加属性:
SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME);
SoapObject aesBusinessSession = new SoapObject(NAMESPACE, "AesBusinessSession");
aesBusinessSession.addAttribute("id",10510);
SoapObject aesBaseStats = new SoapObject(NAMESPACE, "AesBaseStats");
...//add attrs to aesBaseStats
request.addSoapObject(aesBusinessSession);
request.addSoapObject(aesBaseStats);
关于android - 思科 MSE API : SOAP communication with Android APP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18138483/
我正在寻找 GradientBoostingClassifier在 sklearn .然后,我发现有 3 种标准。弗里德曼 mse,mse,mae。sklearn提供的描述是: The functio
我正在训练一个在最后一层具有连续输出的卷积网络。最后一层有 4 个节点。我使用均方误差作为损失函数。作为检查,我使用了 Tensorflow 的均方误差。对于第一个纪元的第一批,这只给出了相同的结果。
我有 2 个张量 .size的 torch.Size([2272, 161]) .我想得到它们之间的均方误差。但是,我希望它沿着 161 个 channel 中的每一个,以便我的误差张量具有 .siz
在使用元启发式算法的聚类分析论文中,许多都优化了均方量化误差 (MSE)。例如在 [1]和 [2] . 我对结果感到困惑。他们告诉他们已经使用 MSE 作为目标函数。但是他们已经报告了欧几里德距离的簇
假设有两个张量列表: r1 = K.variable(1) r2 = K.variable(2) v1 = K.variable(3) v2 = K.variable(4) l1 = [r1,r2]
我是随机森林新手,我有一个关于回归的问题。我正在使用 R 包 randomForests 来计算 RF 模型。 我的最终目标是选择对预测连续性状很重要的变量集,因此我正在计算一个模型,然后删除准确度平
有人能指出这个项目 ( Managed Service Engine ) 是否已被放弃吗? 我需要决定是否将其用作我的企业服务虚拟化计划的一部分。我目前看到来自 Microsoft 的许多竞争解决方案
我正在训练一个 keras 模型,它的最后一层是单个 sigmoid单元: output = Dense(units=1, activation='sigmoid') 我正在用一些训练数据训练这个模型
我试图从我抓取的数据集中预测一些价格。我从未为此使用过 Python(我通常使用 tidyverse ,但这次我想探索 pipeline 。 所以这是代码片段: import pandas as pd
我正在使用 scikit learn 创建回归模型。现在我想知道如何评估均方误差是否合理或不好? 例如,当我进行交叉验证时,训练数据模型的测试数据的 MSE 为 0.70。分数合理还是不好? 计算模型
我试图显示使用getUserMedia从网络摄像头获取的MediaStream,并使用可能的播放机制将其中继到远程对等设备(作为实验)。我不是直接使用webRTC,因为我想控制原始数据。 我遇到的问题
我正在使用 scikit learn 创建回归模型。现在我想知道如何评估均方误差是否合理或不好? 例如,当我进行交叉验证时,训练数据模型的测试数据的 MSE 为 0.70。分数合理还是不好? 计算模型
我不确定这是否是问这个问题的正确地方,但是在哪里可以找到有关如何计算两个图像的 MSE 的分步指南? 我知道公式是什么,但不知道如何付诸实践。 最佳答案 在 C 语言中你可能会这样做: int sum
我正在构建一个使用 MSE 作为误差函数的卷积自动编码器。图像的 MSE 是如何定义的?如果图像以简单矩阵形式呈现,MSE 是否只是各个行列式之差的平方?或者是矩阵之差的行列式的平方? 最佳答案 计算
我得到了不同的 mse 结果。在训练过程中,我在最后一个训练周期后得到 0.296,当我评估我的模型时,我得到 0.112。有谁知道为什么会这样吗? 这是代码: model = Sequential(
假设您有一个代表自动编码器 (AE) 的网络。假设它有 90 个输入/输出。我想用大小为 100 的批处理对其进行批量训练。我将用 x 表示我的输入,用 y 表示我的输出。 现在,我想使用 MSE 来
我正在使用 Scikit-learn 库进行线性回归。一切都简单明了。只需 6 行代码,我就可以完成这项工作。不过,我想知道到底发生了什么。 由于我是机器学习的初学者,也许我的问题是错误的,但我想知道
训练期间 MSE 是否有可能增加? 我目前正在计算每个时期验证集的 MSE,在某个点,MSE 开始增加而不是减少。有人对这种行为有解释吗? 最佳答案 回答您的问题:是的,有可能。 如果您使用正则化或随
我的特征向量大小为 1x4098。每个特征向量对应一个 float (温度)。在训练中,我有 10,000 个样本。因此,我的训练集大小为 10000x4098,标签为 10000x1。我想使用线性回
我正在尝试对 lasso2 包中的前列腺癌数据运行不同的回归模型。当我使用 Lasso 时,我看到两种不同的方法来计算均方误差。但它们确实给了我完全不同的结果,所以我想知道我是否做错了什么,或者这是否
我是一名优秀的程序员,十分优秀!