0
제 3 자 웹 서비스에서 XML 응답을 deserialization하는 데 큰 문제가 있습니다..NET에서 Apache 웹 서비스 deserialization 문제
여기에 XML 응답
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:CardsListResponse xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
<return xmlns:ns9402="http://xml.apache.org/xml-soap" xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="ns9402:Map[62]">
<item xmlns:ns6162="http://xml.apache.org/xml-soap" xsi:type="ns6162:Map">
<item>
<key xsi:type="xsd:string">card</key>
<value xsi:type="xsd:string">0000000000</value>
</item>
<item>
<key xsi:type="xsd:string">service</key>
<value xsi:type="xsd:string">0</value>
</item>
</item>
</return>
</ns1:CardsListResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
호출하는 방법
[SoapDocumentMethod]
[SoapTrace]
public object[] CardsList(string login, string password)
{
object[] result = this.Invoke("CardsList", new object[] { LOGIN, PASSWORD });
return (object[])result;
}
인보 방법에 allways null을 반환하므로 문제가 직렬화에서입니다. deserialization 프로세스를 어떻게 수정했는지 알 수 있습니까? 어떻게이 문제에 영향을 미칠 수 있습니까? 아니면 내 자신의 deserialization 메서드를 쓸 수 있습니까 ??
고맙습니다.
서비스가 WSDL을 가지고 있지 않기 때문에 직접 만들었습니다. –
WSDL이 없으면 SOAP 웹 서비스가 아닙니다. 클라이언트와 서비스간에 계약이 무엇인지 짐작할 수 있습니다. 행운을 빕니다. –
WSDL은 서비스만을 설명합니다. 난 deserialization에만 문제가있다. –