Click here to Skip to main content
15,925,255 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to read file:-----



XML
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-

instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <SOAP-ENV:Header>
                        <TransactionId>0079185000400624</TransactionId>
                        <TraceId>36221056</TraceId>
            </SOAP-ENV:Header>
            <SOAP-ENV:Body>
                        <ns1:bookreservationResponse xmlns:ns1="urn:os:bookreservation:v2" SOAP-

ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
                                    <return xsi:type="ns1:BookReservationResponse">
                                                <SessionID xsi:type="xsd:string">0079185000400624</SessionID>
                                                <ResultCode xsi:type="xsd:int">0</ResultCode>
                                                <Exceptions xmlns:ns2="http://xml.apache.org/xml-soap" xsi:type="ns2:Vector">
                                                </Exceptions>
                                                <Pnr xsi:type="ns1:PassengerNameRecord">
                                                            <Remarks xmlns:ns3="http://xml.apache.org/xml-soap"

xsi:type="ns3:Vector">
                                                            </Remarks>
                                                            <CreateDateTime xsi:type="xsd:dateTime">2010-01-

13T12:25:44.000Z</CreateDateTime>
                                                            <Exceptions xmlns:ns4="http://xml.apache.org/xml-soap"

xsi:type="ns4:Vector">
                                                            </Exceptions>
                                                            <ModifyDateTime xsi:type="xsd:dateTime" xsi:nil="true"/>
                                                            <Status xsi:type="xsd:string">PN</Status>
                                                            <PNRId xsi:type="xsd:string">JZ7KBD</PNRId>
                                                            <AltPNRId xsi:type="xsd:string"></AltPNRId>
                                                            <CreateUser xsi:type="xsd:string">API0S</CreateUser>
                                                            <ModifyUser xsi:type="xsd:string"></ModifyUser>
                                                </Pnr>
                                                <TransactionID xsi:type="xsd:string">0079185000400624</TransactionID>
                                    </return>
                        </ns1:bookreservationResponse>
            </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

:~
Posted

1 solution

OK, this isn't xsi format, it is SOAP format.

If you had to, you'd read it like any other XML Document. However there is normally no need to do this. Normall there is a WSDL file associated with a web service, all you need to do is run WSDL.exe against the services WSDL file, and it generates proxy classes to talk to the service and Object model classes to deserialize the XML to objects. In this case AFACT, you'll get a BookReservation object (its been a long time since I used vanilla SOAP Services), with properties set to the values in the XML.

This will save you a lot of work hand-rolling your own proxies. See this for an article about using the WSDL:
http://my.execpc.com/~gopalan/dotnet/webservices/webservice_csharp_client.html[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900