Hi,
I am working on a flow to use the XSLT Transform element to transform XML coming from a POD Order Site, and pass the order information to our MIS.
I believe I need to use HTTP Request to pass the transformed XML file to our MIS server. I'm not exactly sure how to set that up.
Can anyone shed some light on the settings I should use within the HTTP Request element to take the XML file that comes from the XSLT Transform element and send it to a server address?
thanks so much
Josh
HTTP Request
- magnussandstrom
- Advanced member
- Posts: 420
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: HTTP Request
Hi Josh, I'm guessing that your MIS is communicating by SOAP (since you are mentioning XML)?
Do you have any documentation from your MIS vendor?
In the flow below I'm using Curl to POST a SOAP-call to fetch order data from our MIS (PrintVis).
I have done this by installing Curl on my Switch server and using the app Run Command.
The Command in Run Command App:
I guess that you could also do this with the HTTP request app, but when I built this flow I had som issues with the HTTP request app and found this work-a-round.
Do you have any documentation from your MIS vendor?
In the flow below I'm using Curl to POST a SOAP-call to fetch order data from our MIS (PrintVis).
I have done this by installing Curl on my Switch server and using the app Run Command.
The Command in Run Command App:
Code: Select all
"C:\ProgramData\chocolatey\lib\curl\tools\curl-8.5.0_1-win64-mingw\bin\curl.exe" --ntlm --negotiate --user NAVservice:password --location --request POST "[Job.PrivateData:Key="pv_server"]" --header "SOAPAction: urn:microsoft-dynamics-schemas/codeunit/IntegrationV1:GetPrintVisOrder" --header "Content-Type: application/xml" --data-raw "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:int='urn:microsoft-dynamics-schemas/codeunit/IntegrationV1' xmlns:int1='urn:microsoft-dynamics-nav/xmlports/IntegrationV1'><soapenv:Header/><soapenv:Body><int:GetPrintVisOrderInfo><int:inOrderNoFilter>[Metadata.Text:Path="/field-list/field[tag='Ordernummer']/value",Dataset="Submit",Model="XML"]</int:inOrderNoFilter><int:outOrders></int:outOrders></int:GetPrintVisOrderInfo></soapenv:Body></soapenv:Envelope>" --verbose
Last edited by magnussandstrom on Thu Dec 07, 2023 10:33 pm, edited 6 times in total.
Re: HTTP Request
Documentation is limited from our MIS. All I really have is a sample XML file that shows me how to name elements in the XML in order to properly flow in the corresponding fields in our MIS. Of course, the XML coming out of our Web2Print order sites, do not perfectly match how the MIS wants the XML so not everything flows correctly. Neither side (web2print site software, or MIS) have the capability for us to apply a style sheet to the XML, so I've written it myself and need to transform the XML before it gets to the MIS.
So overall my goal is:
- An order is placed on a Web2Print Order Site by one of our customers.
- XML is sent to a directory on our Switch Server which is picked up by the XSLT Tranform flow I'm creating.
- Transformed XML file is then sent to a server address provided by our MIS which creates a work order for us.
Does that make sense, or am I doing a poor job at explaining my situation?
So overall my goal is:
- An order is placed on a Web2Print Order Site by one of our customers.
- XML is sent to a directory on our Switch Server which is picked up by the XSLT Tranform flow I'm creating.
- Transformed XML file is then sent to a server address provided by our MIS which creates a work order for us.
Does that make sense, or am I doing a poor job at explaining my situation?
- magnussandstrom
- Advanced member
- Posts: 420
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: HTTP Request
I think I understand what you are trying to do.. What does this "server address" look like and what is the intended way of sending the XML?
Re: HTTP Request
server is like this: https://hh.ppath.com/Planweb/xmllistener.aspx
It was suggested to me that I could use HTTP Request to put or post the file there.
I'm not certain if that's the best or even possible solution for this, but I suppose the avenue I'm attempting first.
It was suggested to me that I could use HTTP Request to put or post the file there.
I'm not certain if that's the best or even possible solution for this, but I suppose the avenue I'm attempting first.
- magnussandstrom
- Advanced member
- Posts: 420
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: HTTP Request
Could you provide the name of the MIS and the example XML?
Last edited by magnussandstrom on Thu Dec 07, 2023 10:30 pm, edited 1 time in total.
Re: HTTP Request
Absolutely.
MIS is Printers Plan
Here is sample XML: https://printreach.com/printersplan/Pla ... mplate.xml
MIS is Printers Plan
Here is sample XML: https://printreach.com/printersplan/Pla ... mplate.xml
- magnussandstrom
- Advanced member
- Posts: 420
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: HTTP Request
Maybe you could try this:
In Attached file you choose Single-line text with variables: [Job.Path]
This way you will POST the XML-file by http as is.
In Attached file you choose Single-line text with variables: [Job.Path]
This way you will POST the XML-file by http as is.
Last edited by magnussandstrom on Tue Mar 26, 2024 3:14 pm, edited 1 time in total.
Re: HTTP Request
We're in business. I think I tried that before but was missing the brackets. thanks so much!
- magnussandstrom
- Advanced member
- Posts: 420
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact: