-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOAP over serial (RS-485) possible? #1127
Comments
I can see two possible solutions:
If you have an Idea about how to make this kind of scenario easier, please feel free to submit a PR |
I'm not sure I understand your suggestions. But I appreciate the swift reply, thanks!
Did you also have this sequence in mind when suggesting solution 1? |
Gotcha! I misunderstood your scenario. I thought you needed to write a backend that could respond to requests from the device. SoapCore doesn't have code for generating the requestmessage, since that is supposed to be sent as an incoming payload to SoapCore. I don't think that SoapCore is a good fit for your scenario. You would probably be better off using wsdl.exe to generate c# classes from you wsdl. Then include the package System.ServiceModel.Primitives and use the MessageClass to build your request message. You can use something like this (.Dump() is a linqpad feature that just prints the value)
The response from the device can be parsed by Message.Create. Then you call GetReaderAtBodyContents and pass that to the xmlSerializer, to deserialize into the expected object type |
Hi
A measurement device that I need to control speaks SOAP-over-serial. I have no control over that. The SOAP XML string gets placed into a custom message frame containing a sequence id as well as a checksum. This message frame is then sent over RS485 and the answer returns in a identical message frame. Here is an excerpt from the protocol specification:
I managed to get this specific message working. I also have a custom encoder for the message frame. What I am missing now is an easy Implementation of the dozens of additional function calls the measurement device supports.
I have a WSDL file that specifies the whole interface.
So my questions to this project are:
I would also be happy if the Project just provided a Function to generate the XML from a Function call and then let me handle the transmission. And another function that would let me parse back my received answer?
The text was updated successfully, but these errors were encountered: