dc

dc

  • NA
  • 663
  • 0

C# console app work with web service

Sep 16 2012 11:40 AM
In a C# 2008 console application, I need to send doucments to a web service. This is marked with the following xml: subDocuments attachmentId="xx3">.

I need to send word documents, excel spreadsheets, and PDF files back to the web serivce. Can you tell me how I would accomplish this goal using code?

The xml I am referring to is listed below:

<ns2:RetsubPack serviceSuccessful="true" returnCode="0" xmlns:ns2="http://test1/test">
  <statusDescription>Package Details retrieved Successfully</statusDescription>
  <PackageDetails>
  <Type>type2</Type>
  <Category>dog</Category>
  <ContName>Co 1</ContgName>
  <TotalTrans>0</TotalTrans>
  </PackageDetails>
  <NumberOfDocuments>3</NumberOfDocuments>
  <subDocuments attachmentId="xx1">
  <DocumentMetadata>
  <DocumentTypeCode>Spreadsheet1</DocumentTypeCode>
  <PackageId>pkg1</PackageId>
  </DocumentMetadata>
  </subDocuments>
  <subDocuments attachmentId="xx2">
  <DocumentMetadata>
  <DocumentTypeCode>Spreadsheet2</DocumentTypeCode>
  <PackageId>pkg1</PackageId>
  </DocumentMetadata>
  </subDocuments>
  <subDocuments attachmentId="xx3">