You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-user@ws.apache.org by Bhuvan Gupta <bh...@in.fiorano.com> on 2005/09/27 11:41:14 UTC
WSIF extn for BSF
Hi All,
We have developed WSIF extensions for BSF (Bean Scripting Framework) as part of one of our projects and would like to contribute this to the WSIF project.
Document containing details in attached.
Let me know the procedure to commit it to the CVS.
Thanks
Bhuvan
---------------------------------------------------------------------------------
Fiorano MailServer
All incoming and outgoing mails are scanned for Virus and Spam
http://www.fiorano.com
Re: WSIF extn for BSF
Posted by Davanum Srinivas <da...@gmail.com>.
Bhuvan,
Easiest and quickest way is to open a JIRA issue, upload the zip as
attachment and click on grant license to apache in the JIRA interface.
thanks,
dims
On 9/27/05, Aleksander Slominski <as...@cs.indiana.edu> wrote:
> Bhuvan Gupta wrote:
>
> Hi All,
>
> We have developed WSIF extensions for BSF (Bean Scripting Framework) as part of one of our projects and would like to contribute this to the WSIF project.
> Document containing details in attached.
> hi Bhuvan,
>
> this looks great (just a minor issues [1]) and definitely would be a great contribution to WSIF.
>
>
>
> Let me know the procedure to commit it to the CVS.
> we have moved now to SVN.
>
> if you are an apache commiter (i was not able to determine that) then WS PMC can grant you karma to commit or i can apply your code as a patch.
>
> if the contribution is bigger in size and you are not apache commiter i think we will need signed Contributor License Agreements (and Software Grant depending on size). see towards the end of http://www.apache.org/licenses/
>
> thanks,
>
> alek
>
> [1] please do not send MS Word DOC attachment - they are sometimes filtered and not everybody can read MS Word documents. below is rendering of ti as HTML (copy and past) for anybody interested:
>
>
>
> WSDL BSF Extension
>
>
>
>
>
> Details :
>
>
>
> The BSF binding is a WSDL binding that allows abstract functionality in the abstract service description (messages, operation and port types) to be mapped to the functionality offered by Scripts directly. This means that a script can be described using WSDL, and can be accessed as a WSDL- described service through WSIF.
>
> This makes use of Bean Scripting Framework (BSF) to provide the scripting capabilities.
>
>
>
>
>
> The BSF binding extends WSDL with the following extensibility elements:
>
>
>
>
> <definitions ….>
>
>
>
> <!-- BSF binding -->
>
> <binding …>
>
> <bsf:binding/>
>
> <operation>*
>
> <bsf:operation
>
> methodname="nmtoken"
>
> parameterOrder="nmtoken" ?
>
> returnPart="nmtoken"? />?
>
> <input name="nmtoken"? />?
>
> <output name="nmtoken"? />?
>
> <fault name="nmtoken"? />?
>
> </operation>
>
> </binding>
>
>
>
> <service … >
>
> <port>*
>
> <bsf:script lang="nmtoken"
>
> src="nmtoken"? >
>
> <!—actual script here -- >
>
> </bsf:script>
>
> </port>
>
> </service>
>
> </definitions>
>
>
>
>
>
>
>
> Each element is described in detail below.
>
> bsf:binding This indicates that the binding is a BSF binding.
>
>
>
> bsf:operation This element maps an abstract WSDL operation to a Script method. The methodName attribute specifies the name of the Script method corresponding to the abstract operation. The parameterOrder attribute is similar to and overrides the paramterOrder specification in the abstract operation. It specifies the ordering of the input message parts for the invocation; in the BSF binding case it identifies the method signature. Having a parameterOrder attribute here allows us to map an abstract operation to a Script method even if their signatures aren't compatible in the ordering of parts. The returnPart is that part of the abstract output message which corresponds to the return value of the Script method.
>
>
>
> bsf:script This element is an extension under the WSDL port element that allows specification of a Script as an endpoint for a service available via the BSF binding. The port whose address is specified this way must be associated with a BSF binding only.
>
> The lang attribute specifies the scripting engine to be used for script invocation. The src attribute specifies the location of the script file. The complete script can also be provided instead as CDATA value for the bsf:script element.
>
>
>
>
> Example :
>
>
>
> In the following example, a dateConversion service is offered through Java Script. The service exposes converData operation which takes three input parameters (input data string, input dataformat and output dateformat) and returns the converted date string.
>
>
>
>
>
>
>
>
> <?xml version='1.0' encoding='UTF-8'?>
>
> <definitions name='DateConversion'
>
> targetNamespace='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
>
> xmlns:tns='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
>
> xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
>
> xmlns:bsf='http://schemas.xmlsoap.org/wsdl/bsf/'
>
> xmlns:xsd='http://www.w3.org/2001/XMLSchema'
>
> xmlns='http://schemas.xmlsoap.org/wsdl/'>
>
>
>
> <message name='convertDateRequest'>
>
> <part name='dateString' type='xsd:string'/>
>
> <part name='inFormat' type='xsd:string'/>
>
> <part name='outFormat' type='xsd:string'/>
>
> </message>
>
>
>
> <message name='convertDateResponse'>
>
> <part name='result' type='xsd:string'/>
>
> </message>
>
>
>
> <portType name='DateConversionPortType'>
>
> <operation name='convertDate'>
>
> <input message='tns:convertDateRequest'/>
>
> <output message='tns:convertDateResponse'/>
>
> </operation>
>
> </portType>
>
>
>
> <binding name='DateConversionBSFBinding'
>
> type='tns:DateConversionPortType'>
>
> <bsf:binding/>
>
> <operation name="convertDate">
>
> <bsf:operation
>
> methodName="convertDate"
>
> parameterOrder="dateString inFormat outFormat"
>
> returnPart="result" />
>
> <input name="convertDateRequest"/>
>
> <output name="convertDateResponse"/>
>
> </operation>
>
> </binding>
>
>
>
> <service name='DateConversion'>
>
> <port name='DateConversionPort'
>
> binding='tns:DateConversionBSFBinding'>
>
> <!-- vendor-specific deployment information needs to be entered here -->
>
> <bsf:script lang="javascript" src="C:\\bhuvan\\wsif-2_0\\samples\\bpel\\Test.js"/>
>
> </port>
>
> </service>
>
> </definitions>
>
>
>
>
>
>
>
> --
> The best way to predict the future is to invent it - Alan Kay
>
>
--
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform
Re: WSIF extn for BSF
Posted by Davanum Srinivas <da...@gmail.com>.
Bhuvan,
Easiest and quickest way is to open a JIRA issue, upload the zip as
attachment and click on grant license to apache in the JIRA interface.
thanks,
dims
On 9/27/05, Aleksander Slominski <as...@cs.indiana.edu> wrote:
> Bhuvan Gupta wrote:
>
> Hi All,
>
> We have developed WSIF extensions for BSF (Bean Scripting Framework) as part of one of our projects and would like to contribute this to the WSIF project.
> Document containing details in attached.
> hi Bhuvan,
>
> this looks great (just a minor issues [1]) and definitely would be a great contribution to WSIF.
>
>
>
> Let me know the procedure to commit it to the CVS.
> we have moved now to SVN.
>
> if you are an apache commiter (i was not able to determine that) then WS PMC can grant you karma to commit or i can apply your code as a patch.
>
> if the contribution is bigger in size and you are not apache commiter i think we will need signed Contributor License Agreements (and Software Grant depending on size). see towards the end of http://www.apache.org/licenses/
>
> thanks,
>
> alek
>
> [1] please do not send MS Word DOC attachment - they are sometimes filtered and not everybody can read MS Word documents. below is rendering of ti as HTML (copy and past) for anybody interested:
>
>
>
> WSDL BSF Extension
>
>
>
>
>
> Details :
>
>
>
> The BSF binding is a WSDL binding that allows abstract functionality in the abstract service description (messages, operation and port types) to be mapped to the functionality offered by Scripts directly. This means that a script can be described using WSDL, and can be accessed as a WSDL- described service through WSIF.
>
> This makes use of Bean Scripting Framework (BSF) to provide the scripting capabilities.
>
>
>
>
>
> The BSF binding extends WSDL with the following extensibility elements:
>
>
>
>
> <definitions ….>
>
>
>
> <!-- BSF binding -->
>
> <binding …>
>
> <bsf:binding/>
>
> <operation>*
>
> <bsf:operation
>
> methodname="nmtoken"
>
> parameterOrder="nmtoken" ?
>
> returnPart="nmtoken"? />?
>
> <input name="nmtoken"? />?
>
> <output name="nmtoken"? />?
>
> <fault name="nmtoken"? />?
>
> </operation>
>
> </binding>
>
>
>
> <service … >
>
> <port>*
>
> <bsf:script lang="nmtoken"
>
> src="nmtoken"? >
>
> <!—actual script here -- >
>
> </bsf:script>
>
> </port>
>
> </service>
>
> </definitions>
>
>
>
>
>
>
>
> Each element is described in detail below.
>
> bsf:binding This indicates that the binding is a BSF binding.
>
>
>
> bsf:operation This element maps an abstract WSDL operation to a Script method. The methodName attribute specifies the name of the Script method corresponding to the abstract operation. The parameterOrder attribute is similar to and overrides the paramterOrder specification in the abstract operation. It specifies the ordering of the input message parts for the invocation; in the BSF binding case it identifies the method signature. Having a parameterOrder attribute here allows us to map an abstract operation to a Script method even if their signatures aren't compatible in the ordering of parts. The returnPart is that part of the abstract output message which corresponds to the return value of the Script method.
>
>
>
> bsf:script This element is an extension under the WSDL port element that allows specification of a Script as an endpoint for a service available via the BSF binding. The port whose address is specified this way must be associated with a BSF binding only.
>
> The lang attribute specifies the scripting engine to be used for script invocation. The src attribute specifies the location of the script file. The complete script can also be provided instead as CDATA value for the bsf:script element.
>
>
>
>
> Example :
>
>
>
> In the following example, a dateConversion service is offered through Java Script. The service exposes converData operation which takes three input parameters (input data string, input dataformat and output dateformat) and returns the converted date string.
>
>
>
>
>
>
>
>
> <?xml version='1.0' encoding='UTF-8'?>
>
> <definitions name='DateConversion'
>
> targetNamespace='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
>
> xmlns:tns='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
>
> xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
>
> xmlns:bsf='http://schemas.xmlsoap.org/wsdl/bsf/'
>
> xmlns:xsd='http://www.w3.org/2001/XMLSchema'
>
> xmlns='http://schemas.xmlsoap.org/wsdl/'>
>
>
>
> <message name='convertDateRequest'>
>
> <part name='dateString' type='xsd:string'/>
>
> <part name='inFormat' type='xsd:string'/>
>
> <part name='outFormat' type='xsd:string'/>
>
> </message>
>
>
>
> <message name='convertDateResponse'>
>
> <part name='result' type='xsd:string'/>
>
> </message>
>
>
>
> <portType name='DateConversionPortType'>
>
> <operation name='convertDate'>
>
> <input message='tns:convertDateRequest'/>
>
> <output message='tns:convertDateResponse'/>
>
> </operation>
>
> </portType>
>
>
>
> <binding name='DateConversionBSFBinding'
>
> type='tns:DateConversionPortType'>
>
> <bsf:binding/>
>
> <operation name="convertDate">
>
> <bsf:operation
>
> methodName="convertDate"
>
> parameterOrder="dateString inFormat outFormat"
>
> returnPart="result" />
>
> <input name="convertDateRequest"/>
>
> <output name="convertDateResponse"/>
>
> </operation>
>
> </binding>
>
>
>
> <service name='DateConversion'>
>
> <port name='DateConversionPort'
>
> binding='tns:DateConversionBSFBinding'>
>
> <!-- vendor-specific deployment information needs to be entered here -->
>
> <bsf:script lang="javascript" src="C:\\bhuvan\\wsif-2_0\\samples\\bpel\\Test.js"/>
>
> </port>
>
> </service>
>
> </definitions>
>
>
>
>
>
>
>
> --
> The best way to predict the future is to invent it - Alan Kay
>
>
--
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform
Re: WSIF extn for BSF
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Bhuvan Gupta wrote:
> Can you send me the URL of JIRA and SVN as I can't find that
> information at WSIF homepage.
> http://ws.apache.org/wsif only provides details on CVS and bugzilla.
http://issues.apache.org/jira/browse/WSIF
http://svn.apache.org/viewcvs.cgi/webservices/wsif/trunk/java/
and we definitely need to update WSIF website - i just put jira issue
for it to remind about it ...
http://issues.apache.org/jira/browse/WSIF-76
thanks,
alek
> ----- Original Message -----
> *From:* Aleksander Slominski <ma...@cs.indiana.edu>
> *To:* wsif-user@ws.apache.org <ma...@ws.apache.org>
> *Cc:* WSIF Dev <ma...@ws.apache.org>
> *Sent:* Tuesday, September 27, 2005 10:39 PM
> *Subject:* Re: WSIF extn for BSF
>
> Bhuvan Gupta wrote:
>
>> Hi All,
>>
>> We have developed WSIF extensions for BSF (Bean Scripting
>> Framework) as part of one of our projects and would like to
>> contribute this to the WSIF project.
>> Document containing details in attached.
>
> hi Bhuvan,
>
> this looks great (just a minor issues [1]) and definitely would be
> a great contribution to WSIF.
>
>>
>> Let me know the procedure to commit it to the CVS.
>
> we have moved now to SVN.
>
> if you are an apache commiter (i was not able to determine that)
> then WS PMC can grant you karma to commit or i can apply your code
> as a patch.
>
> if the contribution is bigger in size and you are not apache
> commiter i think we will need signed Contributor License
> Agreements (and Software Grant depending on size). see towards the
> end of http://www.apache.org/licenses/
>
> thanks,
>
> alek
>
> [1] please do not send MS Word DOC attachment - they are sometimes
> filtered and not everybody can read MS Word documents. below is
> rendering of ti as HTML (copy and past) for anybody interested:
>
> *WSDL BSF Extension*
>
> 1. *Details :*
>
> The BSF binding is a WSDL binding that allows abstract
> functionality in the abstract service description (messages,
> operation and port types) to be mapped to the functionality
> offered by Scripts directly. This means that a script can be
> described using WSDL, and can be accessed as a WSDL- described
> service through WSIF.
>
> This makes use of Bean Scripting Framework (BSF) to provide the
> scripting capabilities.
>
> The BSF binding extends WSDL with the following extensibility
> elements:
>
> <definitions ....>
>
> <!-- BSF binding -->
>
> <binding ...>
>
> <bsf:binding/>
>
> <operation>*
>
> <bsf:operation
>
> methodname="nmtoken"
>
> parameterOrder="nmtoken" ?
>
> returnPart="nmtoken"? />?
>
> <input name="nmtoken"? />?
>
> <output name="nmtoken"? />?
>
> <fault name="nmtoken"? />?
>
> </operation>
>
> </binding>
>
> <service ... >
>
> <port>*
>
> <bsf:script lang="nmtoken"
>
> src="nmtoken"? >
>
> <!--actual script here -- >
>
> </bsf:script>
>
> </port>
>
> </service>
>
> </definitions>
>
> Each element is described in detail below.
>
> * *bsf:binding* This indicates that the binding is a BSF binding.
>
> * *bsf:operation* This element maps an abstract WSDL operation
> to a Script method. The methodName attribute specifies the
> name of the Script method corresponding to the abstract
> operation. The parameterOrder attribute is similar to and
> overrides the paramterOrder specification in the abstract
> operation. It specifies the ordering of the input message
> parts for the invocation; in the BSF binding case it
> identifies the method signature. Having a parameterOrder
> attribute here allows us to map an abstract operation to a
> Script method even if their signatures aren't compatible in
> the ordering of parts. The returnPart is that part of the
> abstract output message which corresponds to the return
> value of the Script method.
>
> * *bsf:script* This element is an extension under the WSDL
> port element that allows specification of a Script as an
> endpoint for a service available via the BSF binding. The
> port whose address is specified this way must be associated
> with a BSF binding only.
>
> The *lang* attribute specifies the scripting engine to be
> used for script invocation. The *src* attribute specifies
> the location of the script file. The complete script can
> also be provided instead as CDATA value for the *bsf:script
> *element.
>
>
> 2. Example :
>
> In the following example, a dateConversion service is offered
> through Java Script. The service exposes *converData* operation
> which takes three input parameters (input data string, input
> dataformat and output dateformat) and returns the converted date
> string.
>
> <?xml version='1.0' encoding='UTF-8'?>
>
> <definitions name='DateConversion'
>
>
> targetNamespace='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
>
>
>
> xmlns:tns='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
>
>
> xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
>
> xmlns:bsf='http://schemas.xmlsoap.org/wsdl/bsf/'
>
> xmlns:xsd='http://www.w3.org/2001/XMLSchema'
>
> xmlns='http://schemas.xmlsoap.org/wsdl/'>
>
> <message name='convertDateRequest'>
>
> <part name='dateString' type='xsd:string'/>
>
> <part name='inFormat' type='xsd:string'/>
>
> <part name='outFormat' type='xsd:string'/>
>
> </message>
>
> <message name='convertDateResponse'>
>
> <part name='result' type='xsd:string'/>
>
> </message>
>
> <portType name='DateConversionPortType'>
>
> <operation name='convertDate'>
>
> <input message='tns:convertDateRequest'/>
>
> <output message='tns:convertDateResponse'/>
>
> </operation>
>
> </portType>
>
> <binding name='DateConversionBSFBinding'
>
> type='tns:DateConversionPortType'>
>
> <bsf:binding/>
>
> <operation name="convertDate">
>
> <bsf:operation
>
> methodName="convertDate"
>
> parameterOrder="dateString inFormat outFormat"
>
> returnPart="result" />
>
> <input name="convertDateRequest"/>
>
> <output name="convertDateResponse"/>
>
> </operation>
>
> </binding>
>
> <service name='DateConversion'>
>
> <port name='DateConversionPort'
>
> binding='tns:DateConversionBSFBinding'>
>
> <!-- vendor-specific deployment information needs to
> be entered here -->
>
> <bsf:script lang="javascript"
> src="C:\\bhuvan\\wsif-2_0\\samples\\bpel\\Test.js"/>
>
> </port>
>
> </service>
>
> </definitions>
>
>
>
>--
>The best way to predict the future is to invent it - Alan Kay
>
>
> ------------------------------------------------------------------------------------------------------------------------------------
> This email is intended for the exclusive use by the person(s)
> mentioned as recipient(s). If you receive this email by mistake,
> please notify the sender and delete this email immediately from
> your system and destroy all copies of it. You may not, directly or
> indirectly, use, disclose, distribute, print or copy this email or
> any part of it if you are not the intended recipient. This email
> and its attachments, if any, contain confidential information
> and/or may contain information protected by intellectual property
> rights or other rights. This email shall/may not be construed to
> constitute any commitment from Fiorano Software Inc. or its
> subsidiaries or affiliates except when expressly agreed to in a
> separate written agreement between the intended recipient and
> Fiorano Software Inc. or its subsidiaries or affiliates. Opinions,
> conclusions and other information expressed in this message are
> not given or endorsed by my firm or employer unless otherwise
> indicated by an authorized representative independent of this
> message. Unencrypted electronic mail is not secure, may contain
> harmful or virulent components or attachments and may not be
> authentic. Fiorano Software Inc. does not make any representations
> as to or the contents of this message nor for any damage caused by
> the use thereof.
> ------------------------------------------------------------------------------------------------------------------------------------
> Fiorano MailServer All incoming and outgoing mails are scanned for
> Virus http://www.fiorano.com
>
> ------------------------------------------------------------------------------------------------------------------------------------
> This email is intended for the exclusive use by the person(s)
> mentioned as recipient(s). If you receive this email by mistake,
> please notify the sender and delete this email immediately from your
> system and destroy all copies of it. You may not, directly or
> indirectly, use, disclose, distribute, print or copy this email or any
> part of it if you are not the intended recipient. This email and its
> attachments, if any, contain confidential information and/or may
> contain information protected by intellectual property rights or other
> rights. This email shall/may not be construed to constitute any
> commitment from Fiorano Software Inc. or its subsidiaries or
> affiliates except when expressly agreed to in a separate written
> agreement between the intended recipient and Fiorano Software Inc. or
> its subsidiaries or affiliates. Opinions, conclusions and other
> information expressed in this message are not given or endorsed by my
> firm or employer unless otherwise indicated by an authorized
> representative independent of this message. Unencrypted electronic
> mail is not secure, may contain harmful or virulent components or
> attachments and may not be authentic. Fiorano Software Inc. does not
> make any representations as to or the contents of this message nor for
> any damage caused by the use thereof.
> ------------------------------------------------------------------------------------------------------------------------------------
> Fiorano MailServer All incoming and outgoing mails are scanned for
> Virus http://www.fiorano.com
--
The best way to predict the future is to invent it - Alan Kay
Re: WSIF extn for BSF
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Bhuvan Gupta wrote:
> Can you send me the URL of JIRA and SVN as I can't find that
> information at WSIF homepage.
> http://ws.apache.org/wsif only provides details on CVS and bugzilla.
http://issues.apache.org/jira/browse/WSIF
http://svn.apache.org/viewcvs.cgi/webservices/wsif/trunk/java/
and we definitely need to update WSIF website - i just put jira issue
for it to remind about it ...
http://issues.apache.org/jira/browse/WSIF-76
thanks,
alek
> ----- Original Message -----
> *From:* Aleksander Slominski <ma...@cs.indiana.edu>
> *To:* wsif-user@ws.apache.org <ma...@ws.apache.org>
> *Cc:* WSIF Dev <ma...@ws.apache.org>
> *Sent:* Tuesday, September 27, 2005 10:39 PM
> *Subject:* Re: WSIF extn for BSF
>
> Bhuvan Gupta wrote:
>
>> Hi All,
>>
>> We have developed WSIF extensions for BSF (Bean Scripting
>> Framework) as part of one of our projects and would like to
>> contribute this to the WSIF project.
>> Document containing details in attached.
>
> hi Bhuvan,
>
> this looks great (just a minor issues [1]) and definitely would be
> a great contribution to WSIF.
>
>>
>> Let me know the procedure to commit it to the CVS.
>
> we have moved now to SVN.
>
> if you are an apache commiter (i was not able to determine that)
> then WS PMC can grant you karma to commit or i can apply your code
> as a patch.
>
> if the contribution is bigger in size and you are not apache
> commiter i think we will need signed Contributor License
> Agreements (and Software Grant depending on size). see towards the
> end of http://www.apache.org/licenses/
>
> thanks,
>
> alek
>
> [1] please do not send MS Word DOC attachment - they are sometimes
> filtered and not everybody can read MS Word documents. below is
> rendering of ti as HTML (copy and past) for anybody interested:
>
> *WSDL BSF Extension*
>
> 1. *Details :*
>
> The BSF binding is a WSDL binding that allows abstract
> functionality in the abstract service description (messages,
> operation and port types) to be mapped to the functionality
> offered by Scripts directly. This means that a script can be
> described using WSDL, and can be accessed as a WSDL- described
> service through WSIF.
>
> This makes use of Bean Scripting Framework (BSF) to provide the
> scripting capabilities.
>
> The BSF binding extends WSDL with the following extensibility
> elements:
>
> <definitions ....>
>
> <!-- BSF binding -->
>
> <binding ...>
>
> <bsf:binding/>
>
> <operation>*
>
> <bsf:operation
>
> methodname="nmtoken"
>
> parameterOrder="nmtoken" ?
>
> returnPart="nmtoken"? />?
>
> <input name="nmtoken"? />?
>
> <output name="nmtoken"? />?
>
> <fault name="nmtoken"? />?
>
> </operation>
>
> </binding>
>
> <service ... >
>
> <port>*
>
> <bsf:script lang="nmtoken"
>
> src="nmtoken"? >
>
> <!--actual script here -- >
>
> </bsf:script>
>
> </port>
>
> </service>
>
> </definitions>
>
> Each element is described in detail below.
>
> * *bsf:binding* This indicates that the binding is a BSF binding.
>
> * *bsf:operation* This element maps an abstract WSDL operation
> to a Script method. The methodName attribute specifies the
> name of the Script method corresponding to the abstract
> operation. The parameterOrder attribute is similar to and
> overrides the paramterOrder specification in the abstract
> operation. It specifies the ordering of the input message
> parts for the invocation; in the BSF binding case it
> identifies the method signature. Having a parameterOrder
> attribute here allows us to map an abstract operation to a
> Script method even if their signatures aren't compatible in
> the ordering of parts. The returnPart is that part of the
> abstract output message which corresponds to the return
> value of the Script method.
>
> * *bsf:script* This element is an extension under the WSDL
> port element that allows specification of a Script as an
> endpoint for a service available via the BSF binding. The
> port whose address is specified this way must be associated
> with a BSF binding only.
>
> The *lang* attribute specifies the scripting engine to be
> used for script invocation. The *src* attribute specifies
> the location of the script file. The complete script can
> also be provided instead as CDATA value for the *bsf:script
> *element.
>
>
> 2. Example :
>
> In the following example, a dateConversion service is offered
> through Java Script. The service exposes *converData* operation
> which takes three input parameters (input data string, input
> dataformat and output dateformat) and returns the converted date
> string.
>
> <?xml version='1.0' encoding='UTF-8'?>
>
> <definitions name='DateConversion'
>
>
> targetNamespace='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
>
>
>
> xmlns:tns='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
>
>
> xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
>
> xmlns:bsf='http://schemas.xmlsoap.org/wsdl/bsf/'
>
> xmlns:xsd='http://www.w3.org/2001/XMLSchema'
>
> xmlns='http://schemas.xmlsoap.org/wsdl/'>
>
> <message name='convertDateRequest'>
>
> <part name='dateString' type='xsd:string'/>
>
> <part name='inFormat' type='xsd:string'/>
>
> <part name='outFormat' type='xsd:string'/>
>
> </message>
>
> <message name='convertDateResponse'>
>
> <part name='result' type='xsd:string'/>
>
> </message>
>
> <portType name='DateConversionPortType'>
>
> <operation name='convertDate'>
>
> <input message='tns:convertDateRequest'/>
>
> <output message='tns:convertDateResponse'/>
>
> </operation>
>
> </portType>
>
> <binding name='DateConversionBSFBinding'
>
> type='tns:DateConversionPortType'>
>
> <bsf:binding/>
>
> <operation name="convertDate">
>
> <bsf:operation
>
> methodName="convertDate"
>
> parameterOrder="dateString inFormat outFormat"
>
> returnPart="result" />
>
> <input name="convertDateRequest"/>
>
> <output name="convertDateResponse"/>
>
> </operation>
>
> </binding>
>
> <service name='DateConversion'>
>
> <port name='DateConversionPort'
>
> binding='tns:DateConversionBSFBinding'>
>
> <!-- vendor-specific deployment information needs to
> be entered here -->
>
> <bsf:script lang="javascript"
> src="C:\\bhuvan\\wsif-2_0\\samples\\bpel\\Test.js"/>
>
> </port>
>
> </service>
>
> </definitions>
>
>
>
>--
>The best way to predict the future is to invent it - Alan Kay
>
>
> ------------------------------------------------------------------------------------------------------------------------------------
> This email is intended for the exclusive use by the person(s)
> mentioned as recipient(s). If you receive this email by mistake,
> please notify the sender and delete this email immediately from
> your system and destroy all copies of it. You may not, directly or
> indirectly, use, disclose, distribute, print or copy this email or
> any part of it if you are not the intended recipient. This email
> and its attachments, if any, contain confidential information
> and/or may contain information protected by intellectual property
> rights or other rights. This email shall/may not be construed to
> constitute any commitment from Fiorano Software Inc. or its
> subsidiaries or affiliates except when expressly agreed to in a
> separate written agreement between the intended recipient and
> Fiorano Software Inc. or its subsidiaries or affiliates. Opinions,
> conclusions and other information expressed in this message are
> not given or endorsed by my firm or employer unless otherwise
> indicated by an authorized representative independent of this
> message. Unencrypted electronic mail is not secure, may contain
> harmful or virulent components or attachments and may not be
> authentic. Fiorano Software Inc. does not make any representations
> as to or the contents of this message nor for any damage caused by
> the use thereof.
> ------------------------------------------------------------------------------------------------------------------------------------
> Fiorano MailServer All incoming and outgoing mails are scanned for
> Virus http://www.fiorano.com
>
> ------------------------------------------------------------------------------------------------------------------------------------
> This email is intended for the exclusive use by the person(s)
> mentioned as recipient(s). If you receive this email by mistake,
> please notify the sender and delete this email immediately from your
> system and destroy all copies of it. You may not, directly or
> indirectly, use, disclose, distribute, print or copy this email or any
> part of it if you are not the intended recipient. This email and its
> attachments, if any, contain confidential information and/or may
> contain information protected by intellectual property rights or other
> rights. This email shall/may not be construed to constitute any
> commitment from Fiorano Software Inc. or its subsidiaries or
> affiliates except when expressly agreed to in a separate written
> agreement between the intended recipient and Fiorano Software Inc. or
> its subsidiaries or affiliates. Opinions, conclusions and other
> information expressed in this message are not given or endorsed by my
> firm or employer unless otherwise indicated by an authorized
> representative independent of this message. Unencrypted electronic
> mail is not secure, may contain harmful or virulent components or
> attachments and may not be authentic. Fiorano Software Inc. does not
> make any representations as to or the contents of this message nor for
> any damage caused by the use thereof.
> ------------------------------------------------------------------------------------------------------------------------------------
> Fiorano MailServer All incoming and outgoing mails are scanned for
> Virus http://www.fiorano.com
--
The best way to predict the future is to invent it - Alan Kay
Re: WSIF extn for BSF
Posted by Bhuvan Gupta <bh...@in.fiorano.com>.
Alek,
Can you send me the URL of JIRA and SVN as I can't find that information at WSIF homepage.
http://ws.apache.org/wsif only provides details on CVS and bugzilla.
Thanks
Bhuvan
----- Original Message -----
From: Aleksander Slominski
To: wsif-user@ws.apache.org
Cc: WSIF Dev
Sent: Tuesday, September 27, 2005 10:39 PM
Subject: Re: WSIF extn for BSF
Bhuvan Gupta wrote:
Hi All,
We have developed WSIF extensions for BSF (Bean Scripting Framework) as part of one of our projects and would like to contribute this to the WSIF project.
Document containing details in attached.
hi Bhuvan,
this looks great (just a minor issues [1]) and definitely would be a great contribution to WSIF.
Let me know the procedure to commit it to the CVS.
we have moved now to SVN.
if you are an apache commiter (i was not able to determine that) then WS PMC can grant you karma to commit or i can apply your code as a patch.
if the contribution is bigger in size and you are not apache commiter i think we will need signed Contributor License Agreements (and Software Grant depending on size). see towards the end of http://www.apache.org/licenses/
thanks,
alek
[1] please do not send MS Word DOC attachment - they are sometimes filtered and not everybody can read MS Word documents. below is rendering of ti as HTML (copy and past) for anybody interested:
WSDL BSF Extension
1.. Details :
The BSF binding is a WSDL binding that allows abstract functionality in the abstract service description (messages, operation and port types) to be mapped to the functionality offered by Scripts directly. This means that a script can be described using WSDL, and can be accessed as a WSDL- described service through WSIF.
This makes use of Bean Scripting Framework (BSF) to provide the scripting capabilities.
The BSF binding extends WSDL with the following extensibility elements:
<definitions ..>
<!-- BSF binding -->
<binding .>
<bsf:binding/>
<operation>*
<bsf:operation
methodname="nmtoken"
parameterOrder="nmtoken" ?
returnPart="nmtoken"? />?
<input name="nmtoken"? />?
<output name="nmtoken"? />?
<fault name="nmtoken"? />?
</operation>
</binding>
<service . >
<port>*
<bsf:script lang="nmtoken"
src="nmtoken"? >
<!-actual script here -- >
</bsf:script>
</port>
</service>
</definitions>
Each element is described in detail below.
a.. bsf:binding This indicates that the binding is a BSF binding.
a.. bsf:operation This element maps an abstract WSDL operation to a Script method. The methodName attribute specifies the name of the Script method corresponding to the abstract operation. The parameterOrder attribute is similar to and overrides the paramterOrder specification in the abstract operation. It specifies the ordering of the input message parts for the invocation; in the BSF binding case it identifies the method signature. Having a parameterOrder attribute here allows us to map an abstract operation to a Script method even if their signatures aren't compatible in the ordering of parts. The returnPart is that part of the abstract output message which corresponds to the return value of the Script method.
a.. bsf:script This element is an extension under the WSDL port element that allows specification of a Script as an endpoint for a service available via the BSF binding. The port whose address is specified this way must be associated with a BSF binding only.
The lang attribute specifies the scripting engine to be used for script invocation. The src attribute specifies the location of the script file. The complete script can also be provided instead as CDATA value for the bsf:script element.
2.. Example :
In the following example, a dateConversion service is offered through Java Script. The service exposes converData operation which takes three input parameters (input data string, input dataformat and output dateformat) and returns the converted date string.
<?xml version='1.0' encoding='UTF-8'?>
<definitions name='DateConversion'
targetNamespace='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
xmlns:tns='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
xmlns:bsf='http://schemas.xmlsoap.org/wsdl/bsf/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<message name='convertDateRequest'>
<part name='dateString' type='xsd:string'/>
<part name='inFormat' type='xsd:string'/>
<part name='outFormat' type='xsd:string'/>
</message>
<message name='convertDateResponse'>
<part name='result' type='xsd:string'/>
</message>
<portType name='DateConversionPortType'>
<operation name='convertDate'>
<input message='tns:convertDateRequest'/>
<output message='tns:convertDateResponse'/>
</operation>
</portType>
<binding name='DateConversionBSFBinding'
type='tns:DateConversionPortType'>
<bsf:binding/>
<operation name="convertDate">
<bsf:operation
methodName="convertDate"
parameterOrder="dateString inFormat outFormat"
returnPart="result" />
<input name="convertDateRequest"/>
<output name="convertDateResponse"/>
</operation>
</binding>
<service name='DateConversion'>
<port name='DateConversionPort'
binding='tns:DateConversionBSFBinding'>
<!-- vendor-specific deployment information needs to be entered here -->
<bsf:script lang="javascript" src="C:\\bhuvan\\wsif-2_0\\samples\\bpel\\Test.js"/>
</port>
</service>
</definitions>
--
The best way to predict the future is to invent it - Alan Kay
------------------------------------------------------------------------------------------------------------------------------------ This email is intended for the exclusive use by the person(s) mentioned as recipient(s). If you receive this email by mistake, please notify the sender and delete this email immediately from your system and destroy all copies of it. You may not, directly or indirectly, use, disclose, distribute, print or copy this email or any part of it if you are not the intended recipient. This email and its attachments, if any, contain confidential information and/or may contain information protected by intellectual property rights or other rights. This email shall/may not be construed to constitute any commitment from Fiorano Software Inc. or its subsidiaries or affiliates except when expressly agreed to in a separate written agreement between the intended recipient and Fiorano Software Inc. or its subsidiaries or affiliates. Opinions, conclusions and other information expressed in this message are not given or endorsed by my firm or employer unless otherwise indicated by an authorized representative independent of this message. Unencrypted electronic mail is not secure, may contain harmful or virulent components or attachments and may not be authentic. Fiorano Software Inc. does not make any representations as to or the contents of this message nor for any damage caused by the use thereof. ------------------------------------------------------------------------------------------------------------------------------------ Fiorano MailServer All incoming and outgoing mails are scanned for Virus http://www.fiorano.com
---------------------------------------------------------------------------------
Fiorano MailServer
All incoming and outgoing mails are scanned for Virus and Spam
http://www.fiorano.com
Re: WSIF extn for BSF
Posted by Bhuvan Gupta <bh...@in.fiorano.com>.
Alek,
Can you send me the URL of JIRA and SVN as I can't find that information at WSIF homepage.
http://ws.apache.org/wsif only provides details on CVS and bugzilla.
Thanks
Bhuvan
----- Original Message -----
From: Aleksander Slominski
To: wsif-user@ws.apache.org
Cc: WSIF Dev
Sent: Tuesday, September 27, 2005 10:39 PM
Subject: Re: WSIF extn for BSF
Bhuvan Gupta wrote:
Hi All,
We have developed WSIF extensions for BSF (Bean Scripting Framework) as part of one of our projects and would like to contribute this to the WSIF project.
Document containing details in attached.
hi Bhuvan,
this looks great (just a minor issues [1]) and definitely would be a great contribution to WSIF.
Let me know the procedure to commit it to the CVS.
we have moved now to SVN.
if you are an apache commiter (i was not able to determine that) then WS PMC can grant you karma to commit or i can apply your code as a patch.
if the contribution is bigger in size and you are not apache commiter i think we will need signed Contributor License Agreements (and Software Grant depending on size). see towards the end of http://www.apache.org/licenses/
thanks,
alek
[1] please do not send MS Word DOC attachment - they are sometimes filtered and not everybody can read MS Word documents. below is rendering of ti as HTML (copy and past) for anybody interested:
WSDL BSF Extension
1.. Details :
The BSF binding is a WSDL binding that allows abstract functionality in the abstract service description (messages, operation and port types) to be mapped to the functionality offered by Scripts directly. This means that a script can be described using WSDL, and can be accessed as a WSDL- described service through WSIF.
This makes use of Bean Scripting Framework (BSF) to provide the scripting capabilities.
The BSF binding extends WSDL with the following extensibility elements:
<definitions ..>
<!-- BSF binding -->
<binding .>
<bsf:binding/>
<operation>*
<bsf:operation
methodname="nmtoken"
parameterOrder="nmtoken" ?
returnPart="nmtoken"? />?
<input name="nmtoken"? />?
<output name="nmtoken"? />?
<fault name="nmtoken"? />?
</operation>
</binding>
<service . >
<port>*
<bsf:script lang="nmtoken"
src="nmtoken"? >
<!-actual script here -- >
</bsf:script>
</port>
</service>
</definitions>
Each element is described in detail below.
a.. bsf:binding This indicates that the binding is a BSF binding.
a.. bsf:operation This element maps an abstract WSDL operation to a Script method. The methodName attribute specifies the name of the Script method corresponding to the abstract operation. The parameterOrder attribute is similar to and overrides the paramterOrder specification in the abstract operation. It specifies the ordering of the input message parts for the invocation; in the BSF binding case it identifies the method signature. Having a parameterOrder attribute here allows us to map an abstract operation to a Script method even if their signatures aren't compatible in the ordering of parts. The returnPart is that part of the abstract output message which corresponds to the return value of the Script method.
a.. bsf:script This element is an extension under the WSDL port element that allows specification of a Script as an endpoint for a service available via the BSF binding. The port whose address is specified this way must be associated with a BSF binding only.
The lang attribute specifies the scripting engine to be used for script invocation. The src attribute specifies the location of the script file. The complete script can also be provided instead as CDATA value for the bsf:script element.
2.. Example :
In the following example, a dateConversion service is offered through Java Script. The service exposes converData operation which takes three input parameters (input data string, input dataformat and output dateformat) and returns the converted date string.
<?xml version='1.0' encoding='UTF-8'?>
<definitions name='DateConversion'
targetNamespace='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
xmlns:tns='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
xmlns:bsf='http://schemas.xmlsoap.org/wsdl/bsf/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<message name='convertDateRequest'>
<part name='dateString' type='xsd:string'/>
<part name='inFormat' type='xsd:string'/>
<part name='outFormat' type='xsd:string'/>
</message>
<message name='convertDateResponse'>
<part name='result' type='xsd:string'/>
</message>
<portType name='DateConversionPortType'>
<operation name='convertDate'>
<input message='tns:convertDateRequest'/>
<output message='tns:convertDateResponse'/>
</operation>
</portType>
<binding name='DateConversionBSFBinding'
type='tns:DateConversionPortType'>
<bsf:binding/>
<operation name="convertDate">
<bsf:operation
methodName="convertDate"
parameterOrder="dateString inFormat outFormat"
returnPart="result" />
<input name="convertDateRequest"/>
<output name="convertDateResponse"/>
</operation>
</binding>
<service name='DateConversion'>
<port name='DateConversionPort'
binding='tns:DateConversionBSFBinding'>
<!-- vendor-specific deployment information needs to be entered here -->
<bsf:script lang="javascript" src="C:\\bhuvan\\wsif-2_0\\samples\\bpel\\Test.js"/>
</port>
</service>
</definitions>
--
The best way to predict the future is to invent it - Alan Kay
------------------------------------------------------------------------------------------------------------------------------------ This email is intended for the exclusive use by the person(s) mentioned as recipient(s). If you receive this email by mistake, please notify the sender and delete this email immediately from your system and destroy all copies of it. You may not, directly or indirectly, use, disclose, distribute, print or copy this email or any part of it if you are not the intended recipient. This email and its attachments, if any, contain confidential information and/or may contain information protected by intellectual property rights or other rights. This email shall/may not be construed to constitute any commitment from Fiorano Software Inc. or its subsidiaries or affiliates except when expressly agreed to in a separate written agreement between the intended recipient and Fiorano Software Inc. or its subsidiaries or affiliates. Opinions, conclusions and other information expressed in this message are not given or endorsed by my firm or employer unless otherwise indicated by an authorized representative independent of this message. Unencrypted electronic mail is not secure, may contain harmful or virulent components or attachments and may not be authentic. Fiorano Software Inc. does not make any representations as to or the contents of this message nor for any damage caused by the use thereof. ------------------------------------------------------------------------------------------------------------------------------------ Fiorano MailServer All incoming and outgoing mails are scanned for Virus http://www.fiorano.com
---------------------------------------------------------------------------------
Fiorano MailServer
All incoming and outgoing mails are scanned for Virus and Spam
http://www.fiorano.com
Re: WSIF extn for BSF
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Bhuvan Gupta wrote:
> Hi All,
>
> We have developed WSIF extensions for BSF (Bean Scripting Framework)
> as part of one of our projects and would like to contribute this to
> the WSIF project.
> Document containing details in attached.
hi Bhuvan,
this looks great (just a minor issues [1]) and definitely would be a
great contribution to WSIF.
>
> Let me know the procedure to commit it to the CVS.
we have moved now to SVN.
if you are an apache commiter (i was not able to determine that) then WS
PMC can grant you karma to commit or i can apply your code as a patch.
if the contribution is bigger in size and you are not apache commiter i
think we will need signed Contributor License Agreements (and Software
Grant depending on size). see towards the end of
http://www.apache.org/licenses/
thanks,
alek
[1] please do not send MS Word DOC attachment - they are sometimes
filtered and not everybody can read MS Word documents. below is
rendering of ti as HTML (copy and past) for anybody interested:
*WSDL BSF Extension*
1. *Details :*
The BSF binding is a WSDL binding that allows abstract functionality in
the abstract service description (messages, operation and port types) to
be mapped to the functionality offered by Scripts directly. This means
that a script can be described using WSDL, and can be accessed as a
WSDL- described service through WSIF.
This makes use of Bean Scripting Framework (BSF) to provide the
scripting capabilities.
The BSF binding extends WSDL with the following extensibility elements:
<definitions ....>
<!-- BSF binding -->
<binding ...>
<bsf:binding/>
<operation>*
<bsf:operation
methodname="nmtoken"
parameterOrder="nmtoken" ?
returnPart="nmtoken"? />?
<input name="nmtoken"? />?
<output name="nmtoken"? />?
<fault name="nmtoken"? />?
</operation>
</binding>
<service ... >
<port>*
<bsf:script lang="nmtoken"
src="nmtoken"? >
<!--actual script here -- >
</bsf:script>
</port>
</service>
</definitions>
Each element is described in detail below.
* *bsf:binding* This indicates that the binding is a BSF binding.
* *bsf:operation* This element maps an abstract WSDL operation to a
Script method. The methodName attribute specifies the name of the
Script method corresponding to the abstract operation. The
parameterOrder attribute is similar to and overrides the
paramterOrder specification in the abstract operation. It
specifies the ordering of the input message parts for the
invocation; in the BSF binding case it identifies the method
signature. Having a parameterOrder attribute here allows us to map
an abstract operation to a Script method even if their signatures
aren't compatible in the ordering of parts. The returnPart is that
part of the abstract output message which corresponds to the
return value of the Script method.
* *bsf:script* This element is an extension under the WSDL port
element that allows specification of a Script as an endpoint for a
service available via the BSF binding. The port whose address is
specified this way must be associated with a BSF binding only.
The *lang* attribute specifies the scripting engine to be used for
script invocation. The *src* attribute specifies the location of
the script file. The complete script can also be provided instead
as CDATA value for the *bsf:script *element.
2. Example :
In the following example, a dateConversion service is offered through
Java Script. The service exposes *converData* operation which takes
three input parameters (input data string, input dataformat and output
dateformat) and returns the converted date string.
<?xml version='1.0' encoding='UTF-8'?>
<definitions name='DateConversion'
targetNamespace='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
xmlns:tns='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
xmlns:bsf='http://schemas.xmlsoap.org/wsdl/bsf/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<message name='convertDateRequest'>
<part name='dateString' type='xsd:string'/>
<part name='inFormat' type='xsd:string'/>
<part name='outFormat' type='xsd:string'/>
</message>
<message name='convertDateResponse'>
<part name='result' type='xsd:string'/>
</message>
<portType name='DateConversionPortType'>
<operation name='convertDate'>
<input message='tns:convertDateRequest'/>
<output message='tns:convertDateResponse'/>
</operation>
</portType>
<binding name='DateConversionBSFBinding'
type='tns:DateConversionPortType'>
<bsf:binding/>
<operation name="convertDate">
<bsf:operation
methodName="convertDate"
parameterOrder="dateString inFormat outFormat"
returnPart="result" />
<input name="convertDateRequest"/>
<output name="convertDateResponse"/>
</operation>
</binding>
<service name='DateConversion'>
<port name='DateConversionPort'
binding='tns:DateConversionBSFBinding'>
<!-- vendor-specific deployment information needs to be
entered here -->
<bsf:script lang="javascript"
src="C:\\bhuvan\\wsif-2_0\\samples\\bpel\\Test.js"/>
</port>
</service>
</definitions>
--
The best way to predict the future is to invent it - Alan Kay
Re: WSIF extn for BSF
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Bhuvan Gupta wrote:
> Hi All,
>
> We have developed WSIF extensions for BSF (Bean Scripting Framework)
> as part of one of our projects and would like to contribute this to
> the WSIF project.
> Document containing details in attached.
hi Bhuvan,
this looks great (just a minor issues [1]) and definitely would be a
great contribution to WSIF.
>
> Let me know the procedure to commit it to the CVS.
we have moved now to SVN.
if you are an apache commiter (i was not able to determine that) then WS
PMC can grant you karma to commit or i can apply your code as a patch.
if the contribution is bigger in size and you are not apache commiter i
think we will need signed Contributor License Agreements (and Software
Grant depending on size). see towards the end of
http://www.apache.org/licenses/
thanks,
alek
[1] please do not send MS Word DOC attachment - they are sometimes
filtered and not everybody can read MS Word documents. below is
rendering of ti as HTML (copy and past) for anybody interested:
*WSDL BSF Extension*
1. *Details :*
The BSF binding is a WSDL binding that allows abstract functionality in
the abstract service description (messages, operation and port types) to
be mapped to the functionality offered by Scripts directly. This means
that a script can be described using WSDL, and can be accessed as a
WSDL- described service through WSIF.
This makes use of Bean Scripting Framework (BSF) to provide the
scripting capabilities.
The BSF binding extends WSDL with the following extensibility elements:
<definitions ....>
<!-- BSF binding -->
<binding ...>
<bsf:binding/>
<operation>*
<bsf:operation
methodname="nmtoken"
parameterOrder="nmtoken" ?
returnPart="nmtoken"? />?
<input name="nmtoken"? />?
<output name="nmtoken"? />?
<fault name="nmtoken"? />?
</operation>
</binding>
<service ... >
<port>*
<bsf:script lang="nmtoken"
src="nmtoken"? >
<!--actual script here -- >
</bsf:script>
</port>
</service>
</definitions>
Each element is described in detail below.
* *bsf:binding* This indicates that the binding is a BSF binding.
* *bsf:operation* This element maps an abstract WSDL operation to a
Script method. The methodName attribute specifies the name of the
Script method corresponding to the abstract operation. The
parameterOrder attribute is similar to and overrides the
paramterOrder specification in the abstract operation. It
specifies the ordering of the input message parts for the
invocation; in the BSF binding case it identifies the method
signature. Having a parameterOrder attribute here allows us to map
an abstract operation to a Script method even if their signatures
aren't compatible in the ordering of parts. The returnPart is that
part of the abstract output message which corresponds to the
return value of the Script method.
* *bsf:script* This element is an extension under the WSDL port
element that allows specification of a Script as an endpoint for a
service available via the BSF binding. The port whose address is
specified this way must be associated with a BSF binding only.
The *lang* attribute specifies the scripting engine to be used for
script invocation. The *src* attribute specifies the location of
the script file. The complete script can also be provided instead
as CDATA value for the *bsf:script *element.
2. Example :
In the following example, a dateConversion service is offered through
Java Script. The service exposes *converData* operation which takes
three input parameters (input data string, input dataformat and output
dateformat) and returns the converted date string.
<?xml version='1.0' encoding='UTF-8'?>
<definitions name='DateConversion'
targetNamespace='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
xmlns:tns='http://xml.apache.org/axis/wsif/samples/js/DateConversion'
xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
xmlns:bsf='http://schemas.xmlsoap.org/wsdl/bsf/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<message name='convertDateRequest'>
<part name='dateString' type='xsd:string'/>
<part name='inFormat' type='xsd:string'/>
<part name='outFormat' type='xsd:string'/>
</message>
<message name='convertDateResponse'>
<part name='result' type='xsd:string'/>
</message>
<portType name='DateConversionPortType'>
<operation name='convertDate'>
<input message='tns:convertDateRequest'/>
<output message='tns:convertDateResponse'/>
</operation>
</portType>
<binding name='DateConversionBSFBinding'
type='tns:DateConversionPortType'>
<bsf:binding/>
<operation name="convertDate">
<bsf:operation
methodName="convertDate"
parameterOrder="dateString inFormat outFormat"
returnPart="result" />
<input name="convertDateRequest"/>
<output name="convertDateResponse"/>
</operation>
</binding>
<service name='DateConversion'>
<port name='DateConversionPort'
binding='tns:DateConversionBSFBinding'>
<!-- vendor-specific deployment information needs to be
entered here -->
<bsf:script lang="javascript"
src="C:\\bhuvan\\wsif-2_0\\samples\\bpel\\Test.js"/>
</port>
</service>
</definitions>
--
The best way to predict the future is to invent it - Alan Kay