Search code examples
vb.netweb-serviceswcfintuit-partner-platform

connection closing when getting all invoices


I have a web service that is communicating with the API v3. I have a client application that communicates with my web service. I am working on invoicing in my client application. I am unable to access the Intuit.Ipp.Data.SalesItemLineDetail class in my client application. Therefore, I am unable to pass the invoice from my web service to my client, also because of this, I cannot create an invoice in my client application to pass to my web service.

the web service will retrieve all of the invoices from intuit but fails when it passes the readonlycollection(of invoice) back to my client application.

the ex I get in my client application when I call getAll(invoice) is: System.ServiceModel.CommunicationException: The underlying connection was closed

the inner exception error message from the xml log in my web service is as follows: There was an error while trying to serialize parameter http://tempuri.org/:GetInvoicesResult. The InnerException message was 'Type 'Intuit.Ipp.Data.SalesItemLineDetail' with data contract name 'SalesItemLineDetail:http://schemas.datacontract.org/2004/07/Intuit.Ipp.Data' is not expected. Consider using a DataContractResolver or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.'. Please see InnerException for more details.

What have other people done in this situation? Is it a problem with web services? Can I pass the data type to my client through the web service somehow?


Solution

  • I did figure out a work around for this situation. I was unable to pass the actual invoice from the service so I had to create a sudo-invoice, in the service, that would carry only the specific data that I needed and pass that to my client.

    It seems the invoice object was too large for the service to pass along so I had to go this route to get the data I needed.