Home

sevenstaxSOAP/XML/HTTP User Manual

image

Contents

1. Sets the HTTP content length Parameter uContentLength Content length Return Value 4 2 5 stxHTTPGen SetContentType void stxHTTPGen SetContentType UINT8 stx uContentType UINT8 stx uEncoding Description Sets the HTTP content type and content encoding Parameter uContentType Content type one of the following values HTTP TYPE TEXTXML File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 31 34 Public S V NSTAX sevenstaxSOAP XML HTTP User Manual erger TECHNOLOGIES HTTP_TYPE_TEXTPLAIN uEncoding Content encoding one of the following values HTTP_CHARSET_UTF8 HTTP_CHARSET_ISO8859_1 Return Value 4 2 6 stxHTTPGen_SetHost void stxHTTPGen_SetHost STRING_stx szHost Description Sets the HTTP host Parameter szHost Host name Return Value 4 2 7 stxHTTPGen SetUsernameAndPassword void stxHTTPGen SetUsernameAndPassword STRING stx szUsername STRING stx szPassword Description Sets username and password for HTTP authorization Parameter szUsername username szPassword password Return Value 4 2 8 stxHTTPGen_GetSendHeaderData void stxHTTPGen GetSendHeaderData UINT8 stx uMode STRING stx szBuffer UINT16 stx uLength Description Function to register a handler function for delivering a content It is advisable to call this function before using XML generator Parameter uMode FIRST first packet NEXT next packet szBuffer destination buffer
2. GetCode XML ERR stxXMLGen GetCode UINT8 stx uMode XML ENTRY FPTR stx aXMLEntries STRING stx szBuffer UINT16 stx uLength Description Fills XML code without XML header from a template into buffer Parameter uMode FIRST first packet NEXT next packet aXMLEntries XML template s a szBuffer destination buffer buffer where the packet is to be copied uLength buffer size Return Value One of the following values XML_ERR_NO_NAMESPACES error in namespace declaration XML ERR INVALID PARAM parameter error XML ERR NOT READY header is not yet copied completely function must be called again XML ERR OK header is copied completely File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 26 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual Ta SEMEL ED TECHNOLOGIES buffer ends with terminating zero 3 4 Parser Public functions 3 4 1 stxXMLPrs_Init void stxXMLPrs Init void Description Initializes the module The function must be called once before using any other XML parser functions Parameter Return Value 3 4 2 stxXMLPrs_RegHndlFct_PutTagOpen void stxXMLPrs_RegHndIlFct_PutTagOpen XMLPRS_PUT_TAG_OPEN_HNDL_FCT fHndlFct Description Function to register a handler function for delivering an opened tag It is advisable to call this function before using XML parser Parameter fHndlFct handler function XMLPRS_PUT_TAG_OPEN_HNDL_FCT is defined in x
3. SEVENSTAX sevenstaxSOAP XML HTTP User Manual Revision No 2 1 State Released Author sevenstax GmbH Initial version 24 10 07 Last change 12 03 09 Last Review 09 12 08 Publication Public Filename SOAP XML HTTP UserManual Copyright c 2009 by sevenstax GmbH This document is an intellectual property of sevenstax GmbH Unauthorized copying and distribution is prohibited S VE NSTAX sevenstaxSOAP XML HTTP User Manual erger TECHNOLOGIES Table of Contents e E 5 2 SOAP TE 6 2 1 ONIE E EE ATEA E 6 2 2 Public FUNCTIONS iiiaae aneren aeaa eiaa a rAr AARE AENEA AAE AE a E EAEE er ea Eer ERARE SERSA 6 2 2 1 SXSOQOAPSINIl eae Aaaa EA EE devine aa a as dt 6 2 2 2 stxSOAPSrv Reset mmmmmrrrrrrrrrrmmmmmmmmnmmmemererserererrarereersnerern 7 E E Te RE 7 2 2 4 stx SOAPSrv ZGeihameener 7 2 2 5 stxSOAPSrv_ RegNotifyHndlFct vcs scccccteccecstscsestsennccsscacatacteneseedestacacasavesedvvecestecere 7 2 2 6 stx SOAPSrv RegHnalFct Get AitrVall en 8 2 2 7 stx SOAPSrv RegHnalFct Get AitrVallentieneat 8 2 2 8 stx SOAPSrv RegHnalFct Get ttrVal 8 2 2 9 stx SOAPSrv RegHnalFct GeilnpoutVall en 9 2 2 10 stx SOAPSrv RegHnadlFct GeilnpufVallenbenesat 9 2 2 11 stx SOAPSrv RegHnalFct Geilnputval 10 2 2 12 stxSOAPSrv_RegHndlFct_GetArray Cnt cecccccccccseeeeeeeeeeeeeeeeeeeeeanaaaneeeeeenaea 10 2 2 13 stv sO Dznm Feotindtc Gei rravCCotibepneat 10 2 2 14 stx SOAPSrv RegHnalFct PDut ttrVMal 11 2 2 15 stx SOAPSrv Re
4. SOAP action used in SOAPAction field e arequest XML template e aresponse XML template Every template is an array of XML entries type XML ENTRY An XML entry contains an object type id a namespace id and an object id The object type id is one of the following e XML MARK TAG OPEN tag open MARK NS namespace declaration MARK ATTR NAME attribute name MARK ATTR VAL attribute value ARK CONTENT content MARK TAG CLOSE fe tag close MARK TAG ARRAY COUNT count of tag repetitions array oe e e e e e Ss Ge D Ps Ss Mm o PE BUE EU i E Z MARK_END end of xml document The namespace id must always be 0 File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 17 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual Se CERSESUED TECHNOLOGIES The object id depends of the object type id e XML MARK TAG OPEN tag open tag index defined in soapinst c e XML MARK NS namespace declaration irrelevant e XML MARK ATTR NAME attribute name attribute name index defined in soapinst h e XML MARK ATTR VAL attribute value attribute value index defined in soapinst h e XML MARK CONTENT content content index defined in soapinst h e XML MARK TAG CLOSE tag close irrelevant e XML MARK TAG ARRAY COUNT count of tag repeti
5. Value 2 3 6 NC SOAP ERR HTTP GEN Description SOAP has finished unsuccessfully An error during generating HTTP code is occurred Parameter Return Value 2 3 7 NC SOAP ERR HTTP PRS Description SOAP has finished unsuccessfully An error during parsing HTTP code is occurred Parameter Return Value 2 3 8 NC SOAP ERR XML GEN Description SOAP has finished unsuccessfully An error during generating XML code is occurred Parameter Return Value 2 3 9 NC SOAP ERR XML PRS Description SOAP has finished unsuccessfully File SOAP XML HTTP UserManual odt Revision No 2 1 Page 14 34 Last Review 09 12 08 Public sevenstaxSOAP XML HTTP User Manual S V NSTAX An error during parsing XML code is occurred Parameter Return Value 2 3 10 NC_SOAP_ERR_SOAP Description SOAP has finished unsuccessfully An XML tag that signalises a SOAP error was received Parameter Return Value 2 3 11 NC_SOAP_TIMEOUT Description SOAP has finished unsuccessfully A SOAP request response sequence has last more than 10 minutes Parameter Return Value File SOAP_XML_HTTP_UserManual odt Revision No 2 1 Page 15 34 Last Review 09 12 08 Public S V NSTAX sevenstaxSOAP XML HTTP User Manual Sy PEWS EE DEE 2 4 SOAP instance module In the SOAP instance module the user must define e an XML tag list of his namespace an XML attribute list of his namespace a SOAP operation list a SO
6. AP server namespace an XML prefix for sending tags of his namespace 2 4 1 XML tag list The XML tag list of the user specific namespace must be defined in the array SOAPInst_TagList Every entry consists of a structure that contains a string that defines the name of the tag The structure of the last entry must contain a null pointer Example tag list names const XML TAGLIST ENTRY SOAPInst TagList data FE 0 parameter 1 active 2 NULL stx It is recommended that there is also a list of tag indices as macros to build the templates s b 2 4 2 XML attribute list The XML attribute list of the user specific namespace must be defined in the array SOAPInst_AttrList Every entry consists of a structure that contains a string that defines the name of the attribute The structure of the last entry must contain a null pointer File SOAP_XML_HTTP_UserManual odt Last Review 09 12 08 Revision No 2 1 Page 16 34 Public E S V NSTAX sevenstaxSOAP XML HTTP User Manual Va STRENGER TECHNOLOGIES Example attribute list names const XML ATTRLIST ENTRY SOAPInst AttrList id 0 NULL stx It is recommended that there is also a list of attribute indices as macros to build the templates s b 2 4 3 SOAP operation list The SOAP operation list contains SOAP operations Every SOAP operation type SOAP_OPERATION_TYPE contains e a
7. F8 XML_CHARSET_ISO8859_1 Return Value 3 3 3 stxXMLGen_RegHndlFct_GetAttrValLen void stxXMLGen_RegHndIFct_GetAttrValLen XMLGEN_GET_ATTRVAL_LEN_HNDL_FCT fHndlIFct Description Function to register a handler function for delivering an attribute value length It is advisable to call this function before using XML generator Parameter fHndlFct handler function XMLGEN GET ATTRVAL LEN HNDL FCT is defined in xmigen h Return Value File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 22 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual Sy PEWS PSU ED TENNER NES 3 3 4 stxXMLGen_RegHndlFct_GetAttrValLenRepeat void stxXMLGen_RegHndIFct_GetAttrValLenRepeat XMLGEN_GET_ATTRVAL_LEN_HNDL_FCT fHndlIFct Description Function to register a handler function for the repeated delivering of an attribute value length The handler function MUST return the same value as in the former call of the function registered in the function stxxMLGen RegHndiFct GetAttrValLen It can be necessary to freeze a value length e g for calculating the exact content length in a request It is advisable to call this function before using XML generator Parameter fHndlFct handler function XMLGEN_GET_ATTRVAL_LEN_HNDL_FCT is defined in xmigen h Return Value 3 3 5 stxXMLGen_RegHndlFct_GetAttrVal void stxXMLGen_RegHndIFct_GetAttrVal XMLGEN_GET_ATTRVAL_HNDL_FCT fHndIFct Description Functio
8. FCT is defined in xmigen h Return Value 3 3 8 stxXMLGen_RegHndlFct_GetContent void stxXMLGen_RegHndIFct_GetContent XMLGEN_GET_CONTENT_HNDL_FCT fHndIFct Description Function to register a handler function for delivering a content It is advisable to call this function before using XML generator Parameter fHndlFct handler function XMLGEN GET CONTENT HNDL FCT is defined in xmigen h Return Value 3 3 9 stxXMLGen_RegHndlFct_GetArrayCnt void stxXMLGen_RegHndIFct_GetArrayCnt XMLGEN_GET_ARRAY_CNT_HNDL_FCT fHndlFct Description Function to register a handler function for delivering the count of array entries It is advisable to call this function before using XML generator File SOAP_XML_HTTP_UserManual odt Last Review 09 12 08 Revision No 2 1 Page 24 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual Sy PEWS PSU ED TENNER NES Parameter fHndlFct handler function XMLGEN_GET_ARRAY_CNT_HNDL_FCT is defined in xmigen h Return Value 3 3 10 stxXMLGen_RegHndlFct_GetArrayCntRepeat void stxXMLGen_RegHndIFct_GetArrayCntRepeat XMLGEN_GET_ARRAY_CNT_HNDL_FCT fHndIF ct Description Function to register a handler function for the repeated delivering of the count of array entries The handler function MUST return the same value as in the former call of the function registered in the function stxXxMLGen RegHndiFct GetArrayCnt It can be necessary to freeze a value length e g for calcu
9. G SI 0 0 ity ENDALL CONTENT SENDALL 0 TAG ISP USED 0 0 mr CONTENT DATA ISP US ED File SOAP_XML_HTTP_UserManual odt Revision No 2 1 Page 19 34 Last Review 09 12 08 Public SEVENSTAX sevenstaxSOAP XML HTTP User Manual 2 4 4 SOAP server namespace Must be defined in the macro SOAPINST_XMLNS It is used to generate the XML namespace declaration Example name of soap web service namespace define SOAPINST XMLNS urn wechselrichter 2 4 5 sending XML prefix Must be defined in the macro SOAPINST_PREFIX It is used to generate all XML tags and attributes Example sending prefix of sending tags amp attributes of soap web service namespace define SOAPINST PREFIX my File SOAP_XML_HTTP_UserManual odt Last Review 09 12 08 Revision No 2 1 Page 20 34 Public S V NSTAX sevenstaxSOAP XML HTTP User Manual Sy PEWS ESTED DEE 3 XML module 3 1 Overview The XML module can be used to generate and parse XML documents XML code can be generated in segments of arbitrary length The parse process works on the fly That means that the XML document can be parsed immediately during the receive process The XML module is composed of three parts a main part a generator and a parser The following files are included e xml c main part structures and functions xml h main part function declarations definition
10. MLPRS ERROR HNDL FCT fHndIFct Description Function to register a handler function for signalling an error Parameter fHndlFct handler function XMLPRS_ERROR_HNDL_FCT is defined in xmlprs h Return Value File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 28 34 Public S V NSTAX sevenstaxSOAP XML HTTP User Manual ta SEMBEDDED TECHNOLOGIES 3 4 7 stxXMLPrs Parselnit void stxXMLPrs Parselnit void Description Initialization routine for a parse process must be called on every new parse process Parameter Return Value 3 4 8 stxXMLPrs Parse XML ERR stxXMLPrs Parse STRING stx szDataPacket UINT16 stx uLength Description Parses an XML packet Parameter szDataPacket pointer to XML data packet uLength length of XML data packet Return Value One of the following values XML ERR OK ok XML ERR PARSE error File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 29 34 Public sevenstaxSOAP XML HTTP User Manual S V NSTAX 4 HTTP module 4 1 Overview The HTTP module can be used to generate and parse HTTP header HTTP code can be generated in segments of arbitrary length The parse process works on the fly That means that the HTTP header can be parsed immediately during the receive process The HTTP module is composed of three parts a definition part a generator and a parser The following files are included h
11. P data packet puLength pointer to length of HTTP data packet will be set to position in packet where HTTP code has finished if so Return Value One of the following values HTTP ERR OK ok HTTP ERR PARSE error 4 3 5 stxHTTPPrs GetLastAnswerCode UINT16 stx stxHTTPPrs GetLastAnswerCode void Description Returns last received HTTP return code Parameter Return Value Last received HTTP return code Copyright c 2009 by sevenstax GmbH This document is an intellectual property of sevenstax GmbH Unauthorized copying and distribution is prohibited File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 34 34 Public
12. buffer where the packet is to be copied uLength buffer size Return Value File SOAP_XML_HTTP_UserManual odt Last Review 09 12 08 Revision No 2 1 Page 32 34 Public S V NSTAX sevenstaxSOAP XML HTTP User Manual erger TECHNOLOGIES 4 3 Parser Public functions 4 3 1 stxHTTPPrs Init void stxHTTPPrs Init void Description Initializes the module The function must be called once before using any other HTTP parser functions Parameter Return Value 4 3 2 stxHTTPPrs SetHndIFct SetHeaderinfo void stxHTTPPrs SetHndiFct SetHeaderinfo HTTP SET HEADER INFO FCT TYPE pfnFct Description Function to register a handler function for delivering the HTTP header fields with its values to the application It is advisable to call this function before using HTTP parser Parameter pfnFct handler function HTTP SET HEADER INFO FCT TYPE is defined in httpprs h Return Value 4 3 3 stxHTTPPrs Parselnit void stxHTTPPrs Parselnit void Description Initialization routine for a parse process must be called on every new parse process Parameter Return Value File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 33 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual Tq STENGELEN TECHNOLOGIES 4 3 4 stxHTTPPrs Parse HTTP ERR stxHTTPPrs Parse STRING stx szDataPacket UINT16 stx puLength Description Parses a HTTP data packet Parameter szDataPacket pointer to HTT
13. cture e data exchange with established applications e g o Microsoft Dynamics net tools Software AG Tamino o IBM WebSphere DB2 Viper o Apache SOAP Apache Axis o SAP NetWeaver platform Sun Java J2EE ONE platform The SOAP module can be used to send requests to and receive responses from a SOAP server So the sevenstax module works as a SOAP client The requests and responses are sent over HTTP To do this SOAP uses separate HTTP generator and HTTP parser modules To generate and parse the XML content separate XML generator and XML parser modules are used Before interchanging data with the server a TCP connection as client must be established To do this the functionality of the Data Connect Service is used File SOAP_XML_HTTP_UserManual odt Last Review 09 12 08 Revision No 2 1 Page 5 34 Public S V NSTAX sevenstaxSOAP XML HTTP User Manual Se PEWS ESTED DEER 2 SOAP module 2 1 Overview The SOAP module can be used to send requests to and receive responses from a SOAP server So the module works as a SOAP client It accomplishes all steps from TCP connection establishment over generating and sending the request to receiving and parsing the response The SOAP module is composed of two parts a core part and a user specific part The following files are included e soapsrv c core soapdefs h internal definitions soapsrv h public functions public definitions soapinst c user specific data XML tag list XML at
14. ernal variables so that the delivered strings can be destroyed after the call Parameter szHost Name of the SOAP server uPort TCP port the SOAP server is listening on often 80 for HTTP szResource SOAP resource to be connected with argument of HTTP POST Return Value 2 2 5 stxSOAPSrv RegnNotifyHndIFct void stxSOAPSrv_RegNotifyHndlFct PROTOCOL NOTIFY HANDLER fctAppNotifyPara Description File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 7 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual erger TEEN OLOGIES Registers a notify handler function to consume all SOAP specific notify codes s b It is advisable to call this function before using SOAP Parameter fctAppNotifyPara Notify handler function PROTOCOL NOTIFY HANDLER is defined in protdefs h Return Value 2 2 6 stxSOAPSrv_RegHndlFct_GetAttrValLen void stxSOAPSrv_RegHndIFct_GetAttrValLen SOAP GET ATTRVAL LEN HNDL FCT fHndiIFct Description Registers a handler function for requesting an actual attribute value length The handler function is called during the sending process It is advisable to call this function before using SOAP Parameter fHndlFct Callback function SOAP GET ATTRVAL LEN HNDL FCT is defined in soapsrv h Return Value 2 2 7 stxSOAPSrv_RegHndlFct_GetAttrValLenRepeat void stxSOAPSrv_RegHndIFct_GetAttrValLenRepeat SOAP GET ATTRVAL LEN HNDL FCT fHndiFct Description Re
15. etConfentLengih mu uusaasensassesesersnkansnenennrnkrasvn pennen annend pen edn ean 31 4 2 5 stxHTTPGen ZerContenffwpoe 31 4 2 6 stxHTTPGen ZGeitiost isini isi irrite aa aE A REER 32 4 2 7 stx HTTPGen ZGetilszermame ndiasewor 32 File SOAP XML HTTP UserManual odt Revision No 2 1 Page 3 34 Last Review 09 12 08 Public S V NSTAX sevenstaxSOAP XML HTTP User Manual Ve CEMSERVED TEEN OLOGIES 4 2 8 stx HTTPGen Geizendieacdertata 32 4 3 Parser Public Iunchons cee ceeeeeeeeeeeeeeeeeeeeeeceeaaaeaaeaeeeeeeeeeeseeesaaaaeeessaanes 33 4 31 SIXHT E EE 33 4 3 2 stxHTTPPrs SetHnalFct ZGettieaderloio 33 4 3 3 SstxHTTPPrs Parseint 33 4 3 4 SIX HTTPPTS Patseunanuisunesinvkarsaisrengurkenmmsuknamdstvaknije 34 4 3 5 stxHTTPPrs Gel ast nswert ode 34 File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 4 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual Sy PEWS PSU ED TENNER NES 1 Overview SOAP is a protocol for exchanging structured XML information in Web Services Systems Web Services are defined as a software system designed to support interoperable machine to machine interaction over a network by W3C The main properties are e Continuous with international standards o XML SOAP HTTP are international standards of the W3C o compatible to nei Perl PHP C C Phython etc e Complete device integration into IT infrastructure o for example over SOA service oriented archite
16. g process It is advisable to call this function before using SOAP Parameter fHndlFct Callback function SOAP GET INPUTVAL LEN HNDL FCT is defined in soapsrv h Return Value 2 2 10 stxSOAPSrv_RegHndlFct_GetinputValLenRepeat void stxSOAPSrv_RegHndIFct_GetInputValLenRepeat SOAP GET INPUTVAL LEN HNDL FCT fHndIFct Description Registers a handler function for repeatedly requesting an actual input value content length The handler function is called during the sending process and MUST return the same value as in the former call of the function registered in the function stxSOAPSrv_RegHndlFct_GetlnputValLen It is necessary to freeze a value length to be sent because SOAP must calculate the exact content length in the request It is advisable to call this function before using SOAP Parameter fHndlFct Callback function SOAP GET INPUTVAL LEN HNDL FCT is defined in soapsrv h Return Value File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 9 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual Tq STENGELEN TECHNOLOGIES 2 2 11 stxSOAPSrv_RegHndlFct_GetinputVal void stxSOAPSrv RegHndliFct GetinputVal SOAP GET INPUTVAL HNDL FCT fHndIFct Description Registers a handler function for requesting an actual input value content The handler function is called during the sending process It is advisable to call this function before using SOAP Parameter fHnd
17. gHnalFct PutCOutputValbkt 11 2 2 16 stx SOAPSrv ZSGendeouest 11 2 9 NOR Eee NG 13 2 3 1 NC SOAP READY rrrrnrnnnnnnnnnnrrnrrvvrvrrrrrrrrnnnnnnrrrrrrnrererrnnnnrrnnnnsnrnrnnrnrrernnnenrensnsreen 13 2 3 2 NC SOAP ERR TCP TIMEOUT CONN 13 2 3 3 NC SOAP ERR TCP TIMEOUT DATA 13 2 3 4 NC SOAP ERR TCP DISCONNECTED 13 2 3 5 NC SOAP ERR TCP WEITEN 14 2 3 6 NC SOAP ERR HTTP GEN 14 2 3 7 NC SOAP ERR HTTP DR 14 2 3 8 NC SOAP ERR XML GEN a eE A E 14 2 3 9 NC SOAP ERR XML DR 14 2 3 10 NC SOAP ERR SOAP rder a raaa a EEEE E EAEEREN EREE E 15 2 3 11 NC SOAP TIMEOUT mmnnnnnnvvvnrnrrrrrnnnnnnrrrrrnnrrverernrrrrsnnnnnrenernenreenrrnrrrnnnnsnneenntnen 15 2 4 SOAP instance module cece ccaeeeeeeeeeeeeeeeeeeeeeeaaaaseaaeeeeeeeeeeeeeessaaaaaenteeeeeeess 16 2 4 1 XML togiset 16 2 4 2 Tee 16 2 4 3 SOAP operation st 17 File SOAP_XML_HTTP_UserManual odt Last Review 09 12 08 Revision No 2 1 Page 2 34 Public sevenstaxSOAP XML HTTP User Manual S V ENSTAX 2 4 4 SOAP server OamestpgCe ennta r erreren nennen ennt 20 25 SENG ML Gunnes 20 KAN TT 21 SE EE EE 21 3 2 Main part Public funchons rtnn rrer teent 21 3 2 1 StXXML_REGNAMECSPACES 0 2 2 2 ccccceeeeeeeeeeeeeeeeeeeeeeeeaaaaaaecsseeeeseaaanessaaenesseneeeseas 21 3 3 Generator Public funchons cece eeaaeeeeeeeeeeeeeeeeeeeeeeaaaeeesaeeeseaeneessaees 22 3 3 7 SEXXML GON E 22 3 3 2 SOM GEN SCIEN COGING E 22 3 3 3 stxXxMLGen RegHndlIFct Get ttrvall en 22 3 3 4 stxXxMLGen RegHndliFct Get ttrVval
18. gisters a handler function for repeatedly requesting an actual attribute value length The handler function is called during the sending process and MUST return the same value as in the former call of the function registered in the function stxSOAPSrv_RegHndlFct_GetAttrValLen It is necessary to freeze a value length to be sent because SOAP must calculate the exact content length in the request It is advisable to call this function before using SOAP Parameter fHndlFct Callback function SOAP GET ATTRVAL LEN HNDL FCT is defined in soapsrv h Return Value 2 2 8 stxSOAPSrv_RegHndlFct_GetAttrVal void stxSOAPSrv_RegHndIFct_GetAttrVal File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 8 34 Public S V NSTAX sevenstaxSOAP XML HTTP User Manual Tq STENGER TECHNOLOGIES SOAP GET ATTRVAL HNDL FCT fHndIFct Description Registers a handler function for requesting an actual attribute value The handler function is called during the sending process It is advisable to call this function before using SOAP Parameter fHndlFct Callback function SOAP GET ATTRVAL HNDL FCT is defined in soapsrv h Return Value 2 2 9 stxSOAPSrv_RegHndlFct_GetinputValLen void stxSOAPSrv_RegHndIFct_GetInputValLen SOAP GET INPUTVAL LEN HNDL FCT fHndIFct Description Registers a handler function for requesting an actual input value content length The handler function is called during the sendin
19. lFct Callback function SOAP GET INPUTVAL LEN HNDL FCT is defined in soapsrv h Return Value 2 2 12 stxSOAPSrv_RegHndlFct_GetArrayCnt void stxSOAPSrv_RegHndIFct_GetArrayCnt SOAP GET ARRAY CNT HNDL FCT fHndlFct Description Registers a handler function for requesting an actual count of entries in an XML array The handler function is called during the sending process E g it can be used for sending log data It is advisable to call this function before using SOAP Parameter fHndlFct Callback function SOAP_GET_ARRAY_CNT_HNDL_FCT is defined in soapsrv h Return Value 2 2 13 stxSOAPSrv_RegHndlFct_GetArrayCntRepeat void stxSOAPSrv RegHndliFct GetArrayCntRepeat SOAP GET ARRAY CNT HNDL FCT fHndlIFct Description Registers a handler function for repeatedly requesting an actual count of entries in an XML array The handler function is called during the sending process and MUST return the same value as in the former call of the function registered in the function stxSOAPSrv RegHndlFct GetArrayCnt E g it can be used for sending log data It is advisable to call this function before using SOAP Parameter fHndlFct Callback function SOAP GET ARRAY CNT HNDL FCT is defined in soapsrv h Return Value File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 10 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual Tq STENGELEN TECHNOLOGIES 2 2 14 stxSOAPSr
20. lating the exact content length in a request It is advisable to call this function before using XML generator Parameter fHndlFct handler function XMLGEN_GET_ARRAY_CNT_HNDL_FCT is defined in xmigen h Return Value 3 3 11 stxXMLGen GetHeaderDataLen UINT32 stx stxXMLGen GetHeaderDataLen void Description Calculates the length of the XML header Parameter Return Value Length of the XML header 3 3 12 stxXMLGen GetHeaderData XML ERR stxXMLGen GetHeaderData UINT8 stx uMode STRING stx szBuffer UINT16 stx uLength Description File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 25 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual Sy PEWS ESTED TENE LOG NES Gets the first next packet of the XML header Parameter uMode FIRST first packet NEXT next packet szBuffer destination buffer buffer where the packet is to be copied uLength buffer size Return Value One of the following values XML ERR INVALID PARAM parameter error XML ERR NOT READY header is not yet copied completely function must be called again XML ERR OK header is copied completely buffer ends with terminating zero 3 3 13 stxXMLGen GetCodeLen UINT32 stx stxXMLGen GetCodeLen XML ENTRY FPTR stx aXMLEntries Description Calculates the length of XML code without XML header from a template Parameter aXMLEntries XML template s a Return Value Length of XML code 3 3 14 StxXMLGen
21. lenbiepeat 23 3 3 5 stxXxMLGen RegHndlIFct Get ttrval 23 3 3 6 stxXxMLGen RegHndIFct GetContent en 23 3 3 7 stxXxMLGen RegHndiFct GetContententieneat 24 3 3 8 stxXxMLGen RegHndlIFct Getontent 24 3 3 9 sixXMLGen_RegHndlFct_GetAsrray Cites scncccccccccscevscnseeisetsesesnsesuncensesauvsaneancasoanees 24 3 3 10 stxXxMLGen RegHndiFct Get ravnttieneat 25 3 3 11 stxXxMLGen Geiteadertotal en 25 3 3 12 stxXxMLGen Geiteadertota 25 3 3 13 stxXMLGen GetCodelen nrnna 26 3 3 14 StxXMLGen Getode nn rrrrnrrerrerrnnnssnnnnnssnnnenn 26 3 4 Parser Public functhons eee eeeaaeeeeeceeeeeeeeeeeeeeesaaaeeaaeeeeeseeeeesesaaneeeseas 27 3 4 1 stvxMl Pre Jon 27 3 4 2 stxXxMLPrs RegHndlIFct Dutt agoen 27 3 4 3 SstxXMLPrs RegHndlIFct PDut ttrVal 27 3 4 4 SIXXMLPrs_RegHndlFct_PutT ag CloSe i sccsicccicersscescensssasssavsvenessasvssenogeosvexenenanedaes 28 3 4 5 stvxMl Dr Reotinditct PDutContentbkt 28 3 4 6 stxXMLPrs RegHndiIFct Erortlandier 28 3 4 7 StxXMLPrs Parselnnt 29 3 4 8 StxXMLPrSs Parse cece cece ee neeceeeeeeeeeseeeeeeanaasaaaaseeeeeeeeessceseaaaaaaeeeseaneneesoas 29 4 HTTP module 2 30 EE OT EN EE en 30 4 2 Generator Public Tunchons cece cece cece cece eeeeeeeeeeeeeeeeeeeeceaaaeaaaaeeeeesaaaeeeeseeeeesaanees 30 4 2 1 SIXHT TPGen AMEs a naa Edel decals sabia lagevazivdasbindesevesteusncdaes 30 4 2 2 etvtifTPDGen ZSetdebod cece cccccssneeceeeeteeeeeeeeeeeeceaaanaececesseeeeeeseseeessaaaaeeneesoas 30 4 2 3 etvtifTDtGen Zettiesource nnen 31 4 2 4 stxHTTPGen S
22. mlprs h Return Value 3 4 3 stxXMLPrs_RegHndlFct_PutAttrVal void stxXMLPrs_RegHndlFct_PutAttrVal XMLPRS_PUT_ATTR_VAL_HNDL_FCT fHndlFct Description Function to register a handler function for delivering an attribute value It is advisable to call this function before using XML parser Parameter fHnalFct handler function XMLPRS DUT ATTR VAL HNDL FCT is defined in xmliprs h File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 27 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual Tq STENGER TECHNOLOGIES Return Value 3 4 4 stxXMLPrs_RegHndlFct_PutTagClose void stxXMLPrs_RegHndlFct_PutTagClose XMLPRS_PUT_TAG_CLOSE_HNDL_FCT fHndIFct Description Function to register a handler function for delivering an closed tag It is advisable to call this function before using XML parser Parameter fHndlFct handler function XMLPRS_PUT_TAG_CLOSE_HNDL_FCT is defined in xmlprs h Return Value 3 4 5 stxXMLPrs RegHndlIFct PutContentPkt void stxXMLPrs_RegHndIlFct_PutContentPkt XMLPRS PUT CONTENT PKT HNDL FCT fHndlIFct Description Function to register a handler function for delivering a tag content It is advisable to call this function before using XML generator Parameter fHndlFct handler function XMLPRS DUT CONTENT PKT HNDL FCT is defined in xmlprs h Return Value 3 4 6 stxXMLPrs RegHndIFct ErrorHandler void stxXMLPrs_RegHndlFct_ErrorHandler X
23. n to register a handler function for delivering an attribute value It is advisable to call this function before using XML generator Parameter fHndlFct handler function XMLGEN_GET_ATTRVAL_HNDL_FCT is defined in xmigen h Return Value 3 3 6 stxXMLGen_RegHndlFct_GetContentLen void stxXMLGen_RegHndlFct_GetContentLen XMLGEN GET CONTENT LEN HNDL FCT fHndIFct Description Function to register a handler function for delivering a content length It is advisable to call this function before using XML generator Parameter fHndlFct handler function XMLGEN GET CONTENT LEN HNDL FCT is defined in File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 23 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual Tq STENGELEN TECHNOLOGIES xmigen h Return Value 3 3 7 stxXMLGen_RegHndlFct_GetContentLenRepeat void stxXMLGen_RegHndIFct_GetContentLenRepeat XMLGEN GET CONTENT LEN HNDL FCT fHndIFct Description Function to register a handler function for the repeated delivering of a content length The handler function MUST return the same value as in the former call of the function registered in the function stxXxMLGen RegHndiFct GetContentLen It can be necessary to freeze a value length e g for calculating the exact content length in a request It is advisable to call this function before using XML generator Parameter fHndlFct handler function XMLGEN GET CONTENT LEN HNDL
24. on No 2 1 Page 11 34 Public S V NSTAX sevenstaxSOAP XML HTTP User Manual Ta CEMECRRED TECHNOLOGIES One of the following values SOAP_ERR_OK Send order accepted SOAP ERR BAD INIT Send order not accepted user specific SOAP definitions are not correct soapinst h SOAP ERR BUSY Send order not accepted SOAP is busy File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 12 34 Public S VE NSTAX sevenstaxSOAP XML HTTP User Manual ta SEMBEDDED TECHNOLOGIES 2 3 Notify codes 2 3 1 NC SOAP READY Description SOAP has finished successfully a request response operation Parameter Return Value 2 3 2 NC SOAP ERR TCP TIMEOUT CONN Description SOAP has finished unsuccessfully A TCP connection timeout is occurred Parameter Return Value 2 3 3 NC SOAP ERR TCP TIMEOUT DATA Description SOAP has finished unsuccessfully During receiving TCP data the time difference between two packets was at least one minute Parameter Return Value 2 34 NC SOAP ERR TCP DISCONNECTED Description SOAP has finished unsuccessfully An unexpected TCP disconnect is occurred Parameter Return Value File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 13 34 Public sevenstaxSOAP XML HTTP User Manual S V NSTAX 2 3 5 NC SOAP ERR TCP WRITE Description SOAP has finished unsuccessfully Sending TCP data hat failed Parameter Return
25. s xmlgen c generator functions xmlgen h generator function declarations definitions xmlprs c parser functions xmliprs h parser function declarations definitions The following public functions can be used from any XML controlling module In the sevenstax library XML is controlled for instance by SOAP or REST 3 2 Main part Public functions 3 2 1 stxXML RegNamespaces void stxXML RegNamespaces XML NAMESPACE FPTR stx FPTR stx pNamespaces UINT8 stx uCntNS Description Registers a set of namespaces It must be called before using XML Parameter pNamespaces pointer to an array of namespaces XML NAMESPACE is defined in xml h The last two entries in every namespace SzNSPrefixReceived uValiditylndex must have the values NULL st and JUINT8 stx MAX uCntNS count of namespaces Return Value File SOAP_XML_HTTP_UserManual odt Last Review 09 12 08 Revision No 2 1 Page 21 34 Public S V NSTAX sevenstaxSOAP XML HTTP User Manual Ve CEMBEDDED TECHNOLOGIES 3 3 Generator Public functions 3 3 1 stxXMLGen Init void stxXMLGen Init void Description Initializes the module The function must be called once before using any other XML generator functions Parameter Return Value 3 3 2 stxXMLGen SetEncoding void stxXMLGen SetEncoding UINT8 stx uEncoding Description Sets the used XML encoding Parameter uEncoding encoding to set one of the following values XML_CHARSET_UT
26. tions array array index defined in soapinst h e XML MARK END end of xml document irrelevant Example list of all operations const SOAP OPERATION TYPE FPTR stx uSOAPInst Operations amp SSOAPInst GETORDERS amp SSOAPInst SENDDATA with operation struct const SOAP OPERATION TYPE sSOAPInst_ GETORDERS SOAPINST ACTION XML ENTRY FPTR_stx rgSOAPInst Request GETORDERS XML ENTRY FPTR stx rgSOAPInst Response GETORDERS and File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 18 34 Public sevenstaxSOAP XML HTTP User Manual Crs ef EME S V NSTAX action name define and SOAPINST ACTION MAKESTRING urn wechselrichter request xml template const XML ENTRY rgSOAPInst Request _GETORDERS XM XM XM L MARK TAG OPEN L MARK NS XML MARK TAG OPEN XML MARK CONTENT M XML MARK TAG CLOSE XML MARK TAG OPEN XML MARK CONTENT XML MARK TAG CLOSE XML MARK TAG OPEN XML MARK CONTENT XML MARK TAG CLOSE XML MARK TAG OPEN XML MARK CONTENT XML MARK TAG CLOSE L MARK TAG CLOSE XM L MARK END O TAG GET ORD 0 ity 0 TAG MID 0 0 ty ERS br CONTENT MID 0 TAG CUSTOMER CODE CONTENT C CODE 0 0 ity 0 TA
27. tribute list XML templates soapinst h user specific definitions XML content indices The following public functions and notify codes can be used from any SOAP controlling module In the sevenstax library SOAP is controlled by the Web Service Communication module WSC 2 2 Public functions 2 2 1 stxSOAPSrv Int void stxSOAPSrv Init void Description Initializes the module Calls init functions of the HTTP and XML generator and parser modules and registers callback functions and XML namespaces The function must be called once before using any other SOAP functions Parameter Return Value File SOAP_XML_HTTP_UserManual odt Last Review 09 12 08 Revision No 2 1 Page 6 34 Public S V NSTAX sevenstaxSOAP XML HTTP User Manual Va STRENGER TECHNOLOGIES 2 2 2 stxSOAPSrv Reset void stxSOAPSrv Reset void Description Resets the module so that a new SOAP request can be executed Mainly internal variables are reset Parameter Return Value 2 2 3 StxSOAPSrv Tick void stxSOAPSrv Tick void Description Keeps SOAP alive Handles timeout monitoring and TCP events It must be called as often as possible Parameter Return Value 2 24 stxSOAPSrv SetNameServer void stxSOAPSrv SetSOAPServer STRING stx szHost UINT16 stx uPort STRING stx szResource Description Defines the parameters of the SOAP server to be communicated with Must be called to use SOAP The module saves the delivered data in int
28. ttpdefs c main part structures httpdefs h main part definitions httpgen c generator functions httpgen h generator function declarations definitions httpprs c parser functions httpprs h parser function declarations definitions The following public functions can be used from any HTTP controlling module In the sevenstax library XML is controlled for instance by SOAP 4 2 Generator Public functions 4 2 1 stxHTTPGen Init void stxHTTPGen Init void Description Initializes the module The function must be called once before using any other HTTP generator functions Parameter Return Value 4 2 2 stxHTTPGen SetMethod void stxHTTPGen SetMethod UINT8 stx uMethodPara File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revision No 2 1 Page 30 34 Public S V NSTAX sevenstaxSOAP XML HTTP User Manual ta SEMBEDDED TECHNOLOGIES Description Sets the used HTTP method Parameter uMethodPara Method to set one of the following values HTTP_METHOD_OPTIONS HTTP_METHOD_GET HTTP_METHOD_HEAD HTTP_METHOD_POST HTTP_METHOD_PUT HTTP_METHOD_DELETE HTTP_METHOD_TRACE HTTP_METHOD_CONNECT Return Value 4 2 3 stxHTTPGen SetResource void stxHTTPGen SetResource STRING stx szResourcePara Description Sets the used HTTP resource Parameter szResourcePara Resource to set Return Value 4 2 4 stxHTTPGen SetContentLength void stxHTTPGen SetContentLength UINT32 stx uContentLength Description
29. v_RegHndlFct_PutAttrVal void stxSOAPSrv_RegHndIFct_PutAttrVal SOAP_PUT_ATTRVAL_PKT_HNDL_FCT fHndIFct Description Registers a handler function for delivering a received attribute value The handler function is called during the receiving process It is advisable to call this function before using SOAP Parameter fHndlFct Callback function SOAP DUT ATTRVAL PKT HNDL FCT is defined in soapsrv h Return Value 2 2 15 stxSOAPSrv_RegHndlFct_PutOutputValPkt void stxSOAPSrv_RegHndIFct_PutOutputValPkt SOAP_PUT_OUTPUTVAL_PKT_HNDL_FCT fHndlIFct Description Registers a handler function for delivering a received output value content The handler function is called during the receiving process It is advisable to call this function before using SOAP Parameter fHndlFct Callback function SOAP PUT OUTPUTVAL PKT HNDL FCT is def in soapsrv h Return Value 2 2 16 stxSOAPSrv_SendRequest SOAP_ERR stxSOAPSrv_SendRequest CONN_HNDL_TYPE hConnLink UINT8 stx uSOAPOperationIndexPara Description Starts sending a SOAP request Parameter hConnLink only in multi device version Handle of link layer connection Ethernet PPP uSOAPOperationlndexPara Index of SOAP operation which request is to be started A SOAP operation contains a request and response template The list of all operations must be defined in soapinst c Return Value File SOAP XML HTTP UserManual odt Last Review 09 12 08 Revisi

Download Pdf Manuals

image

Related Search

Related Contents

DDW-225 - Beijer Electronics  Nikon SB-21 User's Manual  Piano di sicurezza e coordinamento  KCE-300BTJ Bluetooth®携帯電話適合表  

Copyright © All rights reserved.
Failed to retrieve file