I am working on an integration between our clients MIVA based e-commerce site and their ERP system. I am attempting to make a web service call from a custom module to our web service to pass the customer order to the ERP. However this is not working and I am getting different errors depending upon the METHOD of call that I specify. I have tried all of the types but I can not get it to connect. Can you please tell me what I am doing wrong.
I am including the module code. At this point the XML is hard coded and my plan is to build up the xml from the customer order data once I have the communication part working.
Thank you!!!!
Steve
<MIVA STANDARDOUTPUTLEVEL = "" IDENT = "$Id: templateorderemails.mv 65726 2017-11-08 23:35:50Z burch $">
<MvCOMMENT>
</MvCOMMENT>
<MvFUNCTION NAME = "Module_Description" PARAMETERS = "module var" STANDARDOUTPUTLEVEL = "">
<MvASSIGN NAME = "l.module:code" VALUE = "VisualERP Interface">
<MvASSIGN NAME = "l.module:name" VALUE = "TVisualERP Interface">
<MvASSIGN NAME = "l.module:provider" VALUE = "Steve Whyte - Visual South">
<MvASSIGN NAME = "l.module:version" VALUE = "9.0009">
<MvASSIGN NAME = "l.module:api_ver" VALUE = "9.065">
<MvASSIGN NAME = "l.module:description" VALUE = "This Module sends orders to a Web API for Visual Manufacturing">
<MvASSIGN NAME = "l.module:features" VALUE = "fulfill">
</MvFUNCTION>
<MvCOMMENT>
|
| Store-level Module Data Support Feature (data_store)
|
</MvCOMMENT>
<MvFUNCTION NAME = "Module_Install_Store" PARAMETERS = "module var" STANDARDOUTPUTLEVEL = "" ERROROUTPUTLEVEL = "">
<MvFUNCTIONRETURN VALUE = 1>
</MvFUNCTION>
<MvFUNCTION NAME = "FulfillmentModule_ProcessOrder" PARAMETERS = "module var, order var" STANDARDOUTPUTLEVEL = "">
<MvASSIGN NAME="l.body" VALUE="{'<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.datacontract.org/2004/07/SaleClassLibrary" xmlns:ns2="http://tempuri.org/">
<SOAP-ENV:Body>
<ns2:CreateOrder>
<ns2:obj>
<ns1:Desired_Ship_Date>11/22/2018</ns1:Desired_Ship_Date>
<ns1:Notes>TEST</ns1:Notes>
<ns1:OrderID>TESTyyy2</ns1:OrderID>
<ns1:OrderLines>
<ns1:OrderLine>
<ns1:Line_No>1</ns1:Line_No>
<ns1:Order_ID>TESTyyy2</ns1:Order_ID>
<ns1:Part_ID>10DC00WG</ns1:Part_ID>
<ns1:Qty>2</ns1:Qty>
<ns1:Service_ID> </ns1:Service_ID>
<ns1:Unit_Price>10.99</ns1:Unit_Price>
</ns1:OrderLine>
</ns1:OrderLines>
<ns1:PO>TEST123</ns1:PO>
<ns1:Ship_Via>TEST</ns1:Ship_Via>
<ns1:auth>
<ns1:Password>Pass1234</ns1:Password>
<ns1:UserName>User1234</ns1:UserName>
</ns1:auth>
<ns1:customer>
<ns1:Address>?</ns1:Address>
<ns1:Bill_to_Address>?</ns1:Bill_to_Address>
<ns1:Bill_to_City>?</ns1:Bill_to_City>
<ns1:Bill_to_Country>?</ns1:Bill_to_Country>
<ns1:Bill_to_Name>?</ns1:Bill_to_Name>
<ns1:Bill_to_State>?</ns1:Bill_to_State>
<ns1:Bill_to_ZipCode>?</ns1:Bill_to_ZipCode>
<ns1:City>?</ns1:City>
<ns1:Country>?</ns1:Country>
<ns1:CustomerID>13599</ns1:CustomerID>
<ns1:CustomerName>?</ns1:CustomerName>
<ns1:EmailId>?</ns1:EmailId>
<ns1:First_Name>?</ns1:First_Name>
<ns1:Last_Name>?</ns1:Last_Name>
<ns1:Phone>?</ns1:Phone>
<ns1:State>?</ns1:State>
<ns1:ZipCode>?</ns1:ZipCode>
</ns1:customer>
</ns2:obj>
</ns2:CreateOrder>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>'}">
<MvCALL ACTION="{'http://xxx.xxx.xxx.xxx:8080/02-SaleServiceHost/SaleService.svc'}"
METHOD="RAW" FIELDS="{l.body}"
HEADERS="Content-type:application/soap+xml">
<MvEVAL EXPR = "{s.callvalue}">
</MvCALL>
<MvFUNCTIONRETURN VALUE = 1>
</MvFUNCTION>
I am including the module code. At this point the XML is hard coded and my plan is to build up the xml from the customer order data once I have the communication part working.
Thank you!!!!
Steve
<MIVA STANDARDOUTPUTLEVEL = "" IDENT = "$Id: templateorderemails.mv 65726 2017-11-08 23:35:50Z burch $">
<MvCOMMENT>
</MvCOMMENT>
<MvFUNCTION NAME = "Module_Description" PARAMETERS = "module var" STANDARDOUTPUTLEVEL = "">
<MvASSIGN NAME = "l.module:code" VALUE = "VisualERP Interface">
<MvASSIGN NAME = "l.module:name" VALUE = "TVisualERP Interface">
<MvASSIGN NAME = "l.module:provider" VALUE = "Steve Whyte - Visual South">
<MvASSIGN NAME = "l.module:version" VALUE = "9.0009">
<MvASSIGN NAME = "l.module:api_ver" VALUE = "9.065">
<MvASSIGN NAME = "l.module:description" VALUE = "This Module sends orders to a Web API for Visual Manufacturing">
<MvASSIGN NAME = "l.module:features" VALUE = "fulfill">
</MvFUNCTION>
<MvCOMMENT>
|
| Store-level Module Data Support Feature (data_store)
|
</MvCOMMENT>
<MvFUNCTION NAME = "Module_Install_Store" PARAMETERS = "module var" STANDARDOUTPUTLEVEL = "" ERROROUTPUTLEVEL = "">
<MvFUNCTIONRETURN VALUE = 1>
</MvFUNCTION>
<MvFUNCTION NAME = "FulfillmentModule_ProcessOrder" PARAMETERS = "module var, order var" STANDARDOUTPUTLEVEL = "">
<MvASSIGN NAME="l.body" VALUE="{'<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.datacontract.org/2004/07/SaleClassLibrary" xmlns:ns2="http://tempuri.org/">
<SOAP-ENV:Body>
<ns2:CreateOrder>
<ns2:obj>
<ns1:Desired_Ship_Date>11/22/2018</ns1:Desired_Ship_Date>
<ns1:Notes>TEST</ns1:Notes>
<ns1:OrderID>TESTyyy2</ns1:OrderID>
<ns1:OrderLines>
<ns1:OrderLine>
<ns1:Line_No>1</ns1:Line_No>
<ns1:Order_ID>TESTyyy2</ns1:Order_ID>
<ns1:Part_ID>10DC00WG</ns1:Part_ID>
<ns1:Qty>2</ns1:Qty>
<ns1:Service_ID> </ns1:Service_ID>
<ns1:Unit_Price>10.99</ns1:Unit_Price>
</ns1:OrderLine>
</ns1:OrderLines>
<ns1:PO>TEST123</ns1:PO>
<ns1:Ship_Via>TEST</ns1:Ship_Via>
<ns1:auth>
<ns1:Password>Pass1234</ns1:Password>
<ns1:UserName>User1234</ns1:UserName>
</ns1:auth>
<ns1:customer>
<ns1:Address>?</ns1:Address>
<ns1:Bill_to_Address>?</ns1:Bill_to_Address>
<ns1:Bill_to_City>?</ns1:Bill_to_City>
<ns1:Bill_to_Country>?</ns1:Bill_to_Country>
<ns1:Bill_to_Name>?</ns1:Bill_to_Name>
<ns1:Bill_to_State>?</ns1:Bill_to_State>
<ns1:Bill_to_ZipCode>?</ns1:Bill_to_ZipCode>
<ns1:City>?</ns1:City>
<ns1:Country>?</ns1:Country>
<ns1:CustomerID>13599</ns1:CustomerID>
<ns1:CustomerName>?</ns1:CustomerName>
<ns1:EmailId>?</ns1:EmailId>
<ns1:First_Name>?</ns1:First_Name>
<ns1:Last_Name>?</ns1:Last_Name>
<ns1:Phone>?</ns1:Phone>
<ns1:State>?</ns1:State>
<ns1:ZipCode>?</ns1:ZipCode>
</ns1:customer>
</ns2:obj>
</ns2:CreateOrder>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>'}">
<MvCALL ACTION="{'http://xxx.xxx.xxx.xxx:8080/02-SaleServiceHost/SaleService.svc'}"
METHOD="RAW" FIELDS="{l.body}"
HEADERS="Content-type:application/soap+xml">
<MvEVAL EXPR = "{s.callvalue}">
</MvCALL>
<MvFUNCTIONRETURN VALUE = 1>
</MvFUNCTION>
Comment