Skip to content

Instantly share code, notes, and snippets.

@joehanna
Forked from gustavohenrique/soap-curl-shell
Created September 28, 2018 22:25
Show Gist options
  • Select an option

  • Save joehanna/23ae1e59d2f4855812c0697a01205738 to your computer and use it in GitHub Desktop.

Select an option

Save joehanna/23ae1e59d2f4855812c0697a01205738 to your computer and use it in GitHub Desktop.

Revisions

  1. @gustavohenrique gustavohenrique created this gist Jun 11, 2013.
    27 changes: 27 additions & 0 deletions soap-curl-shell
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    # request.xml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wst="http://sensedia.com/repository/wstoolkit">
    <soapenv:Header>
    <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:UsernameToken wsu:Id="UsernameToken-1">
    <wsse:Username>system</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">manager</wsse:Password>
    <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">DWk64SMfJ6RxHAKgPRGtPA==</wsse:Nonce>
    <wsu:Created>2013-04-17T18:36:54.013Z</wsu:Created>
    </wsse:UsernameToken>
    </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
    <wst:search>
    <in>
    <keywords>python</keywords>
    <restrictions>
    <sortBy>DATE</sortBy>
    </in>
    </wst:search>
    </soapenv:Body>
    </soapenv:Envelope>

    # makerequest.sh
    ACTION="wst:search"
    URL="http://mydomain.com.br/services/queryPort"
    curl -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:$ACTION" [email protected] $URL > output.xml