-include Makefile.inc
-VPATH=${top_srcdir}/interface
+VPATH=${top_srcdir}/interface:${top_srcdir}/src
STAGETO=interface
-WSDL=JobProvenancePS.wsdl JobProvenanceIS.wsdl JobProvenanceTypes.wsdl
+XSLTPROC=xsltproc
-all compile:
+#WSDL=JobProvenancePS.wsdl JobProvenanceIS.wsdl JobProvenanceTypes.wsdl
+WSDL=JobProvenancePS.wsdl JobProvenanceTypes.wsdl
+
+all compile: ${WSDL}
check:
@echo No unit test required for interface-only module.
-stage:
+stage: ${WSDL}
$(MAKE) install PREFIX=${stagedir}
dist: distsrc distbin
-mkdir -p ${PREFIX}/${STAGETO}
-mkdir -p ${PREFIX}/share/doc/${package}-${version}
install -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version}
- cd ${top_srcdir}/interface && install -m 644 ${WSDL} ${PREFIX}/${STAGETO}
+# cd ${top_srcdir}/interface && install -m 644 ${WSDL} ${PREFIX}/${STAGETO}
+ install -m 644 ${WSDL} ${PREFIX}/${STAGETO}
clean:
rm -f *.h
+
+%.wsdl: %.xml
+ ${XSLTPROC} ../src/puke-wsdl.xsl $< >$@
+++ /dev/null
-<WSDL:definitions
- xmlns:tns="http://glite.org/wsdl/services/jp"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:jp="http://glite.org/wsdl/types/jp"
- xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
- xmlns="http://schemas.xmlsoap.org/wsdl/"
- targetNamespace="http://glite.org/wsdl/services/jp"
- name="JobProvenancePS">
-
- <import namespace="http://glite.org/wsdl/types/jp" location="JobProvenanceTypes.wsdl"/>
-
- <message name="RegisterJobRequest">
- <part name="job" type="xsd:string"/>
- </message>
- <message name="StartUploadRequest">
- <part name="job" type="xsd:string"/>
- <part name="class" type="xsd:string"/>
- <part name="name" type="xsd:string"/>
- <part name="commitBefore" type="xsd:dateTime"/>
- <part name="contentType" type="xsd:string"/>
- </message>
- <message name="StartUploadResponse">
- <part name="destination" type="xsd:string"/>
- <part name="commitBefore" type="xsd:dateTime"/>
- </message>
- <message name="CommitUploadRequest">
- <part name="destination" type="xsd:string"/>
- </message>
- <message name="RecordTagRequest">
- <part name="jobid" type="xsd:string"/>
- <part name="tag" type="jp:TagValue"/>
- </message>
- <message name="FeedIndexRequest">
- <part name="destination" type="xsd:string"/>
- <part name="attributes" type="jp:Attributes"/>
- <part name="conditions" type="jp:PrimaryQuery"/>
- <part name="history" type="xsd:boolean"/>
- <part name="continuous" type="xsd:boolean"/>
- </message>
- <message name="FeedIndexResponse">
- <part name="feedId" type="xsd:string"/>
- <part name="expires" type="xsd:dateTime"/>
- </message>
- <message name="FeedIndexRefreshRequest">
- <part name="feedId" type="xsd:string"/>
- </message>
- <message name="GetJobRequest">
- <part name="jobid" type="xsd:string"/>
- </message>
- <message name="GetJobResponse">
- <part name="files" type="jp:Files"/>
- </message>
- <message name="GenericJPFault">
- <part name="fault" element="jp:GenericJPFault"/>
- </message>
- <message name="EmptyResponse"/>
- <portType name="JobProvenancePS_PortType">
- <operation name="RegisterJob">
- <documentation>Register job with JP primary storage.
-Job registration in LB is propagated to JP immediately so that JP is aware of the job,
-despite no furhter information is available in it.
-
-Input: JobId
-
-Output: N/A
-
-Faults: GenericJPFault
- </documentation>
- <input message="tns:RegisterJobRequest"/>
- <output message="tns:EmptyResponse"/>
- <fault name="f" message="tns:GenericJPFault"/>
- </operation>
- <operation name="StartUpload">
- <documentation>Initiate upload of of sandbox/dump of job life log from LB.
-WM component responsible for job sandbox management and LB server call JP to declare
-intention to upload intput/output sandbox and job life log.
-
-Input:
-
-uclass: type of the upload - INPUT_SANDBOX, OUTPUT_SANDBOX, JOB_LOG
-
-commitTimeout: upper limit on time for which JP waits for committing this upload transaction
-
-contentType: MIME type of the uploaded file
-
-Output:
-
-destination: URL where the client should upload the file
-
-commitBefore: acutual time when the upload transaction times out
-
-Faults: GenericJPFault
-
-
-Initiate upload of of sandbox/dump of job life log from LB.</documentation>
- <input message="tns:StartUploadRequest"/>
- <output message="tns:StartUploadResponse"/>
- <fault name="f" message="tns:GenericJPFault"/>
- </operation>
- <operation name="CommitUpload">
- <documentation>Confirm upload.
-Should be called after a file upload initiaded with StartUpload is finished.
-
-Input:
-
-destination: Upload destination URL (to match with the original request)
-
-Output:
-
-Faults: GenericJPFault
- </documentation>
- <input message="tns:CommitUploadRequest"/>
- <output message="tns:EmptyResponse"/>
- <fault name="f" message="tns:GenericJPFault"/>
- </operation>
- <operation name="RecordTag">
- <documentation>Record a value of user tag.
-JP tags are either standalone or override values of their LB counterparts.
-However, JP tag values are still distinguishable those inherited from LB.
-JP tags may be either strings or blobs.
-
-Input:
-
-jobid:
-
-tag: structure containing name, timestamp, optional sequence number to order tag values
-without relying on timestamps, and string or blob value.
-
-Output: N/A
-
-Faults: GenericJPFault
- </documentation>
- <input message="tns:RecordTagRequest"/>
- <output message="tns:EmptyResponse"/>
- <fault name="f" message="tns:GenericJPFault"/>
- </operation>
- <operation name="FeedIndex">
- <documentation>Start feeding JP index server.
-Called by the index server to start batch feed, and optionally also subscribe for incremental feed.
-
-JP index server subscribes with JP primary storage using a query
-containing conditions on primary metadata and a list of queryable attributes
-of the index server (i.e. data which should be sent to the index server).
-
-When a matching job record is created or modified within the primary storage
-the job record data are sent to the subscribed index server.
-
-The subscription is soft-state, it expires after certain time unless refreshed by the client explicitely.
-
-In the batch mode the query has the same form
-with additional flag asking for all matching records (i.e.\ not only
-arriving afterwards).
-
-Input:
-
-destination: where to send the job record data
-
-attributes: which job record attributes should be sent to the requesting index server
-
-conditions: list of query conditions. Each conditions has the form Attribute Operator Value,
-where Attribute is any of job record attributes and Operator is one of EQUAL, UNEQUAL, LESS, GREATER, WITHIN.
-
-continuous: flag determining that the query is incremental (not batch)
-
-Output:
-
-feedId: unique Id of the feed request, to be used in refresh, cancelation etc.
-
-expires: when the feed times out. Must be refreshed before this time.
-
-Faults: GenericJPFault
- </documentation>
- <input message="tns:FeedIndexRequest"/>
- <output message="tns:FeedIndexResponse"/>
- <fault name="f" message="tns:GenericJPFault"/>
- </operation>
- <operation name="FeedIndexRefresh">
- <documentation>Extend batch feed subscription (used by index server)
-
-Input: feedId returned previously by FeedIndex
-
-Output: the same as for FeedIndex
-
-Faults: GenericJPFault
- </documentation>
- <input message="tns:FeedIndexRefreshRequest"/>
- <output message="tns:FeedIndexResponse"/>
- <fault name="f" message="tns:GenericJPFault"/>
- </operation>
- <operation name="GetJob">
- <documentation>Retrieve job record URL's when jobid is known
-Used either to bypass JP index server query for this specific case, or after the index server query to
-retrieve actual job record.
-
-Input: jobid
-
-Output:
-
-jobLog, inputSandbox, outputSandbox, tags: URL's to components of the job record.
-
-Faults: GenericJPFault
- </documentation>
- <input message="tns:GetJobRequest"/>
- <output message="tns:GetJobResponse"/>
- <fault name="f" message="tns:GenericJPFault"/>
- </operation>
- </portType>
- <binding name="JobProvenancePS" type="tns:JobProvenancePS_PortType">
- <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="RegisterJob">
- <SOAP:operation style="rpc"/>
- <input>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </input>
- <output>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </output>
- <fault name="f">
- <SOAP:fault name="f" use="literal"/>
- </fault>
- </operation>
- <operation name="StartUpload">
- <SOAP:operation style="rpc"/>
- <input>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </input>
- <output>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </output>
- <fault name="f">
- <SOAP:fault name="f" use="literal"/>
- </fault>
- </operation>
- <operation name="CommitUpload">
- <SOAP:operation style="rpc"/>
- <input>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </input>
- <output>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </output>
- <fault name="f">
- <SOAP:fault name="f" use="literal"/>
- </fault>
- </operation>
- <operation name="RecordTag">
- <SOAP:operation style="rpc"/>
- <input>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </input>
- <output>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </output>
- <fault name="f">
- <SOAP:fault name="f" use="literal"/>
- </fault>
- </operation>
- <operation name="FeedIndex">
- <SOAP:operation style="rpc"/>
- <input>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </input>
- <output>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </output>
- <fault name="f">
- <SOAP:fault name="f" use="literal"/>
- </fault>
- </operation>
- <operation name="FeedIndexRefresh">
- <SOAP:operation style="rpc"/>
- <input>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </input>
- <output>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </output>
- <fault name="f">
- <SOAP:fault name="f" use="literal"/>
- </fault>
- </operation>
- <operation name="GetJob">
- <SOAP:operation style="rpc"/>
- <input>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </input>
- <output>
- <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
- </output>
- <fault name="f">
- <SOAP:fault name="f" use="literal"/>
- </fault>
- </operation>
- </binding>
-
- <service name="JobProvenancePS">
- <documentation>Job Provenance Primary Storage service</documentation>
- <port name="JobProvenancePS" binding="tns:JobProvenancePS">
- <SOAP:address location="http://localhost:10001"/>
- </port>
- </service>
-</WSDL:definitions>
+++ /dev/null
-<?xml version="1.0"?>
-<WSDL:definitions
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
- xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:jp="http://glite.org/wsdl/types/jp"
- targetNamespace="http://glite.org/wsdl/types/jp"
- name="JobProvenanceTypes">
-
-
-<WSDL:types>
-
-<schema
- targetNamespace="http://glite.org/wsdl/types/jp"
- xmlns="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="unqualified" attributeFormDefault="unqualified">
- <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
-
- <simpleType name="AttributeType">
- <restriction base="xsd:string">
- <enumeration value="OWNER"/>
- <enumeration value="TIME"/>
- <enumeration value="TAG"/>
- </restriction>
- </simpleType>
- <simpleType name="QueryOp">
- <restriction base="xsd:string">
- <enumeration value="EQUAL"/>
- <enumeration value="UNEQUAL"/>
- <enumeration value="LESS"/>
- <enumeration value="GREATER"/>
- <enumeration value="WITHIN"/>
- </restriction>
- </simpleType>
- <complexType name="TagValue">
- <sequence>
- <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
- <element name="sequence" type="xsd:int" minOccurs="0" maxOccurs="1"/>
- <element name="timestamp" type="xsd:dateTime" minOccurs="0" maxOccurs="1" nillable="true"/>
- <element name="stringValue" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
- <element name="blobValue" type="xsd:base64Binary" minOccurs="0" maxOccurs="1" nillable="true"/>
- </sequence>
- </complexType>
- <complexType name="Attribute">
- <sequence>
- <element name="type" type="jp:AttributeType" minOccurs="1" maxOccurs="1"/>
- <element name="name" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- </sequence>
- </complexType>
- <complexType name="Attributes">
- <sequence>
- <element name="item" type="jp:Attribute" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- <complexType name="GenericJPFaultType">
- <sequence>
- <element name="source" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <element name="code" type="xsd:int" minOccurs="1" maxOccurs="1"/>
- <element name="text" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <element name="reason" type="jp:GenericJPFaultType" minOccurs="0" maxOccurs="1"/>
- </sequence>
- </complexType>
- <complexType name="PrimaryQueryElement">
- <sequence>
- <element name="attr" type="jp:Attribute" minOccurs="1" maxOccurs="1"/>
- <element name="op" type="jp:QueryOp" minOccurs="1" maxOccurs="1"/>
- <element name="value" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <element name="value2" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- </sequence>
- </complexType>
- <complexType name="PrimaryQuery">
- <sequence>
- <element name="item" type="jp:PrimaryQueryElement" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- <complexType name="IndexQueryRecord">
- <sequence>
- <element name="op" type="jp:QueryOp" minOccurs="1" maxOccurs="1"/>
- <element name="value" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- </sequence>
- </complexType>
- <complexType name="IndexQueryElement">
- <sequence>
- <element name="attr" type="jp:Attribute" minOccurs="1" maxOccurs="1"/>
- <element name="record" type="jp:IndexQueryRecord" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- <complexType name="IndexQuery">
- <sequence>
- <element name="item" type="jp:IndexQueryElement" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- <complexType name="JobRecord">
- <sequence>
- <element name="jobid" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <element name="PSContact" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- </sequence>
- </complexType>
- <complexType name="JobRecords">
- <sequence>
- <element name="record" type="jp:JobRecord" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="AttrUpdate">
- <sequence>
- <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <element name="value" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- </sequence>
- </complexType>
- <complexType name="AttrUpdates">
- <sequence>
- <element name="item" type="jp:AttrUpdate" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
- </sequence>
- </complexType>
- <complexType name="JobUpdate">
- <sequence>
- <element name="jobid" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <element name="attributes" type="jp:AttrUpdates" minOccurs="1" maxOccurs="1"/>
- <element name="tags" type="jp:AttrUpdates" minOccurs="1" maxOccurs="1"/>
- </sequence>
- </complexType>
- <complexType name="UpdateJobsData">
- <sequence>
- <element name="job" type="jp:JobUpdate" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="FeedIndexResponse">
- <sequence>
- <element name="feedId" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
- <element name="expires" type="xsd:dateTime" minOccurs="0" maxOccurs="1" nillable="true"/>
- </sequence>
- </complexType>
- <complexType name="GetJobResponse">
- <sequence>
- <element name="jobLog" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
- <element name="inputSandbox" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
- <element name="outputSandbox" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
- <element name="tags" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
- </sequence>
- </complexType>
- <complexType name="StartUploadResponse">
- <sequence>
- <element name="destination" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
- <element name="commitBefore" type="xsd:dateTime" minOccurs="0" maxOccurs="1" nillable="true"/>
- </sequence>
- </complexType>
- <complexType name="File">
- <sequence>
- <element name="class" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="false"/>
- <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
- <element name="url" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="false"/>
- </sequence>
- </complexType>
- <complexType name="Files">
- <sequence>
- <element name="file" type="jp:File" minOccurs="0" maxOccurs="unlimited"/>
- </sequence>
- </complexType>
- <element name="GenericJPFault" type="jp:GenericJPFaultType"/>
-</schema>
-
-</WSDL:types>
-</WSDL:definitions>
--- /dev/null
+<service name="JobProvenancePS"
+ ns="http://glite.org/wsdl/services/jp"
+ prefix="jp"
+ typeNs="http://glite.org/wsdl/types/jp"
+ typePrefix="jpt"
+ elemNs="http://glite.org/wsdl/elements/jp"
+ elemPrefix="jpe"
+ xmlns:jpt="http://glite.org/wsdl/types/jp">
+
+ <import namespace="http://glite.org/wsdl/services/jp" location="JobProvenanceTypes.wsdl"/>
+
+ <fault name="genericFault"/>
+
+ <operations>
+ <op name="RegisterJob">
+ <input name="job" type="xsd:string"></input>
+ <input name="owner" type="xsd:string"></input>
+ <fault name="genericFault" type="genericFault"></fault>
+ </op>
+
+ <op name="StartUpload">
+ <input name="job" type="xsd:string"></input>
+ <input name="class" type="xsd:string"></input>
+ <input name="name" type="xsd:string"></input>
+ <input name="commitBefore" type="xsd:dateTime"></input>
+ <input name="contentType" type="xsd:string"></input>
+ <output name="destination" type="xsd:string"></output>
+ <output name="commitBefore" type="xsd:dateTime"></output>
+ <fault name="genericFault" type="genericFault"></fault>
+ </op>
+
+ <op name="CommitUpload">
+ <input name="destination" type="xsd:string"></input>
+ <fault name="genericFault" type="genericFault"></fault>
+ </op>
+
+ <op name="RecordTag">
+ <input name="jobid" type="xsd:string"></input>
+ <input name="tag" type="tagValue"></input>
+ <fault name="genericFault" type="genericFault"></fault>
+ </op>
+
+ <op name="FeedIndex">
+ <input name="destination" type="xsd:string"></input>
+ <input name="attributes" type="stringList"></input>
+ <input name="conditions" type="primaryQuery" list="yes"></input>
+ <input name="history" type="xsd:bool"></input>
+ <input name="continuous" type="xsd:bool"></input>
+ <output name="feedId" type="xsd:string"></output>
+ <output name="feedExpires" type="xsd:dateTime"></output>
+ <fault name="genericFault" type="genericFault"></fault>
+ </op>
+
+ <op name="FeedIndexRefresh">
+ <input name="feedId" type="xsd:string"></input>
+ <output name="feedExpires" type="xsd:dateTime"></output>
+ <fault name="genericFault" type="genericFault"></fault>
+ </op>
+
+ <op name="GetJob">
+ <input name="jobid" type="xsd:string"></input>
+ <output name="files" type="jppsFile" list="yes" optional="yes"></output>
+ <fault name="genericFault" type="genericFault"></fault>
+ </op>
+ </operations>
+
+</service>
--- /dev/null
+<?xml version="1.0"?>
+
+<service name="JobProvenanceTypes"
+ ns="http://glite.org/wsdl/services/jp"
+ typePrefix="jpt">
+
+ <types ns="http://glite.org/wsdl/types/jp">
+
+ <enum name="queryOp">
+ <val name="EQUAL"></val>
+ <val name="UNEQUAL"></val>
+ <val name="LESS"></val>
+ <val name="GREATER"></val>
+ <val name="WITHIN"></val>
+ </enum>
+
+ <struct name="tagValue">
+ <elem name="name" type="xsd:string"></elem>
+ <elem name="sequence" type="xsd:int" optional="yes"></elem>
+ <elem name="timestamp" type="xsd:dateTime" optional="yes"></elem>
+ <elem name="stringValue" type="xsd:string" optional="yes"></elem>
+ <elem name="blobValue" type="xsd:base64Binary" optional="yes"></elem>
+ </struct>
+
+ <struct name="genericFault" fault="yes">
+ <elem name="source" type="xsd:string"></elem>
+ <elem name="code" type="xsd:int"></elem>
+ <elem name="text" type="xsd:string"></elem>
+ <elem name="description" type="xsd:string" optional="yes"></elem>
+ <elem name="reason" type="jpt:genericFault" optional="yes"></elem>
+ </struct>
+
+ <struct name="primaryQuery">
+ <elem name="attr" type="xsd:string"></elem>
+ <elem name="op" type="queryOp"></elem>
+ <elem name="value" type="xsd:string"></elem>
+ <elem name="value2" type="xsd:string" optional="yes"></elem>
+ </struct>
+
+ <struct name="jppsFile">
+ <elem name="class" type="xsd:string"></elem>
+ <elem name="name" type="xsd:string"></elem>
+ <elem name="url" type="xsd:string"></elem>
+ </struct>
+
+ <list name="string"/>
+ </types>
+
+</service>
+
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:lb="http://glite.org/wsdl/services/lb"
- xmlns:lbt="http://glite.org/wsdl/types/lb">
+ xmlns:jp="http://glite.org/wsdl/services/jp"
+ xmlns:jpe="http://glite.org/wsdl/elements/jp"
+ xmlns:jpt="http://glite.org/wsdl/types/jp">
<xsl:output indent="yes"/>
name="{@name}"
targetNamespace="{@ns}">
<documentation> <xsl:value-of select="text()"/> </documentation>
- <types>
- <xsl:apply-templates select="types"/>
- </types>
- <xsl:apply-templates select="op" mode="message"/>
-
- <xsl:apply-templates select="types/struct[@fault='yes']" mode="message"/>
-
- <portType name="{@name}PortType">
- <xsl:apply-templates select="op" mode="port-type"/>
- </portType>
+ <xsl:apply-templates select="import"/>
- <binding name="{@name}" type="{@prefix}:{@name}PortType">
- <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
- <xsl:apply-templates select="op" mode="binding"/>
- </binding>
-
- <service name="{@name}">
- <documentation><xsl:value-of select="text()"/></documentation>
- <port name="{@name}" binding="{@prefix}:{@name}">
- <soap:address location="http://test.glite.org/{@prefix}:8080"/>
- </port>
-
- </service>
+ <xsl:apply-templates select="types"/>
+
+ <xsl:apply-templates select="fault"/>
+ <xsl:apply-templates select="operations"/>
+
</definitions>
</xsl:template>
<xsl:template match="types">
- <schema targetNamespace="{@ns}"
- xmlns="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="unqualified"
- attributeFormDefault="unqualified">
-
- <xsl:apply-templates/>
- </schema>
+ <wsdl:types>
+ <schema targetNamespace="{@ns}"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="unqualified"
+ attributeFormDefault="unqualified">
+
+ <xsl:apply-templates/>
+ </schema>
+ </wsdl:types>
+ <!-- <xsl:apply-templates select="struct[@fault='yes']" mode="message"/> -->
</xsl:template>
+<!--
<xsl:template match="simple">
<xsd:element name="{@name}" type="xsd:{@name}"/>
+ <xsd:complexType name="{@name}List">
+ <xsd:sequence>
+ <xsd:element name="{@name}" type="xsd:{@name}" minOccurs="0" maxOccurs="unbounded"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="{@name}List" type="{/service/@typePrefix}:{@name}List"/>
+</xsl:template>
+-->
+
+<xsl:template match="list">
+ <xsd:complexType name="{@name}List">
+ <xsd:sequence>
+ <xsd:element name="{@name}" type="xsd:{@name}" minOccurs="0" maxOccurs="unbounded"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
</xsl:template>
+
<xsl:template match="enum">
<xsd:simpleType name="{@name}">
<xsd:restriction base="xsd:string">
<xsl:for-each select="val"><xsd:enumeration value="{@name}"/></xsl:for-each>
</xsd:restriction>
</xsd:simpleType>
- <xsd:element name="{@name}" type="{/service/types/@prefix}:{@name}"/>
+ <xsd:element name="{@name}" type="{/service/@typePrefix}:{@name}"/>
</xsl:template>
<xsl:template match="flags">
</xsd:simpleType>
<xsd:complexType name="{@name}">
<xsd:sequence>
- <xsd:element name="flag" type="{/service/types/@prefix}:{@name}Value" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="flag" type="{/service/@typePrefix}:{@name}Value" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
- <xsd:element name="{@name}" type="{/service/types/@prefix}:{@name}"/>
+ <xsd:element name="{@name}" type="{/service/@typePrefix}:{@name}"/>
</xsl:template>
<xsl:template match="struct">
<xsl:value-of select="@type"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="/service/types/@prefix"/>:<xsl:value-of select="@type"/>
+ <xsl:value-of select="/service/@typePrefix"/>:<xsl:value-of select="@type"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
</xsl:for-each>
</xsd:sequence>
</xsd:complexType>
- <xsd:element name="{@name}" type="{/service/types/@prefix}:{@name}"/>
+ <xsd:complexType name="{@name}List">
+ <xsd:sequence>
+ <xsd:element name="{@name}" type="{/service/@typePrefix}:{@name}" minOccurs="0" maxOccurs="unbounded"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="{@name}" type="{/service/@typePrefix}:{@name}"/>
+ <xsd:element name="{@name}List" type="{/service/@typePrefix}:{@name}List"/>
</xsl:template>
<xsl:template match="op" mode="message">
<wsdl:message name="{@name}Request">
<xsl:for-each select="input">
- <wsdl:part name="{@name}" element="{/service/types/@prefix}:{@type}">
+<!--
+ <xsl:variable name="suffix">
+ <xsl:choose>
+ <xsl:when test="@list='yes'">List</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+-->
+ <wsdl:part name="{@name}" element="{/service/@elemPrefix}:{@name}{../@name}">
<wsdl:documentation><xsl:value-of select="text()"/></wsdl:documentation>
</wsdl:part>
</xsl:for-each>
</wsdl:message>
<wsdl:message name="{@name}Response">
<xsl:for-each select="output">
- <wsdl:part name="{@name}" element="{/service/types/@prefix}:{@type}">
+<!--
+ <xsl:variable name="suffix">
+ <xsl:choose>
+ <xsl:when test="@list='yes'">List</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+-->
+ <wsdl:part name="{@name}" element="{/service/@elemPrefix}:{@name}{../@name}">
<wsdl:documentation><xsl:value-of select="text()"/></wsdl:documentation>
</wsdl:part>
</xsl:for-each>
</wsdl:message>
</xsl:template>
+<xsl:template match="op" mode="element">
+ <xsl:for-each select="input|output">
+ <xsl:variable name="prefix">
+ <xsl:choose>
+ <xsl:when test="starts-with(@type,'xsd:')"/>
+ <xsl:otherwise><xsl:value-of select="/service/@typePrefix"/>:</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="suffix">
+ <xsl:choose>
+ <xsl:when test="@list='yes'">List</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsd:element name="{@name}{../@name}" type="{$prefix}{@type}{$suffix}"/>
+ </xsl:for-each>
+</xsl:template>
+
<xsl:template match="struct[@fault='yes']" mode="message">
<wsdl:message name="{@name}">
- <wsdl:part name="{@name}" element="{/service/types/@prefix}:{@name}">
+ <wsdl:part name="{@name}" element="{/service/@typePrefix}:{@name}">
<wsdl:documentation><xsl:value-of select="text()"/></wsdl:documentation>
</wsdl:part>
</wsdl:message>
</wsdl:operation>
</xsl:template>
+<xsl:template match="import">
+ <wsdl:import namepace="{@namespace}" location="{@location}"/>
+</xsl:template>
+
+<xsl:template match="operations">
+ <wsdl:types>
+ <schema targetNamespace="{/service/@elemNs}"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="unqualified"
+ attributeFormDefault="unqualified">
+
+ <xsl:apply-templates select="op" mode="element"/>
+ </schema>
+ </wsdl:types>
+
+ <xsl:apply-templates select="op" mode="message"/>
+
+ <wsdl:portType name="{/service/@name}PortType">
+ <xsl:apply-templates select="op" mode="port-type"/>
+ </wsdl:portType>
+
+ <binding name="{/service/@name}" type="{/service/@prefix}:{/service/@name}PortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <xsl:apply-templates select="op" mode="binding"/>
+ </binding>
+
+ <service name="{/service/@name}">
+ <documentation><xsl:value-of select="text()"/></documentation>
+ <port name="{/service/@name}" binding="{/service/@prefix}:{/service/@name}">
+ <soap:address location="http://test.glite.org/{/service/@prefix}:8080"/>
+ </port>
+
+ </service>
+
+</xsl:template>
+
+<xsl:template match="fault">
+ <wsdl:message name="{@name}">
+ <wsdl:part name="{@name}" element="{/service/@typePrefix}:{@name}" />
+ </wsdl:message>
+</xsl:template>
+
+
</xsl:stylesheet>
+