I am using webclient to send the request to get a PDF file.
byte[] response = client.UploadData(ClientUrl, Data);
My response schema is as follows. I want save the file as PDF. Could you please point me to a code sample.
I use string s = Encoding.UTF8.GetString(response); to get other fields, but not sure how to save the file.
<?xml version="1.0" encoding="utf-16"?>
<xs:complexType name="getPDF">
<xs:sequence>
<xs:element name="return" form="unqualified" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="status" type="xs:string" minOccurs="0"></xs:element>
<xs:element name="appPdfDoc" type="xs:base64Binary" minOccurs="0"></xs:element>
<xs:element name="messageList" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element ref="tns:Message" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
No comments:
Post a Comment