Custom SOAP Request Header

1
Can someone provide an example of what a Custom Request Header for a web service call should look like? I tried entering the following <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adep="http://www.adeptra.net/Adeptra/"> </soapenv:envelope> With the following result: Created soap envelope: <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:header><soapenv:envelope xmlns:adep="http://www.adeptra.net/Adeptra/"> </soapenv:envelope></soapenv:header><soapenv:body><ns1:setcasedatarequest xmlns:ns1="http://www.adeptra.net/Adeptra/"> <case> <caseinfo> <caseid>1000156</caseid> </caseinfo> <control> <msgtype>DTA</msgtype> <datatimestamp>121003175741</datatimestamp> </control> <devicelist> <device> <devicetype>M</devicetype> <fullnumber>6037383417</fullnumber> </device> </devicelist> <primarycontact> <fullname>6037383417</fullname> </primarycontact> <variablelist> <variable> <name>message</name> <value>You have been approved for an increase in your credit line. Reply with 'Y' to accept.</value> </variable> </variablelist> </case> </ns1:setcasedatarequest></soapenv:body></soapenv:envelope>
asked
2 answers
2

There is a nice howto in the mendix documentation that explains how to use webservices properly: https://world.mendix.com/display/howto25/Consume+a+web+service

answered
0

Do not include the envelope and header in the custom header. Mendix takes care of that. A custom header can be.

  <wsse:Security mustUnderstand="1"   xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" >
     <wsse:UsernameToken>
        <wsse:Username>{1}</wsse:Username>
        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">{2}</wsse:Password>
     </wsse:UsernameToken>
  </wsse:Security>

You can use the button "Insert template" for that.

answered