Hope you find this sample useful
We are using this to create a work order by calling a NER
'****************************************************************************
'*
'* Copyright (c) J.D. Edwards World Solutions Company, 2003
'*
'* This unpublished material is proprietary to J.D. Edwards World Solutions
'* Company. All rights reserved. The methods and techniques described
'* herein are considered trade secrets and/or confidential. Reproduction
'* or distribution, in whole or in part, is forbidden except by express
'* written permission of J.D. Edwards World Solutions Company.
'*
'****************************************************************************
'* Source File: TestConnection
'* Description: <Generic...>
'* Author: Kalyan Chakravarthy
'* Date Created: 09/22/2005
'****************************************************************************
' Revisions:
'****************************************************************************
'Option Explicit
Const OW_USER_ID = "YENUGANK"
Const OW_PASSWORD = ""
Const OW_ENVIRONMENT = "DV811"
Const OW_PORT = ""
Const OW_HOST_NAME = "hosts"
Const OW_CONNECTION_TIMEOUT = 10
Const OW_SESSION_TIMEOUT = 2000
' Test with XML
MsgBox GetXMLResponse()
' Test with AOC Integration object
'MsgBox AOCUtility.IsObject(GetOWConnection())
'******************************************************************************************
'*** Test the OWXMLInterop.dll object directly without using ERPIntegration.dll objects ***
'******************************************************************************************
Function GetXMLResponse()
'Create XML string to send to XMLInterop object.
strXML = "<jdeRequest pwd='" & OW_PASSWORD & "' type='callMethod' user='" & OW_USER_ID & "' session='' environment='" & OW_ENVIRONMENT & "' sessionidle='" & OW_SESSION_TIMEOUT & "' role='*ALL'>"
strXML = strXML & "<callMethod name='CallX4801WorkOrderMBF' app='ConfigServices' runOnError='yes'><params/></callMethod>"
strXML = strXML & "<param name='szBusinessUnit'> 10010</param>"
strXML = strXML & "<param name='szBranchPlant'> 10010</param>"
strXML = strXML & "<param name='szWODescription'> Test1 </param>"
strXML = strXML & "<param name='cBillOfMetrialChange'>Y</param>"
strXML = strXML & "<param name='cNewPartNumberRequired'>Y</param>"
strXML = strXML & "<param name='mnOriginator'>100</param>"
strXML = strXML & "<param name='cWOType'>1</param>"
strXML = strXML & "<param name='cWOPriority'>1</param>
strXML = strXML & "<param name='mnAssignedToNumber'>100</param>
strXML = strXML & "</jdeRequest>"
'Send the XML using XMLInterop only.
Set objXMLInterop = CreateObject( "JDE.AOC.XMLInterop.XMLInterop.1" )
strResponse = objXMLInterop.owRequest( OW_HOST_NAME, OW_PORT, OW_CONNECTION_TIMEOUT, strXML )
GetXMLResponse = strResponse
End Function
'******************************************************************************************
' Test to connect with the AOC OW Integration objects
'******************************************************************************************
Function GetOWConnection()
SET OWConnection = CreateObject("Premisys.Customworks.OneWorldConnection")
OWConnection.ServiceURL = "" '<--must be blank for non-CIS
OWConnection.UserID = OW_USER_ID
OWConnection.Password = OW_PASSWORD
OWConnection.Environment = OW_ENVIRONMENT
OWConnection.Port = OW_PORT
OWConnection.HostName = OW_HOST_NAME
OWConnection.ConnectionTimeout = OW_CONNECTION_TIMEOUT
OWConnection.SessionIdle = OW_SESSION_TIMEOUT
OWConnection.Connect()
Set GetOWConnection = OWConnection
End Function
Kalyan
E1/8.11/Oracle/Citrix