SOAP CreateAsset large files not uploading


(Nic Hubbard) #1

I am wanting to see if there are any settings that might prevent the SOAP CreateAsset method from uploading a large file. I have tested files of a few MB in size and they work fine. But testing a 15MB file doesn't work. No errors anywhere, and no asset created. No SOAP return response. No errors in the logs.


Does anyone think that Suhosin could be the issue? Something else?


(Edison Wang) #2

Enable tracing in the SoapClient or whatever sofeware/function to check last request and response. See if there is any error you get.
If really nothing happens, it's very likely that Suhosin kills the request.



Your soap client should base64 encode the file and put it into the request XML. As i remember, the max size limit for XML file is a huge number, 15m file should be totally fine.

It may be Suhosin that intercepts that HTTP request.


(Nic Hubbard) #3

[quote]
Enable tracing in the SoapClient or whatever sofeware/function to check last request and response. See if there is any error you get.

If really nothing happens, it's very likely that Suhosin kills the request.



Your soap client should base64 encode the file and put it into the request XML. As i remember, the max size limit for XML file is a huge number, 15m file should be totally fine.

It may be Suhosin that intercepts that HTTP request.

[/quote]



Hmm, I am not using a client, just writing my calls in code.



Do you have a client you recommend for testing?


(Benjamin Pearson) #4

[quote]
Hmm, I am not using a client, just writing my calls in code.



Do you have a client you recommend for testing?

[/quote]



Na he means the code, in PHP it is SoapClient. To enable debugging in PHP it is:

    
    $client = new SoapClient($url, array("trace" => 1, "exception" => 1));

(Nic Hubbard) #5

[quote]
Na he means the code, in PHP it is SoapClient. To enable debugging in PHP it is:

    
    $client = new SoapClient($url, array("trace" => 1, "exception" => 1));

[/quote]



Thank you!


(Nic Hubbard) #6

Still struggling with this issue.


Could this possibly be something to do with a character limit of the var that takes in the BASE64 string? Perhaps it is getting clipped? A database timeout? Just trying to figure out the cause here.



You mentioned enabling debugging, but I am just using the normal SOAP Service in Matrix. Is there a place in the code that I need to enable debugging? I don't see

    new SoapClient
anywhere in the soap server files…

(Benjamin Pearson) #7

[quote]
Still struggling with this issue.



Could this possibly be something to do with a character limit of the var that takes in the BASE64 string? Perhaps it is getting clipped? A database timeout? Just trying to figure out the cause here.



You mentioned enabling debugging, but I am just using the normal SOAP Service in Matrix. Is there a place in the code that I need to enable debugging? I don't see

    new SoapClient
anywhere in the soap server files…

[/quote]



No SoapClient is what you would use in your code to connect to Matrix, the previous example is done in PHP, but you might use Obj C, JS etc.

(Nic Hubbard) #8

[quote]
No SoapClient is what you would use in your code to connect to Matrix, the previous example is done in PHP, but you might use Obj C, JS etc.

[/quote]



Yes, I am connecting to the Matrix Soap Server using Objective-C, but I figured that the soap server in Matrix would have used the php code that you posted, which would allow me to add the debug line.



Maybe I am confusing the issue here, but I feel like I have done about all the debugging from the side that makes the call to the Matrix soap server, as I never get a response back when it fails on a large upload.


(Benjamin Pearson) #9

[quote]
Yes, I am connecting to the Matrix Soap Server using Objective-C, but I figured that the soap server in Matrix would have used the php code that you posted, which would allow me to add the debug line.



Maybe I am confusing the issue here, but I feel like I have done about all the debugging from the side that makes the call to the Matrix soap server, as I never get a response back when it fails on a large upload.

[/quote]



Sorry, I think you may be forced to debug (or file a support ticket) from here. Suhosin would be the most obvious point but it would only be a guess without knowing what you have configured.



Also just to be clear, you said no response from Soap… you meant no response as in no xml and not no response as in the no content in the xml? The difference being the latter might have some sort of error message instead of the response you were looking for. When no XML is returned that is a pretty good indicator it would be a server related issue, quite possibly outside of Matrix itself.



Also, you may want to check the XML sent to the server is correct and well formed. Either the client should be able to return this or failing that a tcp dump between your computer and the server should capture the XML.


(Nic Hubbard) #10

[quote]
Sorry, I think you may be forced to debug (or file a support ticket) from here. Suhosin would be the most obvious point but it would only be a guess without knowing what you have configured.



Also just to be clear, you said no response from Soap… you meant no response as in no xml and not no response as in the no content in the xml? The difference being the latter might have some sort of error message instead of the response you were looking for. When no XML is returned that is a pretty good indicator it would be a server related issue, quite possibly outside of Matrix itself.



Also, you may want to check the XML sent to the server is correct and well formed. Either the client should be able to return this or failing that a tcp dump between your computer and the server should capture the XML.

[/quote]



Thanks Ben.



Yeah, no XML, no nothing. No errors from the server either.



The XML sent should be fine, as a smaller file using the exact method works perfectly, just that the large file doesn't. I will keep investigating on the server side. Strange thing is, I have seen this happen on 4 different servers. I am going to continue with Suhosin.