static void sdl_deserialize_encoder(encodePtr enc, sdlTypePtr *types, char **in)
{
	int i;

	WSDL_CACHE_GET_INT(enc->details.type, in);
	enc->details.type_str = sdl_deserialize_string(in);
	enc->details.ns = sdl_deserialize_string(in);
	WSDL_CACHE_GET_INT(i, in);
	enc->details.sdl_type = types[i];
	enc->to_xml = sdl_guess_convert_xml;
	enc->to_zval = sdl_guess_convert_zval;

	if (enc->details.sdl_type == NULL) {
		int ns_len = strlen(enc->details.ns);
		int type_len = strlen(enc->details.type_str);

		if (((ns_len == sizeof(SOAP_1_1_ENC_NAMESPACE)-1 &&
		      memcmp(enc->details.ns, SOAP_1_1_ENC_NAMESPACE, sizeof(SOAP_1_1_ENC_NAMESPACE)-1) == 0) ||
		     (ns_len == sizeof(SOAP_1_2_ENC_NAMESPACE)-1 &&
		      memcmp(enc->details.ns, SOAP_1_2_ENC_NAMESPACE, sizeof(SOAP_1_2_ENC_NAMESPACE)-1) == 0))) {
			char *enc_nscat;
			int enc_ns_len;
			int enc_len;
			encodePtr real_enc;

			enc_ns_len = sizeof(XSD_NAMESPACE)-1;
			enc_len = enc_ns_len + type_len + 1;
			enc_nscat = emalloc(enc_len + 1);
			memcpy(enc_nscat, XSD_NAMESPACE, sizeof(XSD_NAMESPACE)-1);
			enc_nscat[enc_ns_len] = ':';
			memcpy(enc_nscat+enc_ns_len+1, enc->details.type_str, type_len);
			enc_nscat[enc_len] = '\0';

			real_enc = get_encoder_ex(NULL, enc_nscat, enc_len);
			efree(enc_nscat);
			if (real_enc) {
				enc->to_zval = real_enc->to_zval;
				enc->to_xml = real_enc->to_xml;
			}
		}
	}
}
static void sdl_deserialize_encoder(encodePtr enc, sdlTypePtr *types, char **in)
{
	int i;

	WSDL_CACHE_GET_INT(enc->details.type, in);
	enc->details.type_str = sdl_deserialize_string(in);
	enc->details.ns = sdl_deserialize_string(in);
	WSDL_CACHE_GET_INT(i, in);
	enc->details.sdl_type = types[i];
	enc->to_xml = sdl_guess_convert_xml;
	enc->to_zval = sdl_guess_convert_zval;

	if (enc->details.sdl_type == NULL) {
		int ns_len = strlen(enc->details.ns);
		int type_len = strlen(enc->details.type_str);

		if (((ns_len == sizeof(SOAP_1_1_ENC_NAMESPACE)-1 &&
		      memcmp(enc->details.ns, SOAP_1_1_ENC_NAMESPACE, sizeof(SOAP_1_1_ENC_NAMESPACE)-1) == 0) ||
		     (ns_len == sizeof(SOAP_1_2_ENC_NAMESPACE)-1 &&
		      memcmp(enc->details.ns, SOAP_1_2_ENC_NAMESPACE, sizeof(SOAP_1_2_ENC_NAMESPACE)-1) == 0))) {
			char *enc_nscat;
			int enc_ns_len;
			int enc_len;
			encodePtr real_enc;

			enc_ns_len = sizeof(XSD_NAMESPACE)-1;
			enc_len = enc_ns_len + type_len + 1;
			enc_nscat = emalloc(enc_len + 1);
			memcpy(enc_nscat, XSD_NAMESPACE, sizeof(XSD_NAMESPACE)-1);
			enc_nscat[enc_ns_len] = ':';
			memcpy(enc_nscat+enc_ns_len+1, enc->details.type_str, type_len);
			enc_nscat[enc_len] = '\0';

			real_enc = get_encoder_ex(NULL, enc_nscat, enc_len);
			efree(enc_nscat);
			if (real_enc) {
				enc->to_zval = real_enc->to_zval;
				enc->to_xml = real_enc->to_xml;
			}
		}
	}
}