i am trying to add a payment to quickbooks online from my web app. This is the xml that i am sending:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="6.0"?>
<QBXML>
<SignonMsgsRq>
<SignonTicketRq>
<ClientDateTime>2013-05-09T01:37:58</ClientDateTime>
<SessionTicket>V1-115-Q04ffswegvh9uzxaw8qrud:689712285</SessionTicket>
<Language>English</Language>
<AppID>688664435</AppID>
<AppVer>1</AppVer>
</SignonTicketRq>
</SignonMsgsRq>
<QBXMLMsgsRq onError="stopOnError">
<ReceivePaymentAddRq>
<ReceivePaymentAdd defMacro="MACROTYPE"> <!-- required -->
<CustomerRef> <!-- required -->
<ListID >5</ListID> <!-- optional -->
</CustomerRef>
<ARAccountRef>
<FullName>Accounts Receivable:Customer Receivables</FullName>
</ARAccountRef>
<AppliedToTxnAdd> <!-- optional, may repeat -->
<TxnID useMacro="MACROTYPE" >143</TxnID> <!-- required -->
</AppliedToTxnAdd>
<TxnDate >2013-05-09</TxnDate>
<RefNumber >123</RefNumber>
</ReceivePaymentAdd>
</ReceivePaymentAddRq>
</QBXMLMsgsRq>
</QBXML>
I get an error saying:
SAX parser encountered an error parsing request file.
Exception from other package:
org.xml.sax.SAXParseException: The content of element type "ReceivePaymentAdd" must match "(CustomerRef,ARAccountRef?,TxnDate?,RefNumber?,TotalAmount?,PaymentMethodRef?,Memo?,DepositToAccountRef?,CreditCardTxnInfo?,(IsAutoApply|AppliedToTxnAdd+)
I just need to apply a payment to an invoice. The payment will always be for the full amount of the invoice.
Any ideas what is wrong?
Thanks Randy
The order of tags in qbXML matters.
So if the Intuit OSR reference shows you that the correct order of tags is:
<CustomerRef>
<ListID>IDTYPE</ListID>
</CustomerRef>
<ARAccountRef>
<FullName>STRTYPE</FullName>
</ARAccountRef>
<TxnDate>DATETYPE</TxnDate>
<RefNumber>STRTYPE</RefNumber>
...
<AppliedToTxnAdd> ...
And you instead send tags in this order:
<CustomerRef>
<ListID >5</ListID>
</CustomerRef>
<ARAccountRef>
<FullName>Accounts Receivable:Customer Receivables</FullName>
</ARAccountRef>
<AppliedToTxnAdd>
<TxnID useMacro="MACROTYPE" >143</TxnID>
</AppliedToTxnAdd>
<TxnDate >2013-05-09</TxnDate>
<RefNumber >123</RefNumber>
Then you're going to get errors.
(notice you have TxnDate and RefNumber after the AppliedToTxnAdd tag, when the spec defines it as coming before the AppliedToTxnAdd tag)
What it's trying to tell you here:
The content of element type "ReceivePaymentAdd" must match
"(CustomerRef,ARAccountRef?,TxnDate?,RefNumber?,TotalAmount?,PaymentMethodRef?,Memo?,DepositToAccountRef?,CreditCardTxnInfo?,(IsAutoApply|AppliedToTxnAdd+)
Is that it's expecting tags in that order, and you sent them in a different order than it expected.
If you fix the order of the tags, it will work.
We have some example qbXML requests on our QuickBooks integration wiki guide if that helps.
Related
I am using rosbridge. My current ros_distro is melodic. I cannot subscribe to custom messages with an error : Unable to load the manifest for package <pkg_name>. I sourced the bash file in another terminal : . ./devel/setup.bash and used rospack find <pkg_name> but this also gives an error : package not found.
This is strange as I can publish and subscribe to the same topic in ROS.
My directory structure looks like following :
overlay_ws
build
devel
src
CMakeLists.txt
ros_tutorials
CMakeLists.txt
package.xml
msg
msg1
msg2
msg3
scripts
talker.py
Here is the package.xml:
<?xml version="1.0"?>
<package format="2">
<name>ros_tutorials</name>
<version>0.0.0</version>
<description>The demo package</description>
<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe#example.com">Jane Doe</maintainer> -->
<maintainer email="vishal#todo.todo">vishal</maintainer>
<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>message_generation</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>message_runtime</exec_depend>
<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->
</export>
</package>
Is it possible to change default color of the TimePickerAndroid component ?
You would have to change it from the styles.xml file of android. Here's what you do:
1) Open up styles.xml: "android/app/src/main/res/values/styles.xml"
2) you'll need to add a few lines:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:timePickerDialogTheme">#style/Dialog.Theme</item>
</style>
<style name="Dialog.Theme" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#FF0000</item>
<item name="android:textColorPrimary">#0000FF</item>
</style>
In styles.xml you should already have:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
If you do just add the remaining lines. If not go ahead and add them.
4) Lastly, just recompile the app. "react-native run-android". You should see the color change right away.
Using React-native, unfortunately no.
However, by changing some java files in RN and using this solution from SO you might be able to do it.
If you succeed doing this, I suggest you create a Pull Request on RN's repository as it might be very useful for other users.
You could also develop it as a module and open source via NPM.
This is a really weird error, I think it may be a razor bug. I'm using VS 2012, MVC4, Framework 4.5.
Following these instructions: http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253806
I created a new MVC4 project and then I copied all my code (controllers, views, viewmodels) to it from the MVC3 project.
Eveything worked just fine, until I tested one View which has a custom helper and inside it it has one foreach, one switch, three if statements and then I call some other custom helpers in there too.
It's exactly the same code in both projects, in MVC3 it works, but in MVC4 it shows this message:
Compiler Error Message: CS1513: } expected
So I tried adding one curly bracket but it shows the same error, so I keep adding brackets and it won't stop telling me the same thing.
I googled this issue but I just found this question with no answer:
http://www.1771.in/asp-net-mvc-4-issues-migrating-mvc3-view-in-vs-2012-rc.html
has anyone experienced this issue?
The Razor parser of MVC4 is different from MVC3.
Razor v3 is having advanced parser features and on the other hand strict parsing compare to MVC3.
You may run into syntax error in view while converting MVC3 to MVC4 if you have not used razor syntaxes in correct manner.
Solution of some common razor code mistakes that are not allowed in Razor v2 are :
--> Avoid using server blocks in views unless there is variable declaration section.
Don’t : #{if(check){body}}
Recommended : #if(check){body}
--> Avoid using # when you are already in server scope.
Don’t : #if(#variable)
Recommended : #if(variable)
Don't : #{int a = #Model.Property }
Recommended : #{int a = Model.Property }
I had exactly the same issue.
In Razor MVC3 i was accessing the vars like this: #vSuggestion but in MVC4 the # is not necessary.
My example, i had this code in MVC3 working:
#{
var vSuggestion = ((dynamic)ViewData["suggestion"]);
}
<!-- more code here -->
#{ int suggestion = #vSuggestion;
switch (suggestion)
{
case Suggestion.INCORRECT_PASSWORD:
case Suggestion.USER_ALREADY_IN_DATABASE:
<span>Trata de iniciar sesión de nuevo</span><br />
<span>Recupera tu contraseña #Html.ActionLink("aquí", "Recover", "Account")</span>
break;
case Suggestion.EMAIL_DONT_EXISTS:
<span>Comprueba que el correo electrónico está bien escrito</span><br />
<span>Registrate (abajo)</span>
break;
}
}
In MVC4, Razor wasn't catching the first curly bracket from the switch statement. So i removed the # from #vSuggestion and razor parsed the code properly.
Hope it helps.
I ran into this "Expected }" issue as well and the culprit turned out to be an apostrophe in an HTML comment This seems like a bug in Razor.
Here is an example on how to reproduce this issue in the default MVC 4 application with VS 2012. Just add the following a comment with an apostrophe to the #section featured {} in the default.cshtml. Remove the apostrophe from the comment and it works OK.
#section featured {
<!-- hello world it's not cool -->
<section class="featured">
<div class="content-wrapper">
<hgroup class="title">
<h1>#ViewBag.Title.</h1>
<h2>#ViewBag.Message</h2>
</hgroup>
<p>...</p>
</div>
</section>
}
This may be more of a long shot but sometimes if you are using a keyword it will cause that error
List of Keywords VS 2012
http://msdn.microsoft.com/en-us/library/x53a06bb%28v=vs.110%29.aspx
I know two of the new keywords are await and async for 4.5
See the following for an example of what I am talking about
http://www.wduffy.co.uk/blog/css-class-property-asp-net-mvc-htmlattributes/
Try to add this line in web.config
<compilation debug="true" batch="false">
Now, when getting the error you should be able to open the temporary generated .cs file and take a look at generated code.
Maybe then you will more easily spot the problem.
For details look here Debugging ASP.NET generated code
Most helpful thing to do that will solve 6/10 of these for you is in VS2012
File-> Source Control -> Advanced -> Format this Document.
This will solve any un-closed div's, conditional statements even ul's and li's which cause big errors for .net.
I experienced this error but narrowed it down to a missing slash to close a tag. this worked in MVC3:
#helper metatags()
{
<meta charset="utf-8">
}
but not in MVC4. it requires this:
#helper metatags()
{
<meta charset="utf-8" />
}
I have a part of my web application that is an RESTfull api and part a more standard web-pages.
I wish to have the REST part with some custom filters such as the EntryPoint, SuccessHandler and FailureHandler. This part is within the /rest/** mapping.
In the other hand, everything else needs to have more common filters and is mapped with /**.
The problem is to find an easy way to define the filterChainProxy with different mapping-filters.
Right now this solution doesn't work:
<!-- Normal web app -->
<http auto-config="true" use-expressions="true" authentication-manager-ref="authenticationManager">
<form-login/>
<logout/>
<intercept-url pattern="/**" access="hasRole('ROLE_USER')" />
</http>
<!-- Configure RESTfull services -->
<http use-expressions="true" authentication-manager-ref="authenticationManager" entry-point-ref="restAuthenticationEntryPoint" >
<form-login authentication-success-handler-ref="restAuthenticationSuccessHandler" login-page="/rest/login" username-parameter="username" password-parameter="password" />
<logout logout-url="/rest/logout" />
<intercept-url pattern="/rest/**" method="GET" access="hasRole('ROLE_USER')" />
<intercept-url pattern="/rest/**" method="POST" access="hasRole('ROLE_ADMIN')" />
<intercept-url pattern="/rest/**" method="PUT" access="hasRole('ROLE_ADMIN')" />
<intercept-url pattern="/rest/**" method="DELETE" access="hasRole('ROLE_ADMIN')" />
</http>
It complains with: the univseral match being before other patterns.
Is there a way to define such a thing without resorting to define the filterChainProxy with the definition? The http version does help quite a lot to reduce the amount of configuration as I will have to manually set a UsernamePasswordAuthenticationFilter etc.
The next problem is more simple: I have to respond, after the form-login authentication with a JSON object.
So far, I have implemented a SuccessHandler (actually a version of the SimpleUrlAuthenticationSuccessHandler without the redirect part).
How do I write my JSON output?
I must have something like this:
HTTP 200 OK
with:
{"success":true,"customer {"email":"customer#email.com","session_id":"b83a41dfaca6785399f00837888886e646ff9088"}}
and a similar thing with the FailureHandler. It must be quite simple and it's surely is some very basic thing, but how do you do that? Redirecting to a custom controller is not a solution since I will have the 301 redirect status that a very simple REST client might not be able to understand.
At the very least, I wish to have only the http header and no body at all.
thanks!
If you can upgrade to Spring Security 3.1 it supports multiple chains using namespace configuration.
content of The application-content.xml is
<?xml version="1.0" encoding="utf-8"?>
<objects xmlns="http://www.springactionscript.org/schema/objects"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springactionscript.org/schema/objects
http://www.springactionscript.org/schema/objects/spring-actionscript-objects-1.0.xsd">
<property file="strings.properties" />
<object id="string1" class="String"/>
<object id="string2" class="String"/>
<object id="nlslzf" class="com.sgb.model.MyClass"/>
</objects>
content of strings.properties is:
s1=Firststring
s2=Secondstring
but error:
Main Thread (Suspended: Error: An object definition for 'string1' was not found.)
org.springextensions.actionscript.ioc.factory.support::AbstractObjectFactory/getObject
SpringActionScript/test
SpringActionScript/onCreationComplete
SpringActionScript/___SpringActionScript_Application1_creationComplete
flash.events::EventDispatcher/dispatchEventFunction [no source]
mx.core::UIComponent/dispatchEvent
mx.core::UIComponent/set initialized
mx.managers::LayoutManager/doPhasedInstantiation
Function/http://adobe.com/AS3/2006/builtin::apply [no source]
mx.core::UIComponent/callLaterDispatcher2
mx.core::UIComponent/callLaterDispatcher2
mx.core::UIComponent/callLaterDispatcher
i can run normal if removed the ''
why it is? springactionscript bug?
This does indeed 'smell' like a Spring Actionscript bug.
Please file a bug report for this in our JIRA system:
SpringAS JIRA
If you can, add a sample project that demonstrates the bug, that way we'll be able to track down the issue easier and faster.