61 {
"SOAP-ENV", NULL, NULL, NULL},
62 {
"SOAP-ENC", NULL, NULL, NULL},
63 {
"xsi",
"http://www.w3.org/2001/XMLSchema-instance",
"http://www.w3.org/*/XMLSchema-instance", NULL},
64 {
"xsd",
"http://www.w3.org/2001/XMLSchema",
"http://www.w3.org/*/XMLSchema", NULL},
65 {
"g",
"urn:graph", NULL, NULL},
66 {NULL, NULL, NULL, NULL}
72 {
"SOAP-ENV",
"http://schemas.xmlsoap.org/soap/envelope/",
"http://www.w3.org/*/soap-envelope", NULL},
73 {
"SOAP-ENC",
"http://schemas.xmlsoap.org/soap/encoding/",
"http://www.w3.org/*/soap-encoding", NULL},
74 {
"xsi",
"http://www.w3.org/2001/XMLSchema-instance",
"http://www.w3.org/*/XMLSchema-instance", NULL},
75 {
"xsd",
"http://www.w3.org/2001/XMLSchema",
"http://www.w3.org/*/XMLSchema", NULL},
76 {
"g",
"urn:graph", NULL, NULL},
77 {NULL, NULL, NULL, NULL}
83 {
"SOAP-ENV",
"http://www.w3.org/2003/05/soap-envelope",
"http://schemas.xmlsoap.org/soap/envelope/", NULL},
84 {
"SOAP-ENC",
"http://www.w3.org/2003/05/soap-encoding",
"http://schemas.xmlsoap.org/soap/encoding/", NULL},
85 {
"xsi",
"http://www.w3.org/2001/XMLSchema-instance",
"http://www.w3.org/*/XMLSchema-instance", NULL},
86 {
"xsd",
"http://www.w3.org/2001/XMLSchema",
"http://www.w3.org/*/XMLSchema", NULL},
87 {
"g",
"urn:graph", NULL, NULL},
88 {NULL, NULL, NULL, NULL}
93 struct soap *ctx = soap_new1(SOAP_XML_INDENT);
100 for (
int i = 0; i < 4; ++i)
102 Graph *branch = soap_new_Graph(ctx);
103 tree.edges.push_back(branch);
105 for (
int j = 0; j < i; ++j)
106 branch->edges.push_back(soap_new_Graph(ctx));
109 std::cout <<
"**** XML TREE FROM C++ TREE ****" << std::endl;
110 soap_write_Graph(ctx, &tree);
111 std::cout << std::endl << std::endl;
113 std::cout <<
"**** XML TREE FROM C++ DIGRAPH ****" << std::endl;
114 tree.edges[0] = tree.edges[1];
115 tree.edges[2] = tree.edges[3];
116 soap_write_Graph(ctx, &tree);
117 std::cout << std::endl << std::endl;
119 std::cout <<
"**** XML ID-REF DIGRAPH FROM C++ DIGRAPH ****" << std::endl;
120 soap_set_omode(ctx, SOAP_XML_GRAPH);
121 soap_write_Graph(ctx, &tree);
122 std::cout << std::endl << std::endl;
123 soap_clr_omode(ctx, SOAP_XML_GRAPH);
125 std::cout <<
"**** XML ID-REF DIGRAPH FROM C++ CYCLIC GRAPH ****" << std::endl;
126 tree.edges[0]->edges = tree.edges;
127 soap_set_omode(ctx, SOAP_XML_GRAPH);
128 soap_write_Graph(ctx, &tree);
129 std::cout << std::endl << std::endl;
130 soap_clr_omode(ctx, SOAP_XML_GRAPH);
132 std::cout <<
"**** XML TREE (PRUNED CYCLIC BRANCHES) FROM C++ CYCLIC GRAPH ****" << std::endl;
133 soap_set_omode(ctx, SOAP_XML_TREE);
134 soap_write_Graph(ctx, &tree);
135 std::cout << std::endl << std::endl;
136 soap_clr_omode(ctx, SOAP_XML_TREE);
138 std::cout <<
"**** SOAP 1.1 ENCODED GRAPH FROM C++ CYCLIC GRAPH ****" << std::endl;
140 soap_set_version(ctx, 1);
141 ctx->encodingStyle =
"";
142 soap_write_Graph(ctx, &tree);
143 std::cout << std::endl << std::endl;
145 std::cout <<
"**** SOAP 1.2 ENCODED GRAPH FROM C++ CYCLIC GRAPH ****" << std::endl;
147 soap_set_version(ctx, 2);
148 ctx->encodingStyle =
"";
149 soap_write_Graph(ctx, &tree);
150 std::cout << std::endl << std::endl;
static struct Namespace soap11_nsmap[]
Namespace mapping table for SOAP 1.1.
static struct Namespace nosoap_nsmap[]
Namespace mapping table for non-SOAP use.
static struct Namespace soap12_nsmap[]
Namespace mapping table for SOAP 1.2.