Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

DotNetNuke Marketplace
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Using external webservice from custom module
Previous Previous
 
Next Next
New Post 6/19/2008 2:13 AM
User is offline Arjan Rijkens
2 posts
10th Ranked


Using external webservice from custom module 

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 2:43 AM
User is offline Dario Rossa
211 posts
dotnetnuke.dariorossa.it
9th Ranked




Re: Using external webservice from custom module 

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


Dario RossaDario Rossa
Personal WebSite: http://www.dariorossa.it
DotNetNuke: http://dotnetnuke.dariorossa.it
 
New Post 6/20/2008 3:43 AM
User is offline Arjan Rijkens
2 posts
10th Ranked


Re: Using external webservice from custom module 

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 Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Using external webservice from custom module
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


CrystalTech
CrystalTech Web Hosting™ provides first-class service and support. Our value-packed ASP.NET plans offer DNN installation, SQL 2005 and up to 100 domain names starting at only $16.95 per month!
CrystalTech.com
DotNetNuke® in Sweden
All service of DotNetNuke® in Sweden.
Olsmar Konsult
DocuPeak Business Process Management RAD
Comprehensive enterprise and government process management. Forms, documents, indexing, workflow, views, content intelligence, capture, etc. Point and click rapid application development.
www.Webiplex.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP