Consuming webservice in Oxygene

Hi,

I need to build a webservice client in .NET.

First I tried “Import a SOAP Web Service from the Web by its URL” but It generated code that not compile…

Then, I am using VS “add service reference”… First using C# project, and ok it generates proxy classes (View in object browser option) but using oxygene I don´t have this option to view the code after adding service reference.
Oxygene does not generate proxy classes ?

So, how can I use service reference in Oxygene ? Use oxidizer to translate code from C# ?

Thanks
Willian.

Hello Willian,

First I tried “Import a SOAP Web Service from the Web by its URL”
but It generated code that not compile…

Could you please specify exact steps to reproduce your problem. Does it occur for one web service or for any web service you are trying to import?

Oxygene does not generate proxy classes ?
The context menu for service reference is missing “View in Object Browser” option). The bug is logged for further review (#55657). Though inspecting the folder with ServiceReference it contains “Reference.pas” file with correct code.

Also you can use wsdl.exe with language parameter for creating proxy classes (Web Services Description Language Tool (Wsdl.exe) | Microsoft Learn).

Best regards.

viktoriad said: Could you please specify exact steps to reproduce your problem. Does it occur for one web service or for any web service you are trying to import?

First webservice that I imported. Generated intf attached.

viktoriad said: Though inspecting the folder with ServiceReference it contains "Reference.pas" file with correct code.

No. ServiceReference contain no file … Nothing happens if I click there…

viktoriad said: Also you can use wsdl.exe with language parameter for creating proxy classes (http://msdn.microsoft.com/en-us/library/7h3ystb6.aspx).

Thanks, I will try…

Willian.

Hello Willian,

First webservice that I imported. Generated intf attached.
I examined the file you attached. The file is not compiled because you are using the same names for variables with different case. You should change that names in your web-service (e.g. recStoreID change to fRecStoreID) and regenerate _intf file again. Or you can change generated _intf file manually (which takes more time and cause new bugs).

No. ServiceReference contain no file … Nothing happens if I click there…
Did you examined ServiceReference folder through the Windows explorer? But still if you are trying to import the same web service (with the same var names) the generated file will also fail to compile due to ambigous calls.

Best regards.

Hi viktoriad,

viktoriad said: I examined the file you attached. The file is not compiled because you are using the same names for variables with different case. You should change that names in your web-service (e.g. recStoreID change to fRecStoreID) and regenerate _intf file again. Or you can change generated _intf file manually (which takes more time and cause new bugs).

No, “Import RemObject SDK Service” is generating duplicated code… I did it again (to be sure) and I imported a URL once, and intf is duplicated… I am consuming a third party webservice (Apache Axis Web Service) as a user. So I have no control over the webservice source code …

I was able to consume this webservice using C# (service reference), and I am using it until this issue is resolved with the oxygene language …

viktoriad said: Did you examined ServiceReference folder through the Windows explorer? But still if you are trying to import the same web service (with the same var names) the generated file will also fail to compile due to ambigous calls.

Humm, Reference.pas is there… and compile !!

Thanks,
Willian.

Hi Viktoriad,

Examining wsdl file (attached), I think I found the problem:

maybe case sensitive variables is confusing “Import RemObject Web Service” … (Axis webservice uses java language)…

But I will use “add service references” (Reference.pas) and translate what I did from C# …

Many thanks !!

Willian.