wsdlc.cpp

来自「linux下简单对象应用协议的开发库」· C++ 代码 · 共 1,560 行 · 第 1/5 页

CPP
1,560
字号
		{	*type = SOAP_TYPE_xs__element;
			return soap_in_xs__element(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:annotation"))
		{	*type = SOAP_TYPE_xs__annotation;
			return soap_in_xs__annotation(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:union"))
		{	*type = SOAP_TYPE_xs__union;
			return soap_in_xs__union(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:list"))
		{	*type = SOAP_TYPE_xs__list;
			return soap_in_xs__list(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:choice"))
		{	*type = SOAP_TYPE_xs__choice;
			return soap_in_xs__choice(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:sequence"))
		{	*type = SOAP_TYPE_xs__sequence;
			return soap_in_xs__sequence(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:restriction"))
		{	*type = SOAP_TYPE_xs__restriction;
			return soap_in_xs__restriction(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:extension"))
		{	*type = SOAP_TYPE_xs__extension;
			return soap_in_xs__extension(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:complexType"))
		{	*type = SOAP_TYPE_xs__complexType;
			return soap_in_xs__complexType(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:simpleType"))
		{	*type = SOAP_TYPE_xs__simpleType;
			return soap_in_xs__simpleType(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:schema"))
		{	*type = SOAP_TYPE_xs__schema;
			return soap_in_xs__schema(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xsd:byte"))
		{	*type = SOAP_TYPE_byte;
			return soap_in_byte(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xsd:int"))
		{	*type = SOAP_TYPE_int;
			return soap_in_int(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "sd:mutability"))
		{	*type = SOAP_TYPE_sd__mutability;
			return soap_in_sd__mutability(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "soap:useChoice"))
		{	*type = SOAP_TYPE_soap__useChoice;
			return soap_in_soap__useChoice(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "soap:styleChoice"))
		{	*type = SOAP_TYPE_soap__styleChoice;
			return soap_in_soap__styleChoice(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:formChoice"))
		{	*type = SOAP_TYPE_xs__formChoice;
			return soap_in_xs__formChoice(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:processContents"))
		{	*type = SOAP_TYPE_xs__processContents;
			return soap_in_xs__processContents(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xs:attribute-use"))
		{	*type = SOAP_TYPE_xs__attribute_use;
			return soap_in_xs__attribute_use(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xsd:boolean"))
		{	*type = SOAP_TYPE_xsd__boolean;
			return soap_in_xsd__boolean(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xsd:boolean"))
		{	*type = SOAP_TYPE_bool;
			return soap_in_bool(soap, NULL, NULL, NULL);
		}
		if (!soap_match_tag(soap, t, "xsd:string"))
		{	char **s;
			*type = SOAP_TYPE_string;
			s = soap_in_string(soap, NULL, NULL, NULL);
			return s ? *s : NULL;
		}
		if (!soap_match_tag(soap, t, "xs:namespaceList"))
		{	char **s;
			*type = SOAP_TYPE_xs__namespaceList;
			s = soap_in_xs__namespaceList(soap, NULL, NULL, NULL);
			return s ? *s : NULL;
		}
		if (!soap_match_tag(soap, t, "xsd:string"))
		{	char **s;
			*type = SOAP_TYPE_xsd__string;
			s = soap_in_xsd__string(soap, NULL, NULL, NULL);
			return s ? *s : NULL;
		}
		if (!soap_match_tag(soap, t, "xsd:QName"))
		{	char **s;
			*type = SOAP_TYPE_xsd__QName;
			s = soap_in_xsd__QName(soap, NULL, NULL, NULL);
			return s ? *s : NULL;
		}
		if (!soap_match_tag(soap, t, "xsd:NMTOKENS"))
		{	char **s;
			*type = SOAP_TYPE_xsd__NMTOKENS;
			s = soap_in_xsd__NMTOKENS(soap, NULL, NULL, NULL);
			return s ? *s : NULL;
		}
		if (!soap_match_tag(soap, t, "xsd:NMTOKEN"))
		{	char **s;
			*type = SOAP_TYPE_xsd__NMTOKEN;
			s = soap_in_xsd__NMTOKEN(soap, NULL, NULL, NULL);
			return s ? *s : NULL;
		}
		if (!soap_match_tag(soap, t, "xsd:NCName"))
		{	char **s;
			*type = SOAP_TYPE_xsd__NCName;
			s = soap_in_xsd__NCName(soap, NULL, NULL, NULL);
			return s ? *s : NULL;
		}
		if (!soap_match_tag(soap, t, "xsd:ID"))
		{	char **s;
			*type = SOAP_TYPE_xsd__ID;
			s = soap_in_xsd__ID(soap, NULL, NULL, NULL);
			return s ? *s : NULL;
		}
		if (!soap_match_tag(soap, t, "xsd:anyURI"))
		{	char **s;
			*type = SOAP_TYPE_xsd__anyURI;
			s = soap_in_xsd__anyURI(soap, NULL, NULL, NULL);
			return s ? *s : NULL;
		}
		if (!soap_match_tag(soap, t, "xsd:string"))
		{	char **s;
			*type = SOAP_TYPE_string;
			s = soap_in_string(soap, NULL, NULL, NULL);
			return s ? *s : NULL;
		}
		t = soap->tag;
		if (!soap_match_tag(soap, t, "xsd:QName"))
		{	char **s;
			*type = SOAP_TYPE__QName;
			s = soap_in__QName(soap, NULL, NULL, NULL);
			return s ? *s : NULL;
		}
	}
	}
	soap->error = SOAP_TAG_MISMATCH;
	return NULL;
}

#ifdef __cplusplus
}
#endif
#endif

SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap *soap)
{
	if (!soap_peek_element(soap))
	{	int t;
		if (soap->mustUnderstand && !soap->other)
			return soap->error = SOAP_MUSTUNDERSTAND;
		if (((soap->mode & SOAP_XML_STRICT) && soap->part != SOAP_IN_HEADER) || !soap_match_tag(soap, soap->tag, "SOAP-ENV:"))
		{	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "REJECTING element '%s'\n", soap->tag));
			return soap->error = SOAP_TAG_MISMATCH;
		}
		if (!*soap->id || !soap_getelement(soap, &t))
		{	soap->peeked = 0;
			DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unknown element '%s' (level=%u, %d)\n", soap->tag, soap->level, soap->body));
			if (soap->fignore)
				soap->error = soap->fignore(soap, soap->tag);
			else
				soap->error = SOAP_OK;
			DBGLOG(TEST, if (!soap->error) SOAP_MESSAGE(fdebug, "IGNORING element '%s'\n", soap->tag));
			if (!soap->error && soap->body)
			{	soap->level++;
				while (!soap_ignore_element(soap))
					;
				if (soap->error == SOAP_NO_TAG)
					soap->error = soap_element_end_in(soap, NULL);
			}
		}
	}
	return soap->error;
}

#ifndef WITH_NOIDREF
SOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap *soap)
{
	int i;
	struct soap_plist *pp;
	if (soap->version == 1 && soap->encodingStyle && !(soap->mode & (SOAP_XML_TREE | SOAP_XML_GRAPH)))
		for (i = 0; i < SOAP_PTRHASH; i++)
			for (pp = soap->pht[i]; pp; pp = pp->next)
				if (pp->mark1 == 2 || pp->mark2 == 2)
					if (soap_putelement(soap, pp->ptr, "id", pp->id, pp->type))
						return soap->error;
	return SOAP_OK;
}
#endif

#ifndef WITH_NOIDREF

#ifdef __cplusplus
extern "C" {
#endif
SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap *soap, const void *ptr, const char *tag, int id, int type)
{
	switch (type)
	{
	case SOAP_TYPE_byte:
		return soap_out_byte(soap, tag, id, (const char *)ptr, "xsd:byte");
	case SOAP_TYPE_int:
		return soap_out_int(soap, tag, id, (const int *)ptr, "xsd:int");
	case SOAP_TYPE_sd__mutability:
		return soap_out_sd__mutability(soap, tag, id, (const enum sd__mutability *)ptr, "sd:mutability");
	case SOAP_TYPE_soap__useChoice:
		return soap_out_soap__useChoice(soap, tag, id, (const enum soap__useChoice *)ptr, "soap:useChoice");
	case SOAP_TYPE_soap__styleChoice:
		return soap_out_soap__styleChoice(soap, tag, id, (const enum soap__styleChoice *)ptr, "soap:styleChoice");
	case SOAP_TYPE_xs__formChoice:
		return soap_out_xs__formChoice(soap, tag, id, (const enum xs__formChoice *)ptr, "xs:formChoice");
	case SOAP_TYPE_xs__processContents:
		return soap_out_xs__processContents(soap, tag, id, (const enum xs__processContents *)ptr, "xs:processContents");
	case SOAP_TYPE_xs__attribute_use:
		return soap_out_xs__attribute_use(soap, tag, id, (const enum xs__attribute_use *)ptr, "xs:attribute-use");
	case SOAP_TYPE_xsd__boolean:
		return soap_out_xsd__boolean(soap, tag, id, (const bool *)ptr, "xsd:boolean");
	case SOAP_TYPE_bool:
		return soap_out_bool(soap, tag, id, (const bool *)ptr, "xsd:boolean");
	case SOAP_TYPE_wsdl__service:
		return ((wsdl__service *)ptr)->soap_out(soap, tag, id, "wsdl:service");
	case SOAP_TYPE_wsdl__port:
		return ((wsdl__port *)ptr)->soap_out(soap, tag, id, "wsdl:port");
	case SOAP_TYPE_wsdl__binding:
		return ((wsdl__binding *)ptr)->soap_out(soap, tag, id, "wsdl:binding");
	case SOAP_TYPE_wsdl__binding_operation:
		return ((wsdl__binding_operation *)ptr)->soap_out(soap, tag, id, "wsdl:binding-operation");
	case SOAP_TYPE_wsdl__ext_fault:
		return ((wsdl__ext_fault *)ptr)->soap_out(soap, tag, id, "wsdl:ext-fault");
	case SOAP_TYPE_wsdl__ext_output:
		return ((wsdl__ext_output *)ptr)->soap_out(soap, tag, id, "wsdl:ext-output");
	case SOAP_TYPE_wsdl__ext_input:
		return ((wsdl__ext_input *)ptr)->soap_out(soap, tag, id, "wsdl:ext-input");
	case SOAP_TYPE_wsdl__portType:
		return ((wsdl__portType *)ptr)->soap_out(soap, tag, id, "wsdl:portType");
	case SOAP_TYPE_wsdl__fault:
		return ((wsdl__fault *)ptr)->soap_out(soap, tag, id, "wsdl:fault");
	case SOAP_TYPE_wsdl__output:
		return ((wsdl__output *)ptr)->soap_out(soap, tag, id, "wsdl:output");
	case SOAP_TYPE_wsdl__input:
		return ((wsdl__input *)ptr)->soap_out(soap, tag, id, "wsdl:input");
	case SOAP_TYPE_wsdl__types:
		return ((wsdl__types *)ptr)->soap_out(soap, tag, id, "wsdl:types");
	case SOAP_TYPE_wsdl__import:
		return ((wsdl__import *)ptr)->soap_out(soap, tag, id, "wsdl:import");
	case SOAP_TYPE_gwsdl__portType:
		return ((gwsdl__portType *)ptr)->soap_out(soap, tag, id, "gwsdl:portType");
	case SOAP_TYPE_sd__staticServiceDataValues:
		return ((sd__staticServiceDataValues *)ptr)->soap_out(soap, tag, id, "sd:staticServiceDataValues");
	case SOAP_TYPE_sd__serviceData:
		return ((sd__serviceData *)ptr)->soap_out(soap, tag, id, "sd:serviceData");
	case SOAP_TYPE_wsdl__operation:
		return ((wsdl__operation *)ptr)->soap_out(soap, tag, id, "wsdl:operation");
	case SOAP_TYPE_http__operation:
		return ((http__operation *)ptr)->soap_out(soap, tag, id, "http:operation");
	case SOAP_TYPE_http__binding:
		return ((http__binding *)ptr)->soap_out(soap, tag, id, "http:binding");
	case SOAP_TYPE_http__address:
		return ((http__address *)ptr)->soap_out(soap, tag, id, "http:address");
	case SOAP_TYPE_dime__message:
		return ((dime__message *)ptr)->soap_out(soap, tag, id, "dime:message");
	case SOAP_TYPE_mime__multipartRelated:
		return ((mime__multipartRelated *)ptr)->soap_out(soap, tag, id, "mime:multipartRelated");
	case SOAP_TYPE_mime__part:
		return ((mime__part *)ptr)->soap_out(soap, tag, id, "mime:part");
	case SOAP_TYPE_mime__content:
		return ((mime__content *)ptr)->soap_out(soap, tag, id, "mime:content");
	case SOAP_TYPE_soap__address:
		return ((soap__address *)ptr)->soap_out(soap, tag, id, "soap:address");
	case SOAP_TYPE_soap__header:
		return ((soap__header *)ptr)->soap_out(soap, tag, id, "soap:header");
	case SOAP_TYPE_soap__headerfault:
		return ((soap__headerfault *)ptr)->soap_out(soap, tag, id, "soap:headerfault");
	case SOAP_TYPE_soap__fault:
		return ((soap__fault *)ptr)->soap_out(soap, tag, id, "soap:fault");
	case SOAP_TYPE_soap__body:
		return ((soap__body *)ptr)->soap_out(soap, tag, id, "soap:body");
	case SOAP_TYPE_soap__operation:
		return ((soap__operation *)ptr)->soap_out(soap, tag, id, "soap:operation");
	case SOAP_TYPE_soap__binding:
		return ((soap__binding *)ptr)->soap_out(soap, tag, id, "soap:binding");
	case SOAP_TYPE_wsdl__part:
		return ((wsdl__part *)ptr)->soap_out(soap, tag, id, "wsdl:part");
	case SOAP_TYPE_wsdl__message:
		return ((wsdl__message *)ptr)->soap_out(soap, tag, id, "wsdl:message");
	case SOAP_TYPE_wsdl__definitions:
		return ((wsdl__definitions *)ptr)->soap_out(soap, tag, id, "wsdl:definitions");
	case SOAP_TYPE_xs__redefine:
		return ((xs__redefine *)ptr)->soap_out(soap, tag, id, "xs:redefine");
	case SOAP_TYPE_xs__include:
		return ((xs__include *)ptr)->soap_out(soap, tag, id, "xs:include");
	case SOAP_TYPE_xs__import:
		return ((xs__import *)ptr)->soap_out(soap, tag, id, "xs:import");
	case SOAP_TYPE_xs__complexContent:
		return ((xs__complexContent *)ptr)->soap_out(soap, tag, id, "xs:complexContent");
	case SOAP_TYPE_xs__whiteSpace:

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?