That's a generic error message and you didn't give too much detail in your post but the most reasonable assumption I can make is that the service you are trying to connect to is simply expecting something different from what you are giving them. They probably have a very specific format they are expecting and you are probably not giving them it. What they expect depends on what you are connecting to and how you are doing so.
I think you should verify that you are connecting the correct way and then try and figure out what they are expecting to receive. I can't really help beyond that but that seems like the problem. It can be hard to find out exactly what they want from you but they probably are expecting a very specific format that you are not using.