I am working with an ecommerce site that is written in Java (jsp) (2 pages in question).
We currently have a page with a form that submits the order. Once it is sent, our server sends out an invoice email to the customer. We started using email vision a couple months ago, and my boss wanted me to use their mailing server API. Basically he is wanting (in real time), for the complete order button to be clicked and then using SOAP, send the data to emailvision who will send out the invoice for us.
I have never used an api before (or soap for that matter), and am very confused on how I am supposed to use the trigger in conjunction with the .jsp page.
You have 2 general approaches, and in both cases you need to consume a SOAP service. Consuming SOAP services is an orthogonal concern to the fact that it happens to be in a web-sever. So that is one specific question you can ask: How to consume a SOAP service in Java.
As far as web-tier and jsp in particular, you can either execute the call to consume the SOAP service in the page, or, you could allow for that action to occur somewhere in the request processing chain, by a post-action filter.
If you only need to make this call in one place then it is perfectly fine to just include it in your JSP code.
Next step up (in abstraction and reuse), you can make a custom JSP tag e.g.
Alternatively, you can use a Filter in the request process to send the message given certain conditions in the request context (e.g. stick a flag in the context to ‘send-mail’ or not.)