Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Ограничений на уникальность наименования нет.

Примеры вызова

Пример 1: REST. Компания успешно создана

Запрос:

Code Block
languagejava
{
  "company_name": "Алкоголики и тунеядцы",
  "company_type": "ООО",
  "company_users": ["test_anna@gmail.com", "mrak20@list.ru"],
  "email_owner": "aa+1@mail.com"
} 

...

Code Block
languagejava
{
    "type": "success",
    "id_company": 63,
    "company": {
        "name": "Алкоголики и тунеядцы",
        "type": "ООО",
        "inn": "",
        "ogrn": "",
        "kpp": "",
        "phone": "",
        "adress": "",
        "users": [
            "test_anna@gmail.com",
            "mrak20@list.ru"
        ]
    }
}

Пример 2: SOAP. Компания успешно создана

Запрос:

Code Block
languagejava
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wrap="http://foo.bar/wrappersoapserver" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
   <soapenv:Header/>
   <soapenv:Body>
      <wrap:CreateCompany>
         <company_name>Тестовая компания</company_name>
         <company_type>ООО</company_type>
         <email_owner>manager@mail.ru</email_owner>
           <company_users soapenc:arrayType="xsd:array[]">
         			<item>test_cu_11@mail.com</item>
         			<item>test_dev@mail.com</item>
         			<item>ivan@noibiz.com</item>
		</company_users>
      </wrap:CreateCompany>
   </soapenv:Body>
</soapenv:Envelope>

Ответ:

Code Block
languagejava
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://users.bugred.ru/tasks/soap/WrapperSoapServer.php" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
      <ns1:CreateCompanyResponse>
         <return xsi:type="SOAP-ENC:Struct">
            <id_company xsi:type="xsd:int">38</id_company>
            <message xsi:type="xsd:string">Компания успешно создана!</message>
            <name xsi:type="xsd:string"/>
            <type xsi:type="xsd:string"/>
            <inn xsi:type="xsd:string"/>
            <ogrn xsi:type="xsd:string"/>
            <kpp xsi:type="xsd:string"/>
            <phone xsi:type="xsd:string"/>
            <adress xsi:type="xsd:string"/>
            <users SOAP-ENC:arrayType="xsd:string[3]" xsi:type="SOAP-ENC:Array">
               <item xsi:type="xsd:string">test_cu_11@mail.com</item>
               <item xsi:type="xsd:string">test_dev@mail.com</item>
               <item xsi:type="xsd:string">ivan@noibiz.com</item>
            </users>
         </return>
      </ns1:CreateCompanyResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>