15,890,282 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by AmVal (Top 2 by date)
AmVal
12-Jul-11 17:34pm
View
Sorry, that didn't paste in very well... I tried to delete but it's still here.
Will re-post as Answer instead...
AmVal
12-Jul-11 17:26pm
View
Deleted
I'm confused. The CurrencyConverter example I learned from made a call to soap_instantiate for each parameter, which it said was necessary. But when I'm looking at these other examples, I never see any call to soap_instantiate at all. So maybe I should be doing something completely different???
My input parameter is an object of this class, which contains another class element:
class SOAP_CMAC ns1__processServiceCallNumber
{
public:
class ns1__validateServiceCallNumberInput *processServiceCallNumber; /* optional element of type ns1:validateServiceCallNumberInput */
struct soap *soap; /* transient */
public:
virtual int soap_type() const { return 6; } /* = unique id SOAP_TYPE_ns1__processServiceCallNumber */
virtual void soap_default(struct soap*);
virtual void soap_serialize(struct soap*) const;
virtual int soap_put(struct soap*, const char*, const char*) const;
virtual int soap_out(struct soap*, const char*, int, const char*) const;
virtual void *soap_get(struct soap*, const char*, const char*);
virtual void *soap_in(struct soap*, const char*, const char*);
ns1__processServiceCallNumber() : processServiceCallNumber(NULL), soap(NULL) { }
virtual ~ns1__processServiceCallNumber() { }
};
and ns1__validateServiceCallNumberInput is defined like this:
class SOAP_CMAC ns1__validateServiceCallNumberInput
{
public:
char *serviceCallNumber; /* optional element of type xsd:string */
struct soap *soap; /* transient */
public:
virtual int soap_type() const { return 7; } /* = unique id SOAP_TYPE_ns1__validateServiceCallNumberInput */
virtual void soap_default(struct soap*);
virtual void soap_serialize(struct soap*) const;
virtual int soap_put(struct soap*, const char*, const char*) const;
virtual int soap_out(struct soap*, const char*, int, const char*) const;
virtual void *soap_get(struct soap*, const char*, const char*);
virtual void *soap_in(struct soap*, const char*, const char*);
ns1__validateServiceCallNumberInput() : serviceCallNumber(NULL), soap(NULL) { }
virtual ~ns1__validateServiceCallNumberInput() { }
};
So I need to pass my serviceCallNumber input string in (myServiceCallNumber->processServiceCallNumber)->serviceCallNumber = sInput;
But when I try to set that value, after having instantiated the input parameter as follows, it crashes because that inner component doesn't seem to be instantiated. So, I think for this type of 'complex' parameter, I need to do something different for the instantiation. I've been looking at lots of examples... I'll keep looking, but if someone can point to a particular example, or give me some different direction,that would be great.
//instantiate my input paramter
ns1__processServiceCallNumber* myServiceCallNumber;
size_t *pServiceCallNumberSize = new size_t;
*pServiceCallNumberSize = sizeof(ns1__processServiceCallNumber);
myServiceCallNumber = (ns1__processServiceCallNumber*) soap_instantiate(validateServiceCallNumberBinding_->soap, SOAP_TYPE_ns1__processServiceCallNumber,"","",pServiceCallNumberSize);
delete pServiceCallNumberSize;
//call web service, after also instantiating response parameter, not shown...
iRet = validateServiceCallNumberBinding_->__ns1__processServiceCallNumber(myServiceCallNumber, myServiceCallNumberResponse);