Я пытаюсь позвонить в веб-службу с помощью wadl-файла.Я использую инструмент soapUI для создания wadl-файла, который включает в себя только один объект Authorization, с которым связано тело.когда я импортирую свой файл wadl из soapUI, я не получаю содержимое тела, отображаемое в файле wadl. Проблема заключается в том, что я должен передать тело json для объекта Authorization.Любая помощь будет присвоена.
У меня ограниченные знания файлов xml и wadl, так как они для меня новые.
Это пример, который я получаю из SoapUI
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://wadl.dev.java.net/2009/02">
<doc xml:lang="en" title="https://login.google.com"/>
<grammars>
<xs:schema attributeFormDefault="unqualified"
elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Output">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="apiVersion"/>
<xs:element type="xs:string" name="columnDelimiter"/>
<xs:element type="xs:string" name="concurrencyMode"/>
<xs:element type="xs:string" name="contentType"/>
<xs:element type="xs:string" name="contentUrl"/>
<xs:element type="xs:string" name="createdById"/>
<xs:element type="xs:string" name="createdDate"/>
<xs:element type="xs:string" name="externalIdFieldName"/>
<xs:element type="xs:string" name="id"/>
<xs:element type="xs:string" name="lineEnding"/>
<xs:element type="xs:string" name="object"/>
<xs:element type="xs:string" name="operation"/>
<xs:element type="xs:string" name="state"/>
<xs:element type="xs:string" name="systemModstamp"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</grammars>
<resources base="https://login.google.com">
<resource path="content/objects" id="Ingest">
<doc xml:lang="en" title="jobs/ingest"/>
<param name="Authorization" type="xs:string" required="true" default="" style="header" xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
<method name="POST" id="jobid">
<doc xml:lang="en" title="1"/>
<request>
<representation mediaType="application/json"/>
</request>
<response status="200">
<representation mediaType="text/html; charset=UTF-8"/>
<representation mediaType="application/json;charset=UTF-8" element="Output" xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
</response>
</method>
</resource>
</resources>
</application>
Это мой контент тела json в SoapUI
{
"operation" : "upsert",
"object" : "Customer_Promise_date__c",
"externalIdFieldName": "External_ID__c",
"contentType" : "CSV",
"lineEnding" : "CRLF",
"columnDelimiter" : "COMMA"
}
Это схема json
{"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://example.com/root.json",
"type": "object",
"title": "The Root Schema",
"required": [
"operation",
"object",
"externalIdFieldName",
"contentType",
"lineEnding",
"columnDelimiter"], "properties": {
"operation": {
"$id": "#/properties/operation",
"type": "string",
"title": "The Operation Schema",
"default": "",
"examples": [
"upsert"
],
"pattern": "^(.*)$"
},
"object": {
"$id": "#/properties/object",
"type": "string",
"title": "The Object Schema",
"default": "",
"examples": [
"Customer_Promise_date__c"
],
"pattern": "^(.*)$"
},
"externalIdFieldName": {
"$id": "#/properties/externalIdFieldName",
"type": "string",
"title": "The Externalidfieldname Schema",
"default": "",
"examples": [
"External_ID__c"
],
"pattern": "^(.*)$"
},
"contentType": {
"$id": "#/properties/contentType",
"type": "string",
"title": "The Contenttype Schema",
"default": "",
"examples": [
"CSV"
],
"pattern": "^(.*)$"
},
"lineEnding": {
"$id": "#/properties/lineEnding",
"type": "string",
"title": "The Lineending Schema",
"default": "",
"examples": [
"CRLF"
],
"pattern": "^(.*)$"
},
"columnDelimiter": {
"$id": "#/properties/columnDelimiter",
"type": "string",
"title": "The Columndelimiter Schema",
"default": "",
"examples": [
"COMMA"
],
"pattern": "^(.*)$"
}}}
Теперь мне нужно включить эту схему json в качестве тела для объекта авторизации.
Я получаю эту ошибку
Ошибка HTTP 400 Ошибка неверного запроса Код ошибки: ошибка API, сообщение: тело HTTP требуется, но у запроса нет тела объекта