00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "wsdlparser/WsdlElement.h"
00021 #include "wsdlparser/WsdlParser.h"
00022
00023 namespace WsdlPull {
00024 void
00025 WsdlElement::print(std::ostream & out)
00026 {
00027 size_t i;
00028 out << extElems_.size() << XmlUtils::dbsp << XmlUtils::dbsp;
00029 for (i = 0; i < extElems_.size(); i++)
00030 out << extElems_[i] << XmlUtils::dbsp;
00031 out << std::endl;
00032 out << extAttributes_.size() << XmlUtils::dbsp << XmlUtils::dbsp;
00033 for (i = 0; i < extAttributes_.size(); i++)
00034 out << extAttributes_[i] << XmlUtils::dbsp;
00035 }
00036
00037
00038 bool
00039 WsdlElement::getExtensibilityElements(const std::string & namespc,
00040 std::vector<int>& ids)
00041 {
00042 WsdlExtension * we = wParser_.getExtensibilityHandler(namespc);
00043 if (we == 0)
00044 return false;
00045 bool ret = false;
00046 for (size_t i = 0 ;i<extElems_.size();i++){
00047
00048 if (we->getElementName(extElems_[i])!=0){
00049 ids.push_back(extElems_[i]);
00050 ret = true;
00051 }
00052 }
00053 return ret;
00054 }
00055
00056
00057 bool
00058 WsdlElement::getExtensibilityAttributes(const std::string & namespc,
00059 std::vector<int>& ids)
00060 {
00061 WsdlExtension * we = wParser_.getExtensibilityHandler(namespc);
00062 if (we == 0)
00063 return false;
00064 bool ret = false;
00065 for (size_t i = 0 ;i<extAttributes_.size();i++){
00066
00067 if (we->getAttributeName(extAttributes_[i])!=0){
00068 ids.push_back(extAttributes_[i]);
00069 ret = true;
00070 }
00071 }
00072 return ret;
00073 }
00074 }