2002-07-08 07:03:43 +08:00
|
|
|
#ifndef PHP_SDL_H
|
|
|
|
#define PHP_SDL_H
|
|
|
|
|
|
|
|
#define XSD_WHITESPACE_COLLAPSE 1
|
|
|
|
#define XSD_WHITESPACE_PRESERVE 1
|
|
|
|
#define XSD_WHITESPACE_REPLACE 1
|
|
|
|
|
2002-08-07 11:03:09 +08:00
|
|
|
#define BINDING_SOAP 1
|
|
|
|
#define BINDING_HTTP 2
|
|
|
|
|
|
|
|
#define SOAP_RPC 1
|
|
|
|
#define SOAP_DOCUMENT 2
|
|
|
|
|
|
|
|
#define SOAP_ENCODED 1
|
|
|
|
#define SOAP_LITERAL 2
|
|
|
|
|
2004-01-10 02:22:03 +08:00
|
|
|
struct _sdl {
|
2004-01-12 19:46:01 +08:00
|
|
|
HashTable docs; /* pointer to the parsed xml file */
|
|
|
|
HashTable *types; /* array of sdlTypesPtr */
|
2003-01-18 03:35:13 +08:00
|
|
|
HashTable *encoders; /* array of encodePtr */
|
|
|
|
HashTable *bindings; /* array of sdlBindings (key'd by name) */
|
2002-07-08 07:03:43 +08:00
|
|
|
char *target_ns;
|
|
|
|
char *source;
|
|
|
|
};
|
|
|
|
|
2004-01-10 02:22:03 +08:00
|
|
|
struct _sdlBinding {
|
2002-08-07 11:03:09 +08:00
|
|
|
char *name;
|
|
|
|
HashTable *functions;
|
|
|
|
char *location;
|
|
|
|
int bindingType;
|
|
|
|
void *bindingAttributes;
|
|
|
|
};
|
|
|
|
|
2003-01-18 03:35:13 +08:00
|
|
|
/* Soap Binding Specfic stuff */
|
2004-01-10 02:22:03 +08:00
|
|
|
struct _sdlSoapBinding {
|
2002-08-07 11:03:09 +08:00
|
|
|
char *transport;
|
|
|
|
int style;
|
|
|
|
};
|
|
|
|
|
2004-01-10 02:22:03 +08:00
|
|
|
struct _sdlSoapBindingFunctionBody {
|
2002-08-07 11:03:09 +08:00
|
|
|
char *ns;
|
|
|
|
int use;
|
2003-01-18 03:35:13 +08:00
|
|
|
char *parts; /* not implemented yet */
|
|
|
|
char *encodingStyle; /* not implemented yet */
|
2002-08-07 11:03:09 +08:00
|
|
|
};
|
|
|
|
|
2004-01-10 02:22:03 +08:00
|
|
|
struct _sdlSoapBindingFunction {
|
2002-08-07 11:03:09 +08:00
|
|
|
char *soapAction;
|
|
|
|
int style;
|
|
|
|
|
|
|
|
sdlSoapBindingFunctionBody input;
|
|
|
|
sdlSoapBindingFunctionBody output;
|
|
|
|
sdlSoapBindingFunctionBody falut;
|
|
|
|
};
|
|
|
|
|
2003-01-18 03:35:13 +08:00
|
|
|
/* HTTP Binding Specfic stuff */
|
2002-08-07 11:03:09 +08:00
|
|
|
/*********** not implemented yet ************
|
|
|
|
struct _sdlHttpBinding
|
|
|
|
{
|
|
|
|
int holder;
|
|
|
|
};
|
|
|
|
*********************************************/
|
|
|
|
|
2004-01-10 02:22:03 +08:00
|
|
|
struct _sdlRestrictionInt {
|
2002-07-08 07:03:43 +08:00
|
|
|
int value;
|
|
|
|
char fixed;
|
|
|
|
char *id;
|
|
|
|
};
|
|
|
|
|
2004-01-10 02:22:03 +08:00
|
|
|
struct _sdlRestrictionChar {
|
2002-07-08 07:03:43 +08:00
|
|
|
char *value;
|
|
|
|
char fixed;
|
|
|
|
char *id;
|
|
|
|
};
|
|
|
|
|
2004-01-10 02:22:03 +08:00
|
|
|
struct _sdlRestrictions {
|
2003-01-18 03:35:13 +08:00
|
|
|
HashTable *enumeration; /* array of sdlRestrictionCharPtr */
|
2002-07-08 07:03:43 +08:00
|
|
|
sdlRestrictionIntPtr minExclusive;
|
|
|
|
sdlRestrictionIntPtr minInclusive;
|
|
|
|
sdlRestrictionIntPtr maxExclusive;
|
|
|
|
sdlRestrictionIntPtr maxInclusive;
|
|
|
|
sdlRestrictionIntPtr totalDigits;
|
|
|
|
sdlRestrictionIntPtr fractionDigits;
|
|
|
|
sdlRestrictionIntPtr length;
|
|
|
|
sdlRestrictionIntPtr minLength;
|
|
|
|
sdlRestrictionIntPtr maxLength;
|
|
|
|
sdlRestrictionCharPtr whiteSpace;
|
|
|
|
sdlRestrictionCharPtr pattern;
|
|
|
|
};
|
|
|
|
|
2004-01-10 02:22:03 +08:00
|
|
|
struct _sdlType {
|
2002-07-08 07:03:43 +08:00
|
|
|
char *name;
|
|
|
|
char *namens;
|
2004-01-06 00:44:01 +08:00
|
|
|
int nillable;
|
2002-07-08 07:03:43 +08:00
|
|
|
int min_occurs;
|
|
|
|
int max_occurs;
|
2003-01-18 03:35:13 +08:00
|
|
|
HashTable *elements; /* array of sdlTypePtr */
|
|
|
|
HashTable *attributes; /* array of sdlAttributePtr */
|
2002-07-08 07:03:43 +08:00
|
|
|
sdlRestrictionsPtr restrictions;
|
|
|
|
encodePtr encode;
|
|
|
|
};
|
|
|
|
|
2004-01-10 02:22:03 +08:00
|
|
|
struct _sdlParam {
|
2002-07-08 07:03:43 +08:00
|
|
|
int order;
|
|
|
|
encodePtr encode;
|
|
|
|
char *paramName;
|
|
|
|
};
|
|
|
|
|
2004-01-10 02:22:03 +08:00
|
|
|
struct _sdlFunction {
|
2002-07-08 07:03:43 +08:00
|
|
|
char *functionName;
|
|
|
|
char *requestName;
|
|
|
|
char *responseName;
|
2003-01-18 03:35:13 +08:00
|
|
|
HashTable *requestParameters; /* array of sdlParamPtr */
|
|
|
|
HashTable *responseParameters; /* array of sdlParamPtr (this should only be one) */
|
2002-08-07 11:03:09 +08:00
|
|
|
int bindingType;
|
|
|
|
void *bindingAttributes;
|
2002-07-08 07:03:43 +08:00
|
|
|
};
|
|
|
|
|
2004-01-10 02:22:03 +08:00
|
|
|
struct _sdlAttribute {
|
2002-07-08 07:03:43 +08:00
|
|
|
char *def;
|
|
|
|
char *fixed;
|
|
|
|
char *form;
|
|
|
|
char *id;
|
|
|
|
char *name;
|
|
|
|
char *ref;
|
|
|
|
char *type;
|
|
|
|
char *use;
|
2003-01-18 03:35:13 +08:00
|
|
|
HashTable *extraAttributes; /* array of xmlNodePtr */
|
2002-07-08 07:03:43 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
sdlPtr get_sdl(char *uri);
|
2004-01-12 19:46:01 +08:00
|
|
|
sdlPtr load_wsdl(char *struri);
|
2002-07-08 07:03:43 +08:00
|
|
|
int load_sdl(char *struri, int force_load);
|
|
|
|
int load_ms_sdl(char *struri, int force_load);
|
|
|
|
|
2004-01-06 00:44:01 +08:00
|
|
|
encodePtr get_encoder_from_prefix(sdlPtr sdl, xmlNodePtr data, const char *type);
|
|
|
|
encodePtr get_encoder(sdlPtr sdl, const char *ns, const char *type);
|
|
|
|
encodePtr get_encoder_ex(sdlPtr sdl, const char *nscat);
|
|
|
|
encodePtr get_create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const char *ns, const char *type);
|
|
|
|
encodePtr create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const char *ns, const char *type);
|
2002-07-08 07:03:43 +08:00
|
|
|
|
2002-08-07 11:03:09 +08:00
|
|
|
sdlBindingPtr get_binding_from_type(sdlPtr sdl, int type);
|
|
|
|
sdlBindingPtr get_binding_from_name(sdlPtr sdl, char *name, char *ns);
|
|
|
|
|
|
|
|
xmlNodePtr sdl_guess_convert_xml(encodeType enc, zval* data, int style);
|
2002-08-14 13:26:25 +08:00
|
|
|
zval *sdl_guess_convert_zval(encodeType enc, xmlNodePtr data);
|
2002-07-08 07:03:43 +08:00
|
|
|
|
2002-08-07 11:03:09 +08:00
|
|
|
xmlNodePtr sdl_to_xml_array(sdlTypePtr type, zval *data, int style);
|
|
|
|
xmlNodePtr sdl_to_xml_object(sdlTypePtr type, zval *data, int style);
|
2002-07-08 07:03:43 +08:00
|
|
|
|
|
|
|
void delete_type(void *type);
|
|
|
|
void delete_attribute(void *attribute);
|
|
|
|
#endif
|