You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openmeetings.apache.org by Maxim Solodovnik <so...@gmail.com> on 2012/03/26 07:15:43 UTC

Fwd: Openmeetings

FYI

below is the simple How to describing how to work with OM services from .NET
Hope it will be useful for somebody

---------- Forwarded message ----------
From: Maxim Solodovnik <so...@gmail.com>
Date: Mon, Mar 26, 2012 at 12:11
Subject: Re: Openmeetings
To: Hamza Öztürk <we...@gmail.com>


Hello Hamza,

unfortunately I was unable to run your project. (it fail to compile since
somehow it was unable to find web-service references)

To test if OM works as expected with .NET I did the following:
1) create new c# WebApplication
2) add new WebService reference with URL:
http://localhost:5080/openmeetings/services/UserService?wsdl
3) add the following code to Default.aspx.cs:
protected void Page_Load(object sender, EventArgs e)
{
 UserService.UserServicePortTypeClient cli = new
UserService.UserServicePortTypeClient("UserServiceHttpSoap11Endpoint");
string sid = cli.getSession().session_id;
 long result = cli.loginUser(sid, "admin", "12345");
if (result == 1)
 {
long uid = cli.addNewUserWithExternalType(sid, "userName1", "12345",
"lastName1", "firstName1", "mail1@email.email.com", "additionalName1"
 , "street1", "zip1", "fax1", 1, "town1", 1, "", 1, "test_type.NET");
int i = 0;
 }
}

The call failed claiming transport should be https
Then I opened Web.config
and changed:
1) security mode
was <security mode="Transport">
became <security mode="TransportCredentialOnly">

2) change port in Endpoints:
was:
<endpoint address="
http://localhost:8080/openmeetings/services/UserService.UserServiceHttpSoap11Endpoint/
"
<endpoint address="
http://localhost:8080/openmeetings/services/UserService.UserServiceHttpSoap12Endpoint/
"

become
address="
http://localhost:5080/openmeetings/services/UserService.UserServiceHttpSoap11Endpoint/
"
<endpoint address="
http://localhost:5080/openmeetings/services/UserService.UserServiceHttpSoap12Endpoint/
"

The code above is now works as expected the user created successfully

Attached in my sample web application

On Sun, Mar 25, 2012 at 02:09, Hamza Öztürk <we...@gmail.com> wrote:

> Hi Maxim,
>
> Did you look our web service code ?
>
> --
> Hamza Öztürk
>
> 0 506 752 36 36
> destek@e-veri.com
>
> E-Veri Bilişim Hizmetleri
>



-- 
WBR
Maxim aka solomax



-- 
WBR
Maxim aka solomax