QuickBooks Webconnector Error - Django Soap Web Service - Actual error received from web service for serverVersion call -
i have written soap web service in django , have installed following components
- soaplib-0.8.1 in system
- quickbooks pro
- qbwc version 2.1.0.30 - intuit
when try add application(.qwc file) qbwc(quick books web connector), calling web service. giving me below error
error: 20130807.09:03:28 utc : qbwebconnector.webservicemanager.doupdateselected() : updatews() application = 'quick books integration' has started 20130807.09:03:28 utc : qbwebconnector.registrymanager.getupdatelock() : hkey_current_user\software\intuit\qbwebconnector\updatelock = false 20130807.09:03:28 utc : qbwebconnector.registrymanager.setupdatelock() : hkey_current_user\software\intuit\qbwebconnector\updatelock has been set true 20130807.09:03:28 utc : qbwebconnector.registrymanager.setupdatelock() : ********** update session locked ********** 20130807.09:03:28 utc : qbwebconnector.soapwebservice.instantiatewebservice() : initiated connection following application. 20130807.09:03:28 utc : qbwebconnector.soapwebservice.instantiatewebservice() : appname: cognam technologies pvt ltd quick books integration 20130807.09:03:28 utc : qbwebconnector.soapwebservice.instantiatewebservice() : appuniquename (if available): quick books integration 20130807.09:03:28 utc : qbwebconnector.soapwebservice.instantiatewebservice() : appurl: http://test:8000/qwc/qwcintegration/service.wsdl 20130807.09:03:28 utc : qbwebconnector.soapwebservice.do_serverversion() : * calling serverversion(). 20130807.09:03:28 utc : qbwebconnector.soapwebservice.do_serverversion() : actual error received web service serverversion call: . backward compatibility of webservers, qbwc catch errors under app-not-supporting-serverversion. 20130807.09:03:28 utc : qbwebconnector.soapwebservice.do_serverversion() : application not contain support serverversion. allowing update operation backward compatibility. 20130807.09:03:28 utc : qbwebconnector.soapwebservice.do_clientversion() : * calling clientversion() following parameter: 20130807.09:03:28 utc : qbwebconnector.soapwebservice.updatews() : actual error received web service clientversion call: . backward compatibility of webservers, qbwc catch errors under app-not-supporting-clientversion. 20130807.09:03:28 utc : qbwebconnector.soapwebservice.do_clientversion() : application not contain support clientversion. allowing update operation backward compatibility. 20130807.09:03:28 utc : qbwebconnector.soapwebservice.do_authenticate() : authenticating application 'quick books integration', username = 'anil' 20130807.09:03:28 utc : qbwebconnector.soapwebservice.do_authenticate() : * calling authenticate() following parameters: 20130807.09:03:28 utc : qbwebconnector.soapwebservice.do_authenticate() : qbwc1012: authentication failed due following error message. underlying connection closed: unexpected error occurred on receive. more info: stacktrace = @ system.web.services.protocols.webclientprotocol.getwebresponse(webrequest request) @ system.web.services.protocols.httpwebclientprotocol.getwebresponse(webrequest request) @ system.web.services.protocols.soaphttpclientprotocol.invoke(string methodname, object[] parameters) @ qbwebconnector.localhost.wcwebservicedoc.authenticate(string strusername, string strpassword) @ qbwebconnector.localhost.wcwebservice.authenticate(string strusername, string strpassword) @ qbwebconnector.soapwebservice.authenticate(string username, string password) @ qbwebconnector.webservice.do_authenticate(string& ticket, string& companyfilename) source = system.web.services 20130807.09:03:28 utc : qbwebconnector.registrymanager.setupdatelock() : hkey_current_user\software\intuit\qbwebconnector\updatelock has been set false 20130807.09:03:28 utc : qbwebconnector.registrymanager.setupdatelock() : *********** update session unlocked *********** 20130807.09:03:28 utc : qbwebconnector.webservicemanager.doupdateselected() : update completed errors. see log (qwclog.txt) details.
the url webservice contains localhost instead of test.when posting issue, didnt allow me provide link localhost , changed test. actual link in qwc file contains localhost , not test.
please me out. guess soap version qbwc using , have installed not compatible
i dont know going wrong. please me out solve issue. in advance
code below: views.py
from soaplib_handler import array, string, integer soaplib import soap soaplib.service import soapmethod soaplib_handler import djangosoapapp, soapmethod, soap_types
class quickbooksservice(djangosoapapp):
__tns__ = 'http://developer.intuit.com/' @soapmethod(soap_types.string, _returns=soap_types.string) def serverversion(self, ticket): print 'serverversion()' print ticket return '2.1' @soapmethod(soap_types.string, soap_types.string, _returns=array(string), _outmessage='{http://developer.intuit.com/}authenticateresponse', _outvariablename='authenticateresult', ) def authenticate(self, strusername, strpassword): print 'authenticate()' results = [] results.append('{85b41bee-5cd9-427a-a61b-83964f1eb426}') results.append('') results.append('') print strusername print strpassword print results return results @soapmethod(soap_types.string, _returns=soap_types.string) def clientversion(self, strversion): print 'clientversion()' print strversion return "" @soapmethod(soap_types.string, _returns=soap_types.string) def closeconnection(self, ticket): print 'closeconnection()' print ticket return 'closeconnection() called on ws' @soapmethod(soap_types.string, soap_types.string, soap_types.string, _returns=soap_types.string) def connectionerror(self, ticket, hresult, message): print 'connectionerror' print ticket print hresult print message return 'done' @soapmethod(soap_types.string, _returns=soap_types.string) def getlasterror(self, ticket): print 'lasterror()' print ticket return 'problems foo bar' @soapmethod(soap_types.string, soap_types.string, soap_types.string, soap_types.string, _returns=integer, _outmessage='{http://developer.intuit.com/}receiveresponsexmlresponse', _outvariablename='receiveresponsexmlresult',) def receiveresponsexml(self, ticket, response, hresult, message): print 'receiveresponsexml()' print "ticket=" + ticket print "response=" + response if hresult: print "hresult=" + hresult print "message=" + message return 100 @soapmethod(soap_types.string, soap_types.string, soap_types.string, soap_types.string, soap_types.integer, soap_types.integer, _returns=string, _outmessage='{http://developer.intuit.com/}sendrequestxmlresponse', _outvariablename='sendrequestxmlresult',) def sendrequestxml(self, ticket, strhcpresponse, strcompanyfilename, qbxmlcountry, qbxmlmajorvers, qbxmlminorvers ): print 'sendrequestxml()' print strhcpresponse xml = "<?xml version=\"1.0\" ?>" + \ "<?qbxml version=\"2.0\"?>" + \ "<qbxml>" + \ "<qbxmlmsgsrq onerror=\"stoponerror\">" + \ "<itemqueryrq></itemqueryrq>" + \ "</qbxmlmsgsrq>" + \ "</qbxml>" return xml @soapmethod(soap_types.string, soap_types.string, _returns=soap_types.string) def interactiveurl(self, ticket, sessionid): print 'interactiveurl' print ticket print sessionid return 'http://localhost/test' @soapmethod(soap_types.string, _returns=soap_types.string) def interactivedone(self, ticket): print 'interactivedone()' print ticket return 'done' @soapmethod(soap_types.string, soap_types.string, _returns=soap_types.string) def interactiverejected(self, ticket, reason): print 'interactiverejected()' print ticket print reason return 'message show'
quickbooks_service = quickbooksservice()
soaplib_handler.py
from django.http import httpresponse soaplib.serializers import primitive soap_types soaplib.serializers.primitive import _element_to_unicode, null, _element_to_integer soaplib.service import soapmethod soaplib.wsgi_soap import simplewsgisoapapp
class djangosoapapp(simplewsgisoapapp):
def __call__(self, request): print "inside call method" django_response = httpresponse() def start_response(status, headers): print "initial" print status print headers status, reason = status.split(' ', 1) # try: # status, reason = status.split(' ', 1) # except: # status = status.split(' ') # reason = '' print "status" print status # s1 = status[0] django_response.status_code = int(status) header, value in headers: django_response[header] = value print "over" response = super(djangosoapapp, self).__call__(request.meta, start_response) django_response.content = "\n".join(response) return django_response
urls.py
urlpatterns = patterns('',
url(r'^hello_world/', views.quickbooks_service, name='service'), url(r'^hello_world/service.wsdl', views.quickbooks_service, name='service2'),
)
soap response when hit browser: ----------------------------------------->
<definitions xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:tns="http://developer.intuit.com/" xmlns:typens="http://developer.intuit.com/" xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/1999/xmlschema-instance" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetnamespace="http://developer.intuit.com/" name="quickbooksservice"> <types> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="http://developer.intuit.com/"> <xs:element name="interactiveurlresponse" type="tns:interactiveurlresponse"/> <xs:complextype name="connectionerror"> <xs:sequence> <xs:element name="ticket" type="xs:string"/> <xs:element name="hresult" type="xs:string"/> <xs:element name="message" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:complextype name="getlasterrorresponse"> <xs:sequence> <xs:element name="getlasterrorresult" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:complextype name="interactiverejected"> <xs:sequence> <xs:element name="ticket" type="xs:string"/> <xs:element name="reason" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:element name="clientversion" type="tns:clientversion"/> <xs:element name="receiveresponsexml" type="tns:receiveresponsexml"/> <xs:complextype name="interactiverejectedresponse"> <xs:sequence> <xs:element name="interactiverejectedresult" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:element name="interactiverejectedresponse" type="tns:interactiverejectedresponse"/> <xs:complextype name="connectionerrorresponse"> <xs:sequence> <xs:element name="connectionerrorresult" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:element name="getlasterrorresponse" type="tns:getlasterrorresponse"/> <xs:element name="interactiverejected" type="tns:interactiverejected"/> <xs:complextype name="getlasterror"> <xs:sequence> <xs:element name="ticket" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:complextype name="authenticate"> <xs:sequence> <xs:element name="strusername" type="xs:string"/> <xs:element name="strpassword" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:complextype name="clientversion"> <xs:sequence> <xs:element name="strversion" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:element name="interactiveurl" type="tns:interactiveurl"/> <xs:complextype name="interactiveurlresponse"> <xs:sequence> <xs:element name="interactiveurlresult" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:element name="connectionerror" type="tns:connectionerror"/> <xs:element name="getlasterror" type="tns:getlasterror"/> <xs:element name="{http://developer.intuit.com/}sendrequestxmlresponse" type="tns:{http://developer.intuit.com/}sendrequestxmlresponse"/> <xs:element name="{http://developer.intuit.com/}authenticateresponse" type="tns:{http://developer.intuit.com/}authenticateresponse"/> <xs:complextype name="interactivedone"> <xs:sequence> <xs:element name="ticket" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:complextype name="serverversion"> <xs:sequence> <xs:element name="ticket" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:element name="connectionerrorresponse" type="tns:connectionerrorresponse"/> <xs:element name="sendrequestxml" type="tns:sendrequestxml"/> <xs:element name="authenticate" type="tns:authenticate"/> <xs:element name="closeconnectionresponse" type="tns:closeconnectionresponse"/> <xs:element name="interactivedone" type="tns:interactivedone"/> <xs:element name="serverversionresponse" type="tns:serverversionresponse"/> <xs:element name="{http://developer.intuit.com/}receiveresponsexmlresponse" type="tns:{http://developer.intuit.com/}receiveresponsexmlresponse"/> <xs:element name="serverversion" type="tns:serverversion"/> <xs:complextype name="interactiveurl"> <xs:sequence> <xs:element name="ticket" type="xs:string"/> <xs:element name="sessionid" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:complextype name="stringarray"> <xs:sequence> <xs:element minoccurs="0" maxoccurs="unbounded" type="tns:string" name="string"/> </xs:sequence> </xs:complextype> <xs:complextype name="interactivedoneresponse"> <xs:sequence> <xs:element name="interactivedoneresult" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:complextype name="receiveresponsexml"> <xs:sequence> <xs:element name="ticket" type="xs:string"/> <xs:element name="response" type="xs:string"/> <xs:element name="hresult" type="xs:string"/> <xs:element name="message" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:complextype name="sendrequestxml"> <xs:sequence> <xs:element name="ticket" type="xs:string"/> <xs:element name="strhcpresponse" type="xs:string"/> <xs:element name="strcompanyfilename" type="xs:string"/> <xs:element name="qbxmlcountry" type="xs:string"/> <xs:element name="qbxmlmajorvers" type="xs:int"/> <xs:element name="qbxmlminorvers" type="xs:int"/> </xs:sequence> </xs:complextype> <xs:complextype name="closeconnectionresponse"> <xs:sequence> <xs:element name="closeconnectionresult" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:complextype name="{http://developer.intuit.com/}receiveresponsexmlresponse"> <xs:sequence> <xs:element name="receiveresponsexmlresult" type="xs:int"/> </xs:sequence> </xs:complextype> <xs:complextype name="{http://developer.intuit.com/}sendrequestxmlresponse"> <xs:sequence> <xs:element name="sendrequestxmlresult" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:complextype name="serverversionresponse"> <xs:sequence> <xs:element name="serverversionresult" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:element name="interactivedoneresponse" type="tns:interactivedoneresponse"/> <xs:element name="closeconnection" type="tns:closeconnection"/> <xs:complextype name="closeconnection"> <xs:sequence> <xs:element name="ticket" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:element name="stringarray" type="tns:stringarray"/> <xs:element name="clientversionresponse" type="tns:clientversionresponse"/> <xs:complextype name="clientversionresponse"> <xs:sequence> <xs:element name="clientversionresult" type="xs:string"/> </xs:sequence> </xs:complextype> <xs:complextype name="{http://developer.intuit.com/}authenticateresponse"> <xs:sequence> <xs:element name="authenticateresult" type="tns:stringarray"/> </xs:sequence> </xs:complextype> </schema> </types> <message name="authenticate"> <part name="authenticate" element="tns:authenticate"/> </message> <message name="{http://developer.intuit.com/}authenticateresponse"> <part name="{http://developer.intuit.com/}authenticateresponse" element="tns:{http://developer.intuit.com/}authenticateresponse"/> </message> <message name="clientversion"> <part name="clientversion" element="tns:clientversion"/> </message> <message name="clientversionresponse"> <part name="clientversionresponse" element="tns:clientversionresponse"/> </message> <message name="closeconnection"> <part name="closeconnection" element="tns:closeconnection"/> </message> <message name="closeconnectionresponse"> <part name="closeconnectionresponse" element="tns:closeconnectionresponse"/> </message> <message name="connectionerror"> <part name="connectionerror" element="tns:connectionerror"/> </message> <message name="connectionerrorresponse"> <part name="connectionerrorresponse" element="tns:connectionerrorresponse"/> </message> <message name="getlasterror"> <part name="getlasterror" element="tns:getlasterror"/> </message> <message name="getlasterrorresponse"> <part name="getlasterrorresponse" element="tns:getlasterrorresponse"/> </message> <message name="interactivedone"> <part name="interactivedone" element="tns:interactivedone"/> </message> <message name="interactivedoneresponse"> <part name="interactivedoneresponse" element="tns:interactivedoneresponse"/> </message> <message name="interactiverejected"> <part name="interactiverejected" element="tns:interactiverejected"/> </message> <message name="interactiverejectedresponse"> <part name="interactiverejectedresponse" element="tns:interactiverejectedresponse"/> </message> <message name="interactiveurl"> <part name="interactiveurl" element="tns:interactiveurl"/> </message> <message name="interactiveurlresponse"> <part name="interactiveurlresponse" element="tns:interactiveurlresponse"/> </message> <message name="receiveresponsexml"> <part name="receiveresponsexml" element="tns:receiveresponsexml"/> </message> <message name="{http://developer.intuit.com/}receiveresponsexmlresponse"> <part name="{http://developer.intuit.com/}receiveresponsexmlresponse" element="tns:{http://developer.intuit.com/}receiveresponsexmlresponse"/> </message> <message name="sendrequestxml"> <part name="sendrequestxml" element="tns:sendrequestxml"/> </message> <message name="{http://developer.intuit.com/}sendrequestxmlresponse"> <part name="{http://developer.intuit.com/}sendrequestxmlresponse" element="tns:{http://developer.intuit.com/}sendrequestxmlresponse"/> </message> <message name="serverversion"> <part name="serverversion" element="tns:serverversion"/> </message> <message name="serverversionresponse"> <part name="serverversionresponse" element="tns:serverversionresponse"/> </message> <porttype name="quickbooksservice"> <operation name="authenticate" parameterorder="authenticate"> <documentation/> <input name="authenticate" message="tns:authenticate"/> <output name="{http://developer.intuit.com/}authenticateresponse" message="tns:{http://developer.intuit.com/}authenticateresponse"/> </operation> <operation name="clientversion" parameterorder="clientversion"> <documentation/> <input name="clientversion" message="tns:clientversion"/> <output name="clientversionresponse" message="tns:clientversionresponse"/> </operation> <operation name="closeconnection" parameterorder="closeconnection"> <documentation/> <input name="closeconnection" message="tns:closeconnection"/> <output name="closeconnectionresponse" message="tns:closeconnectionresponse"/> </operation> <operation name="connectionerror" parameterorder="connectionerror"> <documentation/> <input name="connectionerror" message="tns:connectionerror"/> <output name="connectionerrorresponse" message="tns:connectionerrorresponse"/> </operation> <operation name="getlasterror" parameterorder="getlasterror"> <documentation/> <input name="getlasterror" message="tns:getlasterror"/> <output name="getlasterrorresponse" message="tns:getlasterrorresponse"/> </operation> <operation name="interactivedone" parameterorder="interactivedone"> <documentation/> <input name="interactivedone" message="tns:interactivedone"/> <output name="interactivedoneresponse" message="tns:interactivedoneresponse"/> </operation> <operation name="interactiverejected" parameterorder="interactiverejected"> <documentation/> <input name="interactiverejected" message="tns:interactiverejected"/> <output name="interactiverejectedresponse" message="tns:interactiverejectedresponse"/> </operation> <operation name="interactiveurl" parameterorder="interactiveurl"> <documentation/> <input name="interactiveurl" message="tns:interactiveurl"/> <output name="interactiveurlresponse" message="tns:interactiveurlresponse"/> </operation> <operation name="receiveresponsexml" parameterorder="receiveresponsexml"> <documentation/> <input name="receiveresponsexml" message="tns:receiveresponsexml"/> <output name="{http://developer.intuit.com/}receiveresponsexmlresponse" message="tns:{http://developer.intuit.com/}receiveresponsexmlresponse"/> </operation> <operation name="sendrequestxml" parameterorder="sendrequestxml"> <documentation/> <input name="sendrequestxml" message="tns:sendrequestxml"/> <output name="{http://developer.intuit.com/}sendrequestxmlresponse" message="tns:{http://developer.intuit.com/}sendrequestxmlresponse"/> </operation> <operation name="serverversion" parameterorder="serverversion"> <documentation/> <input name="serverversion" message="tns:serverversion"/> <output name="serverversionresponse" message="tns:serverversionresponse"/> </operation> </porttype> <plnk:partnerlinktype name="quickbooksservice"> <plnk:role name="quickbooksservice"> <plnk:porttype name="tns:quickbooksservice"/> </plnk:role> </plnk:partnerlinktype> <binding name="quickbooksservice" type="tns:quickbooksservice"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="authenticate"> <soap:operation soapaction="authenticate" style="document"/> <input name="authenticate"> <soap:body use="literal"/> </input> <output name="{http://developer.intuit.com/}authenticateresponse"> <soap:body use="literal"/> </output> </operation> <operation name="clientversion"> <soap:operation soapaction="clientversion" style="document"/> <input name="clientversion"> <soap:body use="literal"/> </input> <output name="clientversionresponse"> <soap:body use="literal"/> </output> </operation> <operation name="closeconnection"> <soap:operation soapaction="closeconnection" style="document"/> <input name="closeconnection"> <soap:body use="literal"/> </input> <output name="closeconnectionresponse"> <soap:body use="literal"/> </output> </operation> <operation name="connectionerror"> <soap:operation soapaction="connectionerror" style="document"/> <input name="connectionerror"> <soap:body use="literal"/> </input> <output name="connectionerrorresponse"> <soap:body use="literal"/> </output> </operation> <operation name="getlasterror"> <soap:operation soapaction="getlasterror" style="document"/> <input name="getlasterror"> <soap:body use="literal"/> </input> <output name="getlasterrorresponse"> <soap:body use="literal"/> </output> </operation> <operation name="interactivedone"> <soap:operation soapaction="interactivedone" style="document"/> <input name="interactivedone"> <soap:body use="literal"/> </input> <output name="interactivedoneresponse"> <soap:body use="literal"/> </output> </operation> <operation name="interactiverejected"> <soap:operation soapaction="interactiverejected" style="document"/> <input name="interactiverejected"> <soap:body use="literal"/> </input> <output name="interactiverejectedresponse"> <soap:body use="literal"/> </output> </operation> <operation name="interactiveurl"> <soap:operation soapaction="interactiveurl" style="document"/> <input name="interactiveurl"> <soap:body use="literal"/> </input> <output name="interactiveurlresponse"> <soap:body use="literal"/> </output> </operation> <operation name="receiveresponsexml"> <soap:operation soapaction="receiveresponsexml" style="document"/> <input name="receiveresponsexml"> <soap:body use="literal"/> </input> <output name="{http://developer.intuit.com/}receiveresponsexmlresponse"> <soap:body use="literal"/> </output> </operation> <operation name="sendrequestxml"> <soap:operation soapaction="sendrequestxml" style="document"/> <input name="sendrequestxml"> <soap:body use="literal"/> </input> <output name="{http://developer.intuit.com/}sendrequestxmlresponse"> <soap:body use="literal"/> </output> </operation> <operation name="serverversion"> <soap:operation soapaction="serverversion" style="document"/> <input name="serverversion"> <soap:body use="literal"/> </input> <output name="serverversionresponse"> <soap:body use="literal"/> </output> </operation> </binding> <service name="quickbooksservice"> <port name="quickbooksservice" binding="tns:quickbooksservice"> <soap:address location="http://localhost:8000/qwc/hello_world/service"/> </port> </service> </definitions>
it looks web server closing connection, when shouldn't be:
the underlying connection closed: unexpected error occurred on receive.
are sure soap service works, , web server isn't crashing, throwing error, or closing connection no reason?
another thing wonder - have web connector pointed wsdl. shouldn't pointed actual web service, not @ wsdl definition?
appurl: http://test:8000/qwc/qwcintegration/service.wsdl
Comments
Post a Comment