[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Deserialize soap XML response

Asked by MogalManic in Programming for ASP.NET, Miscellaneous Web Development, Web Services Description Language

Tags: asp.net, web services, XML

The company developing a web service I am writing a client for has not yet released the test URL.

Instead they have supplied WSDL and sample Request/Response XML.  I can create the proxy objects from the WSDL using WSDL.exe.

Is there an easy way to load the Response and/or the request XML samples into the proxy objects so I can write mock unit tests?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
<?xml version="1.0" encoding="utf-8"?>  <!--Sample Request-->
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <EquipmentQuery_ExecuteQuery xmlns="http://crow.equinox.ca/">
            <!-- Service.EquipmentQuery_ExecuteQuery parameters go here -->
    </EquipmentQuery_ExecuteQuery>
  </soap:Body>
</soap:Envelope>
<!-------------------------------------------------------------------------------------->
<!----------SampleResponse------------------------------------------------------>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <EquipmentQuery_ExecuteQueryResponse xmlns="http://crow.equinox.ca/">
      <EquipmentQuery_ExecuteQueryResult>
        <rowsReturned>4</rowsReturned>
        <returnedEquipment>
          <ReturnedEquipment>
            <!--  ReturnedEquipment properties-->
			<!--  This is the stuff I wan to deserialize!!!! -->
          </ReturnedEquipment>
          <ReturnedEquipment>
            <!--  ReturnedEquipment properties-->
			<!--  This is the stuff I wan to deserialize!!!! -->
          </ReturnedEquipment>
          <ReturnedEquipment>
            <!--  ReturnedEquipment properties-->
			<!--  This is the stuff I wan to deserialize!!!! -->
          </ReturnedEquipment>
          <ReturnedEquipment>
            <!--  ReturnedEquipment properties-->
			<!--  This is the stuff I wan to deserialize!!!! -->
          </ReturnedEquipment>
        </returnedEquipment>
        <errorCodes>
          <ErrorCode>
            <errorCode>0</errorCode>
            <errorDescription>No Error</errorDescription>
          </ErrorCode>
        </errorCodes>
      </EquipmentQuery_ExecuteQueryResult>
    </EquipmentQuery_ExecuteQueryResponse>
  </soap:Body>
</soap:Envelope>
[+][-]10/27/09 07:23 AM, ID: 25672729Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/27/09 08:28 AM, ID: 25673480Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/20/09 06:32 PM, ID: 25876079Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625