Last post Oct 14, 2016 10:35 AM by mike4u
Aug 12, 2016 06:01 AM|mike4u|LINK
<groupdetail> // It is group head tag
<state_code></state_code> // Mandatory
<no_of_records>10</no_of_records>// Mandatory, no of records send in XML
<benifciary_no>5402</benifciary_no> Mandatory field
<uid_no></uid_no> \\ aadahr no. should be of 12 digits only.
<eid_no></eid_no> \\ EID no.
<applicant_name></applicant_name> \\ Beneficiary name
<father_husband_name> </father_husband_name> Father/Husband name
<mobile_no></mobile_no> \\ Mobile no. Only of ten digit <bank_po_account_no></bank_po_account_no> Valid bank /PO account <disbursement_mode>BANK</disbursement_mode> \\ disbursement mode
<ifsc_code>BKID0004805</ifsc_code> \\ ifsc code in case of bank
<status>SO_SAVED </status> </detail>..... \\ Status of beneficiary
I have to create client , which call http://demowebservice web service . I needs to send data in XML format only.
I have to send xml file according to XSD given using restful webservicemasters kindly suggest how to do it.
Aug 12, 2016 07:30 AM|Nan Yu|LINK
Hi mike4u ,
You could store the pdf in a common data store on the server such as database or file system . Please refer to below article for how to upload and download PDF files from database using asp.net c#:
Aug 12, 2016 07:38 AM|mike4u|LINK
Aug 12, 2016 08:28 AM|PatriceSc|LINK
I would use HttpClient.
http://www.asp.net/web-api/overview/advanced/calling-a-web-api-from-a-net-client shows JSon sample put you have as well Xml methods. You'll just pass an object and it will be serialized to XML for you (and you can guide how the serialization happens).
With that you should be able to just initialize an object with the data you want and post this object. All the serialization should be then handled for you behing the scene. You could post to a tst page and possible use
https://msdn.microsoft.com/en-us/library/system.web.httprequest.saveas(v=vs.110).aspx so that you can check it seems to be that is expected by the service at which point you could test it live.
Edit: you could use http://xmltocsharp.azurewebsites.net/ to turn an XM document into the corresponding C# class.
Aug 12, 2016 09:54 AM|mike4u|LINK
thnks for reply. I have to generate xml from my side on buttonclick .So i am confused how to use webapi at my side on button click. could u plz suggest some demo code according to my above mentioned xml.
Aug 12, 2016 10:28 AM|mike4u|LINK
patrice sir assist with demo code based on my xml
Aug 26, 2016 04:56 AM|mike4u|LINK
plz masters suggest
Sep 03, 2016 09:26 PM|PatriceSc|LINK
With HttpClient you can use
https://msdn.microsoft.com/en-us/library/hh944531(v=vs.118).aspx which will post the object as XML. You can use the earlier link to create the class from your XML markup.
You could post to a test page and use F12 (or save or show the request) to check it matches what you want before trying with the actual service.
Oct 14, 2016 10:35 AM|mike4u|LINK