Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Rey Magdalaga
  Where is Rey Magdalaga?
 Rizal Province
 Philippines
 Rey Magdalaga
 To: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 Tags
Subject: RE: XML Web Service using SOAP discontinued?
Thread ID: 143281 Message ID: 143597 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Web Services
Date: Thursday, August 30, 2007 6:39:14 AM         
   


> >
> > Hi Bernard,
> >
> > Thanks for the info.
> >
> > Most certainly, I will be using the XML Web Service to pass my xml cursor data selected from the VFP database by the COM object. The thing is, in what level of complexity would it take so I know that my xml data cannot be handled anymore by the SOAP toolkit? I will be selecting records from the tables, convert them to xml, get the xml via web service to the client. Is there a limit on how many records can I pass? Fields or elements for the XML data?
> >
> > I will go with your suggestion I guess, cause I'm still knew with this web services functionality and I don't think I'm going to include arrays yet. Plus, Erik showed me a link for the support period of MS which is till 2013 for the SOAP toolkit. Before that time, we would have already updated our systems with new platform available for VFP.
> >
> > Thanks!
> >
> >
> > Rey M.
>
> For passing a normal flat table of data by XML then you can use CursorToXML and XMLToCursor to convert between. For this SOAP is fine. But once you move into the realm of Complex Objects and arrays, then you cannot do this with VFP alone, and SOAP will fall over.
>
> With .NET you can Serialize your objects and in your methods you can return the OBJECT itself. .Net has built in serialization and will automatically serialize the object into XML.
>
> This gives the added benefit that the object is visible from the Consuming application. For instance I return an object with multi levels and the output from .NET looks like this - GenericResponseObject:
>
>
> <?xml version="1.0" encoding="utf-8" ?> 
> - <GenericResponseObjectWithMemberDetails xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://zesthealthclubs.com.au/">
>   <ErrorCode>0</ErrorCode> 
>   <ErrorText /> 
>   <SessionID>_2620M2M6Z37073.627</SessionID> 
> - <MemberDetails>
>       <cMemberID>QXXXXXXXX</cMemberID> 
>       <cName>Bernard Bout</cName> 
>       <cAddress1>63 XXXXXXXX DRIVE</cAddress1> 
>       <cAddress2 /> 
>       <cSuburb>BIRKDALE</cSuburb> 
>       <cState>QLD</cState> 
>       <cPostcode>4159</cPostcode> 
>       <cHomephone>07 5555 3433</cHomephone> 
>       <cWorkphone /> 
>       <cMobile>0422555555</cMobile> 
> -     <MemberCC>
>           <csName>K XXXXXXXXX</csName> 
>           <csNumber>XXXXXXXXXXXXXX</csNumber> 
>           <csExpiry>1899-12-30T00:00:00</csExpiry> 
>           <csType>AMEX</csType> 
>       </MemberCC>
> -     <MemberDD>
>           <csAcctname>X X XXXXXX</csAcctname> 
>           <csBankacct>123456789</csBankacct> 
>           <csBankName>MET</csBankName> 
>           <csBanksid>484799</csBanksid> 
>           <csBranchName>BRISBANE</csBranchName> 
>       </MemberDD>
> -     <EmergencyContact>
>           <ECName /> 
>           <ECPhone /> 
>           <ECRelationship /> 
>       </EmergencyContact>
> -     <Relationships>
>           <string>BROTHER</string> 
>           <string>DAUGHTER</string> 
>           <string>FAMILY</string> 
>           <string>FATHER</string> 
>           <string>FIANCE</string> 
>       </Relationships>
> -     <MktInfo>
>           <string>Renewal</string> 
>           <string>Radio Advertisment</string> 
>           <string>TV / Cinema Advertising</string> 
>           <string>Print Advertising</string> 
>           <string>Letterbox Flyer</string> 
>           <string>Yellow Pages</string> 
>           <string>Website</string> 
>   
>       </MktInfo>
>   </MemberDetails>
>   </GenericResponseObjectWithMemberDetails>
> 

>
> While it is not impossible to do this with VFP it is quite hard and you will need to write your own code to do this. Also it is not visible to intellisense from the consumer.
>
> When passing Array's like MKTINFO and Relationship, SOAP will only make the first item visible. So if a web service returns complex objects like above, then you can't use VFP and SOAP to even read the output.
>
> As you can see above I have :
>
>
GenericResponseObject
>     MemberDetails
>     MemberCC
>     MemberDD
>     EmergencyContact
>     
> 
> and two atrrays below that:
>     MktInfo
>     Relationship

>
> However I would have to advise you that the principal of keeping it simple is the best approach. While the move from VFP to .NET is big, once you get used to it it is very easy, since the intellisense in .NET is very good.
>
> I myself took the path of writing the Web Service in .NET with the business logic and DataAccess in a VFP COM. That is not an easy path and it took me a while to get the 2 to communicate properly.
>
> If you don't need to return complex objects stick to VFP. It is much easier.
>
> Bernard
>
> ** If you see someone without a smile, give em one of yours :) **


Hi Bernard,

Thanks for the explanation. I now understand what you mean by complex data. I don't think I will be returning such data like your example yet so yeah I will stick to VFP since it is much easier and faster for me.

Thanks again.

ENTIRE THREAD

XML Web Service using SOAP discontinued? Posted by Rey Magdalaga @ 8/27/2007 1:12:50 PM
RE: XML Web Service using SOAP discontinued? Posted by Eric den Doop @ 8/27/2007 1:22:36 PM
RE: XML Web Service using SOAP discontinued? Posted by Rey Magdalaga @ 8/27/2007 1:44:09 PM
RE: XML Web Service using SOAP discontinued? Posted by Eric den Doop @ 8/27/2007 3:18:41 PM
RE: XML Web Service using SOAP discontinued? Posted by Bernard Bout @ 8/27/2007 11:44:15 PM
RE: XML Web Service using SOAP discontinued? Posted by Rey Magdalaga @ 8/28/2007 1:16:56 PM
RE: XML Web Service using SOAP discontinued? Posted by Bernard Bout @ 8/30/2007 6:11:39 AM
RE: XML Web Service using SOAP discontinued? Posted by Rey Magdalaga @ 8/30/2007 6:39:14 AM
RE: XML Web Service using SOAP discontinued? Posted by Christian Pano @ 8/30/2007 7:02:52 AM