Thread View: borland.public.cppbuilder.webservices.soap
1 messages
1 total messages
Started by Noel Bouchard
Wed, 24 Aug 2005 20:54
Problems with simple Web Service client ...
Author: Noel Bouchard
Date: Wed, 24 Aug 2005 20:54
Date: Wed, 24 Aug 2005 20:54
45 lines
4536 bytes
4536 bytes
I just bought your C++Builder V6.0 Pro. specifically to create a simple Web Service client for the following: http://europe.ipx.com/api/services/SmsApi50?wsdl This is a simple (1 function interface) to send Short Messages to mobile phone offered by Ericsson, in Sweden. I started by using the WSDL Importer wizard but the program would not compile ... Here is the unique function prototype: virtual void send(const AnsiString correlationId, const AnsiString originatingAddress, const AnsiString destinationAddress, const bool originatorAlpha, const AnsiString userData, const AnsiString userDataHeader, const int dcs, const int pid, const int relativeValidityTime, const AnsiString deliveryTime, const int statusReportFlags, const AnsiString accountName, const bool blocking, const AnsiString tariffClass, const AnsiString referenceId, const AnsiString contentCategory, const AnsiString username, const AnsiString password, AnsiString& correlationId, AnsiString& messageId, int& responseCode, AnsiString& responseMessage, bool& temporaryError, bool& billed) = 0; The problem is obviously caused by a parameter using the same name (correlationId) that is used for both input and output ... So ... after trying several things for a few hours i found that using the Import wizard with Options 'Unwind Literal Params" UNCHECKED and "Emit Literal Types" CHECKED which produce classes for SendResponse and SendRequest and the following prototype: virtual SendResponse* send(const SendRequest* request) = 0; This seemed promising ... BUT when trying to compile i got this time a LINKER error with "Unresoled External" for SendRequest AND SendResponse !!!??? I tried everyting i could think of ... but no success ... Then after again many hours of reasearch i used the Command Line WSDL Importer with the -R option to map the correlationId output param to the return value. This gave the following prototype: virtual AnsiString send(const AnsiString correlationId, const AnsiString originatingAddress, const AnsiString destinationAddress, const bool originatorAlpha, const AnsiString userData, const AnsiString userDataHeader, const int dcs, const int pid, const int relativeValidityTime, const AnsiString deliveryTime, const int statusReportFlags, const AnsiString accountName, const bool blocking, const AnsiString tariffClass, const AnsiString referenceId, const AnsiString contentCategory, const AnsiString username, const AnsiString password, AnsiString& messageId, int& responseCode, AnsiString& responseMessage, bool& temporaryError, bool& billed) = 0; This compile OK !!! and i tought i had found a solution .... but after runnung and calling the send function i got a run time Exception: --------------------------- Debugger Exception Notification --------------------------- Project SMS_Gateway.exe raised exception class ERemotableException with message 'org.xml.sax.SAXException: Invalid element in com.ipx.server.api.sms50.types.SendRequest - messageId'. Process stopped. Use --------------------------- Now i have a feeling that the 2nd solution which produce classes for SendRequest and SendResponse could work but it does not even compile because of the "unresolved external" error on SendRequest / SendResponse and again after searching Borland site and the Internet for several hours i could not find a single example on how to use this method ... I have tried everything i could think of for now OVER 4 DAYS and NOTHING WORKS !!! I am getting VERY frustrated by all these bugs !!! Please HELP !!! (I can send the WSDL file on request ...) Thanks !!!! No�l Bouchard noel@teledata.qc.ca
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads