No announcement yet.

Outbound XML to localhost? Usage of WMServlet?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Outbound XML to localhost? Usage of WMServlet?

    We are trying to setup an outbound transmission of a Order Release from an OTM 5.5 CU4 installation and would like to drop the XML on the local file system on the Application Server.
    The External System setup we normally use has the URL of the OTM Tomcat Web Server:
    http://<OTM_Web_RootURL>/GC3/ (additional parameters omitted)
    This then does an FTP to where you want the file to go.
    The question - Is there a simple way to drop the XML on the localhost file system like this?:
    http://<OTM_App_Server_Name>:<port>/...lSystemServlet (...)
    And FTP from the Application server to the Application server, or even better just drop the file on the localhost.
    Also a related question - Can the WMServlet be used for outbound XML transmissions?
    Any examples of what the URL would look like in the External System configuration would be greatly appreciated.

  • #2
    Re: Outbound XML to localhost? Usage of WMServlet?

    Hi mkenney,
    we have doen the outbound transmission by sending the planned shipment to a dump file using BPEL.For this we use BPEL to extract the data from the s=database whenever a new filed is entered and it puts that data in to desired location.
    You can try this if you want.


    • #3
      Re: Outbound XML to localhost? Usage of WMServlet?

      The easiest way to get the file dumped to localhost is to either setup an FTP server on localhost to accept the outbound connection from OTM and drop the file to local disk, or to utilize the Python scripts (located under $OTM_HOME/utils/integration/python/) to do the same. As banerjeemnmims noted, using BPEL to dump to file is also an option, though requires more overhead.

      As for outbound from WMServlet, no - this servlet is intended for inbound integration only.



      • #4
        Outbound XML to localhost? Usage of WMServlet?

        Thanks to both of you for the input on this issue. I think the options you propose are probably viable though we have gone a different direction.

        We have found that when using the ExternalSystemServlet as specified in the Help Documentation for an HTTP type External System XML outbound communication, we run into a problem in the Oracle code. This is the error from the Tomcat logs oin the OTM Web Server:
        --- <Transmission xmlns="http:\\apps\otm">[Remainder of XML Text Omitted]<\Transmission>
        (The system cannot find the path specified)
        at Method)
        at<init>(FileInputStream.jav a:106)
        at<init>(FileInputStream.jav a:66)
        at glog.util.ftp.client.FTPClientFactory.putFile(FTPC
        at glog.util.ftp.FTPClientWrapper.putString(FTPClient
        at glog.integration.servlet.ExternalSystemHelper.proc ess(
        at glog.integration.servlet.ExternalSystemServlet.doP ost(
        As you can see the ExternalSystemHelper.process method makes a call to the FTPClientFactory.putFile method with the sixth parameter being a String with the XML text, not a path to an XML file. This gets passed through to the FTPClientFactory which tries to construct a FileInputStream, but the localFileName parameter has the XML text instead of a file name which results in the IO problem:

        ftpClient.putFile(remoteFileName, new FileInputStream(localFileName));

        The end result is that an FTP session is established, changing to binary etc., but failing with this exception when trying to execute the PUT command. It is possible that there is some change in parameters or setup of a property file that would get this working, but as I mentioned we have gone a different direction.

        I created a simple Servlet class that will handle a post, and drop a file in the folder you specify. It does not use the Web Server or FTP, but instead keeps everything on the Application server which radically simplifies the process. Otherwise it is configured as an External System the same way and works great.

        I've included the source (attached) which contains additional configuration instructions. Consider it Open Source.


        Matt Kenney
        Attached Files