I've been tasked with making a sequence diagram and this should be done via creating a new sequence diagram off of a class diagram, so I have access to all the actors, operations etc. I need to make a sequence diagram for making a booking and I've noticed that some of the messages that would be sent aren't represented in the original class diagram. For instance, I figured the controller would need to fetch available bookings from the db but I don't have such an operation in my class diagram. With sequence diagrams, can they only have functionality provided in the class diagram? Or is it okay that this operation doesn't exist in the class diagram? I was under the impression that if you find functionality that doesn't exist in the class diagram, it's most likely wrong but I'm not sure.
Well, it seems you have spotted a hole in your architecture then. And that's pretty much one major advantage of creating SDs. If there's a missing operation you have to contact the system architect and talk with him on how to fix it. In no case you just invent a message to have a nice looking diagram. Only once the operation is identified you place a correct message with an annotation that it must be implemented - and after clarifying that with the system architect.