Quickbooks qbmxl report request hangs for only one customer - web-services

I have a integrated application via webconnector that is working perfectly for about 20 customers. It adds customers, vendors and updates AP and AR and receives payments without a hitch for all of my customers.
My application also requests AP and AR agings from QB and it works for all except one customer. I've been able to copy their file and recreate the problem in the lab. I've included the XML request and the quickbooks log. Any help, advice, clues, etc would be welcomed.
Request:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="5.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<AgingReportQueryRq>
<!-- AgingReportType may have one of the following values: APAgingDetail, APAgingSummary, ARAgingDetail, ARAgingSummary, CollectionsReport -->
<AgingReportType >APAgingDetail</AgingReportType>
<ReportPeriod>
<FromReportDate >2013-02-01</FromReportDate>
<ToReportDate >2013-02-28</ToReportDate>
</ReportPeriod>
<IncludeColumn >Name</IncludeColumn>
<IncludeColumn>RefNumber</IncludeColumn>
<IncludeColumn>Date</IncludeColumn>
<IncludeColumn>OpenBalance</IncludeColumn>
<IncludeColumn>Memo</IncludeColumn>
<IncludeColumn>Account</IncludeColumn>
<IncludeColumn>NameAccountNumber</IncludeColumn>
<IncludeColumn>TxnID</IncludeColumn>
</AgingReportQueryRq>
</QBXMLMsgsRq>
</QBXML>
The log is :
Log file initialized at Wednesday, February 27, 2013 - 12:15 AM UTC
Timestamp format used: YYYYMMDD.HH:MM:SS UTC
QBWebConnector 2.0 has been initialized with its logging status to level = VERBOSE.
Please restart QBWebConnector for any change in log level to take effect. Use file menu to clear log.
20130227.00:15:06 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : hresult=""
20130227.00:15:06 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : message=""
20130227.00:15:07 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : QBWC1042: ReceiveResponseXML failed
Error message: The request failed with HTTP status 404: Not Found.
More info:
StackTrace = at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at QBWebConnector.localhost.WCWebServiceDoc.receiveResponseXML(String ticket, String response, String hresult, String message)
at QBWebConnector.localhost.WCWebService.receiveResponseXML(String ticket, String response, String hresult, String message)
at QBWebConnector.SOAPWebService.receiveResponseXML(String wcTicket, String response, String hresult, String message)
at QBWebConnector.WebService.do_receiveResponseXML(String wcTicket, String response, String hresult, String message, Boolean& success, Boolean& timeout)
Source = System.Web.Services
20130227.00:15:07 UTC : QBWebConnector.CompanyFileLock.Send_CompanyQueryRqXML() : XML dump follows: -
<?xml version="1.0"?><?qbxml version="10.0"?><QBXML><QBXMLMsgsRq onError="stopOnError"><CompanyQueryRq requestID="1"><OwnerID>{ADB06C95-6FC7-4D8D-AC30-6A28E24AAB22}</OwnerID></CompanyQueryRq></QBXMLMsgsRq></QBXML>
20130227.00:15:07 UTC : QBWebConnector.CompanyFileLock.Send_CompanyQueryRqXML() : XML dump follows: -
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<CompanyQueryRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<CompanyRet>
<IsSampleCompany>false</IsSampleCompany>
<CompanyName>DFW JAVV BUS INC</CompanyName>
<LegalCompanyName>DFW JAVV BUS INC</LegalCompanyName>
<Address>
<Addr1>105 101TH Street #501</Addr1>
<City>Little Prairie</City>
<State>CA</State>
<PostalCode>95050</PostalCode>
<Country>US</Country>
</Address>
<AddressBlock>
<Addr1>105 108TH Street #501</Addr1>
<Addr2>Little Prairie, CS 95050</Addr2>
</AddressBlock>
<LegalAddress>
<Addr1>1010 A N Davis Dr</Addr1>
<City>Lomita</City>
<State>CA</State>
<PostalCode>96012</PostalCode>
<Country>US</Country>
</LegalAddress>
<Phone>972-522-1500</Phone>
<FirstMonthFiscalYear>January</FirstMonthFiscalYear>
<FirstMonthIncomeTaxYear>January</FirstMonthIncomeTaxYear>
<CompanyType>other</CompanyType>
<EIN>20-3726264</EIN>
<TaxForm>Form1120S</TaxForm>
<SubscribedServices>
<Service>
<Name>QuickBooks Online Banking</Name>
<Domain>banking.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing</Name>
<Domain>billing.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Level 1 Service</Name>
<Domain>qbob1.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Level 2 Service</Name>
<Domain>qbob2.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Payment Service</Name>
<Domain>qbobpay.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Bill Payment</Name>
<Domain>billpay.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Paper Mailing Service</Name>
<Domain>qbobpaper.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Payroll Service</Name>
<Domain>payroll.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Basic Payroll Service</Name>
<Domain>payrollbsc.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Basic Disk Payroll Service</Name>
<Domain>payrollbscdisk.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Deluxe Payroll Service</Name>
<Domain>payrolldlx.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Premier Payroll Service</Name>
<Domain>payrollprm.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Basic Plus Federal</Name>
<Domain>basic_plus_fed.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Basic Plus Federal and State</Name>
<Domain>basic_plus_fed_state.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Basic Plus Direct Deposit</Name>
<Domain>basic_plus_dd.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Merchant Account Service</Name>
<Domain>mas.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
</SubscribedServices>
<AccountantCopy>
<AccountantCopyExists>false</AccountantCopyExists>
</AccountantCopy>
<DataExtRet>
<OwnerID>{ADB06C95-6FC7-4D8D-AC30-6A28E24AAB22}</OwnerID>
<DataExtName>AppLock</DataExtName>
<DataExtType>STR255TYPE</DataExtType>
<DataExtValue>LOCKED:QAXP1JV_VM:634975201418013380</DataExtValue>
</DataExtRet>
<DataExtRet>
<OwnerID>{ADB06C95-6FC7-4D8D-AC30-6A28E24AAB22}</OwnerID>
<DataExtName>FileID</DataExtName>
<DataExtType>STR255TYPE</DataExtType>
<DataExtValue>{714E8016-F6D4-4530-AFC3-995A34F3F7CE}</DataExtValue>
</DataExtRet>
</CompanyRet>
</CompanyQueryRs>
</QBXMLMsgsRs>
</QBXML>
20130227.00:15:07 UTC : QBWebConnector.CompanyFileLock.getLock() : Got Lock = LOCKED:QAXP1JV_VM:634975201418013380
20130227.00:15:07 UTC : QBWebConnector.CompanyFileLock.Send_DataExtModRqXML() : XML dump follows: -
<?xml version="1.0"?><?qbxml version="10.0"?><QBXML><QBXMLMsgsRq onError="stopOnError"><DataExtModRq requestID="1"><DataExtMod><OwnerID>{ADB06C95-6FC7-4D8D-AC30-6A28E24AAB22}</OwnerID><DataExtName>AppLock</DataExtName><OtherDataExtType>Company</OtherDataExtType><DataExtValue>UNLOCKED:QAXP1JV_VM</DataExtValue></DataExtMod></DataExtModRq></QBXMLMsgsRq></QBXML>
20130227.00:15:08 UTC : QBWebConnector.CompanyFileLock.Send_DataExtModRqXML() : XML dump follows: -
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<DataExtModRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<DataExtRet>
<OwnerID>{ADB06C95-6FC7-4D8D-AC30-6A28E24AAB22}</OwnerID>
<DataExtName>AppLock</DataExtName>
<DataExtType>STR255TYPE</DataExtType>
<DataExtValue>UNLOCKED:QAXP1JV_VM</DataExtValue>
</DataExtRet>
</DataExtModRs>
</QBXMLMsgsRs>
</QBXML>
20130227.00:15:08 UTC : QBWebConnector.CompanyFileLock.unsetLock() : Company file has been unlocked for ownerID = <{ADB06C95-6FC7-4D8D-AC30-6A28E24AAB22}>
20130227.00:15:08 UTC : QBWebConnector.SOAPWebService.update() : Company file has been unlocked.
20130227.00:15:08 UTC : QBWebConnector.SOAPWebService.update() : Ending session to QuickBooks.
20130227.00:15:08 UTC : QBWebConnector.SOAPWebService.DisconnectFromQB() : Session ended and connection closed
20130227.00:15:08 UTC : QBWebConnector.SOAPWebService.do_closeConnection() : *** Calling closeConnection() with following parameter:<wcTicket="03dfdb40-3588-4d1b-b51f-000b3d2de071">
20130227.00:15:10 UTC : QBWebConnector.SOAPWebService.do_closeConnection() : Received from closeConnection() following parameter:<ccResponse="OK">
20130227.00:15:10 UTC : QBWebConnector.SOAPWebService.do_closeConnection() : CloseConnection called to application.
20130227.00:15:10 UTC : QBWebConnector.SOAPWebService.do_closeConnection() : Response received from application = OK
20130227.00:15:10 UTC : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to False
20130227.00:15:10 UTC : QBWebConnector.RegistryManager.setUpdateLock() : ********************* Update session unlocked *********************
20130227.00:15:10 UTC : QBWebConnector.SOAPWebService.update() : update completed.
20130227.00:15:10 UTC : QBWebConnector.WebServiceManager.DoUpdateSelected() : Update for application = 'jvQBWebSyncApplication' has COMPLETED
20130227.00:15:10 UTC : QBWebConnector.WebServiceManager.DoUpdateSelected() : Update session has ended.

Why is your web server returning a 404 Not Found error?
20130227.00:15:07 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : QBWC1042:
ReceiveResponseXML failed Error message: The request failed with HTTP
status 404: Not Found. More info:
Also, you should post an entire log - this only shows the response, where's the request?

Related

Jetty MDC handler doesn't provide contextPath

Jetty 9.3.8.v20160314 running on AWS EC2 Linux machine with Java 1.8.0_51 has two web apps under two different dir+context.xml - webapps/app1 and webapps/app2 with an empty webapps/ROOT directory.
I'm trying to get each webapp to have a separate log with contextPath in its name.
Each app has the following webapps/appX.xml context defined -
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/appX</Set>
<Set name="war">
<SystemProperty name="jetty.home" default="."/>/webapps/appX
</Set>
</Configure>
Followed Example: Centralized Logging with Logback and installed webapp-logging module, app is using slf4j Logger and resources/logback.xml is -
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss} %t %c{0} [%p] %m%n</pattern>
</encoder>
</appender>
<appender name="SIFT" class="ch.qos.logback.classic.sift.SiftingAppender">
<discriminator>
<key>contextPath</key>
<defaultValue>unknown</defaultValue>
</discriminator>
<sift>
<appender name="FILE-${contextPath}" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${jetty.home}/logs/${contextPath}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${contextPath}_%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- keep 30 days' worth of history -->
<maxHistory>30</maxHistory>
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss} %t %c{0} [%p] %m%n</pattern>
</encoder>
<append>true</append>
</appender>
</sift>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="SIFT"/>
</root>
</configuration>
But it all goes to unknown.log. Using servername instead works well and creates separate file for each domain being used to access the server.
So it would seem that contextPath isn't properly assigned by ContextLogHandler.
Why is it empty?

The ServiceClass object does not implement the required method in the following form: OMElement login(OMElement e)

After i upgraded the axis2 from 1.6.2 to 1.7.0 i get the following exception:
"The ServiceClass object does not implement the required method in the following form: OMElement"
most of the answers I found suggest to set the rpc message receivers in services.xml which i already had from previous version:
<service name="LogService" scope="transportsession">
<description>
Log
</description>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<parameter name="ServiceClass">
com.viaMEDICI.viaWS.services.LogService
</parameter>
Any other ideas what could have gone wrong? List services and the wsdl looks fine.
LE:
something different is the namespace before was "axis2ns2" now it is "nsoMZdG". No idea where could this come from.. and also i don't get all parameters by calling the ws restful and just only the first one...
As noted in the Apache Axis2 1.7.0 release notes, the http://www.w3.org/2004/08/wsdl/XXX MEP URIs are no longer supported. Use http://www.w3.org/ns/wsdl/XXX instead.
I had the same issue
I solved it by updating
http://www.w3.org/2004/08/wsdl/in-only to http://www.w3.org/ns/wsdl/in-only
and
http://www.w3.org/2004/08/wsdl/in-out to http://www.w3.org/ns/wsdl/in-out
Example services.xml
Earlier
<service name="Axis2HelloWorld" >
<Description>
Please Type your service description here
</Description>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<parameter name="ServiceClass" locked="false">com.ciber.webservices.Axis2HelloWorld</parameter>
</service>
New
<service name="Axis2HelloWorld" >
<Description>
Please Type your service description here
</Description>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<parameter name="ServiceClass" locked="false">com.ciber.webservices.Axis2HelloWorld</parameter>
</service>
update to axis2 1.7.1 solved this problem, but there now i discovered other problems... like this one:
[2016-03-02 11:39:47] [ERROR] [org.apache.axis2.rpc.receivers.RPCMessageReceiver] - null
java.lang.NullPointerException
at org.apache.axis2.databinding.utils.BeanUtil.addInstanceTypeAttribute(BeanUtil.java:1316)
at org.apache.axis2.databinding.utils.BeanUtil.getPropertyQnameList(BeanUtil.java:390)
at org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:88)
at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProperties(ADBXMLStreamReaderImpl.java:989)
at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:829)
at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:71)

Apple Pay and Authorize.net Token Submit Fails

I am working on getting Apple Pay integrated in my app through Cordova (Phonegap) and have successfully retrieved my Apple Pay token. I followed all the instructions outlined in both Apple Pay and ADN documentation. Generated all required keys and certificates (twice). I already have a working ADN integration using both CIM and AIM, so I know my integration is solid. I can process regular auth-capture transactions no problem.
I am working in the ADN sandbox and have tried switching my account between Live and Test, as well as switching test mode between True and False.
Here is the information I generated just now (redacted and truncated):
Apple Pay Token
eyJ2ZXJz.....2dKdWs9In19
Base 64 Decoded Apple Pay Token
{ "data" : "PtFJv.....UNFGg==",
"header" : { "ephemeralPublicKey" : "MFkwEw.....Baor01w==",
"publicKeyHash" : "Q1q.....Juk=",
"transactionId" : "c51.....b4"
},
"signature" : "MIAG.....AAAA",
"version" : "EC_v1"
}
ADN Request
<?xml version="1.0" encoding="UTF-8"?>
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>REDACTED</name>
<transactionKey>REDACTED</transactionKey>
</merchantAuthentication>
<refId>C.....4</refId>
<transactionRequest>
<transactionType>authCaptureTransaction</transactionType>
<amount>5</amount>
<payment>
<opaqueData>
<dataDescriptor>COMMON.APPLE.INAPP.PAYMENT</dataDescriptor>
<dataValue>eyJ2ZX.....9In19</dataValue>
</opaqueData>
</payment>
</transactionRequest>
</createTransactionRequest>
ADN Response
<?xml version="1.0" encoding="UTF-8"?>
<createTransactionResponse xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<refId>CID2254674</refId>
<messages>
<resultCode>Error</resultCode>
<message>
<code>E00027</code>
<text>The transaction was unsuccessful.</text>
</message>
</messages>
<transactionResponse>
<responseCode>3</responseCode>
<authCode />
<avsResultCode>P</avsResultCode>
<cvvResultCode />
<cavvResultCode />
<transId>0</transId>
<refTransID />
<transHash>2E.....B72</transHash>
<testRequest>0</testRequest>
<accountNumber />
<accountType />
<errors>
<error>
<errorCode>153</errorCode>
<errorText>There was an error processing the payment data.</errorText>
</error>
</errors>
</transactionResponse>
</createTransactionResponse>
Needless to say, this error response is less than helpful. ANY help would be greatly appreciated. Also posted to ADN community forums.

How to handle endpoint failure in wso2esb and wso2dss

I created proxy services using wso2dss for data insertion, so services working fine I am quite happy with this. But while any data duplication errors occurred in wso2dss I need to handle it in wso2esb so I kept this property in wso2esb for dss level error handle:
<property name="FORCE_ERROR_ON_SOAP_FAULT" value="true"/>
So its working fine I am getting 50000 code using this I am able to handle error while this error my esb showing this message:
[2014-03-07 11:22:40,778] INFO - LogMediator To: /services/GeoLocationInsertion, MessageID: urn:uuid:b51629e2-934e-4227-8f50-65fd9f719b8e, Direction: request, userid = -1212807836, username = sa|214057357158656, password = sa
[2014-03-07 11:22:40,783] INFO - LogMediator To: /services/ServiceLogin, MessageID: urn:uuid:1967bde1-d820-46f9-957d-55fbb6f7ea9e, Direction: request, usercode = sa, clientid = 214057357158656
[2014-03-07 11:22:40,833] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:24aea5ed-f4e2-4214-809b-b3101031edf7, Direction: response, faisal = true
[2014-03-07 11:22:40,838] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:42a17360-cd04-43bc-83ef-1f53b639de11, Direction: response, kk = true
[2014-03-07 11:22:40,853] WARN - EndpointContext Endpoint : endpoint_71f1485e740c2b97ec407fe4d3bf86929122480f208b6642 will be marked SUSPENDED as it failed
[2014-03-07 11:22:40,853] WARN - EndpointContext Suspending endpoint : endpoint_71f1485e740c2b97ec407fe4d3bf86929122480f208b6642 - last suspend duration was : 30000ms and current suspend duration is : 30000ms - Next retry after : Fri Mar 07 11:23:10 IST 2014
[2014-03-07 11:22:40,856] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:42a17360-cd04-43bc-83ef-1f53b639de11, Direction: response, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 500000, ERROR_MESSAGE = null
[2014-03-07 11:22:40,857] INFO - LogMediator To: , WSAction: , SOAPAction: , MessageID: urn:uuid:42a17360-cd04-43bc-83ef-1f53b639de11, Direction: response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><ResponseJSON><Body><Data><Exception>duplicate key value violates or The system is attempting to access an inactive service </Exception></Data></Body><Status>500000</Status></ResponseJSON></soapenv:Body></soapenv:Envelope>
Above error message means my endpoint gone into suspend mode after 30sec it will automatically in active mode.
If any user tries on the same time he is unable to insert his correct data and he is losing the data due to endpoint nonavailability. So how we can keep endpoint in active mode?
If any other error will come this issue is not raising:
[2014-03-07 11:22:40,853] WARN - EndpointContext Suspending endpoint : endpoint_71f1485e740c2b97ec407fe4d3bf86929122480f208b6642 - last suspend duration was : 30000ms and current suspend duration is : 30000ms - Next retry after : Fri Mar 07 11:23:10 IST 2014
So how would I do this?
If I remove the property I am unable to handle DSS level message and I am getting error like this even my user not getting any response:
[2014-03-07 11:20:51,816] ERROR - NativeWorkerPool Uncaught exception
java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMElementImpl cannot be cast to org.apache.axiom.soap.SOAPFault
at org.apache.axiom.soap.impl.llom.SOAPBodyImpl.getFault(SOAPBodyImpl.java:120)
at org.apache.synapse.util.POXUtils.convertSOAPFaultToPOX(POXUtils.java:46)
at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:91)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:308)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:92)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:232)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:443)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:166)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:222)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
So that 30sec are so important, it causes my client's data loss. How could I avoid this endpoint failure?
The actual error in wso2dss is:
Nested Exception:-
org.postgresql.util.PSQLException: ERROR: column "deviceid" is of type bigint but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
Position: 81
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:105)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:110)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.getReader(DSOMDataSource.java:116)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourcedElementImpl.java:225)
... 41 more
I handle it in wso2esb fault and working fine also but endpoint failure is uncatchble
If you want to configure your DSS endpoint's suspension behavior in the ESB, please refer to the Endpoint Error Handling documentation.
If you drop the FORCE_ERROR_ON_SOAP_FAULT property, you should still be able to handle a soap fault from your DSS response in the out sequence of an ESB proxy.
yo can disable that config with this configuration in your endpoint:
<?xml version="1.0"?>
<endpoint>
<address uri="http://localhost:9000/services/SimpleStockQuoteService">
<timeout>
<duration>30000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
</markForSuspension>
</address>
</endpoint>
I came up with this error myself and it was terrible to identify it and find a way to work with it. It seems there is a bug in older versions of WSO2 ESB (we have this problem with version 4.8.1) when dealing with a returned soap fault.
You can see the answer of #JorgeInfanteOsorio to disable the endpoint suspension, but you will need an workaround for the "Uncaught exception" issue. What I found is that it is possible to retrieve the parameters from the fault message and then "clear" the current payload, so any subsequent calls wont return the exception issue.
Example:
<!--
After we call a webservice on DSS or other webservice we check if the message contains a fault message
-->
<property xmlns:s="http://www.w3.org/2003/05/soap-envelope"
name="return_fault"
expression="/s:Envelope/s:Body/s:Fault"/>
<filter source="boolean(get-property('return_payzen_fault'))" regex="true">
<then>
<!--
There is a fault message on the payload...
-->
<!--
Retrieve the information from the fault message. How you will access it and which information you will retrieve may be different depending if the answer comes from a third part webservice or from your own DSS.
-->
<property xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" name="code" expression="/s:Envelope/s:Body/s:Fault/s:Code/s:faultcode"/>
<property xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" name="code" expression="/s:Envelope/s:Body/s:Fault/s:Code/s:faultstring"/>
<!--
Clear the payload containing the fault message
-->
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body/>
</soapenv:Envelope>
</format>
<args/>
</payloadFactory>
<!--
Now you can proceed and process the message as usual without getting the exception. You may probably use the parameters stored in the properties at the beginning to determine which error occured and what you are going to do next.
-->
</then>
</filter>
<!--
There is no fault message, you can proceed with the message processing here.
-->

Error obtaining the response from a Web Service call

I am trying to consume a Web Service and, though apparently all my parameters seem to be okay, I keep getting an erro page as response instead of an array of bytes which is what I am expecting and what the WebService is supposed to return.
My objective is to Seal a file in order to make them only readable for the right people. I am using the IRM Oracle Web Services to acomplish that, but, though all my parameters semm alright, I can't get the reponse properly.
Acording to the Oraclel support, my request is fine, so it must be something on IIS I guess. Any help?
Exception Message:
The content type multipart/related;start="";type="application/xop+xml";boundary="uuid:ab73a894-eaf4-4293-aa4e-c3358b95ec73";start-info="text/xml" of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 748 bytes of the response were: '--uuid:ab73a894-eaf4-4293-aa4e-c3358b95ec73 Content-Id: Content-Type: application/xop+xml;charset=utf-8;type="text/xml" Content-Transfer-Encoding: binary '.
Exception Stacktrace:
Server stack trace: at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at HTMLToPDFComponenteConverter.sealing_services.SealingServices.Seal(SealRequest request) at HTMLToPDFComponenteConverter.sealing_services.SealingServicesClient.HTMLToPDFComponenteConverter.sealing_services.SealingServices.Seal(SealRequest request) at HTMLToPDFComponenteConverter.sealing_services.SealingServicesClient.Seal(Byte[] stream, String mimeType, SealingOptions options) at HTMLToPDFComponenteConverter.ConvertToPDF.Page_Load(Object sender, EventArgs e)
Exception Data:
System.Collections.ListDictionaryInternal
Exception Source:
mscorlib
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.ContentType = "application/vnd.sealedmedia.softseal.pdf";
Response.AddHeader("Content-Disposition", "attachment; filename=Relatorio.spdf");
SealingServicesClient sealingServicesClient =
new SealingServicesClient("SealingServices");
sealingServicesClient.ClientCredentials.UserName.UserName =
ConfigurationManager.AppSettings["Irm-user"];
sealingServicesClient.ClientCredentials.UserName.Password =
ConfigurationManager.AppSettings["Irm-password"];
// Create the classification details used in the sealing options
SealingOptions sealingOptions = new SealingOptions();
// This just set several parameters which the WebService validates. (They're all okay)
sealingOptions.classification = GetClassificationSetUp();
String mimeType = "application/pdf";
// Here is where everything goes wrong. I keep getting an error message.
byte[] sealedFile = sealingServicesClient.Seal(file, mimeType, sealingOptions);
if (sealedFile != null && sealedFile.Length > 0)
{
Response.AddHeader("Content-Length", sealedFile.Length.ToString());
Response.BinaryWrite(sealedFile);
Response.Flush();
Response.End();
}
Meu WebConfig está desse jeito:
<system.serviceModel>
<client>
<endpoint address="https://url:porta/irm_sealing/sealing_services"
binding="basicHttpBinding" bindingConfiguration="SealingServicesBinding"
contract="sealing_services.SealingServices" name="SealingServices"
behaviorConfiguration="IrmSealingAbril">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
<behaviors>
<endpointBehaviors>
<behavior name="IrmSealingAbril">
<clientCredentials>
<clientCertificate storeLocation="LocalMachine"
storeName="Root"
x509FindType="FindByThumbprint"
findValue="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX">
</clientCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="SealingServicesBinding" closeTimeout="00:05:00"
openTimeout="00:05:00" receiveTimeout="00:10:00" sendTimeout="00:05:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2097152" maxBufferPoolSize="524288" maxReceivedMessageSize="2097152"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport">
<transport clientCredentialType="Basic" realm="weblogic" />
</security>
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
Where am I going wrong?
Additional information: The request apparently is correct as confirmed by oracle support. However, I can't get the returning response. I thought it could be something related to the IIS, but I do not have mush skill at configuring it.
Thanks in advance.
I found the answer for my problem here:
Error consuming webservice, content type "application/xop+xml" does not match expected type "text/xml"
Thanks anyway