web service

1C:Enterprise platform integration capabilities and techniques

#1
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Oct 4, 2012
Company:

I am trying to post webservice
platform
IIS 7
Visual Studio 2008

my code is

Code
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim proxy As System.Net.WebProxy = New WebProxy(
                "https://1c.traffickurye.com/GunServisEkstre/ws/", True)
        proxy.Credentials = New NetworkCredential("WS", "***", 
                "https://1c.traffickurye.com/GunServisEkstre/")

        Dim k As New ServiceReference1.GunServisEkstrePortTypeClient("GunServisEkstreSoap")

        k.ClientCredentials.UserName.UserName = "WS"
        k.ClientCredentials.UserName.Password = "*****"
        k.ClientCredentials.Windows.ClientCredential = proxy.Credentials
        k.ClientCredentials.HttpDigest.ClientCredential = proxy.Credentials
        k.ClientCredentials.Windows.AllowedImpersonationLevel = 
                System.Security.Principal.TokenImpersonationLevel.Impersonation
        Dim data = k.CariHareketleri(2012, 12, "694")

        GridView1.DataSource = data.Evraklar

        GridView1.DataBind()

End Sub

but receive this error:

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic realm="1C:Enterprise 8.2"'.

The remote server returned an error: (401) Unauthorized.

Edited: Soner Eren - Dec 28, 2012 06:54 PM (password)
 
#2
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Nov 19, 2012
Company:

I'm not sure it will help you, but this code works well:

Code
Dim Service = New AutoupdateWebService.Installer
Service.Url = AddressWS
Service.Credentials = New NetworkCredential(UserWS, PasswordWS)
Dim Mess = Service.GetDataList()

 
#3
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Try to publish it without of authorization first to check if your web service is configured properly.

 
#4
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Feb 26, 2015
Company: Uguz Limited sirketi

[Turkish]
Kardeşim kolay gelsin, ismini görünce cevabıda Türkçe yazayım dedim,
Benzer sorunla bende karşılaşmıştım, olayın çözümü çok basit, datayı 1c tarafında json olarak hazırlatıyosun,
Uygulamaya json olarak çekiyosun, sonrada jsonu datatable ye dönüştürüyosun,
burdaki en önmeli nokta web servise atama yaparken 1c içinde bir kullanıcı oluşturuyosun örneğin adı webuygulamakullanicisi / şifrede 12345 mesela, bunu vb veya c# içinde oluşturduğun network kimliği olarak atıyosun, data sana direk json olarak geliyor.

[English]
1) You must first create a 1C user.
2) Authorize this user in the application. (Such as c # or vb.net ...)
3) The webservice should send you data in JSON format.
4) Convert the webservice data in the application.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.