85 struct soap *soap = soap_new1(SOAP_XML_STRICT | SOAP_XML_INDENT | SOAP_XML_NOTYPE);
92 fs.open(
"address.xml", std::ios::in);
98 std::cerr <<
"Error reading address.xml file" << std::endl;
99 soap_stream_fault(soap, std::cerr);
106 std::cout << std::endl <<
"ADDRESS BOOK - An Example XML Data Binding Application" << std::endl << std::endl;
107 for (std::vector<a__address*>::const_iterator i = ab->
address.begin(); i != ab->
address.end(); ++i)
111 std::cout <<
"Address entry " << (*i)->ID << std::endl;
112 std::cout <<
"Name: " << (*i)->name << std::endl;
113 std::cout <<
"Street: " << (*i)->street << std::endl;
114 std::cout <<
"City: " << (*i)->city << std::endl;
115 std::cout <<
"Zip: " << (*i)->zip << std::endl;
122 std::cout <<
"Phone: " << *(*i)->phone << std::endl;
124 std::cout <<
"Mobile: " << *(*i)->mobile << std::endl;
127 std::cout <<
"DOB: " << soap_dateTime2s(soap, *(*i)->dob) << std::endl;
128 std::cout <<
"---------" << std::endl;
139 std::cout <<
"Enter a new contact:" << std::endl;
148 std::cerr <<
"Not a valid country code" << std::endl;
165 std::cout << std::endl <<
"Contact information added." << std::endl;
168 fs.open(
"address.xml", std::ios::out);
171 std::cerr <<
"Cannot create address.xml file" << std::endl;
177 std::cerr <<
"Error writing address.xml file" << std::endl;
178 soap_stream_fault(soap, std::cerr);
198 printf(
"%-9s> ", prompt);
199 fgets(buf, 80, stdin);
202 for (s = buf + strlen(buf) - 1; s > buf; s--)
210 for (s = buf; *s; s++)