I have a servlet written in Java and I am attempting to send data to the method using C and the WinSock2 API. When I attempt to just send the raw data I get an invalid stream header error. I am not sure how I should go about handling this situation. Does anyone have any idea of how I should do this? The ObjectInputStream is expecting an array of bytes which if I am not mistaken is just an array of shorts in C. However I'm not sure how to serialize the array to send it.

may be you can your code?

If you want to check the frame data, you can use ethereal to
analyse the frame data you sent or received....if it would be useful...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.