QuickBooks Web Connector - Не удается найти ответ SOAP - PullRequest
0 голосов
/ 26 февраля 2020

Я пытаюсь создать сервер SOAP для взаимодействия с QuickBooks Web Connector, но не могу найти примеров того, каким должен быть ответ SOAP на его запрос к authenticate.

Как мы реагируем на это?

Я пытался найти способ ответить на это действие, но нет документа или примера.

{'soapaction': '"http://developer.intuit.com/authenticate"', 'host': 'api:3000', 'user-agent': 'Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.42000)', 'content-type': 'text/xml; charset=utf-8', 'cookie': None, 'content-length': '382', 'ssl-client-verify': 'NONE', 'x-forwarded-for': '12.34.567.89', 'x-real-ip': '12.34.567.89', 'anvil-host': 'Jeremiah.QB.app'}

1 Ответ

0 голосов
/ 27 февраля 2020

WSDL

Вы можете найти WSDL для этой услуги по ссылке ниже, которая может помочь вам в разработке:

Пример SOAP запрос

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
 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:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
        <authenticate xmlns="http://developer.intuit.com/">
            <strUserName xsi:type="xsd:string">username</strUserName>
            <strPassword xsi:type="xsd:string">password</strPassword>
        </authenticate>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Пример SOAP ответ для VALID логин

HTTP/1.1 200 OK
Date: Sat, 02 May 2009 17:45:48 GMT
Server: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7l DAV/2 PHP/5.2.9
X-Powered-By: PHP/5.2.9
Content-Length: 416
Connection: close
Content-Type: text/xml

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://developer.intuit.com/">
    <SOAP-ENV:Body>
        <ns1:authenticateResponse>
            <ns1:authenticateResult>
                <ns1:string>15c9ce293bd3f41b761c21635b14fa06</ns1:string>
                <ns1:string></ns1:string>
            </ns1:authenticateResult>
        </ns1:authenticateResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Пример SOAP ответ для НЕВЕРНОГО логин

HTTP/1.1 200 OK
Date: Sat, 02 May 2009 17:43:09 GMT
Server: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7l DAV/2 PHP/5.2.9
X-Powered-By: PHP/5.2.9
Content-Length: 387
Connection: close
Content-Type: text/xml

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://developer.intuit.com/">
    <SOAP-ENV:Body>
        <ns1:authenticateResponse>
            <ns1:authenticateResult>
                <ns1:string></ns1:string>
                <ns1:string>nvu</ns1:string>
            </ns1:authenticateResult>
        </ns1:authenticateResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Источник:

...