view · edit · sidebar · attach · print · history

SOAP Request to Refdata using wget

wget --post-file "ref.xml" --header "content-type: text/xml;charset=utf-8" --header "SOAPAction: http://refdatabase.refdata.ch/Pharma/Download" http://refdatabase.refdata.ch/Service/Article.asmx -O sexy.xml

 xmllint --format sexy.xml > more_sexy.xml

ref.xml

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://refdatabase.refdata.ch/Article_in" xmlns:ns2="http://refdatabase.refdata.ch/">
  <SOAP-ENV:Body>
    <ns2:DownloadArticleInput>
      <ns1:ATYPE>NONPHARMA</ns1:ATYPE>
    </ns2:DownloadArticleInput>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>
</ns1:ATYPE></ns2:DownloadArticleInput></SOAP-ENV:Body>

partner.xml

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://refdatabase.refdata.ch/Partner_in" xmlns:ns2="http://refdatabase.refdata.ch/">
  <SOAP-ENV:Body>
    <ns2:DownloadPartnerInput>
      <ns1:TYPE>ALL</ns1:TYPE>
    </ns2:DownloadPartnerInput>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The oneliners

wget --post-file "ref.xml" --header "content-type: text/xml;charset=utf-8" --header "SOAPAction: http://refdatabase.refdata.ch/Pharma/Download" http://refdatabase.refdata.ch/Service/Article.asmx -O se.xml; xmllint --format se.xml > sexy.xml
wget --post-file "partner.xml" --header "content-type: text/xml;charset=utf-8" --header "SOAPAction: http://refdatabase.refdata.ch/Download" http://refdatabase.refdata.ch/Service/Partner.asmx -O pe.xml; xmllint --format pe.xml > partner_sexy.xml

Via

http://wsdlbrowser.com/

view · edit · sidebar · attach · print · history
Page last modified on November 17, 2016, at 02:32 PM