0 Replies Latest reply: Dec 13, 2012 1:42 PM by 979840 RSS

    XML Interop Return Code 14 Connection to OneWorld Failed

    979840
      Using this article:

      http://it.toolbox.com/blogs/daniel-at-work/calling-xmlinterop-from-c-via-a-com-object-20923

      I created a C++ com object and a simple C# Console app to call it. I am getting an error:

      <returnCode code = '14'>Connection to OneWorld failed</returnCode>

      I have researched and seen different post but none seem to apply. Here is my C++:

      STDMETHODIMP CXmlinteropClass::jdeXmlRequest(BSTR request, BSTR* response , BSTR host, SHORT port, SHORT timeout)
      {
           CString csReq(request);
           char* cRequest; cRequest = csReq.GetBuffer();
           char* presp = jdeXMLRequest( (unsigned short*)host, port, timeout, (void*)cRequest, 0);
           CComBSTR* foo = new CComBSTR();
           foo->Append(presp);
           *response = foo->Detach();
           jdeFreeXMLResponse(presp);
           
           return S_OK;
      }

      Here is the c# in the console app making the call:

      static void Main(string[] args)
      {
      string response;
      string request = @"<?xml version='1.0' encoding='utf-8'?> <jdeRequest pwd='Apple2' role='*ALL' type='callmethod' user='sduvedi' session='' environment='DV811' sessionidle=''> <callMethodTemplate name='GetAuditInfo' app='AwiIntegrations' /> </jdeRequest>";
      string host = "10.8.66.107";
      short port = 6014;
      short timeout = 10000;
      xmlinterop_comLib.XmlinteropClass foo = new xmlinterop_comLib.XmlinteropClass();
      foo.jdeXmlRequest(request, out response, host, port, timeout);
      Console.WriteLine(response);
      Console.Read();
      }