QuickBooks Web Connector - Can't find SOAP response - soap

I'm trying to build a SOAP server to interact with the QuickBooks Web Connector, but can't find any examples of what the SOAP response to it's request to authenticate should be.
How do we respond to this?
I tried to find a way to response this action, but there is no document or example.
{'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'}

WSDL
You can find a WSDL for this service at the link below, which may help you develop:
https://test.developer.intuit.com/QBWC/TroubleshootWebServiceFS/Service.asmx?wsdl
Example SOAP request
<?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>
Example SOAP response for a VALID login
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>
Example SOAP response for an INVALID login
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>
Source:
authenticate: http://wiki.consolibyte.com/wiki/doku.php/quickbooks_web_connector_soap_authenticate
all of the other Web Connector SOAP methods: http://wiki.consolibyte.com/wiki/doku.php/quickbooks_web_connector#array_authenticate_string_strusername_string_strpassword

Related

Fiddler doesn't capture SOAP Action

How do we find the SOAP action in fiddler:-
I captured the text view of the request. It doesn't show the request SOAP action:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><a:Security soap:mustUnderstand="1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:a="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><a:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><a:Username>LP_DEALIO#SERVICES</a:Username><a:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Abc.1234</a:Password></a:UsernameToken></a:Security></s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Get__CompIntfc__LP_PC_PROJECT_GEN xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/M676402.V1"><BUSINESS_UNIT>US001</BUSINESS_UNIT><PROJECT_ID>LM202017</PROJECT_ID></Get__CompIntfc__LP_PC_PROJECT_GEN></s:Body></s:Envelope>
The SOAP Action is found in the Headers Section in Fiddler. Something like this:-
POST /PSIGW/PeopleSoftServiceListeningConnector/PSFT_EP/CI_LP_PC_PROJECT_GEN.1.wsdl HTTP/1.1
Content-Type: text/xml; charset=utf-8
VsDebuggerCausalityData: uIDPo+YluAuf3g9BhNp2nGC57WUAAAAA60+5s/MerUGZDfyhBXBAgPyLh3Vk3hZMrWvRTb0KntcACQAA
SOAPAction: "CI_LP_PC_PROJECT_GEN_UP.V1"
Host: psf92extigw.am.jll.com
Content-Length: 1039
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

Postman HTTP Status 400 - why?

I want to consume a SOAP Webservice from Dynamics NAV 2013 R2 via
http://servername:7047/DynamicsNAV71/WS/CRONUS%20AG/Codeunit/WSInterface
I can visit this page only via Chrome and it asks me for credentials (which are correct and working).
If I'm logged with Crome and start Postman I'm able to consume it:
POST /DynamicsNAV71/WS/CRONUS%20AG/Codeunit/WSInterface HTTP/1.1
Host: servername:7047
Content-Type: text/xml
SOAPAction: urn:microsoft-dynamics-schemas/codeunit/WSInterface:Process
Cache-Control: no-cache
Postman-Token: 5e640ab7-d0af-a098-0665-da4fa281f892
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsin="urn:microsoft-dynamics-schemas/codeunit/WSInterface">
<soapenv:Header/>
<soapenv:Body>
<wsin:Process>
<wsin:request>INPUT</wsin:request>
<wsin:response>FAKE_RESPONSE</wsin:response>
</wsin:Process>
</soapenv:Body>
</soapenv:Envelope>
and get statuscode 200 OK as response.
As soon, as I close the Chrome browser and send the request again I get the Status 401 (Unauthorized), so I add the Authorization header. After that I get the Status 400 with following headers:
POST /DynamicsNAV71/WS/CRONUS%20AG/Codeunit/WSInterface HTTP/1.1
Host: servername:7047
Content-Type: text/xml
SOAPAction: urn:microsoft-dynamics-schemas/codeunit/WSInterface:Process
Authorization: NTLM YWNhbVxncnU6Z3J1MTIzNA==
Cache-Control: no-cache
Postman-Token: 595777b7-5183-38d3-d49b-6bc5d4e3d30e
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsin="urn:microsoft-dynamics-schemas/codeunit/WSInterface">
<soapenv:Header/>
<soapenv:Body>
<wsin:Process>
<wsin:request>INPUT</wsin:request>
<wsin:response>FAKE_RESPONSE</wsin:response>
</wsin:Process>
</soapenv:Body>
</soapenv:Envelope>
Nothing changed beside the Authorization header, so why do I get the Status 400? Can somebody help?
If I'm logged in with Chrome the Authorization header doesn't matter if sent or not...
NTLM authentication is not supported by postman, you can use Fiddler or your chrome browser for authentication. https://github.com/postmanlabs/postman-app-support/issues/1137

Why does SOAPUI return bad request?

I have created a soapui project to test this wsdl
When sending this request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:x/="http://www.w3schools.com/xml/">
<soapenv:Header/>
<soapenv:Body>
<x/:CelsiusToFahrenheit>
<!--Optional:-->
<x/:Celsius>30</x/:Celsius>
</x/:CelsiusToFahrenheit>
</soapenv:Body>
I get bad request in raw response
HTTP/1.1 400 Bad Request
Cache-Control: private,public
Content-Type: text/xml; charset=utf-8
Date: Sun, 28 Feb 2016 17:33:28 GMT
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Content-Length: 0
The error is so trivial due to the special character in the namespace (x/), which can be found by Validating the request( clicking keys 'Alt+v` in the request editor)
Could not figure it out that why such special character is coming when soapUI generates the request
What should be done in order to make the request valid?
Please change the request to below(replaced x/ to x):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:x="http://www.w3schools.com/xml/">
<soapenv:Header/>
<soapenv:Body>
<x:CelsiusToFahrenheit>
<x:Celsius>30</x:Celsius>
</x:CelsiusToFahrenheit>
</soapenv:Body>
</soapenv:Envelope>
Below is the screen shot of successful response upon changing the request as above.

Zimbra SOAP SearchRequest returns unknown document error

I am trying to send the SearchRequest to find the stuff I need in the mailbox. However, I keep on getting the unknown Document error.
POST /service/soap HTTP/1.1
SOAPAction: ""
Content-Type: text/xml;charset="utf-8"
Accept: text/xml
Host: 192.168.138.133
Content-Length: 514
Expect: 100-continue
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<authToken>%token acquired from AuthRequest%</authToken>
<context xmlns="urn:zimbra" />
</soap:Header>
<soap:Body>
<SearchRequest xlmns="urn:zimbraMail">
<query>is:unread</query>
</SearchRequest>
</soap:Body>
</soap:Envelope>
It seems to me, that I have the wrong xmlns specified, but the zimbra soap api reference says that the namespace should be zimbraMail. Still I keep on getting the error.
Shouldn't there be a session somewhere in the headers ? (inside context)
http://dropcanvas.com/521xc/91
Try
<soap:Header>
<context xmlns="urn:zimbra" >
<authToken>%token acquired from AuthRequest%</authToken>
</context>
</soap:Header>

CardDAV with osX/iPhone clients

I am implementing a CardDAV backend to a crm package.
During the handshake with my backend the following request/response is handled:
PROPFIND /directory/ HTTP/1.1
Host: 10.0.0.202:9292
User-Agent: Address%20Book/883 CFNetwork/454.11.12 Darwin/10.7.0 (i386) (MacBookPro4%2C1)
Content-Type: text/xml; charset=utf-8
Depth: 0
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Content-Length: 147
Connection: keep-alive
<?xml version="1.0" encoding="utf-8"?>
<D:propfind xmlns:D="DAV:" xmlns:C="DAV:">
<D:prop>
<C:current-user-privilege-set/>
</D:prop>
</D:propfind>
HTTP/1.1 207
Content-Type: text/xml; charset="utf-8"
Content-Length: 432
Connection: keep-alive
Server: thin 1.2.11 codename Bat-Shit Crazy
<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>http://10.0.0.202:9292/directory/</D:href>
<D:propstat>
<D:prop>
<D:current-user-privilege-set>
<D:privilege>
<D:read/>
</D:privilege>
</D:current-user-privilege-set>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
PROPFIND /contacts/ HTTP/1.1
Host: 10.0.0.202:9292
User-Agent: Address%20Book/883 CFNetwork/454.11.12 Darwin/10.7.0 (i386) (MacBookPro4%2C1)
Content-Type: text/xml; charset=utf-8
Depth: 0
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Content-Length: 167
Connection: keep-alive
<?xml version="1.0" encoding="utf-8"?>
<D:propfind xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
<D:prop>
<C:addressbook-home-set/>
</D:prop>
</D:propfind>
HTTP/1.1 207
Content-Type: text/xml; charset="utf-8"
Content-Length: 408
Connection: keep-alive
Server: thin 1.2.11 codename Bat-Shit Crazy
<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>http://10.0.0.202:9292/contacts/</D:href>
<D:propstat>
<D:prop>
<D:addressbook-home-set>
<D:href>http://10.0.0.202:9292/contacts/</D:href>
</D:addressbook-home-set>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
This is despite my CardDAV backend never hinting that /directory/ is anything that the client need concern itself with.
The client is returning the error The CardDAV server returned an error (207) for the user "richo", however when I patched the server to return a different status code (200) I got the same error, but with a new status code.
I am working on the hunch that something else is upsetting it about the response. I have tried returning absolute instead of relative URL's (and vice versa) to no avail.
Any input appreciated. There is a similar issue on the mac forums here that seems to end with resolution but the links are broken.
As it turned out, it was a namespace issue.
using the urn:ietf:params:xml:ns:carddav namespace where appropriate cleared it up.