E10 in Visual Studio 2013

Hi All,

I tried to create sample visual studio web form application to scan orders .

image

Once the application load time i tried to do develop my code. As per your forum it shows following code help to connect with Ice.Core.Session dll in epicor.

public static Ice.Core.Session obj;
obj = new Ice.Core.Session(“username”, “pwd”, “net.tcp://SG-VM-P-EPCAPP1/Test”);

When i run this code it creates run time error.

"An unhandled exception of type ‘System.ServiceModel.Security.MessageSecurityException’ occurred in Ice.Contracts.Lib.SessionMod.dll

Additional information: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail."

Can you help me to sort out this issue? do i need do put configurations in App.config?

You should be using REST it will make your life a thousand times easier

4 Likes

You means rather than form application? Why this error come?
I need to update db field using UDAdapter when user clicks the form button.

No I mean instead of using the dlls you should talk to epicor over rest

3 Likes

@josecgomez means that of the three choices you have for accessing E10 Server, he (and I) normally recommend starting with REST until it proves impossible (Then ping me on why it is not possible) THEN if I can’t help you we can consider one of the ‘legacy’ approaches :slight_smile:

Take a look at this overview options doc. It’s being used in doc not released yet but gives you the flavor of what we mean.

3 Likes

@josecgomez and @Bart_Elia Thank you both . I 'll try to do using REST service. :slight_smile:

If i use REST service how can i update UD field value. is it update using service call?? And also we are using ERP10.1.500 Client version So is it could be issue?

Further i have tried with our Server Root but i have some issue. can we use " /api/v1" by default? i change only the server path but it returns 404.

Hi Bart,

I have a question regarding you’re suggestion of using REST over legacy (normally). But first, here’s my context.

I’ve worked for an Epicor Partner for couple years (until last may). I have developed with Epicor tools ans Epicor’s SDK.

My current employer has Epicor 9 and planning on migrating Epicor 10 in couple months. There is a lot of Excel sheet that has been developed acting as dashboards. None, are updatable (according to what I saw, if they would like to make some of them updatable, REST would be great tool instead of building them from scratch with Epicor’s SDK due to their complexity). Add to that, a lot a devs that are pending.

My current employer is open for purchasing Epicor’s SDK.

What would be a good approach in this context ? Or, what should be the guide lines regarding developement?

Is it preferable to bring what is out of Epicor back in?

Are custom BO reachable through REST?

From now on, would it PREFERABLE to consider a mix approach? I mean by that, creating custom BOs, Contracts, Adapters and using Excel (as example) with REST service.

What would be the “State of the Art” when all tools are available?

In 500 it was in beta so I would stay away from production loads.Only a few minor issues came out of that release as issues but from a corporate support sense, you will bump into that categorization :frowning:

First, I’ll talk to E10 exclusively. The tech stack on E9 is pretty different obviously but the patterns hold in 9 as well.

Be careful not to confuse BOs and REST vs WCF vs legacy 4GL network calls. A BO is just a class that does SalesOrder or Jobs or ARInvoices. There are methods on it to populate data for a search (GetList) or populate a forms tree with all it’s child records (GetRows) or to Update data, etc. That’s the same ‘SalesOrderSvc’ class no matter how the class is called across the network.

In WCF, that call comes in and the WCF plumbing does a (pseudo code of course)

var bo = new SalesOderSvc();
bo.Update(dataset);

In Rest, that call comes in and the REST plumbing does a

var bo = new SalesOderSvc();
bo.Update(dataset);

The same biz logic is being called so the same BPMs are firing, the same Method and Field security is in place, the same UD columns are added to the payload, etc. The only difference is how data is being serialized over the wire.

The Epicor SDK is focused on two major areas in regards to this chat. The first is the open ‘open source’ client code. You can see how everything is put together there. The other aspect of the SDK is the creation of new services using the tooling we use internally. Need to build a new ‘Dentist Office’ vertical and need to build some new services to manage Xrays machine output or whatever and need new services? There you go. Defined new db tables, services, the methods, the datasets, etc and it looks like a real E10 service - because it is - right down to automatically being exposed as a WCF and a REST service. You create the ‘DentalXraySvc’ class and the ICE framework does all the work exposing things for you. The app service coder doesn’t need to worry about the difference. If you have needs to lock that down in Method or Field security, license it as a partner, etc - all available to you in the SDK.

As to preference, the existing Rich Client forms (winform), EWA, most of the legacy clients - Service Connect, Info Worker, EMA, a few others still use the WCF client stack. Even Search and Social use WCF but do a v0.1 flavor of REST on WCF so I still count them as WCF. Everything coming out of late - Mobile CRM, Active Home Page, Epicor Data Discovery use the released to all v1 of REST. They are all using versions of the ‘Kinetic’ browser client announced during Insights 2018.
If and when we decide to move other clients to REST or Kinetic is not announced. By the way - that is two different things as well. Our rich clients COULD talk to the server via rest and stay in winforms. Again, REST is just a wire protocol for throwing bits over the wire. We don’t rewrite servers or clients when you flip from net.tcp to https for example.

As to preferences on which tool to use…
It depends on what you are doing. If you are doing a one off client or integration, the REST client is ‘simpler’ to use. You can use Postman for development and build an integration test suite in it. When a new release of Epicor comes out, re-run the test suite and check impact (and yell at us if we broke something and did not call it out in the release notes).
The REST services do not have the equivalent of the adapters, client BOs (impls), retry logic, session handling, etc.No UI framework until you get Kinetic in your hands (it’s exclusive to partners only atm though that will change at some point - SDK owners? General github repo? No clue atm). All the ‘broadcast tower’ context handling of the client, off the shelf BPM handling info messages, etc.
So you need to understand what you are trying to do before deciding on which tool to use.

Not sure that helps or confuses more.

FYI - internally we sometimes joke about a partner building a dental office vertical to try out ideas upon that fictitious company - think Fabrikam in Microsoft land. I am still waiting for the day we have a partner start building a dental office vertical and mess up all our straw man examples

4 Likes

Thank a lot for your response.

Have a great day!

Thanks Bart.
If you never mind can you help me to sort the issues which i have?

If i use REST service how can i update UD field value. is it update using service call??

Further i have tried with our Server Root but i have some issue. can we use " /api/v1" by default? i change only the server path but it returns 404.
What do you mean by categorization ? it means isn’t there any way to integrate epic 10 with Visual studio ??

There are plenty of examples in the REST Implementation section of the Erp 10 help. There are also examples on our Product Owners github @ https://github.com/bconner

A UD example is not in there but updating a UD is the same as any other update. Make sure you include keys and you are fine. If you are not familiar with ERP 10 customization, please spend some time in the university walkthroughs.

The ‘Server Root’ is just whatever share you selected in IIS - say MyServer/MyInstance/

For WCF, the services are all under Ice or ERP / BO or lib / Service name. You can get a tour of that by reading the ‘REST Novel’ REST Overview Novel

If you are having 404 issues, probably easiest to contact support and walk thru the setup with them. Usually it’s a web.config error. They are getting very good at diagnosing those errors of late. People have some interesting IIS server configurations :slight_smile:

3 Likes

Thanks you very much Bart.

As i said earlier i’m using Epicor ERP10.1.500 version. Because i tried 3 ways that you mentioned earlier. One time it creates error while i retrieve session. Once i use REST it shows 404. Therefore i though is this issue related 500 version. Because once i try to retrieve data from API i don’t have any idea about the methods and there names inside API
is that 500 version support REST? if so how can i know the methods name to access?

Have you read the ‘REST Overview Novel’ link?

Yes Bart… Thank you so much. And i have some issues regarding the integration. when i try to connect my server using mentioned url it shows error message. According to my knowledge that’s happens because of it cannot access api/v1. Is that related to authentication issue or any security issue? If you can please help me to troubleshoot the issue it would be highly appreciated.