Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using external webservice from custom moduleUsing external webservice from custom module
Previous
 
Next
New Post
6/19/2008 5:13 AM
 

Hello,

I'm using DNN for some time now and I'm developing a custom module using an external webservice. "Normally" I would add a Web Reference to the solution and from there I can access the methods automatically insight my aspx files. I searched around a lot and read a lot of articels but I cannot find how to connect to the external webservice from my DNN module.

Can someone get me started here, preferrably using VB? I downloaded already the Iowa Weather Service iowacomputergurus.com/free-products/dotnetnuke-modules/dnn-weather-conditions-service-module.aspx as an example to see if this would set me off but sadly no succes so far.

 
New Post
6/19/2008 5:43 AM
 

Hi Arjan,

are you connecting to a WCF web service or to an ASP .NET asmx web service? I successfully connected to both using the standard way. For example to connect to my WCF service I add the reference and use:

Imports System.ServiceModel
Imports MyWCFServiceReference
Imports System.Windows.Data

Private Sub CallWebService(Parameters)
  Dim MyEndpointAddress As New EndpointAddress("WebServiceURLGoesHere")
  Dim MyBinding As New BasicHttpBinding 'Or whatever you need
  Dim proxy As New MyWCFServiceReference.MyWCFServiceClient(MyBinding, MyEndpointAddress)
  AddHandler proxy.DoWorkCompleted, AddressOf DoWork_Completed
  proxy.DoWorkAsync(Parameters)
End Sub

and

Protected Sub DoWork_Completed(ByVal sender As Object, ByVal e As MyWCFServiceReference.DoWorkCompletedEventArgs)
' get results form e.Result
End Sub

Remember that accessing cross domain services requires the cross domain policy xml file to allow this. Let me know if you need the asmx code or if you need further help.

Best regards,
Dario Rossa

 
New Post
6/20/2008 6:43 AM
 

Hello Dario,

thank you for your reply.

I can get it to work in DNN using the standard ASP.NET methods : Add Web Reference, import service in vb module (in my dnn cusom module) and use the methods from the webservice.

Do you - or someone else - have guidelines/books/ documents/ how-to if I want the following: Create DNN Custom module and consume an external ASP.NET asmx web service?

All insight one custom module that i can export and reuse in other DNN sites?

Greetings,

Arjan

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using external webservice from custom moduleUsing external webservice from custom module


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out