SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
Hello,
Since SmartConnector can get data from SBO via EWS, so I think it also can be used to get data from PME via EWS. I configure the RESTful EWS Gateway in SmartConnector and test GET/Values/{id}, the response value is correct. But When trying to get multiple data and using POST /Subscriptions/Create command, I got a error:
Response Code
500
Response Body
{
"Message": "由于 ContractFilter 在 EndpointDispatcher 不匹配,因此 Action 为“http://www.schneider-electric.com/common/dataexchange/2011/05/SubscribeIn”的消息无法在接收方处理。这可能是由于协定不匹配(发送... Action 不匹配)或发送方和接收方绑定/安全不匹配。请检查发送方和接收方是否具有相同的协定和绑定(包括安全要求,如 Message、Transport、None)。"
}
Below is capture, sorry there are some Chinese characters, it means that something mismatch.
Does anybody know the reason for it? or how to solve it? Thank you!
Best Regards
Jessie
Link copied. Please paste this link to share this article on your social media post.
Hi Chris,
This is exactly the line I was looking for .
It looks as though you may have the wrong version of ICS.CustomSoapRestProvider.dll.
Adam Summers can you help see if Chris has the correct version? The one that was built against 2.3.117 nuget packages.
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Hi Jessie,
This is because PME does not support EWS Subscriptions. (Subscribe, GetNotifications, Renew, Unsubscribe EWS methods). And because the /Subscriptions and /Notifications REST endpoints use these methods behind the scenes, you are getting this error.
That said in order to make this work today, you will need to create a custom REST endpoint that overrides the POST /Subscriptions/Create and /Notifications/Create method to use different EWS methods behind the scenes (There is a sample how to do this in the SmartConnectorSamples project in GitHub: GitHub - BuildingsLabs/SmartConnectorSamples: Sample projects for SmartConnector). The good news is, you are not the first to run into this issue .
Adam Summers would you be able to help Jessie out with this?
We have adding a fall-back mechanism into the SoapEwsRestProvider for these endpoints on the roadmap for SmartConnector, but this will not be complete until a future version of Smart Connector.
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Hi Jessie,
As Jeff mentioned I have built a Custom Endpoint Provider which extends the built in SOAP EWS endpoint. It overrides the notification and subscription methods such that these are handled internally by SmartConnector. It's currently in use on one project and so far the feedback has been positive. I'd be happy to share the extension with you if you wanted to give it a try and see if it's fit for your purpose. - No cost for the extension from me on this occasion but you'll have to take it as is, without warranty etc - be good to get some more feedback to know if it solves your problem. It should at least be good enough to fill the gap whilst you wait for the development to be completed in the core. Let me know if it's of interest and I'll get it posted for you to download.
Adam.
Link copied. Please paste this link to share this article on your social media post.
The extension has been listed over on the License Depot at SmartConnector Server as "Custom Soap EWS Rest Provider" you will need to complete a license request to use the extension and enter the machine thumbprint to get your license file. You can download the extension dll which you just need to copy into the SmartConnector install directory here Custom Soap EWS Rest Provider - Box - this has been built for use with SmartConnector 2.3.117
Link copied. Please paste this link to share this article on your social media post.
Thank you Adam,
Yes, I am interested in it, and thank you very much for sharing it to me. I would like to try it and will let you know the feedback.
Best Regards
Jessie
Link copied. Please paste this link to share this article on your social media post.
Thank you Jeff!
Link copied. Please paste this link to share this article on your social media post.
Trying to do so on a test machine, assembly for end point is still missing the custom soap rest provider option.
Any idea?
I've done:
Link copied. Please paste this link to share this article on your social media post.
Hi Christopherus,
What version of Smart Connector do you have installed? Make sure you are using 2.3.117.
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Hi Jeff,
Yes, version 2.3.117.
So I did a reinstall of SC, and still same issue.
I'll create another VM, to see if got the same behaviour.
Thoughts?
Details
License:
On Test VM: adding new end point shows only the default Ews.RESTExtensions, missing the CustomSoapRestProvider.
In comparison, on SC deployed on actual site, it showed the customSoapRestProvider
This is the assembly used for PME (by Adam), and -currently testing- for DCE.
Regards,
Chris
Link copied. Please paste this link to share this article on your social media post.
Hi Chris,
If you are not seeing it show up when are trying to add it, try the following.
1. Turn logging to Trace
2. Make sure the 'Portal' filter is set to True.
3. Restart Smart Connector
4. Try to add the endpoint configuration again.
5. Attach the Smart Connector log to this thread .
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Hi Jeff,
Attached is log per above.
https://schneider-electric.box.com/s/w562wzrmci1nwfiu5bsb3cah2dd3l2yk
I think this is the log entry you are looking for:
2018-03-14 10:31:32.2212,Error,Portal,admin,Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Mongoose.Service.Portal.Root.AddBindingInformationBaseController`2.GetClassList(AssemblyListItemModel assemblyInfo)
at Mongoose.Service.Portal.Root.AddBindingInformationBaseController`2.GetAssemblyList(String rootFolder)
,["Error attempting to load assembly C:\\Program Files (x86)\\Schneider Electric\\SmartConnector\\ISC.CustomSoapRestProvider.dll. Loader Exception(s): \r\nCould not load file or assembly 'Ews.RestExtensions, Version=2.3.113.0, Culture=neutral, PublicKeyToken=223885051a9a1eff' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)\r\nCould not load file or assembly 'Ews.RestExtensions, Version=2.3.113.0, Culture=neutral, PublicKeyToken=223885051a9a1eff' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)\r\nCould not load file or assembly 'Ews.RestExtensions, Version=2.3.113.0, Culture=neutral, PublicKeyToken=223885051a9a1eff' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)\r\nCould not load file or assembly 'Ews.RestExtensions, Version=2.3.113.0, Culture=neutral, PublicKeyToken=223885051a9a1eff' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)\r\nCould not load file or assembly 'Ews.RestExtensions, Version=2.3.113.0, Culture=neutral, PublicKeyToken=223885051a9a1eff' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)\r\n"],
Regards,
Chris
Link copied. Please paste this link to share this article on your social media post.
Hi Chris,
This is exactly the line I was looking for .
It looks as though you may have the wrong version of ICS.CustomSoapRestProvider.dll.
Adam Summers can you help see if Chris has the correct version? The one that was built against 2.3.117 nuget packages.
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Jeff, Adam,
Thanks, I retraced the file ICS.CustomSoapRestProvider.dll , and was copied from actual production site, not the same file as the one in box.It seems it is older version.
Replaced with Adam's file in box, and the customsoaprestprovider assembly showed up.
All good for testing now, thanks!
Link copied. Please paste this link to share this article on your social media post.
Hi Chris,
Just wanted to check, did you get everything resolved? The latest build of the extension which I shared on Box should be compatible with 2.3.117.
Link copied. Please paste this link to share this article on your social media post.
Hi Adam,
Yes, it is working now, thanks.
I am now running DCE with SC on my own VM for testing.
Link copied. Please paste this link to share this article on your social media post.
It would be great if the SoapRestProvider would work with PME and PSE. Please update us when this becomes available.
Link copied. Please paste this link to share this article on your social media post.
The REST API providers do work with PME. PME doesn’t support subscriptions so the model didn’t work well for requesting large batches of data. That’s where the extension I published comes in as it allows subscription like behaviour managed by SmartConnector instead of the downstream system. I know Jeff has this on the backlog to support natively but you should be able to use PME with SmartConnector REST API today. I’m also currently looking at work we’ve done with Citect SCADA using ctAPI which could have the REST API on top of the EWS server it presents. That might help put SmartConnector straight on top of a PSE client but we have some validation to do with the team in Canada first.
Link copied. Please paste this link to share this article on your social media post.
Ah I see. Good to know as we have a couple of projects where we would like to do just that. The REST Api is getting a lot of attention here. Thanks
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.