You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Wenfeng ZHAO <zh...@gmail.com> on 2009/10/01 07:47:05 UTC

Re: Is automatic WS composition possible?

Hi Madhaijan,

To 2):   SCQR supports "semantic web service", but uses a rarely seen format
based on Datalog to describe the functionality of services. However, it is
easy to encode it into OWL-S/WSMO, although we haven't done it yet. For
example,
      AmazonBookSearch(title, author, rank)bff :-
        http://examples.org/book#Book(bk),
        http://examples.org/book#hasTitle(bk, title),
        http://examples.org/book#hasAuthor(bk, author),
        http://examples.org/book#hasAmazonRank(bk,rank).
you can find a little explanation to it in ReadMe.txt  given in the
attachment. More examples are provided in the release pack.

To 1):    Any types of services with WSDL description and accessed through
SOAP, regardless of their implementation technique,  can be used in SCQR to
compose more complex services, if its semantic is within the expressivity
reach of SCQR.     That is the service should be a information-providing
service, rather than world-altering one, and correspond to a Conjunctive
Query with Arithmetic Comparisons(CQAC for short) but without arithmetic
comparisons between two variables.

To make SCQR work, what you need to do is creating semantic description as
above for each advertised service, creating semantic-syntactic binding like
below, and creating a semantic description for the requested service. Then
SCQR will create BPEL processes of composition plans!

Binding example:
  <grounding view="AmazonBookSearch" xmlns:amz="
http://webservices.amazon.com/AWSECommerceService/2005-10-13">
    <portType wsdlFileLoc="AWSECommerceService.wsdl">
      amz:AWSECommerceServicePortType
    </portType>
    <operation name="ItemSearch">
      <inputMsg name="ItemSearchRequestMsg">
                <part name="body" element="amz:ItemSearch"/>
      </inputMsg>
      <outputMsg name="ItemSearchResponseMsg">
                <part name="body" element="amz:ItemSearchResponse"/>
      </outputMsg>
    </operation>
    <inputBinding>
      <path  orderInPart="3">body/amz:Request[1]/amz:Title</path>
    </inputBinding>
    <outputBinding>
      <path
orderInPart="1">body/amz:Items[1]/amz:Item[1]/amz:ItemAttributes/amz:Author[*]</path>
      <path
orderInPart="0">body/amz:Items[1]/amz:Item[1]/amz:SalesRank</path>
    </outputBinding>
    <fixedInputs>
      <!--Note the value of the SubscriptionId belongs to my personal Amazon
account:)
          which is given out publicly only to ease the process of
approaching SCQR.
          So please use it moderately. Thanks! --zwf -->
      <valueGiven path="body/amz:SubscriptionId" value="1CXX...XG2"
orderInPart="0"/>
      <valueGiven path="body/amz:Request[1]/amz:SearchIndex" value="Books"
orderInPart="2"/>
      <valueGiven path="body/amz:Request[1]/amz:ResponseGroup[1]"
value="Medium"  orderInPart="1"/>
    </fixedInputs>
    <endpoint serviceQName="amz:AWSECommerceService"
portName="AWSECommerceServicePort"/>
  </grounding>


NOTICE. The expressivity of SCQR is rather limited (remember the NP Hard
essence of the composition problem), which might make it unsuitable for your
requirement. So do not expect too much on it :)

Regards,
Wenfeng

On Thu, Oct 1, 2009 at 12:26 AM, M.Madhaiyan <ma...@gmail.com> wrote:

> hi Wenfeng ZHAO,
>
> Thanks for your information..
>
> do you have any documentation to  understand the flow of your SCQR
> project?.
>
> 1). if i add JAX-WS or C# services in this tool.. will it compose as BPEL
> service..
>
> 2). Will SCQR support semantic web service or syntactic web service?
>
>
> Regards
> M.Madhaiyan
>
> On Wed, Sep 30, 2009 at 7:29 PM, Wenfeng ZHAO <zh...@gmail.com>wrote:
>
>>
>> JVM1.5 or above
>> ODE 1.3.2  (1.3.3 has a little problem)
>> Axis2 1.4
>>
>> B.T.W.  The source codes of OWLS-XPlan (see[2]) also have been published
>> on this site.
>>
>> Thanks for attentions!
>>
>> Wenfeng
>>
>>
>>
>> On Wed, Sep 30, 2009 at 9:43 PM, M.Madhaiyan <ma...@gmail.com> wrote:
>>
>>> hi Wenfeng ZHAO,
>>>
>>> Thanks for your valuable information...  can you send the system
>>> requirements for this project..
>>>
>>> Regards
>>> M.Madhaiyan
>>>
>>> On Tue, Sep 29, 2009 at 8:08 AM, Wenfeng ZHAO <zh...@gmail.com>wrote:
>>>
>>>> Hello M.Madhaiyan,
>>>>
>>>> Although this topic has no relation with ODE, yet I happen to have
>>>> learned something about it and I'd like to share my view to it in the
>>>> following.
>>>>
>>>> I believe it is possible, but rarely efficient enough to be used in real
>>>> world. Given additional functionality description, usually in form of
>>>> Precondition&Effect, to WS - both requested and advertised - the problem can
>>>> be reduced to AI planning problem[1][2] as well as automatic theorem proving
>>>> problem[1]. And one can also build an automatic composition system from
>>>> scratch by searching in the state space of the problem[3][4][5]. But the
>>>> essence of the problem that it is at least NP-Hard causes a situation that
>>>> such systems are either of rich expressivity but bad performance, or of poor
>>>> expressivity but good performance. In my opinion, how to balance
>>>> expressivity and computing complexity is a critical issue for this problem,
>>>> especially when the target domain is given.
>>>>
>>>> There are some surveys on this topic, of which I found [1][6][7] are
>>>> useful to me.
>>>>
>>>> Recently I've designed and implemented a new type of automatic
>>>> composition system for information-providing WS, SCQR, which is based on a
>>>> query rewriting algorithm MiniCon[8][9] from Data Integration domain, which
>>>> can automatically create BPEL processes of composition plans that can be
>>>> deployed directly on ODE1.3.2. Although its completeness is worse than
>>>> previous methods, the performance is rather exciting. It can get first 20
>>>> solutions out of a repository containing 1000 services in less than 10s for
>>>> a typical request/services combination. You can download the source codes
>>>> from http://semwebcentral.org/projects/scqr/ and try it according to
>>>> the specification in ReadMe.txt. Sorry that a paper explaining it in English
>>>> is not available now.
>>>>
>>>> Note the methods I said  all aim at stateless WS, and there are some
>>>> work aiming at statful WS which are referenced in [6] as "Behavior-Based
>>>> Service Composition".
>>>>
>>>> [1](2004-SWSWPC-RaoJH)A Survey of Automated Web Service Composition
>>>> Methods
>>>> [2] Klusch M. and Gerber A.  Semantic web service composition planning
>>>> with OWLS-XPlan. In: the 1st Int. AAAI Fall Symposium on Agents and the
>>>> Semantic Web. 2005.
>>>> [3]     Kona S, Bansal A, Gupta G, et al.  Automatic Composition of
>>>> Semantic Web Services. In: 2007 IEEE Int’l Conf. on Web Services (ICWS
>>>> 2007), Salt Lake City, 2007.
>>>> [4]     Liu Z, Ranganathan A, and Riabov A.  ModelingWeb Services using
>>>> Semantic Graph Transformations to aid Automatic Composition. In: 2007 IEEE
>>>> Int’l Conf. on Web Services (ICWS 2007), Salt Lake City, 2007.
>>>> [5]     Ambite, J.L. and Kapoor D. Automatically Composing Data
>>>> Workflows with Relational Descriptions and Shim Services, in The 6th Int’l
>>>> Semantic Web Conf. (ISWC 2007). 2007: Busan, Korea.
>>>> [6](2005-wshp-Kuster-24)A classification of issues and approaches in
>>>> automatic service composition
>>>> [7](2005-rpt-Peer-64)Web service composition as ai planning - a survey
>>>> [8]Pottinger R. and Halevy A.  MiniCon: a scalable algorithm for
>>>> answering queries using views. The Int’l Journal on Very Large Data Bases,
>>>> 2001, 10(2-3): 182-198.
>>>> [9]Afrati F, Li C and Mitra P, Rewriting queries using views in the
>>>> presence of arithmetic comparisons. Theoretical Computer Science, Dec 2006,
>>>> 368(1-2):88-123.
>>>>
>>>>
>>>> Thanks for reading
>>>>
>>>> Wenfeng
>>>>
>>>> =======On 2009-09-29 at 01:17:06 M.Madhaiyan wrote: =======
>>>>
>>>> >hi.
>>>> >i am doing project in anna university, chennai, india. during my first
>>>> >review, the project reviewers asked me to do the web service
>>>> composition
>>>> >automatically.
>>>> >
>>>> >In BPEL we have to hard code the composition of various services, but
>>>> the
>>>> >execution is dynamic.. it depends on the user input.
>>>> >
>>>> >I need the composition should be automatic one.. is there any
>>>> approach.. plz
>>>> >help me..
>>>> >
>>>> >Regards
>>>> >M.Madhaiyan
>>>> >
>>>> >On Mon, Sep 28, 2009 at 4:08 PM, Tammo van Lessen <
>>>> tvanlessen@gmail.com>wrote:
>>>> >
>>>> >> Hi,
>>>> >>
>>>> >> looks like a namespace issue. The name element you're creating in
>>>> your
>>>> >> literal-copy is not in the null-namespace but rather in the BPEL
>>>> >> namespace (the default namespace), which is wrong. Try the following
>>>> >> literal assign expression:
>>>> >>
>>>> >> <literal>
>>>> >>    <ns2:hello xmlns:ns2="http://hello.netbureau.it/">
>>>> >>         <name xmlns=""/>
>>>> >>    </ns2:hello>
>>>> >> </literal>
>>>> >>
>>>> >> HTH,
>>>> >>  Tammo
>>>> >>
>>>> >> ytrewq2002@libero.it wrote:
>>>> >> > hi,
>>>> >> >
>>>> >> >
>>>> >> > this is the correct soap msg i have to send to an external
>>>> webservice
>>>> >> HelloWs and it works:
>>>> >> >
>>>> >> > <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
>>>> xmlns:soapenv="
>>>> >> http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns2:hello
>>>> >> xmlns:ns2="http://hello.netbureau.it/
>>>> >> "><name>pippo</name></ns2:hello></soapenv:Body></soapenv:Envelope>
>>>> >> >
>>>> >> > so i try to call with invoke ina  bpel process:
>>>> >> >
>>>> >> > valuating FROM expression "{Literal <?xml version="1.0"
>>>> >> encoding="UTF-8"?>
>>>> >> > <literal xmlns="
>>>> http://docs.oasis-open.org/wsbpel/2.0/process/executable
>>>> >> ">
>>>> >> > <ns2:hello xmlns:ns2="http://hello.netbureau.it/">
>>>> >> >    <name/>
>>>> >> > </ns2:hello>
>>>> >> > </literal>}".
>>>> >> >
>>>> >> > This is the firts part of intialize a variable HelloIn that is the
>>>> input
>>>> >> of invoke.
>>>> >> > defining a literal for instanciate a message to send is ok but in
>>>> the
>>>> >> second step why when i copy this into the HelloIn variable whose type
>>>> is
>>>> >> hello it give me a different soap message ( ns2: namespace prefix
>>>> disappear
>>>> >> and also the tag name get a bpel namespace..this is not correct!)
>>>> >> >
>>>> >> > ASSIGN Writing variable 'HelloIn' value '<?xml version="1.0"
>>>> >> encoding="UTF-8"?>
>>>> >> > <message><parameters><hello xmlns="http://hello.netbureau.it/">
>>>> >> > <name xmlns="
>>>> http://docs.oasis-open.org/wsbpel/2.0/process/executable"/>
>>>> >> >  </hello></parameters></message>'
>>>> >> >
>>>> >> > this is wrong.. why???? so i get a SelectionFailure exception when
>>>> i try
>>>> >> to write into HelloIn..
>>>> >> >
>>>> >> > :(
>>>> >> >
>>>> >> > my wsdl contain <types> <schema....
>>>> >> > and elementFormDefault= "unqualified"
>>>> >> > instead bpel schema is qualified and so tns:input is the input of
>>>> bpel
>>>> >> process (Caller.bpel), that is:
>>>> >> >
>>>> >> > message><payload><CallerRequest xmlns="http://MyTest.com/Test"
>>>> xmlns:S="
>>>> >> http://schemas.xmlsoap.org/soap/envelope/"><input xmlns="
>>>> >> http://MyTest.com/Test
>>>> ">pippo</input></CallerRequest></payload></message>
>>>> >> >
>>>> >> >
>>>> >> > Can help me?
>>>> >> >
>>>> >> > this is the bpel:
>>>> >> >
>>>> >> > <process
>>>> >> >     name="Caller"
>>>> >> >     targetNamespace="http://hello.netbureau.it/"
>>>> >> >     xmlns="
>>>> http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>>>> >> >     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>> >> >     xmlns:sxt="
>>>> >> http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace"
>>>> >> >     xmlns:sxed="
>>>> >> http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor
>>>> "
>>>> >> >     xmlns:tns="http://MyTest.com/Test"
>>>> >> >     xmlns:ns2="http://hello.netbureau.it/">
>>>> >> >
>>>> >> >     <!--schema def for bpel, adding to process tag-->
>>>> >> >     <!--xsd:schemaLocation="ws_bpel_executable.xsd"-->
>>>> >> >
>>>> >> >      <!-- wsdl Caller + partnerLink defintion-->
>>>> >> >     <import namespace="http://MyTest.com/Test"
>>>> location="Caller.wsdl"
>>>> >> importType="http://schemas.xmlsoap.org/wsdl/"/>
>>>> >> >      <!-- wsdl Ws Helloname + PartenrLinkType definition-->
>>>> >> >     <import namespace="http://hello.netbureau.it/"
>>>> >> location="Helloname.wsdl" importType="
>>>> http://schemas.xmlsoap.org/wsdl/"/>
>>>> >> >     <!-- xsd xhema for HellonameWs -->
>>>> >> >     <!--import namespace="http://hello.netbureau.it/"
>>>> >> location="Helloname.xsd" importType="
>>>> http://www.w3.org/2001/XMLSchema"/-->
>>>> >> >     <partnerLinks>
>>>> >> >         <partnerLink name="HelloWs" partnerLinkType="ns2:Helloname"
>>>> >> partnerRole="WriteHelloMsgRole"/>
>>>> >> >         <partnerLink name="Caller" partnerLinkType="tns:Caller"
>>>> >> myRole="CallerProvider"/>
>>>> >> >     </partnerLinks>
>>>> >> >     <variables>
>>>> >> >         <variable name="CallerOut"
>>>> >> messageType="tns:CallerResponseMessage"/>
>>>> >> >         <variable name="HelloOut" messageType="ns2:helloResponse"/>
>>>> >> >         <variable name="HelloIn" messageType="ns2:hello" />
>>>> >> >         <variable name="ProcessIn"
>>>> >> messageType="tns:CallerRequestMessage"/>
>>>> >> >     </variables>
>>>> >> >     <sequence>
>>>> >> >         <receive name="ReceiveFromclient"
>>>> >> >         createInstance="yes"
>>>> >> >         partnerLink="Caller"
>>>> >> >         operation="process" xmlns:tns="http://MyTest.com/Test"
>>>> >> >         portType="tns:Caller"
>>>> >> >         variable="ProcessIn"/>
>>>> >> >         <assign name="Assign1">
>>>> >> >             <copy>
>>>> >> > <!-- first part soap message correct-->
>>>> >> >                 <from>
>>>> >> >                     <literal>
>>>> >> >                         <ns2:hello xmlns:ns2="
>>>> http://hello.netbureau.it/
>>>> >> ">
>>>> >> >                             <name/>
>>>> >> >                         </ns2:hello>
>>>> >> >                     </literal>
>>>> >> >                 </from>
>>>> >> > <!-- second part soap message wrong -->
>>>> >> >                 <to variable="HelloIn" part="parameters"></to>
>>>> >> >             </copy>
>>>> >> >             <copy>
>>>> >> >                 <from>$ProcessIn.payload/tns:input</from>
>>>> >> >                 <to>$HelloIn.parameters/name</to>
>>>> >> >             </copy>
>>>> >> >         </assign>
>>>> >> >         <invoke name="InvokeHelloname"
>>>> >> >         partnerLink="HelloWs"
>>>> >> >         operation="hello"
>>>> >> >         portType="ns2:Helloname"
>>>> >> >         inputVariable="HelloIn"
>>>> >> >         outputVariable="HelloOut"/>
>>>> >> >         <assign name="Assign2">
>>>> >> >             <copy>
>>>> >> >                 <from>
>>>> >> >                     <literal>
>>>> >> >                         <tns:CallerResponse>
>>>> >> >                             <tns:result/>
>>>> >> >                         </tns:CallerResponse>
>>>> >> >                     </literal>
>>>> >> >                 </from>
>>>> >> >                 <to part="payload" variable="CallerOut"/>
>>>> >> >             </copy>
>>>> >> >             <copy>
>>>> >> >                 <!-- this is work fine without namespace(it depends
>>>> on
>>>> >> web service response)-->
>>>> >> >                 <from>$HelloOut.parameters/return</from>
>>>> >> >                 <to>$CallerOut.payload/tns:result</to>
>>>> >> >             </copy>
>>>> >> >         </assign>
>>>> >> >         <reply name="ReplyToClient" partnerLink="Caller"
>>>> >> operation="process" portType="tns:Caller" variable="CallerOut"/>
>>>> >> >     </sequence>
>>>> >> >
>>>> >> > </process>
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Tammo van Lessen - http://www.taval.de
>>>> >>
>>>> >
>>>>
>>>> = = = = = = = = = = = = = = = = = = = =
>>>> ZHAO Wenfeng (赵文峰)
>>>> Ph.D. Candidate
>>>> http://www.bupt.edu.cn
>>>>
>>>>
>>>
>>
>>
>> --
>> = = = = = = = = = = = = = = = = = = = =
>> ZHAO Wenfeng (赵文峰)
>> Ph.D. Candidate
>> http://www.bupt.edu.cn
>>
>>
>


-- 
= = = = = = = = = = = = = = = = = = = =
ZHAO Wenfeng (赵文峰)
Ph.D. Candidate
http://www.bupt.edu.cn