使用webmethods的POST请求

时间:2018-06-13 09:29:07

标签: rest middleware esb webmethods

我正在使用webmethods平台10.1,我开发了一个服务,应该以Post请求的形式接收数据。 当我尝试在IDE上运行它时工作正常,但是当我发布它并尝试通过API门户访问它时,它不起作用。 我不知道如何将我的JSON映射到我的文档。有人可以在这方面指导我吗?

我附上了我的文档屏幕截图以及我想要发布的json。 任何人都可以解释两者是如何不相关的,因为当我将以下JSON发布到我的服务时,我没有得到这些值。

enter image description here

enter image description here

   {
        "EventCompanyId": "443",
        "PositionTitleEn": "New post",
        "PositionTitleAr": "New post",
        "ReportsTo": "Manager",
        "KnowledgeRequiredEn": "Basic knowlege",
        "KnowledgeRequiredAr": "Basic knowledge",
        "ExperienceRequired": "7 years",
        "Gender": "1",
        "EducationLevel": "4",
        "CreatedBy": "1",
        "UpdatedBy": "1",
        "StartSalary": "35000",
        "EndSalary": "35000",
        "Status": "0",
        "Certificate": "BS",
        "YearsOfExperience": "7",
        "Major": "5",
        "Age": "30",
        "JobType": "1",
        "TrainingCourse": "",
        "Weekdays": "",
        "WorkingHours": "",
        "Language": "1",
        "Shift": "",
        "JobLocations": [
            {
                "EmiratesId": 3,
                "NumberOfVacancies": 3,
                "EmiratesArea": "United Arab Emirates",
                "Latitude": ,
                "Longitude": ,
                "EmirateEn": null,
                "EmirateAr": null,
                "EmirateName": null
            },
            {
                "EmiratesId": 6,
                "NumberOfVacancies": 23,
                "EmiratesArea": " Dubai - United Arab Emirates",
                "Latitude": 25.20447520001559,
                "Longitude": 55.28122901916504,
                "EmirateEn": null,
                "EmirateAr": null,
                "EmirateName": null
            },
            {
                "EmiratesId": 1,
                "NumberOfVacancies": 5,
                "EmiratesArea": "Dubai - United Arab Emirates",
                "Latitude": ,
                "Longitude": ,
                "EmirateEn": null,
                "EmirateAr": null,
                "EmirateName": null
            },
            {
                "EmiratesId": 2,
                "NumberOfVacancies": 3,
                "EmiratesArea": "D72 - Dubai - United Arab Emirates",
                "Latitude": ,
                "Longitude": ,
                "EmirateEn": null,
                "EmirateAr": null,
                "EmirateName": null
            }
        ]
    }

1 个答案:

答案 0 :(得分:0)

我找到了一个解决方案,问题是我需要从Job Document下删除Job Properties,它们不应该在任何其他属性中。