SOAPpy, C # и передача объектов - PullRequest
       51

SOAPpy, C # и передача объектов

1 голос
/ 30 августа 2010

Я пытаюсь написать клиент SOAPpy для моего C # WebService. Это прибывает как нуль: (

Как получить отладчик из SOAP-анализатора C #, который использует WebService?

Вот что отправляет Python:

<?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>
  <ns1:UpdateSession xmlns:ns1="http://www.xlogic.pl/SENACA" SOAP-ENC:root="1">
   <xsd:Session>        
    <ID xsi:type="xsd:int">420</ID>
    <RecordCreationTime SOAP-ENC:arrayType="xsd:ur-type[6]" xsi:type="SOAP-ENC:Array"> 
     <item xsi:type="xsd:int">2010</item>
     <item xsi:type="xsd:int">8</item> 
     <item xsi:type="xsd:int">17</item>
     <item xsi:type="xsd:int">11</item> 
     <item xsi:type="xsd:int">13</item> 
     <item xsi:type="xsd:double">21.0</item>
    </RecordCreationTime>
    <ASP_SessionID xsi:type="xsd:string">92072674A04CB88D62776EA7</ASP_SessionID>
    <LangID xsi:type="xsd:string">fr-FR</LangID>
    <OneTimeKey xsi:type="xsd:string">a334cea18e014f4d8d04</OneTimeKey> 
   </xsd:Session>  
  </ns1:UpdateSession>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Это то, что ожидает C #

<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:tns="http://www.xlogic.pl/SENACA"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <tns:UpdateSession>
      <s href="#id1"/>
    </tns:UpdateSession>
    <tns:Session id="id1" xsi:type="tns:Session">
      <ID xsi:type="xsd:int">int</ID>
      <RecordCreationTime
            xsi:type="xsd:dateTime">dateTime</RecordCreationTime>
      <ASP_SessionID xsi:type="xsd:string">string</ASP_SessionID>
      <LangID xsi:type="xsd:string">string</LangID>
      <OneTimeKey xsi:type="xsd:string">string</OneTimeKey>
    </tns:Session>
  </soap:Body>
</soap:Envelope>

1 Ответ

0 голосов
/ 30 августа 2010

Не Python-ответ, но soapUI - очень полезное средство для отладки и автоматического тестирования веб-сервисов. Я интенсивно использовал его в проекте CF WCF с различными клиентами, включая Python, Boo, Java и C #.

...