Error:The server cannot service the request because the media type is unsupported

Error:The server cannot service the request because the media type is unsupported

Good afternoon everybody,

I have the following error which it returns for a soap method:

Error:The server cannot service the request because the media type is unsupported


I use the function postUrl to execute the method soap


I sent the following XML:

<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:bat=" http://fslso.com/BatchFiling">
   <soapenv:Header>
      <bat:AuthenticationHeader>
         <bat:UserName><username></bat:UserName>
         <bat:APIKey><password></bat:APIKey>
      </bat:AuthenticationHeader>
   </soapenv:Header>
   <soapenv:Body>
      <bat:VerifyCredentials>
         <bat:strWSUserName><username></bat:strWSUserName>
         <bat:strWSPassword><password></bat:strWSPassword>
      </bat:VerifyCredentials>
   </soapenv:Body>
</soapenv:Envelope>