SOLVED

Communication Exception of SyncMultipleLeads

Go to solution
Anonymous
Not applicable

Communication Exception of SyncMultipleLeads

Hi all,

When syncing Leads to Marketo by API SyncMultipleLeads, I get exception with message 'The content type text/html 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 0 bytes of the response were: ''.'
Is there anybody who has met this issue?
Any suggestions?

Thanks,
Biao
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Communication Exception of SyncMultipleLeads

Hi Erik,
I'm sorry that our test customer user works well for this issue and I'm not allowed to reproduce this error too many times on our customer account.
Could you please let me explain the response for you?

The green part in the picture could be read, and it is the response header.
"
HTTP/1.1 200 OK
Date: Mon, 20 Oct 2014 09:46:20 GMT
Server: Apache
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 20
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html
Set-Cookie: BIGipServerabdweb_app_https=470286602.47873.0000; path=/
"

The balck part may be response body, but is really
unreadable. But, no matter what it is, it is too short to be a correct response for updating 300+ Leads.

My problem is that, while we are using the same API and data of the same format, other batches of data are updated correctlly and expecting XML responses are returned, but for this specified data and specified user, there is HTML but not XML returned. It could be reproduced not only in batches working but also in single working, so I think it is not a Web Service level issue.
Could you help me to find out what case Marketo would send this kind of response in?

Thanks,
Biao



It could not be reproduced now. It may be an issue for special data

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Re: Communication Exception of SyncMultipleLeads

Hi Biao,

It seems like the code you have wrapping the API call is having trouble parsing the return value. Can you output the exact call and exact response in the logs for troubleshooting? That often helps.
Anonymous
Not applicable

Re: Communication Exception of SyncMultipleLeads

Hi Erik,
I just call the SOAP API in C# :
public MarketoSvc.SuccessSyncMultipleLeads syncMultipleLeads(MarketoSvc.AuthenticationHeaderInfo AuthenticationHeader, MarketoSvc.ParamsSyncMultipleLeads paramsSyncMultipleLeads)

The MarketoSvc is my project reference namespace, and the response would always be deserialized by SOAP Service of dotNET.
It seems that the API are expecting XML but the response is a HTML string. And the error position is not all the same.
So, could you help me to find out an example that causing error with HTML but not XML?

Thanks,
Biao
 
Anonymous
Not applicable

Re: Communication Exception of SyncMultipleLeads

Hard to troubleshoot this kind of thing at the code layer. Instead, can you output the raw XML request and response of the pure SOAP call? That'll help us figure out what it could be.
Anonymous
Not applicable

Re: Communication Exception of SyncMultipleLeads

Hi Erik,

The expected response should be XML text, but my error response is HTML (content type).
The raw response is :
"
HTTP/1.1 200 OK
Date: Mon, 20 Oct 2014 09:46:20 GMT
Server: Apache
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 20
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html
Set-Cookie: BIGipServerabdweb_app_https=470286602.47873.0000; path=/

����������������

"

When sending the same data to another customer, it works well.
Could this information help?

Thanks,
Biao
 
Anonymous
Not applicable

Re: Communication Exception of SyncMultipleLeads

This is a screencut of the error request and response got by Fiddler.
0EM50000000SXEE.jpg
Anonymous
Not applicable

Re: Communication Exception of SyncMultipleLeads

This is super hard to read. Can you just log the XML from your SOAP client? Most have some option to do that.
Anonymous
Not applicable

Re: Communication Exception of SyncMultipleLeads

Hi Erik,
I'm sorry that our test customer user works well for this issue and I'm not allowed to reproduce this error too many times on our customer account.
Could you please let me explain the response for you?

The green part in the picture could be read, and it is the response header.
"
HTTP/1.1 200 OK
Date: Mon, 20 Oct 2014 09:46:20 GMT
Server: Apache
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 20
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html
Set-Cookie: BIGipServerabdweb_app_https=470286602.47873.0000; path=/
"

The balck part may be response body, but is really
unreadable. But, no matter what it is, it is too short to be a correct response for updating 300+ Leads.

My problem is that, while we are using the same API and data of the same format, other batches of data are updated correctlly and expecting XML responses are returned, but for this specified data and specified user, there is HTML but not XML returned. It could be reproduced not only in batches working but also in single working, so I think it is not a Web Service level issue.
Could you help me to find out what case Marketo would send this kind of response in?

Thanks,
Biao



It could not be reproduced now. It may be an issue for special data
Anonymous
Not applicable

Re: Communication Exception of SyncMultipleLeads

I understand all of that, but without seeing it I can't tell you what is happening. If you get the literal response, I can help otherwise I can't. It's probably some kind of error, but I can't tell you which one without seeing it.