#include <Types.h>
Public Member Functions | |
Types (const Application &appl, const Wsdl &wsdl) | |
~Types () | |
void | generate () |
void | create_ifile () |
void | display (const std::string &name, const Xml::XmlNode &node) |
Private Attributes | |
const Application & | m_appl |
const Wsdl & | m_wsdl |
Definition at line 31 of file Types.h.
Types::Types | ( | const Application & | appl, | |
const Wsdl & | wsdl | |||
) |
void Types::generate | ( | ) |
Definition at line 54 of file Types.cpp.
References display(), Wsdl::GetMessage(), Wsdl::GetMessageParameters(), Wsdl::GetOperations(), Wsdl::GetSoapAction(), m_appl, m_wsdl, and Application::Portname().
Referenced by main().
00055 { 00056 std::list<std::string> ops = m_wsdl.GetOperations( m_appl.Portname() ); 00057 00058 for (std::list<std::string>::iterator it = ops.begin(); it != ops.end(); it++) 00059 { 00060 std::string op = *it; 00061 00062 printf("Operation: %s\n", op.c_str()); 00063 printf("SOAPaction: %s\n", m_wsdl.GetSoapAction(m_appl.Portname(), op).c_str()); 00064 00065 std::string in; 00066 std::string out; 00067 std::string path; 00068 try { 00069 in = m_wsdl.GetMessage(m_appl.Portname(), op, "input"); 00070 } catch (const WsdlException&) {} 00071 if (!in.empty()) 00072 { 00073 std::list<std::pair<std::string, Xml::XmlNode> > vec = m_wsdl.GetMessageParameters(in, path); 00074 printf("Input: %s\nPath: %s\n", in.c_str(), path.c_str()); 00075 for (std::list<std::pair<std::string, Xml::XmlNode> >::iterator it = vec.begin(); it != vec.end(); it++) 00076 { 00077 display(it -> first, it -> second); 00078 } 00079 } 00080 try { 00081 out = m_wsdl.GetMessage(m_appl.Portname(), op, "output"); 00082 } catch (const WsdlException&) {} 00083 if (!out.empty()) 00084 { 00085 std::list<std::pair<std::string, Xml::XmlNode> > vec = m_wsdl.GetMessageParameters(out, path); 00086 printf("Output: %s\nPath: %s\n", out.c_str(), path.c_str()); 00087 for (std::list<std::pair<std::string, Xml::XmlNode> >::iterator it = vec.begin(); it != vec.end(); it++) 00088 { 00089 display(it -> first, it -> second); 00090 } 00091 } 00092 // 00093 printf("\n"); 00094 } 00095 }
void Types::create_ifile | ( | ) |
void Types::display | ( | const std::string & | name, | |
const Xml::XmlNode & | node | |||
) |
Definition at line 41 of file Types.cpp.
Referenced by generate().
00042 { 00043 printf(" %s %s", name.c_str(), node.GetProperty("type").c_str()); 00044 if (node.PropertyExists("minOccurs")) 00045 printf(" minOccurs %s", node.GetProperty("minOccurs").c_str()); 00046 if (node.PropertyExists("maxOccurs")) 00047 printf(" maxOccurs %s", node.GetProperty("maxOccurs").c_str()); 00048 00049 // 00050 printf("\n"); 00051 }
const Application& Types::m_appl [private] |
const Wsdl& Types::m_wsdl [private] |