def parseMessage()

in src/main/scala/com/gu/salesforce/messageHandler/SOAPNotificationsParser.scala [17:25]


  def parseMessage(soapRequestEnvelope: String): Notifications = {
    val envelope: Envelope = fromXML[soapenvelope11.Envelope](XML.loadString(soapRequestEnvelope))

    val notificationsXml = envelope.Body.any.collect({
      case DataRecord(_, _, x: Elem) if x.label != "Fault" => x
    }).head

    fromXML[Notifications](notificationsXml)
  }