Coldfusion读取XML HTTP而无需扩展

时间:2015-12-31 21:08:09

标签: java xml coldfusion cfml lucee

我不知道自己做错了什么,我以为我会像网络服务一样打电话但不行。

任务:从网络服务器端口读取XML内容:80756。当我在浏览器输出中点击此网址(http://192.168.22.80:80756)时。

#include <iostream>
#include <cmath>
using namespace std;

const int BUSY=1;
const int IDLE=0;

int  
    choice,
    WL,                           
    SS;                    

double
    MX,
    IT,
    ST,
    TM,
    AT,
    DT,
    TypeOfEvent,
    NextServiceTime,
    ProgressAT’
    ProgressDT;


void  initialize();
void  Timing();
void  Arrival();
void  Departure();
float expon(float mean);

int main() 
{   
    initialize();  
    do
    {
        cout<<"Enter your Policy: ";
        cin>>choice;
    }
    while(choice>2||choice<1);

    cout<<"'End of Simulation’ Time: "<<MX<<endll;

    while(true)
    {      Timing();   //To Determine The Next Event

            if(TM>MX)
                 break;

            switch (int(TypeOfEvent))
            {  case 1:
                    Arrival();
                    break;

            case 2:
                    Departure();
                    break;
            }
    }
    return 0;    
}

void initialize() 
{   IT=1.0;
        ST=0.5;
        TM = 0.0;
        SS = IDLE;
        WL= 0;
        AT= TM + expon(IT);              //Arriving
        NextServiceTime = expon(ST);
        DT= 1.0e+10;                        // Guaranteeing that the first event is arriving
        ProgressAT=0.0;
        ProgressDT = 0.0;
}

void Timing() 
{   
    TypeOfEvent = 0;

    if(AT < DT)
    {  
        TypeOfEvent = 1;
        TM=AT;
    }

    else
    {  
        TypeOfEvent = 2;
        TM= DT;
    }

    if (TypeOfEvent == 0)
    {
        cout<<"System Idle "<<TM;
        exit(1);
    }      
}

void Arrival() 
{
    if (SS == BUSY)
    {
        ++WL;
        ServiceTime[WL] = NextServiceTime;
    }

    else
    {
        SS = IDLE;
        DT = TM + NextServiceTime;
    }

    AT = TM + expon(IT);
    NextServiceTime = expon(ST);
}

void Departure()
{
    if (WL == 0)
    {
            SS= IDLE;
            DT = 9999;
    }
    else
    {       
        if(choice==2)
        {
            DT= TM + NextServiceTime;
        }
        --WL;  
    }    
}

Coldfusion代码:

<NTMonitorDoc>
<SMTPAddr>0.0.0.0</SMTPAddr>
<LineErrors>0</LineErrors>
<LogErrorsCount>0</LogErrorsCount>
<PopupErrorsCount>0</PopupErrorsCount>
<IsDTSProcRunning>1</IsDTSProcRunning>
<IsDTSMailProcRunning>0</IsDTSMailProcRunning>
<IsInboundProcRunning>0</IsInboundProcRunning>
<CTFTOErrorCount>0</CTFTOErrorCount>
</NTMonitorDoc>

Coldfusion OUTPUT

1 个答案:

答案 0 :(得分:1)

这是lucee的许可问题。