嗨,上面是我之前关于肥皂的问题.在那里我传递一维数组.现在我的问题是我需要将2D数组传递给以下Soap架构.
请求架构
<?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>
<CalculateWeb2DObjectArray xmlns="http://tempuri.org/">
<HCID>string</HCID>
<jaggedobjDataMICRO>
<ArrayOfAnyType>
<anyType />
<anyType />
</ArrayOfAnyType>
<ArrayOfAnyType>
<anyType />
<anyType />
</ArrayOfAnyType>
</jaggedobjDataMICRO>
<numeratorID>int</numeratorID>
</CalculateWeb2DObjectArray>
</soap:Body>
</soap:Envelope>
Run Code Online (Sandbox Code Playgroud)
响应模式
<?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>
<CalculateWeb2DObjectArrayResponse xmlns="http://tempuri.org/">
<CalculateWeb2DObjectArrayResult>
<ArrayOfAnyType>
<anyType />
<anyType />
</ArrayOfAnyType>
<ArrayOfAnyType>
<anyType />
<anyType />
</ArrayOfAnyType>
</CalculateWeb2DObjectArrayResult>
</CalculateWeb2DObjectArrayResponse>
</soap:Body>
</soap:Envelope>
Run Code Online (Sandbox Code Playgroud)
我的守则
from suds.xsd.doctor import Import, ImportDoctor
from suds.client import Client
# enable logging to see transmitted XML
import logging
logging.basicConfig(level=logging.INFO) …Run Code Online (Sandbox Code Playgroud) 有没有办法在JTable中实现行跨度和colspan,如html表.
我试着打电话给肥皂服务.我的调用是成功但它返回空值.我附上我的soap请求和响应模式.它需要1d数组作为输入并返回该数组.
请求架构
<?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>
<CalculateWeb1D xmlns="http://tempuri.org/">
<HCID>string</HCID>
<jaggedobjDataMICRO>
<string>string</string>
<string>string</string>
</jaggedobjDataMICRO>
<numeratorID>int</numeratorID>
</CalculateWeb1D>
</soap:Body>
</soap:Envelope>
Run Code Online (Sandbox Code Playgroud)
响应模式
<?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>
<CalculateWeb1DResponse xmlns="http://tempuri.org/">
<CalculateWeb1DResult>
<string>string</string>
<string>string</string>
</CalculateWeb1DResult>
</CalculateWeb1DResponse>
</soap:Body>
</soap:Envelope>
Run Code Online (Sandbox Code Playgroud)
我的代码叫肥皂服务
from SOAPpy import WSDL
import warnings
warnings.simplefilter('ignore',DeprecationWarning)
import SOAPpy
wsdlFile = 'http://204.9.76.243/nuCast.DataFeedService/Service1.asmx?WSDL'
server = WSDL.Proxy(wsdlFile)
server.soapproxy.config.dumpSOAPOut = 1
server.soapproxy.config.dumpSOAPIn = 1
print server.CalculateWeb1D(str(1073757),[1,2],99)
Run Code Online (Sandbox Code Playgroud)
和我的输出
*** Outgoing SOAP ******************************************************
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>
<SOAP-ENV:Body>
<CalculateWeb1D …Run Code Online (Sandbox Code Playgroud) 我必须限制一行中的行数JTable.如果我有100条记录,我需要在初始加载JTable时显示10条.我希望按下一个按钮"next",每次点击后它会显示另一组10条记录.
我的JComboBox模型包含了诸如项目item1,item2,item1.我的问题是当我选择第三项(item1)JComboBox并检查getSelectedIndex()它总是返回0.
如果我的模型中的项目相同,我如何获得不同的每个项目的索引?喜欢: