🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.webservices.soap
Article #141

Writing a Webservice Client

#141
From: Jens Hibbeler
Date: Tue, 11 Oct 2005 19:04
79 lines
2753 bytes
Hello,


I am trying to write a Webservice with Borland C++ Builder 6. I use the
WSDL importer but I have no idea how to acess the Webservice.
I have tried the following:


The WSDL File is from the Google Webservice and looks like this


...
__interface INTERFACE_UUID("{0B396A82-A4DD-69A7-A771-6D80F8831A71}")
GoogleSearchPort : public IInvokable
{
public:
  virtual TByteDynArray   doGetCachedPage(const AnsiString key, const
AnsiString url) = 0;
  virtual AnsiString      doSpellingSuggestion(const AnsiString key,
const AnsiString phrase) = 0;
  virtual GoogleSearchResult* doGoogleSearch(const AnsiString key,
const AnsiString q, const int start, const int maxResults, const bool
filter, const AnsiString restrict, const bool safeSearch, const
AnsiString lr, const AnsiString ie, const AnsiString oe) = 0;


};


typedef DelphiInterface<GoogleSearchPort> _di_GoogleSearchPort;

_di_GoogleSearchPort GetGoogleSearchPort(bool useWSDL=false, AnsiString
addr="");
...


I have problems to access the Webservice with the following class:


//-------------------------------------------------------------------------�--
#include <vcl.h>
#include <iostream>
#include <conio>
#include "GoogleSearch.h"


using namespace NS_GoogleSearch;
//-------------------------------------------------------------------------�--


#pragma argsused
int main(int argc, char* argv[])
{


         GoogleSearchResult *Results=
GetGoogleSearchPort()->doGoogleSearch("MyGoogleSearchCODE", "test", 0,
10, True,"", True, "lang_en", "latin1", "latin1");


        getch();


        return 0;


}


//-------------------------------------------------------------------------�--

Can someone give me a hint where the problem is or a link to a tutorial
which can help me?


Regards,


Jens
Technical Details
Message-ID: <434c0c1a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!mpls-transit-01.news.qwest.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11096a,7c5703f047c33c45
X-Google-Attributes: gid11096a,public
X-Google-Language: ENGLISH,ASCII
From: "Jens Hibbeler" <jenshibbeler@gmx.de>
Newsgroups: borland.public.cppbuilder.webservices.soap
Subject: Writing a Webservice Client
Date: Tue, 11 Oct 2005 21:04:10 +0200
Lines: 83
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
NNTP-Posting-Host: 213.23.3.181
Message-ID: <434c0c1a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1129057306 213.23.3.181 (11 Oct 2005 12:01:46 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!mpls-transit-01.news.qwest.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail