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 <[email protected]>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 >> >> [email protected] 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
