Sto integrando QuickBooks (versione desktop) con un'applicazione ASP.NET. Per questo sto usando QuickBooks Web Connector. Come posso creare un file .qwc per il mio servizio web personalizzato?Come creare un file .qwc per il connettore Web QuickBooks?
risposta
Il connettore Web è in realtà solo un proxy o un relè che si trova tra QuickBooks e la propria applicazione.
Come una panoramica, in pratica, si crea un server SOAP/servizio Web che parla un insieme specifico di metodi. Il connettore Web è quindi installato sulla macchina che esegue QuickBooks e esegue il polling del servizio Web chiedendo "Ehi, ho qualcosa da fare per me?" Il tuo servizio Web può quindi rispondere con richieste qbXML (examples of qbXML here) che dicono al Web Connector "Aggiungi questo cliente : ... "o" Inviami fatture corrispondenti: ... "ecc. Ecc. Ecc. Il connettore Web inoltra tali richieste a QuickBooks, QuickBooks le elabora e la risposta viene inoltrata al servizio web. Il servizio Web potrebbe quindi elaborare la risposta in qualche modo, quindi inviare la richiesta successiva al connettore Web.
C'è uno overview of the Web Connector here grande o, se si scarica il QuickBooks SDK ha un PDF di oltre 100 pagine che ripercorre questo in dettaglio.
Probabilmente anche voler guardare in questo esempio dopo aver installato il QuickBooks SDK:
- C: \ Program Files (x86) \ Intuit \ IDN \ QBSDK12.0 \ campioni \ qbdt \ c-sharp \ qbXML \ WCWebService
Che è un esempio completo di implementazione SOAP di un connettore Web.
A è più forma di base, sembra qualcosa di simile:
[WebMethod]
/// <summary>
/// WebMethod - authenticate()
/// To verify username and password for the web connector that is trying to connect
/// Signature: public string[] authenticate(string strUserName, string strPassword)
///
/// IN:
/// string strUserName
/// string strPassword
///
/// OUT:
/// string[] authReturn
/// Possible values:
/// string[0] = ticket
/// string[1]
/// - empty string = use current company file
/// - "none" = no further request/no further action required
/// - "nvu" = not valid user
/// - any other string value = use this company file
/// </summary>
public string[] authenticate(string strUserName, string strPassword)
{
string[] authReturn = new string[2];
// Generate a random session ticket
authReturn[0]= System.Guid.NewGuid().ToString();
// For simplicity of sample, a hardcoded username/password is used.
string pwd="password";
if (strUserName.Trim().Equals("username") && strPassword.Trim().Equals(pwd))
{
// An empty string for authReturn[1] means asking QBWebConnector
// to connect to the company file that is currently openned in QB
authReturn[1]="";
}
else
{
authReturn[1]="nvu";
}
return authReturn;
}
[ WebMethod(Description="This web method facilitates web service to send request XML to QuickBooks via QBWebConnector",EnableSession=true) ]
/// <summary>
/// WebMethod - sendRequestXML()
/// Signature: public string sendRequestXML(string ticket, string strHCPResponse, string strCompanyFileName,
/// string Country, int qbXMLMajorVers, int qbXMLMinorVers)
///
/// IN:
/// int qbXMLMajorVers
/// int qbXMLMinorVers
/// string ticket
/// string strHCPResponse
/// string strCompanyFileName
/// string Country
/// int qbXMLMajorVers
/// int qbXMLMinorVers
///
/// OUT:
/// string request
/// Possible values:
/// - “any_string” = Request XML for QBWebConnector to process
/// - "" = No more request XML
/// </summary>
public string sendRequestXML(string ticket, string strHCPResponse, string strCompanyFileName,
string qbXMLCountry, int qbXMLMajorVers, int qbXMLMinorVers)
{
// QuickBooks has asked for your next request
... return a qbXML request here ...
}
[ WebMethod(Description="This web method facilitates web service to receive response XML from QuickBooks via QBWebConnector",EnableSession=true) ]
/// <summary>
/// WebMethod - receiveResponseXML()
/// Signature: public int receiveResponseXML(string ticket, string response, string hresult, string message)
///
/// IN:
/// string ticket
/// string response
/// string hresult
/// string message
///
/// OUT:
/// int retVal
/// Greater than zero = There are more request to send
/// 100 = Done. no more request to send
/// Less than zero = Custom Error codes
/// </summary>
public int receiveResponseXML(string ticket, string response, string hresult, string message)
{
// QuickBooks has sent you a qbXML response to your request
... do something with 'response' here ...
}
Questo esempio include anche un esempio di file .QWC. Here's some .QWC file documentation ed ecco un esempio di base:
<?xml version="1.0"?>
<QBWCXML>
<AppName>QuickBooks Integrator</AppName>
<AppID></AppID>
<AppURL>https://secure.domain.com/quickbooks/server.php</AppURL>
<AppDescription></AppDescription>
<AppSupport>http://www.domain.com/quickbooks/support.php</AppSupport>
<UserName>username</UserName>
<OwnerID>{90A44FB7-33D9-4815-AC85-AC86A7E7D1EB}</OwnerID>
<FileID>{57F3B9B6-86F1-4FCC-B1FF-967DE1813D20}</FileID>
<QBType>QBFS</QBType>
<Scheduler>
<RunEveryNMinutes>2</RunEveryNMinutes>
</Scheduler>
<IsReadOnly>false</IsReadOnly>
</QBWCXML>
- 1. Connettore web Quickbooks Uso ID proprietario/FileID
- 2. Creare un servizio Web (WCF) da integrare con QuickBooks
- 3. Come configurare il connettore Web dai valori metrics.log
- 4. Come installare il connettore mysql
- 5. Come creare il file war per un'applicazione Web Clojure Noir?
- 6. Come creare un client Java per il servizio Web?
- 7. come creare un motore di ricerca per il sito web?
- 8. Connettore crogiolo per Eclipse?
- 9. Come creare un file per popolare HttpContext.Current.Request.Files?
- 10. Connettore per distribuzione Maven?
- 11. Come ottenere schemaspy per vedere il connettore mysql?
- 12. Database Python e QuickBooks
- 13. Come posso creare un file register/login.php per il mio sito web?
- 14. QuickBooks Spiegazione QBFC
- 15. Come installare il connettore mysql tramite pip
- 16. Qualsiasi libreria Python per accedere ai Quickbooks?
- 17. Creare un servizio Web ASMX da un file WSDL
- 18. Come creare il file .mbtiles?
- 19. Come creare un pacchetto web su heroku?
- 20. Come creare un server Web di immagini?
- 21. Come posso creare un'interfaccia web per un semplice script python?
- 22. Come creare un'interfaccia web per un servizio Windows in .Net?
- 23. Connessione da R a Quickbooks
- 24. Come generare file XSD per il servizio Web
- 25. Come creare il file "channel.html" per Facebook SDK
- 26. Come creare un file chm?
- 27. Applicazioni online QuickBooks - Paesi supportati
- 28. Come creare un file virtuale?
- 29. Come creare un file "corrotto"
- 30. Connettore NIO in Tomcat
Grazie per la risposta. Ora ho aggiunto l'app Quickbooks al connettore web Quickbook. Ora, come posso ottenere i valori dei quickbook sulla mia applicazione asp.net? – Golda
Hai letto i collegamenti o la documentazione che ho postato sopra? Hai pubblicato il tuo codice in modo che possiamo vedere cosa stai facendo? Quale richiesta stai inviando a QuickBooks? Qual è la risposta che stai ricevendo? Cosa dice il registro dal connettore Web? –
Sì, ho letto il documento e creato il file .qwc e scaricato il servizio web dal https://developer.intuit.com/docs/0025_quickbooksapi/0055_devkits/0250_qb/0050_documentation/sample_code link. Nel connettore Web è stata aggiunta un'applicazione utilizzando Aggiungi un pulsante dell'applicazione e aggiornato il selezionato. Comunque ogni cosa va bene. Allora cosa dovrei fare? – Golda