Loading...
 
Multi-Language Add-In for VB6

Multi-Language Add-In for VB6


Errors at launch

Hi,

I'm testing the trial version.
I've installed the setup.
When I open VB6 I get 4 errors that pops up.
I click 'continue' on them.
In the end, the tools seems to work without errors (for what I've tested so far).

Here are the errors:

*******

An error occured in the Multi-Language Add-In:

Licensed User:
Version: Version 6.03.0004
Function: Class_Initialize
Line number: 50
Description: WSDLReader:XML Parser failed at linenumber 0, lineposition 0, reason is: Accès refusé.
HRESULT=0x1: Fonction incorrecte.
- WSDLReader:Loading of the WSDL file failed HRESULT=0x80070057: Paramètre incorrect.
- Client:One of the parameters supplied is invalid. HRESULT=0x80070057: Paramètre incorrect.

Additional details:


*******

An error occured in the Multi-Language Add-In:

Licensed User:
Version: Version 6.03.0004
Function: SetAutoProxy
Line number: 206
Description: Client:Soap client is not initialized. HRESULT=0x80040007: Objet non initialisé

Additional details:

*******

An error occured in the Multi-Language Add-In:

Licensed User:
Version: Version 6.03.0004
Function: wsm_GetLanguages
Line number: 109
Description: L'objet ne gère pas cette propriété ou cette méthode
Additional details:

********

An error occured in the Multi-Language Add-In:

Licensed User:
Version: Version 6.03.0004
Function: MicrosoftTranslatorError
Line number: 16
Description: Valeur de propriété incorrecte
Additional details:

Germany

These are errors trying to access the Microsoft Translator Web Service.

I will look at the exact errors and line numbers in the next few days.

Phil


Germany

Hi,

I think that I have now fixed this problem in version 6.03.0005, which you can download with the link http://www.jollans.com/SetupMultiLang.exe.

I am using MSSoap30 to access the web service from VB6. It's hard to find good documentation for this component (probably because it is so old), but there seems to be problem in the initialisation sequence.

The first call is to the function SoapClient30.MSSoapInit2, specifying the path to the WDSL definition file. Previously I was using a reference to the file http://api.microsofttranslator.com/V1/SOAP.svc in the internet. In your case, it looks like this failed (Accès refusé).

To actually use the web service, you can specify a proxy address (and port number) which is probably necessary for you. However, as far as I can tell, it is not possible to specify the proxy address before calling MSSoapInit2.

My solution is to install the WDSL file onto the target system and to specify the local file in the call to MsSoapInit2.

After that, if the access fails, you should see a dialog where you can enter a proxy address, or simply disable online translation.

Best regards
Phil


Hi,

You're probably rigth about the proxy problem as I work behind one.
I'll let you know if it works now.
but should I uninstall the previous addin version before running SetupMultiLang.exe?

Marc


Hi,

unfotunately, thehe is still some errors
here is the first one that pops up :

Licensed User:
Version: Version 6.03.0005
Function: Class_Initialize
Line number: 52
Description: WSDLReader:XML Parser failed at linenumber 0, lineposition 0, reason is: Accès refusé.
HRESULT=0x1: Fonction incorrecte.
- WSDLReader:Could not find '/definitions/service' inside the 'http://api.microsofttranslator.com/v1/soap.svc' namespace of the wsdl file HRESULT=0x80070057: Paramètre incorrect.

- WSDLReader:Analyzing the WSDL file failed HRESULT=0x80070057: Paramètre incorrect.
- Client:One of the parameters supplied is invalid. HRESULT=0x80070057: Paramètre incorrect.

Following errors seems to be same as the ones in my first post except that line is 209 for 2nd error and 112 for third error.

Thanks in advance,
Marc

Germany

Hi,

I agree, it looks like they are the same errors.

I have already spent some time trying to figure out what is causing this error, obviously without success. Since I do not get this error, it is almost impossible for me to solve the problem.

I have two suggestions:

(1)
I trap the error and disable the Microsoft Translator completely. I don't like this solution, but it is better than getting errors every time you start the Add-In.

(2)
I send you a test program, and maybe you can figure out a solution.

I have uploaded a simple test program, which you can download with the following link:
http://www.jollans.com/MicrosoftTranslatorTest.zip

Actually, it would be enough to create a test project in VB6, add a reference to Microsoft Spat Type Library v3.0 and past in the following code:

Option Explicit

Private sc_Soap As SoapClient30
Private Const c_WSDL_URL As String = "http://api.microsofttranslator.com/V1/SOAP.svc"
Private Const c_SERVICE As String = "Soap"
Private Const c_PORT As String = "BasicHttpBinding_LanguageService"
Private Const c_SERVICE_NAMESPACE As String = "http://api.microsofttranslator.com/v1/soap.svc"

Private Sub Form_Load()

  Dim str_WSML As String
  str_WSML = ""

  Set sc_Soap = New SoapClient30

  sc_Soap.MSSoapInit2 c_WSDL_URL, str_WSML, c_SERVICE, c_PORT, c_SERVICE_NAMESPACE
  
End Sub

The error occurs on the function call MSSoapInit2.

In the test program, this code is in the Class_Initialize function in the MicrosoftTranslator class.

I have included a second version of the call to MSSoapInit2 which loads the soap definition from a local file MicrosoftTranslatorSoap.svc (which I have included with the project). To try this version you will have to uncomment the line and enter the correct path to the file.

This is more or less the change I made in the most recent version, because I thought that it would prevent it accessing the internet during this function call.

Note that this test program only initialises the class, but doesn't call any functions in the Web Service. The functions in the web service require an AppID, which you can obtain from Microsoft (at http://www.bing.com/developers/createapp.aspx for anybody who is interested). I'm a bit reluctant to give out the ID which I use in the Add-In. If necessary, I can generate another ID.

Phil


Hi,

I've tried the test program and got the same behaviour.
Rigth now, I d'ont have much time to have a deeper look at the bug, maybe later I will.

What is Microsoft Translator used for? Can it be skipped without major limitation?
Maybe it could be interesting to add an option so that it could be disabled.
It migth be interseting too, in case someone installs the addin on a machine that has no web access at all.

By the way thanks for the time you've spent on it
Marc

Germany

Hi Marc,

I have managed to reproduce this error, by the simple method of disconnecting my network cable!

Clearly, the Add-In should not generate any error messages, simply because you are working offline. I have uploaded a new version which disables the Microsoft Translator in this situation.

The Microsoft Translator is an optional feature, with which you can generate translations automatically (for supported languages). It makes it easy to translate your complete project very quickly, but the translations are not very good. Ultimately, you still need a human translator to check and correct the translations.

Sorry, there is nothing in the help file about it yet. In fact the best description is in the forum for the .NET version of the Add-In. A lot of the information applies to the VB6 Add-In.

I found one interesting link about the problem with the SOAP interface at http://www.ureader.com/msg/1626265.aspx which seems to suggest that the same error may occur if your proxy server requires authentication. If your proxy would show a login box, it sounds like SoapClient30 just generates an error.

Might this apply to your network?

Phil

Hi,

I can confirm there's no more error poping up at launch.
We don't mind Microsoft Translator being disabled as the translation work is already done.
So I'm gonna work with this version.

Thanks for your work on that issue.
Marc