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" https://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 ALL

<?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>
 use PTYPE to get more data.

partner.xml only NAT

<?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:PTYPE>NAT</ns1:PTYPE>
    </ns2:DownloadPartnerInput>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The oneliners

Articles

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

Partners

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

view · edit · sidebar · attach · print · history
Page last modified on September 19, 2023, at 11:13 AM