alexjavarotti
7 years agoNew Contributor
SoapUI response data does not contain date and time values
During some tests with SoapUI, a program in C# sends the requesting to the Mock Service. The requesting message contains a set of data elements that can be found in the 'Last Request' content in the 'Mock Response Editor'. However, only the data elements that represent Date and Time are not found. The 'Validate' command gives the information that everything is correct.
The program in C# is very simple. The 'Body' contains the data elements, including the Date and Time data elements:
MaintenanceNoteRequest request = new MaintenanceNoteRequest(); request.Header = new MaintenanceNoteRequestHeader(); request.Body = new MaintenanceNoteRequestBody(); request.Header.GlobalID = "99999"; request.Header.MessageID = "000001"; request.Body.NotificationType = "1"; request.Body.MaintenancePlanningPlant = "Plant1"; request.Body.Priority = "0"; request.Body.ReportedBy = "Javarotti"; request.Body.ShortText = "Short text from VS"; request.Body.LongText = "Long text from VS"; request.Body.DateTimeStartMalfunction = System.DateTime.Now; request.Body.DateTimeEndMalfunction = System.DateTime.Now; SERV_MaintenanceNoteserviceagent agent = new SERV_MaintenanceNoteserviceagent(); MaintenanceNoteResponse response = agent.OPER_MaintenanceNoteService(request); ResponseTextBox.Text = response.Success.MaintenanceNoteNumber;
However, the last request is the following:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <MaintenanceNoteRequest xmlns="http://www.vale.com/MI/20120005/01/SCHM_MaintenanceNote"> <Header> <MessageID>000001</MessageID> <GlobalID>99999</GlobalID> </Header> <Body> <NotificationType>1</NotificationType> <MaintenancePlanningPlant>Plant1</MaintenancePlanningPlant> <ShortText>Short text from VS</ShortText> <LongText>Long text from VS</LongText> <Priority>0</Priority> <ReportedBy>Javarotti</ReportedBy> </Body> </MaintenanceNoteRequest> </soap:Body> </soap:Envelope>
Would anyone have a suggestion about what is wrong?