xml - cant generate the right soap response description with c# -


i've built .net c# webservice. 1 of methods should return xml search resaults.

my current soap description im getting when method returns xmldocument type is:

 soap 1.1  following sample soap 1.1 request , response. placeholders shown need replaced actual values.   post /harelcybws/harelcybws.asmx http/1.1  host: safemail-t.harel-ins.co.il  content-type: text/xml; charset=utf-8  content-length: length  soapaction: "http://www.securenet.co.il/getsafeactivitiesxml"   <?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>      <getsafeactivitiesxml xmlns="http://www.securenet.co.il">        <safename>string</safename>        <days>int</days>        <filename>string</filename>      </getsafeactivitiesxml>    </soap:body>  </soap:envelope>  http/1.1 200 ok  content-type: text/xml; charset=utf-8  content-length: length   <?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>      <getsafeactivitiesxmlresponse xmlns="http://www.securenet.co.il">        <getsafeactivitiesxmlresult>xml</getsafeactivitiesxmlresult>      </getsafeactivitiesxmlresponse>    </soap:body>  </soap:envelope> 

i want response this:

 <?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>      <getsafeactivitiesxmlresponse xmlns="http://www.securenet.co.il">        <getsafeactivitiesxmlresult>  <results>  <result>        <safename>string</safename>        <days>int</days>        <username>string</username>        <numberid>int</numberid>        <comment>string</comment>  </result>  <result>        <safename>string</safename>        <days>int</days>        <username>string</username>        <numberid>int</numberid>        <comment>string</comment>  </result>  <result>        <safename>string</safename>        <days>int</days>        <username>string</username>        <numberid>int</numberid>        <comment>string</comment>  </result>  </results>  </getsafeactivitiesxmlresult>      </getsafeactivitiesxmlresponse>    </soap:body>  </soap:envelope> 

i tried looking schemas , serilization , other stuff, , dont know i'm doing there. im new xml, , dont know details.

what can ? also, xmldocument right return type ?

please help,

thank you.

david

the return type new class representing list of single result class. worked me.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -