Can you share the response XML for this issue. ( If you're using devkit, then please set the logger in DEBUG mode, to get the raw request and response XMLs)
PFB one working JE response.
<JournalEntry domain="QBO" sparse="false">
<Id>6</Id>
<SyncToken>0</SyncToken>
<MetaData>
<CreateTime>2014-03-10T21:10:17-07:00</CreateTime>
<LastUpdatedTime>2014-03-10T21:10:17-07:00</LastUpdatedTime>
</MetaData>
<DocNumber>1</DocNumber>
<TxnDate>2014-03-11</TxnDate>
<CurrencyRef name="United States Dollar">USD</CurrencyRef>
<Line>
<Id>0</Id>
<Description>Debit</Description>
<Amount>100.00</Amount>
<DetailType>JournalEntryLineDetail</DetailType>
<JournalEntryLineDetail>
<PostingType>Debit</PostingType>
<Entity>
<Type>Customer</Type>
<EntityRef name="Customer123">2</EntityRef>
</Entity>
<AccountRef name="Accounts Receivable (A/R)">48</AccountRef>
<ClassRef name="CLASS-1">3000000000000199718</ClassRef>
</JournalEntryLineDetail>
</Line>
<Line>
<Id>1</Id>
<Description>Credit</Description>
<Amount>100.00</Amount>
<DetailType>JournalEntryLineDetail</DetailType>
<JournalEntryLineDetail>
<PostingType>Credit</PostingType>
<AccountRef name="Sales">1</AccountRef>
</JournalEntryLineDetail>
</Line>
<Adjustment>false</Adjustment>
</JournalEntry>
QBO UI( US company )
Thanks
Instead of
<EntityRef>
<EntityRef>21</EntityRef>
<Type>Customer</Type>
</EntityRef>
Please try (as you got from the response)
<Entity>
<Type>Customer</Type>
<EntityRef name="Right Way Cleaners">21</EntityRef>
</Entity>
You had used EntityRef twice in the composite tag.