我正在尝试让Flutter应用程序安全地连接到soap / wsdl Web服务。
我的问题是如何使用servicestack产品,以便可以连接Flutter Mobile App或Dart控制台App来使用肥皂WSDL服务?
谢谢
更新:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://nick.mobile.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://nick.mobile.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://nick.mobile.com/">
<s:element name="C_getFilteredCustInfo_WithAssignNo">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="AssignNo" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="clSecurityCheckBase" type="tns:cpSecurityCheckBase_WithAssignNo" />
<s:element minOccurs="0" maxOccurs="1" name="language" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="cpSecurityCheckBase_WithAssignNo">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="AssignNo" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="OrgData" />
<s:element minOccurs="0" maxOccurs="1" name="HashData" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="IP" type="s:string" />
</s:sequence>
</s:complexType>
...
...
...
答案 0 :(得分:0)
ServiceStack的Dart and Flutter support依赖于using the JsonWebClient以及生成的类型化DTO,例如:
import 'package:servicestack/client.dart';
import 'techstacks.dtos.dart';
var client = new JsonServiceClient("https://www.techstacks.io");
main() async {
var response = await client.get(new GetTechnology(slug: "flutter"));
print("${response.technology.name}: ${response.technology.vendorUrl}");
}
仅与ServiceStack的JSON端点一起使用,因此您将无法使用它直接调用SOAP Services。
代替ServiceStack support SOAP Services作为ServiceStack Services的附加终结点,您可以从JSON和SOAP 1.1 / 1.2客户端获得相同的服务。