Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
themeConfluence
EdmiError edmiRemoteGetWSDL(SdaiServerContext serverContextId,
                             SdaiString        repositoryName, 
                             SdaiString        modelName, 
                             SdaiString        methodType, 
                             SdaiString        schemaName, 
                             SdaiString        methodSchemaName, 
                             SdaiString        serverAddress, 
                             SdaiOptions       options 
                             SdaiOutputStream  wsdlDocument, 
                             SdaiInvocationId  *edmiInvocationId);


Generates a Web Service Definition Language (WSDL) document for the specified method schema.

...

  The generated WSDL document contains a method signature for every function in the method schema. In WSDL terminology the query/map schema becomes a web service and the functions in the schema becomes operations. Below is an example of the service definition part of a WSDL document:
 
<wsdl:service name="ifd_wsdl_expressService">
<wsdl:port binding="impl:EDMWSSoapBinding" name="EDMWS"> 
<wsdlsoap:address location="http://localhost/EDMWS/earlybinding/DataRepository/IFD/QEX/ifd_wsdl_express"/
</wsdl:port> 
</wsdl:service>
 
In this example edmiRemoteGetWSDL is called with repositoryName = "DataRepository", modelName = "IFD", methodType = "QEX", methodSchemaName = "ifd_wsdl_express" and serverAddress ="http://localhost". One can observe that the name of the web service becomes method name + "Service" and repository and model is a part of the URL in the location attribute of the wsdlsoap:address tag. This URL should web service clients use when connecting to this web service. Which data model in the EDM database an operation defined here shall act upon is defined by the two sub strings following "EDMWS/earlybinding".
In addition to define the operations of the web service, all the data structures needed for input parameters and the return values are defined by XML Schema definitions.

...

EDMwebServices support both rpc/encoded and document/literal style. The main difference between rpc/encoded and document/literal style is that rpc/encoded style support multiple reference to instances while document/literal does not.

...

Arguments

...

TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiString

repositoryName

Specifies the name of the data repository in the EDMdatabase that holds the model that the web service operation acts upon. Repository names are case sensitive.

SdaiString

modelName

Specifies the name of the model in the specified repository that the web service operation acts upon. Model names are case sensitive.

SdaiString

methodType

Specifies which method schema type to generate WSDL for. In the current version (oct. 2007), it is only possible to generate WSDL for query schemata.

SdaiString

schemaName

Express schema for which the specified query schema is belonging to. If schema name is not specified, the underlying schema of the specified EDMdatabase model is used.

SdaiString

methodSchemaName

Name of the query schema to generate WSDL document for.

SdaiOptions

serverAddress

Address of the web server where edmiRemoteGetWSDL is executed. The server address is used in both name spaces and in the web service location URL.

SdaiOutputStream

wsdlDocument

SdaiOutputStream where the WSDL document is returned. See the example below to understand how to use a SdaiOutputStream.

SdaiInvocationId

edmiInvocationId

Currently not used.

Options: Descriptions:

LITERAL_ENCODING

Use this option to select literal encoding style.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

OptionComment
INPUT_IN_STRINGComment
RESULT_IN_STRING 
INPUT_IN_FILE 
LITERAL_ENCODING 
LIST_WEB_SERVICES_LONG_FORM 

 

Example

...

 

Code Block
languagecpp
 /* Context parameter for stream read / write. */
 typedef struct _tFileStreamContext
 {
 FILE *fp; 
 } tFileStreamContext;
  
  
 long outputFileWriter(SdaiStreamContext sc,
 char *buffer, 
 int nBytes) 
 {
 int nWritten; 
 FILE stream = ((tFileStreamContext)sc)->fp;

...

 
  
 if (stream) {

...

 
 if (nBytes <= 0) nBytes = strlen(buffer);

...

 
 nWritten = fwrite(buffer, 1, nBytes, stream);

...

 
 } 
 return (nWritten == nBytes) ? OK : -1;

...

 
 }
  
 tSdaiOutputStream wsdlDocument;
 tFileStreamContext outContext;
  
 /* open the wsdl document file */
 outContext.fp = fopen("ifd.wsdl", "wb");

...


 /* Initiate the stream write descriptor wsdlDocument */

...


 wsdlDocument.write = &outputFileWriter;

...


 wsdlDocument.context = (SdaiStreamContext)&outContext;

...


  
 rstat = edmiRemoteGetWSDL(serverContextId

...


 "DataRepository",

...

 
 "IFD",

...

 
 "QEX",

...

 
 "",

...

 
 "ifd_wsdl_express",

...

 
 "http://localhost",

...

 
 0,

...

 
 &wsdlDocument,

...

 
 NULL);

...

 
 if (rstat) {

...


 /* handle the error */

...

 
 }
 fclose(outContext.fp);

...


 . . .

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"



Related functions: edmiRemoteExecuteWebService, edmiRemoteExecuteWebServiceEx