فهرست منبع

DYNAMIC ESDL - add dynamic esdl support to HPCC
add roxie test page
Add configmanager support (more changes needed)
update esxdl2xsd.xslt to generate schema with appropritate URN
fix unencoded & issue in EspBinding::getNavigationData

-Remove insurance specific code.
-remove single extra line.
-move EE specific files to LN repo
-rename EsdlBasedWS to DynamicESDL

-Removes stowaway tabs and superfluous white spaces.

Signed-off-by: Rodrigo Pastrana <Rodrigo.Pastrana@lexisnexis.com>

Rodrigo Pastrana 12 سال پیش
والد
کامیت
4197acba01

+ 159 - 0
esp/bindings/SOAP/xpp/xpp/xpputils.cpp

@@ -0,0 +1,159 @@
+#include "jlib.hpp"
+#include "XmlPullParser.h"
+#include "xpputils.h"
+
+using namespace xpp;
+
+IMultiException *xppMakeException(XmlPullParser &xppx)
+{
+    StringBuffer msg;
+    StringBuffer sourcestr;
+    int code = -1;
+
+    int level = 1;
+    int type = XmlPullParser::END_TAG;
+
+    StartTag stag;
+
+    while(level > 0)
+    {
+        type = xppx.next();
+        switch(type)
+        {
+            case XmlPullParser::START_TAG:
+            {
+                xppx.readStartTag(stag);
+                ++level;
+                const char *tag = stag.getLocalName();
+                if (!stricmp(tag, "Message"))
+                {
+                    readFullContent(xppx, msg);
+                }
+                else if (!stricmp(tag, "Code"))
+                {
+                    StringBuffer codestr;
+                    readFullContent(xppx, codestr);
+                    code = atoi(codestr.str());
+                }
+                else if (!stricmp(tag, "Source"))
+                {
+                    readFullContent(xppx, sourcestr);
+                }
+                break;
+            }
+            case XmlPullParser::END_TAG:
+                --level;
+            break;
+
+            case XmlPullParser::END_DOCUMENT:
+                level=0;
+            break;
+        }
+    }
+
+    IMultiException * me = MakeMultiException(sourcestr.str());
+    me->append(*MakeStringException(code, msg.str()));
+
+    return me;
+}
+
+
+void xppToXmlString(XmlPullParser &xpp, StartTag &stag, StringBuffer & buffer)
+{
+    int level = 1; //assumed due to the way gotonextdataset works.
+    int type = XmlPullParser::END_TAG;
+    const char * content = "";
+    const char *tag = NULL;
+    EndTag etag;
+
+    tag = stag.getLocalName();
+    if (tag)
+    {
+        buffer.appendf("<%s", tag);
+
+        for (int idx=0; idx<stag.getLength(); idx++)
+        {
+            buffer.appendf(" %s=\"", stag.getRawName(idx));
+            buffer.append(stag.getValue(idx));
+            buffer.append('\"');
+        }
+
+        buffer.append(">");
+    }
+    do
+    {
+        type = xpp.next();
+        switch(type)
+        {
+            case XmlPullParser::START_TAG:
+            {
+                xpp.readStartTag(stag);
+                ++level;
+
+                tag = stag.getLocalName();
+                if (tag)
+                {
+                    buffer.appendf("<%s", tag);
+                    for (int idx=0; idx<stag.getLength(); idx++)
+                    {
+                        buffer.appendf(" %s=\"", stag.getRawName(idx));
+                        buffer.append(stag.getValue(idx));
+                        buffer.append('\"');
+                    }
+                    buffer.append(">");
+                }
+                break;
+            }
+            case XmlPullParser::END_TAG:
+                xpp.readEndTag(etag);
+                tag = etag.getLocalName();
+                if (tag)
+                    buffer.appendf("</%s>", tag);
+                --level;
+            break;
+            case XmlPullParser::CONTENT:
+                content = xpp.readContent();
+                encodeXML(content, buffer);
+                break;
+            case XmlPullParser::END_DOCUMENT:
+                level=0;
+            break;
+        }
+    }
+    while (level > 0);
+}
+
+bool xppGotoTag(XmlPullParser &xppx, const char *tagname, StartTag &stag)
+{
+    int level = 1;
+    int type = XmlPullParser::END_TAG;
+
+    do
+    {
+        type = xppx.next();
+        switch(type)
+        {
+            case XmlPullParser::START_TAG:
+            {
+                xppx.readStartTag(stag);
+                ++level;
+                const char *tag = stag.getLocalName();
+                if (!stricmp(tag, tagname))
+                    return true;
+                else if (!stricmp(tag, "Exception"))
+                    throw xppMakeException(xppx);
+                break;
+            }
+            case XmlPullParser::END_TAG:
+                --level;
+            break;
+
+            case XmlPullParser::END_DOCUMENT:
+                level=0;
+            break;
+        }
+    }
+    while (level > 0);
+
+    return false;
+}

+ 14 - 0
esp/bindings/SOAP/xpp/xpp/xpputils.h

@@ -0,0 +1,14 @@
+// -*-c++-*- --------------74-columns-wide-------------------------------|
+#ifndef XPP_UTILS_H_
+#define XPP_UTILS_H_
+
+#pragma warning(disable:4290)
+
+using namespace xpp;
+
+IMultiException *xppMakeException(XmlPullParser &xppx);
+
+void xppToXmlString(XmlPullParser &xpp, StartTag &stag, StringBuffer & buffer);
+bool xppGotoTag(XmlPullParser &xppx, const char *tagname, StartTag &stag);
+
+#endif // XPP_UTILS_H_

+ 75 - 2
esp/bindings/http/platform/httpbinding.cpp

@@ -100,7 +100,8 @@ EspHttpBinding::EspHttpBinding(IPropertyTree* tree, const char *bindname, const
 {
     Owned<IPropertyTree> proc_cfg = getProcessConfig(tree, procname);
     m_viewConfig = proc_cfg ? proc_cfg->getPropBool("@httpConfigAccess") : false;   
-    m_formOptions = proc_cfg ? proc_cfg->getPropBool("@formOptionsAccess") : false; 
+    m_formOptions = proc_cfg ? proc_cfg->getPropBool("@formOptionsAccess") : false;
+    m_roxieOption = proc_cfg ? proc_cfg->getPropBool("@roxieTestAccess") : false;
     m_includeSoapTest = true;
     m_configFile.set(tree ? tree->queryProp("@config") : "esp.xml");
     Owned<IPropertyTree> bnd_cfg = getBindingConfig(tree, bindname, procname);
@@ -369,6 +370,26 @@ StringBuffer &EspHttpBinding::generateNamespace(IEspContext &context, CHttpReque
     return ns;
 }
 
+void EspHttpBinding::getSchemaLocation( IEspContext &context, CHttpRequest* request, StringBuffer &schemaLocation )
+{
+    const char* svcName = request->queryServiceName();
+    const char* method = request->queryServiceMethod();
+    if ( !svcName || !(*svcName) )
+        return;
+
+    StringBuffer host;
+    const char* wsdlAddr = request->queryParameters()->queryProp("__wsdl_address");
+    if (wsdlAddr && *wsdlAddr)
+        host.append(wsdlAddr);
+    else
+    {
+        host.append(request->queryHost());
+        if (request->getPort()>0)
+          host.append(":").append(request->getPort());
+    }
+    schemaLocation.appendf("%s/%s/%s?xsd&amp;ver_=%g", host.str(), svcName, method ? method : "", context.getClientVersion());
+}
+
 int EspHttpBinding::getMethodDescription(IEspContext &context, const char *serv, const char *method, StringBuffer &page)
 {
     StringBuffer key(method);
@@ -1440,6 +1461,57 @@ void EspHttpBinding::generateSampleXml(bool isRequest, IEspContext &context, CHt
     throw MakeStringException(-1,"Unknown type: %s", element.str());
 }
 
+void EspHttpBinding::generateSampleXmlFromSchema(bool isRequest, IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method, const char * schemaxml)
+{
+    StringBuffer serviceQName, methodQName;
+
+    if (!qualifyServiceName(context, serv, method, serviceQName, &methodQName))
+        return;
+
+    MethodInfoArray info;
+    getQualifiedNames(context, info);
+    StringBuffer element;
+    for (unsigned i=0; i<info.length(); i++)
+    {
+        CMethodInfo& m = info.item(i);
+        if (stricmp(m.m_label, methodQName)==0)
+        {
+            element.set(isRequest ? m.m_requestLabel : m.m_responseLabel);
+            break;
+        }
+    }
+
+    if (!element.length())
+        element.append(methodQName.str()).append(isRequest ? "Request" : "Response");
+
+    StringBuffer schemaXmlbuff(schemaxml);
+
+    Owned<IXmlSchema> schema = createXmlSchema(schemaXmlbuff);
+    if (schema.get())
+    {
+        IXmlType* type = schema->queryElementType(element);
+        if (type)
+        {
+            StringBuffer content;
+            StringStack parent;
+            StringBuffer nsdecl("xmlns=\"");
+
+            content.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+            if (context.queryRequestParameters()->hasProp("display"))
+                content.append("<?xml-stylesheet type=\"text/xsl\" href=\"/esp/xslt/xmlformatter.xsl\"?>");
+
+            genSampleXml(parent,type, content, element, generateNamespace(context, request, serviceQName.str(), methodQName.str(), nsdecl).append('\"').str());
+            response->setContent(content.length(), content.str());
+            response->setContentType(HTTP_TYPE_APPLICATION_XML_UTF8);
+            response->setStatus(HTTP_STATUS_OK);
+            response->send();
+            return;
+        }
+    }
+
+    throw MakeStringException(-1,"Unknown type: %s", element.str());
+}
+
 int EspHttpBinding::onGetReqSampleXml(IEspContext &ctx, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method)
 {
     generateSampleXml(true, ctx, request, response, serv, method);
@@ -1757,7 +1829,7 @@ int EspHttpBinding::onGetIndex(IEspContext &context, CHttpRequest* request,  CHt
 
 // Interestingly, only single quote needs to HTML escape.
 // ", <, >, & don't need escape.
-static void escapeSingleQuote(StringBuffer& src, StringBuffer& escaped)
+void EspHttpBinding::escapeSingleQuote(StringBuffer& src, StringBuffer& escaped)
 {
     for (const char* p = src.str(); *p!=0; p++)
     {
@@ -1820,6 +1892,7 @@ int EspHttpBinding::onGetXForm(IEspContext &context, CHttpRequest* request, CHtt
 
         xform->setParameter("formOptionsAccess", m_formOptions?"1":"0");
         xform->setParameter("includeSoapTest", m_includeSoapTest?"1":"0");
+        xform->setParameter("includeRoxieTest", m_roxieOption?"1":"0");
 
         // set the prop noDefaultValue param
         IProperties* props = context.queryRequestParameters();

+ 18 - 12
esp/bindings/http/platform/httpbinding.hpp

@@ -113,8 +113,8 @@ interface IEspWsdlSections
     virtual int getWsdlBindings(IEspContext &context, CHttpRequest *request, StringBuffer &content, const char *service, const char *method, bool mda)=0;
 };
 
-class esp_http_decl EspHttpBinding : 
-    implements IEspHttpBinding, 
+class esp_http_decl EspHttpBinding :
+    implements IEspHttpBinding,
     implements IEspWsdlSections
 {
 private:
@@ -125,7 +125,7 @@ private:
     bool                    m_formOptions;
     StringAttr              m_configFile;
     double                  m_wsdlVer;
-    
+
     HINSTANCE               m_hSecDll;
 
     StringBuffer            m_authtype;
@@ -137,9 +137,7 @@ private:
     Owned<IAuthMap>         m_authmap;
     Owned<IAuthMap>         m_feature_authmap;
     Owned<IAuthMap>         m_setting_authmap;
-
     Owned<IPTree>           m_subservices;
-    StringAttr              m_defaultSvcVersion;
 
     StringAttrMapping desc_map;
     StringAttrMapping help_map;
@@ -148,6 +146,8 @@ protected:
     MethodInfoArray m_methods;
     bool                    m_includeSoapTest;
     StringBuffer            m_challenge_realm;
+    StringAttr              m_defaultSvcVersion;
+    bool                    m_roxieOption;
 
 public:
     EspHttpBinding(IPropertyTree* cfg, const char *bindname=NULL, const char *procname=NULL);
@@ -164,6 +164,8 @@ public:
     const char* getChallengeRealm() {return m_challenge_realm.str();}
     double getWsdlVersion(){return m_wsdlVer;}
     void setWsdlVersion(double ver){m_wsdlVer=ver;}
+    const char *getWsdlAddress(){return m_wsdlAddress.str();}
+    void setWsdlAddress(const char *wsdladdress){m_wsdlAddress.clear().append(wsdladdress);}
 
     virtual void setRequestPath(const char *path);
     virtual bool rootAuthRequired();
@@ -174,6 +176,7 @@ public:
     virtual const char* getRootPage() {return NULL;}
 
     virtual StringBuffer &generateNamespace(IEspContext &context, CHttpRequest* request, const char *serv, const char *method, StringBuffer &ns);
+    virtual void getSchemaLocation(IEspContext &context, CHttpRequest* request, StringBuffer &schemaLocation );
 
     virtual StringBuffer &getRequestPath(){return m_reqPath;}
     static int formatHtmlResultSet(IEspContext &context, const char *serv, const char *method, const char *resultsXml, StringBuffer &html);
@@ -203,7 +206,7 @@ public:
     virtual int onGet(CHttpRequest* request, CHttpResponse* response);
     virtual int onGetWsdl(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serviceName, const char *methodName);
     virtual int onGetXsd(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serviceName, const char *methodName);
-    
+
     virtual int onPost(CHttpRequest* request, CHttpResponse* response){return 0;};
 
     virtual int onGetNotFound(IEspContext &context, CHttpRequest* request,  CHttpResponse* response, const char *serv);
@@ -221,9 +224,9 @@ public:
     virtual int onGetIframe(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *path);
     virtual int onGetContent(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method);
     virtual int onGetSoapBuilder(IEspContext &context, CHttpRequest* request, CHttpResponse* response,  const char *serv, const char *method);
-    
+
     virtual int onSoapRequest(CHttpRequest* request, CHttpResponse* response){return 0;}
-    
+
     // In general, there is no difference between a query and an instant query;
     //   in some cases we may want to return the url for results from a query
     //   and the results themselves from an instant query.
@@ -231,7 +234,7 @@ public:
     {
         return onGetInstantQuery(context,request,response,serviceName,methodName);
     }
-    
+
     virtual int onGetService(IEspContext &context, CHttpRequest* request,   CHttpResponse* response, const char *serv, const char *method, const char *pathex)
     {
         //when a service url is requested with no parameters, the default is to treat it as a query with no parameters
@@ -284,18 +287,21 @@ public:
     }
     ISecManager* querySecManager() {return m_secmgr.get(); }
 
+    static void escapeSingleQuote(StringBuffer& src, StringBuffer& escaped);
+
 protected:
     virtual bool basicAuth(IEspContext* ctx);
     int getWsdlOrXsd(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *service, const char *method, bool isWsdl);
     bool getSchema(StringBuffer& schema, IEspContext &ctx, CHttpRequest* req, const char *service, const char *method,bool standalone);
     virtual void appendSchemaNamespaces(IPropertyTree *namespaces, IEspContext &ctx, CHttpRequest* req, const char *service, const char *method){}
     void generateSampleXml(bool isRequest, IEspContext &context, CHttpRequest* request, CHttpResponse* response,    const char *serv, const char *method);
+    void generateSampleXmlFromSchema(bool isRequest, IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method, const char * schemaxml);
     virtual void getSoapMessage(StringBuffer& soapmsg, IEspContext &context, CHttpRequest* request, const char *serv, const char *method);
-    void onBeforeSendResponse(IEspContext& context, CHttpRequest* request,MemoryBuffer& contentconst, 
+    void onBeforeSendResponse(IEspContext& context, CHttpRequest* request,MemoryBuffer& contentconst,
                             const char *serviceName, const char* methodName);
-    void validateResponse(IEspContext& context, CHttpRequest* request,MemoryBuffer& contentconst, 
+    void validateResponse(IEspContext& context, CHttpRequest* request,MemoryBuffer& contentconst,
                             const char *serviceName, const char* methodName);
-    void sortResponse(IEspContext& context, CHttpRequest* request,MemoryBuffer& contentconst, 
+    void sortResponse(IEspContext& context, CHttpRequest* request,MemoryBuffer& contentconst,
                             const char *serviceName, const char* methodName);
     const char* queryAuthMethod() {return m_authmethod.str(); }
 };

+ 2 - 0
esp/bindings/http/platform/httptransport.cpp

@@ -1499,6 +1499,8 @@ void CHttpRequest::parseEspPathInfo()
                     m_sstype=sub_serv_respsamplexml;
                 else if (m_queryparams && (m_queryparams->hasProp("soap_builder_")))
                     m_sstype=sub_serv_soap_builder;
+                else if (m_queryparams && (m_queryparams->hasProp("roxie_builder_")))
+                    m_sstype=sub_serv_roxie_builder;
                 else if (m_queryparams && m_queryparams->hasProp("config_"))
                     m_sstype=sub_serv_config;
                 else if (m_espServiceName.length()==0)

+ 1 - 0
esp/bindings/http/platform/httptransport.ipp

@@ -288,6 +288,7 @@ typedef enum sub_service_
     sub_serv_query,
     sub_serv_instant_query,
     sub_serv_soap_builder,
+    sub_serv_roxie_builder,
     sub_serv_wsdl,
     sub_serv_xsd,
     sub_serv_config,

+ 8 - 1
esp/files/gen_form.js

@@ -367,7 +367,14 @@ function onSubmit(reqType)  // reqType: 0: regular form, 1: soap, 2: form param
     {
          doBookmark(form);
     }
-
+    if (reqType==3)
+    {
+         if (form.action.indexOf('roxie_builder_')<0) // add only if does not exist already
+         {
+                var c =  (form.action.indexOf('?')>0) ? '&' : '?';
+                form.action += c + "roxie_builder_";
+         }
+    }
     // alert("Form action = " + form.action);
 
     // firefox now save input values (version 1.5)  

+ 22 - 16
esp/platform/espprotocol.cpp

@@ -107,12 +107,12 @@ const StringBuffer &CEspApplicationPort::getAppFrameHtml(time_t &modified, const
             }
         }
     }
-    
+
     if (!xslp)
        throw MakeStringException(0,"Error - CEspApplicationPort XSLT processor not initialized");
-    
+
     bool embedded_url=(inner&&*inner);
-    
+
     StringBuffer params;
     bool needRefresh = true;
     if (!getUrlParams(ctx->queryRequestParameters(), params))
@@ -144,7 +144,7 @@ const StringBuffer &CEspApplicationPort::getAppFrameHtml(time_t &modified, const
         StringBuffer encoded_inner;
         if(inner && *inner)
             encodeXML(inner, encoded_inner);
-        
+
         // replace & with &amps;
         params.replaceString("&","&amp;");
 
@@ -160,7 +160,7 @@ const StringBuffer &CEspApplicationPort::getAppFrameHtml(time_t &modified, const
     if (!needRefresh && !embedded_url)
         html.clear().append(appFrameHtml.str());
 
-    static time_t startup_time = time(NULL);    
+    static time_t startup_time = time(NULL);
     modified = startup_time;
     return html;
 }
@@ -223,7 +223,7 @@ const StringBuffer &CEspApplicationPort::getNavBarContent(IEspContext &context,
             else
             {
                 xslsource.append(getCFD()).append("./xslt/nav.xsl");
-                    
+
             }
             xform->loadXslFromFile(xslsource.str());
 
@@ -236,7 +236,7 @@ const StringBuffer &CEspApplicationPort::getNavBarContent(IEspContext &context,
     return content;
 }
 
-const StringBuffer &CEspApplicationPort::getDynNavData(IEspContext &context, IProperties *params, StringBuffer &content, 
+const StringBuffer &CEspApplicationPort::getDynNavData(IEspContext &context, IProperties *params, StringBuffer &content,
                                                        StringBuffer &contentType, bool& bVolatile)
 {
     Owned<IPropertyTree> navtree=createPTree("EspDynNavData");
@@ -266,7 +266,7 @@ int CEspApplicationPort::onBuildSoapRequest(IEspContext &context, IHttpMessage*
 {
     CHttpRequest *request=dynamic_cast<CHttpRequest*>(ireq);
     CHttpResponse *response=dynamic_cast<CHttpResponse*>(iresp);
-    
+
     int handled=0;
     int count = getBindingCount();
     for (int idx = 0; !handled && idx<count; idx++)
@@ -475,7 +475,7 @@ IPropertyTree *CEspBinding::addNavException(IPropertyTree &folder, const char *m
 {
     IPropertyTree *ret = folder.addPropTree("Exception", createPTree());
     ret->addProp("@message", message ? message : "Unknown exception");
-    ret->setPropInt("@code", code); 
+    ret->setPropInt("@code", code);
     ret->setProp("@source", source);
     return ret;
 }
@@ -490,18 +490,24 @@ void CEspBinding::getNavigationData(IEspContext &context, IPropertyTree & data)
         if (!getUrlParams(context.queryRequestParameters(), params))
         {
             if (context.getClientVersion()>0)
-                params.appendf("&ver_=%g", context.getClientVersion());
+                params.appendf("%cver_=%g", params.length()?'&':'?', context.getClientVersion());
         }
-        if (params.length())
-            params.setCharAt(0,'&');
-        
+
         IPropertyTree *folder=createPTree("Folder");
         folder->addProp("@name", serviceName.str());
         folder->addProp("@info", serviceName.str());
-        folder->addProp("@urlParams", params.str());
+
+        StringBuffer encodedparams;
+        if (params.length())
+            encodeUtf8XML(params.str(), encodedparams, 0);
+
+        folder->addProp("@urlParams", encodedparams);
         if (showSchemaLinks())
             folder->addProp("@showSchemaLinks", "true");
-        
+
+        if (params.length())
+            params.setCharAt(0,'&'); //the entire params string will follow the initial param: "?form"
+
         MethodInfoArray methods;
         wsdl->getQualifiedNames(context, methods);
         ForEachItemIn(idx, methods)
@@ -638,7 +644,7 @@ unsigned CEspApplicationPort::updatePassword(IEspContext &context, IHttpMessage*
 }
 #endif
 
-CEspProtocol::CEspProtocol() 
+CEspProtocol::CEspProtocol()
 {
    m_viewConfig=false;
    m_MaxRequestEntityLength = DEFAULT_MAX_REQUEST_ENTITY_LENGTH;

+ 0 - 1
esp/xslt/CMakeLists.txt

@@ -23,7 +23,6 @@ FOREACH( iFILES
     ${CMAKE_CURRENT_SOURCE_DIR}/esdl_method.xslt
     ${CMAKE_CURRENT_SOURCE_DIR}/espheader.xsl
     ${CMAKE_CURRENT_SOURCE_DIR}/esxdl2req.xslt
-    ${CMAKE_CURRENT_SOURCE_DIR}/esxdl2xsd.xslt
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_form.xsl
     ${CMAKE_CURRENT_SOURCE_DIR}/multistatus.xsl
     ${CMAKE_CURRENT_SOURCE_DIR}/nav.xsl

+ 0 - 105
esp/xslt/esxdl2xsd.xslt

@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-##############################################################################
-#    HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-##############################################################################
--->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
-    <xsl:template match="ESXDL">
-        <xsd:schema elementFormDefault="qualified" targetNamespace="http://webservices.seisint.com/WsAccurint" xmlns:tns="http://webservices.seisint.com/WsAccurint" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-            <xsd:element name="string" nillable="true" type="xsd:string" /> 
-            <xsd:complexType name="EspException">
-                <xsd:all>
-                    <xsd:element name="Code" type="xsd:string" minOccurs="0"/>
-                    <xsd:element name="Audience" type="xsd:string" minOccurs="0"/>
-                    <xsd:element name="Source" type="xsd:string" minOccurs="0"/>
-                    <xsd:element name="Message" type="xsd:string" minOccurs="0"/>
-                </xsd:all>
-            </xsd:complexType>
-            <xsd:complexType name="ArrayOfEspException">
-                <xsd:sequence>
-                    <xsd:element name="Source" type="xsd:string" minOccurs="0"/>
-                    <xsd:element name="Exception" type="tns:EspException" minOccurs="0" maxOccurs="unbounded"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="Exceptions" type="tns:ArrayOfEspException"/>
-            <xsl:apply-templates select="EsdlStruct"/>
-            <xsl:apply-templates select="EsdlRequest"/>
-            <xsl:apply-templates select="EsdlResponse"/>
-        </xsd:schema>
-    </xsl:template>
-    <xsl:template match="EsdlStruct">
-        <xsd:complexType>
-            <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
-            <xsd:all>
-                <xsl:apply-templates select="EsdlElement|EsdlArray"/>
-            </xsd:all>
-        </xsd:complexType>
-    </xsl:template>
-    <xsl:template match="EsdlElement">
-        <xsd:element minOccurs="0">
-            <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
-            <xsl:attribute name="type">
-            <xsl:choose>
-            <xsl:when test="@xsd_type"><xsl:value-of select="@xsd_type"/></xsl:when>
-            <xsl:when test="@type='bool'">xsd:<xsl:value-of select="'boolean'"/></xsl:when>
-            <xsl:when test="@type">xsd:<xsl:value-of select="@type"/></xsl:when>
-            <xsl:when test="@complex_type">tns:<xsl:value-of select="@complex_type"/></xsl:when>
-            </xsl:choose></xsl:attribute>
-        </xsd:element>
-    </xsl:template>
-    <xsl:template match="EsdlArray">
-        <xsd:element minOccurs="0">
-            <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
-            <xsd:complexType>
-                <xsd:sequence>
-                    <xsd:element minOccurs="0" maxOccurs="unbounded">
-                        <xsl:attribute name="name"><xsl:value-of select="@item_tag"/></xsl:attribute>
-                        <xsl:choose>
-                            <xsl:when test="@type='string'">
-                                <xsl:attribute name="type">xsd:string</xsl:attribute>
-                            </xsl:when>
-                            <xsl:otherwise>
-                                <xsl:attribute name="type">tns:<xsl:value-of select="@type"/></xsl:attribute>
-                            </xsl:otherwise>
-                        </xsl:choose>
-                    </xsd:element>
-                </xsd:sequence>
-            </xsd:complexType>
-        </xsd:element>
-    </xsl:template>
-    <xsl:template match="EsdlRequest">
-        <xsd:element>
-            <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
-            <xsd:complexType>
-                <xsd:all>
-                    <xsl:apply-templates select="EsdlElement"/>
-                </xsd:all>
-            </xsd:complexType>
-        </xsd:element>
-    </xsl:template>
-    <xsl:template match="EsdlResponse">
-        <xsd:element>
-            <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
-            <xsd:complexType>
-                <xsd:all>
-                    <xsl:apply-templates select="EsdlElement"/>
-                </xsd:all>
-            </xsd:complexType>
-        </xsd:element>
-    </xsl:template>
-</xsl:stylesheet>

+ 14 - 10
esp/xslt/gen_form.xsl

@@ -38,6 +38,8 @@
     <xsl:param name="formOptionsAccess" select="0"/>
     <xsl:param name="noDefaultValue" select="0"/> 
     <xsl:param name="includeSoapTest" select="1"/>
+    <xsl:param name="includeRoxieTest" select="0"/>
+    <!--xsl:param name="includeGatewayTest" select="0"/-->
     <xsl:param name="schemaRoot" select="xsd:schema"/>
     <xsl:param name="esdl_links" select="0"/>
     
@@ -247,20 +249,22 @@
 
                 <tr class='commands'>
                   <td align='left'>
-           <input type='submit' value='Submit' name='S1' onclick='return onSubmit(0)'/>
-                <xsl:if test="$includeSoapTest">
-              &nbsp;<input type='submit' value='SOAP Test' onclick='return onSubmit(1)'/>
-                </xsl:if>          
-          &nbsp;<input type='reset' value='Reset'  title='Reset the form'/>
-          &nbsp;<input type='button' value='Clear All' onclick='onClearAll()'  title='Reset the form, and remove all arrays you added'/>
-          &nbsp;<input type='button' value='Link to This Form' title='Generate a link to this page with form filled' onclick='onSubmit(2)'/>
+                   <input type='submit' value='Submit' name='S1' onclick='return onSubmit(0)'/>
+                   <xsl:if test="$includeSoapTest">
+                    &nbsp;<input type='submit' value='SOAP Test' onclick='return onSubmit(1)'/>
+                   </xsl:if>
+                   <xsl:if test="$includeRoxieTest">
+                    &nbsp;<input type='submit' value='Roxie Test' onclick='return onSubmit(3)'/>
+                   </xsl:if>
+                   &nbsp;<input type='reset' value='Reset'  title='Reset the form'/>
+                   &nbsp;<input type='button' value='Clear All' onclick='onClearAll()'  title='Reset the form, and remove all arrays you added'/>
+                   &nbsp;<input type='button' value='Link to This Form' title='Generate a link to this page with form filled' onclick='onSubmit(2)'/>
            </td>
                  </tr>
-                 
                 <xsl:if test="$formOptionsAccess">
-                <tr><td height="6"></td></tr>                  
+                <tr><td height="6"></td></tr>
                  <tr class='options'>
-                    <td> 
+                    <td>
                      <input type='button' value='Options &gt;&gt;' onclick='show_hide(document.getElementById("option_span"));'/>
                      <span id='option_span' style='display:none'>
                         <input type='checkbox' id='esp_dest' name='esp_dest' value='0' onclick='onClickDest(this.checked, document.getElementById("dest_url"));'>Destination</input>

+ 23 - 0
initfiles/componentfiles/configxml/@temp/esp_service.xsl

@@ -263,6 +263,29 @@ xmlns:seisint="http://seisint.com"  xmlns:set="http://exslt.org/sets" exclude-re
         <xsl:copy-of select="@adlLogDirectory[.!='']"/>
         <xsl:copy-of select="@FeatureFlags[.!='']"/>
         <xsl:choose>
+           <xsl:when test="$serviceType='DynamicESDL'">
+                <xsl:element name="ESDL">
+                    <xsl:attribute name="service">
+                        <xsl:value-of select="@esdlservice" />
+                    </xsl:attribute>
+
+                    <xsl:element name="XMLFile">
+                        <xsl:value-of select="@XMLFile" />
+                    </xsl:element>
+
+                    <xsl:element name="Methods">
+                        <xsl:for-each select="./MethodConfiguration">
+                            <Method name="{@name}" queryname="{@queryname}" querytype="{@querytype}" url="{@url}"  username="{@username}" password="{@password}" />
+                        </xsl:for-each>
+                    </xsl:element>
+                </xsl:element>
+                <Gateways>
+                    <xsl:for-each select="Gateways">
+						<Gateway name="{@name}" url="{@url}"  username="{@username}" password="{@password}" />
+                    </xsl:for-each>
+                </Gateways>
+            </xsl:when>
+
             <xsl:when test="$serviceType='WsAutoUpdate'">
                 <xsl:for-each select="@path|@downloadUrl|@successUrl|@errorUrl|@daysValid">
                     <xsl:if test="string(.) != ''">