Trying to consume Coldfusion Web Service using VB.NET

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2008
Posts: 2
Reputation: bsousa is an unknown quantity at this point 
Solved Threads: 0
bsousa bsousa is offline Offline
Newbie Poster

Trying to consume Coldfusion Web Service using VB.NET

 
0
  #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 8:03 am. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 2
Reputation: saisunil1978 is an unknown quantity at this point 
Solved Threads: 0
saisunil1978 saisunil1978 is offline Offline
Newbie Poster

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

 
0
  #2
Aug 12th, 2008
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 Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC