User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 391,666 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,892 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 634 | Replies: 1
Reply
Join Date: May 2008
Posts: 2
Reputation: bsousa is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bsousa bsousa is offline Offline
Newbie Poster

Trying to consume Coldfusion Web Service using VB.NET

  #1  
May 27th, 2008
Hi all,

I'm trying to consume a Service called GetMemberPointsAvailable using VB.NET. Here is the wsdl: http://sp-s3g-uat.iclp.com.au/ws/ega...egapi.cfc?wsdl

This service is written in coldfusion - axis engine.

The steps:
I'm using VB.net on Visual Studio 2005. I created a new windows application project.

Then I added a web reference with URL http://sp-s3g-uat.iclp.com.au/ws/ega...egapi.cfc?wsdl and named the reference as webserviceICLP

Then i added a button on my form and put the following code on the button click event:
  1. Dim client As New webserviceICLP.SportingWS '(or egapiClient in VB2008)
  2. For Each item As webserviceICLP.mapItem In client.getMemberPointsAvailable("xxxxx", "yyyy", "123456789")
  3. MsgBox(item.key & vbNewLine & item.value)
  4. Next

It does nothing because (i think) there are no item created by the response of the webservice.
Also i tried to serialize the returning webservice message object using the following code:
  1. Dim wsICLP As New webserviceICLP.SportingWS
  2. Dim MyParams() As webserviceICLP.mapItem = {New webserviceICLP.mapItem}
  3. MyParams = wsICLP.getMemberPointsAvailable("xxxxx", "yyyy", "123456789")
  4. MsgBox(SerializeToXML(MyParams))
  5. Public Shared Function SerializeToXML(Of T)(ByVal obj As T) As String
  6. Dim returnXML As String = String.Empty
  7. Dim serializer As New Serialization.XmlSerializer(GetType(T))
  8. Using writer As New IO.StringWriter
  9. serializer.Serialize(New XmlTextWriter(writer), obj)
  10. returnXML = writer.ToString()
  11. End Using
  12. Return returnXML
  13. End Function

and the result I get is :

  1. <?xml version="1.0" encoding="utf-16"?><ArrayOfMapItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />


I know that the webservice is running because i tried to test it with the Soap UI tool and it did Ok. Here's the reponse of the WS:
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
  3. <soapenv:Body>
  4. <getMemberPointsAvailableResponse xmlns='http://v10.egapi.ws'>
  5. <getMemberPointsAvailableReturn xsi:type='ns1:Map' xmlns:ns1='http://xml.apache.org/xml-soap'>
  6. <item xmlns=''>
  7. <key xsi:type='xsd:string'>
  8. RESPONSEERRORS
  9. </key>
  10. <value xsi:type='ns2:ArrayOf_xsd_anyType' xmlns:ns2='http://rpc.xml.coldfusion'/>
  11. </item>
  12. <item xmlns=''>
  13. <key xsi:type='xsd:string'>
  14. RESPONSESUCCESS
  15. </key>
  16. <value xsi:type='xsd:string'>
  17. true
  18. </value>
  19. </item>
  20. <item xmlns=''>
  21. <key xsi:type='xsd:string'>
  22. RESPONSEDATA
  23. </key>
  24. <value xsi:type='ns1:Map'>
  25. <item>
  26. <key xsi:type='xsd:string'>
  27. POINTS_AVAILABLE
  28. </key>
  29. <value xsi:type='xsd:int'>
  30. 106
  31. </value>
  32. </item>
  33. </value>
  34. </item>
  35. </getMemberPointsAvailableReturn>
  36. </getMemberPointsAvailableResponse>
  37. </soapenv:Body>
  38. </soapenv:Envelope>


Any help would be much appreciated!

All the best,
BS
Last edited by peter_budo : May 31st, 2008 at 7:03 am. Reason: Keep It Organized - please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2008
Posts: 2
Reputation: saisunil1978 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
saisunil1978 saisunil1978 is offline Offline
Newbie Poster

Re: Trying to consume Coldfusion Web Service using VB.NET

  #2  
8 Days Ago
Hi,
Did you get any solution for this problem.actually i am also facing same problem in consuming CF webservice in .NET.I have tried in different ways like creating proxy.Direct Http request and deserialzing.nothing worked for me.The custom type MAP and MapItem are creating problem
If you are able to find a solution please let me.
Thanks In advance
Sai
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 1:53 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC