We're sorry GroupDocsCloud doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.cloud

Error calling ConvertDocument

This is the exception from the SDK:
GroupDocs.Conversion.Cloud.Sdk.Client.ApiException:
The namespace declaration attribute has an incorrect ‘namespaceURI’: ‘http://www.w3.org/2000/xmlns/’.
at GroupDocs.Conversion.Cloud.Sdk.Client.RequestHandlers.ApiExceptionRequestHandler.ThrowApiException(HttpWebResponse webResponse, Stream resultStream)
at GroupDocs.Conversion.Cloud.Sdk.Client.RequestHandlers.ApiExceptionRequestHandler.ProcessResponse(HttpWebResponse response, Stream resultStream)
at System.Collections.Generic.List1.ForEach(Action1 action)
at GroupDocs.Conversion.Cloud.Sdk.Client.ApiInvoker.ReadResponse(WebRequest client, Boolean binaryResponse)
at GroupDocs.Conversion.Cloud.Sdk.Client.ApiInvoker.InvokeInternal(String path, String method, Boolean binaryResponse, String body, Dictionary2 headerParams, Dictionary2 formParams, String contentType)
at GroupDocs.Conversion.Cloud.Sdk.Api.ConvertApi.ConvertDocument(ConvertDocumentRequest request)

@flopez4

The ConvertDocument API method is working fine at my end. Please share your input document with us along with the sample code. We will test the scenario and will share our findings with you.

Here is the word document:
Proposal RNWL22-02188-R1.docx (77.6 KB)

Here is the code sample:
var configuration = new Configuration(AppSettings.GroupDocsAppSID, AppSettings.GroupDocsAppKey);

            //Upload the file
            var fileApi = new FileApi(configuration);
            using (var fileStream = File.Open(fullFileName, FileMode.Open))
            {
                var wordfileRequest = new UploadFileRequest($"AMS WorkArea/{Path.GetFileName(fullFileName)}", fileStream);
                var responseUpload = fileApi.UploadFile(wordfileRequest);
            }

            // Create necessary API instances
            var apiInstance = new ConvertApi(configuration);

            // Prepare convert settings
            var settings = new ConvertSettings
            {
                FilePath = $"AMS WorkArea/{Path.GetFileName(fullFileName)}",
                Format = "pdf",
                OutputPath = "AMS WorkArea",
                FontsPath = "Fonts"
            };

            // Convert to specified format
            var responseConvert = apiInstance.ConvertDocument(new ConvertDocumentRequest(settings));

Right now we are unable to convert any documents. All was working fine, nothing here was updated. The same document that worked an hour ago - will get an error now.

System.Net.WebException: The operation has timed out.

Our application is able to connect to other services. Any idea what is causing this error?

@flopez4

I am afraid I cannot reproduce the reported issue. You may share your credentials in a private message. So we will further investigate the issue.

Hello,

I randomly got the same error using ConvertDocument to convert docx to PDF : “Message: Internal error: The namespace declaration attribute has an incorrect ‘namespaceURI’: ‘http://www.w3.org/2000/xmlns/’.”

I’m testing your API with the same docx file since a few hours. It’s working then not working (the code and the file did not change).

You can check in my API call logs, I got error 400 regularly.

Can you help me ?

@brendan0403

We are sorry for the inconvenience. We are investigating the system logs and will share our findings with you soon.