REST Overview Novel


(Mark Tellefson) #102

Trying to get REST up and running so @Banderson has some more toys to play with. We did not generate the self-signed SSL security certificate during server install. The instructions say “You must complete these steps prior to adding an Epicor Application Server”. Can I still add the certificate after the fact?


(Brandon Anderson) #103

Yessssssssssssssss…

200


(Bart Elia) #104

You might be reading the steps to setting up a cert for the WCF binding as opposed to the REST endpoints?
I just got a peak at the new admin console approach and like it better so hopefully is easier. I am sure I can count on you folks to provide me with ‘enthusiastic feedback’ when you get your hands on 10.2


(Jose C Gomez) #105

No, simply install a self signed cert in your server /iis and enable https binding on your website in iis.
Then check the REST checkbox (if you haven’t already) and you are off to the races

-Jose


(Mark Tellefson) #106

Done deal. Thanks Bart and Jose!


(Brandon Anderson) #107

Now I have some work to do to try to figure out how to use it. Good thing I have all the above information to hopefully get me started.


(Brandon Anderson) #108

I’m having some problems with the certificate. I can get a query to run in the web browser, but when I try to bring in the address to excel to use the Odata import, I get this error. Any idea what we are missing?

image


(Bart Elia) #109

Excel requires a higher level of trust than getting a warning in a browser and ‘proceeding unsafely’. If your self signed cert does not get stored in the correct place in the certificate store, Excel complains. There is no Excel version of ‘ignore warning and proceed unsafely’ that I am aware of.


(Brandon Anderson) #110

When I first try it in a new excel sheet, I get this warning. I can view the certificate and install it (using the defaults that it provides), but that doesn’t seem to to anything different. Is there something that needs to be done to the SSL itself to allow this?

image

I’ve been trying to follow these steps as well, with no luck. I can get the cert from the browser but don’t know where to put it (or if it’s even the right one)


(Jose C Gomez) #111

Yeah that was a deal breaker for us, we ended up coding around it with a VSTO plug in for @jgiese.wci (we demoed it a bit at insights earlier this year). Excel is super zealous with security (for a good reason)
There is no known way around it other than having a legit cert that excel trusts. If you are in a domain you could try and push it via GPO and an internal CA , or install the internal self signed cert on each work station but that was also a pain point we couldn’t always get past.


(Brandon Anderson) #112

To take a page out of @Chris_Conn 's book.

I don’t even know what any of those acronyms even mean…


(Jose C Gomez) #113

VSTO is an office add in written in .NET (Think XL Connect)
GPO (Group Policy) is a way to manage your workstations and network from a central location with a set of "Policies"
CA (Certificate Authority, allows you to issue / mint your own trusted certificates within the bounds of your network domain)


(Nick Tu) #114

This is great, but what references did you need to add in order to use SalesOrderTableset and Epicor.SalesOrderSvc2.OrderDtlRow?

Thanks


(Jose C Gomez) #115

You create those using the example I outlined above.


(Nick Tu) #116

Sorry, I must be blind, but I can’t find the example you’re referring to. Would you be a bit more specific, please?

Thanks.


(Bart Elia) #117

@NickTu are you trying to write a C# integration against the REST APIs?

Because the whole point of REST is that you do not HAVE to make dll references against the dotNet assemblies. In fact you cannot in all cases - we have C#, VB, C++, Perl, Php, Go and even Cobol clients talking to this. And many different OS and even devices that don’t have much more than a http stack.

Adding a dll reference to Erp.Contracts.BO.SalesOrder.dll to get the C# type CAN be done in Windows and dotNet but …
CAN you do that? Obviously the list above shows scenarios where it is not a possibility.
Do you WANT to? If those dlls change with a patch or a version change, you need to manually deploy and possibly recompile your integration depending on scenario.

So, a little more context and we can give better options :slight_smile:


(Nick Tu) #118

Thanks for the explanation. I’m just trying to follow the sample code from tkoch (above) where he updates a sales order, but also instantiate and use the SalesOrderTableset object. It does make a lot more sense to not have to reference any dll or WCF service.


(Jose C Gomez) #119

I was referring to the Integration Post where I gave an example of creating a JSON Class from REST


(Nick Tu) #120

Found it. Thanks!


(Bart Elia) #121

That’s the real emphasis I am trying to make. During V8/E9/E10 I worry that we have been doing internal development a certain way and our customization is currently the same way and examples have historically been rather dictatorial - “Do it our way and on Windows”. That’s not what integrators are forced to do. You should have more flexibility in how you consume ERP data and dictate to us what you want and how you want it.

At the same time, I respect that giving no guard rails can be more than a little intimidating and worries about guidance and support … where are you going to get it? Unfortunately that’s kind of the trade off we all face in IT.