diff --git a/src/fr/inrialpes/exmo/align/service/WSAServProfile.java b/src/fr/inrialpes/exmo/align/service/WSAServProfile.java index 7411f32aca811ec77e6d76ca1bf674bbae489529..1a519cb14ecad437f4e98aed4002fffc6ce916c0 100644 --- a/src/fr/inrialpes/exmo/align/service/WSAServProfile.java +++ b/src/fr/inrialpes/exmo/align/service/WSAServProfile.java @@ -334,6 +334,57 @@ public class WSAServProfile implements AlignmentServiceProfile { msg += displayAnswer( answer ); } msg += "</matchResponse>"; + } else if ( method.equals("align") ) { // URL * URL * (params) -> URI + Parameters params = new BasicParameters(); + Message answer = null; + msg += "<alignResponse>"; + + getParameter( domMessage, message, params, "url1", "onto1" ); + if ( params.getParameter( "onto1" ) == null ) { + answer = new NonConformParameters(0,(Message)null,myId,"",message,(Parameters)null); + } + + getParameter( domMessage, message, params, "url2", "onto2" ); + if ( params.getParameter( "onto2" ) == null ) { + answer = new NonConformParameters(0,(Message)null,myId,"",message,(Parameters)null); + } + + getParameter( domMessage, message, params, "method", "method" ); + //getParameter( domMessage, message, params, "force", "force" ); + if ( params.getParameter( "method" ) == null ) { + params.setParameter( "method", "fr.inrialpes.exmo.align.impl.method.EditDistNameAlignment" ); + + } + + if ( answer == null ) { + Message result = manager.align( new Message(newId(),(Message)null,myId,serverURL,"", params) ); + if ( result instanceof ErrorMsg ) { + answer = result; + + } else { + params = new BasicParameters(); + params.setParameter( "id", result.getContent() ); + //System.out.println("The ID is: "+result.getContent()); + if ( params.getParameter( "id" ) == null ) { + answer = new NonConformParameters(0,(Message)null,myId,"",message,(Parameters)null); + } + params.setParameter( "method", "fr.inrialpes.exmo.align.impl.renderer.RDFRendererVisitor" ); + if ( answer == null ) + answer = manager.render( new Message(newId(),(Message)null,myId,serverURL, "", params) ); + } + } + + if ( answer instanceof ErrorMsg ) { + msg += displayError( answer ); + + } else { + // JE: Depending on the type we should change the MIME type + // This should be returned in answer.getParameters() + // JE: This should also suppress the <?xml... statement + msg += "<result>" + answer.getContent() + "</result>"; + msg += displayAnswer( answer ); + } + msg += "</alignResponse>"; } else if ( method.equals("findRequest") ) { // URI * URI -> List of URI Parameters params = new BasicParameters(); Message answer = null; diff --git a/src/fr/inrialpes/exmo/align/service/aserv.wsdl b/src/fr/inrialpes/exmo/align/service/aserv.wsdl index 7e7e147753b3f79c59c9e0894cdc895034f3e52b..79be8d5f5e2422e27032654c3622f6df6d9a55f6 100644 --- a/src/fr/inrialpes/exmo/align/service/aserv.wsdl +++ b/src/fr/inrialpes/exmo/align/service/aserv.wsdl @@ -46,6 +46,15 @@ <wsdl:part name="alid" type="xsd:string"/> </wsdl:message> + <wsdl:message name="align"> <!-- JE : URI --> + <wsdl:part name="url1" type="xsd:string"/> + <wsdl:part name="url2" type="xsd:string"/> + <!-- JE: beware, this one should at least have parameters --> + </wsdl:message> + <wsdl:message name="alignResponse"> <!-- JE: XML --> + <wsdl:part name="alignment" type="xsd:string"/> + </wsdl:message> + <wsdl:message name="metadataRequest"> <!-- JE : URI --> <wsdl:part name="alid" type="xsd:string"/> <wsdl:part name="key" type="xsd:string"/> @@ -153,10 +162,14 @@ <wsdl:input message="impl:translateRequest" name="translateRequest"/> <wsdl:output message="impl:translateResponse" name="translateResponse"/> </wsdl:operation> - <wsdl:operation name="match" parameterOrder="url1 url2 uri alid force params"> + <wsdl:operation name="match" parameterOrder="url1 url2 method alid force params"> <wsdl:input message="impl:matchRequest" name="matchRequest"/> <wsdl:output message="impl:matchResponse" name="matchResponse"/> </wsdl:operation> + <wsdl:operation name="align" parameterOrder="url1 url2"> + <wsdl:input message="impl:align" name="align"/> + <wsdl:output message="impl:alignResponse" name="alignResponse"/> + </wsdl:operation> <wsdl:operation name="cut" parameterOrder="alid method threshold"> <wsdl:input message="impl:cutRequest" name="cutRequest"/> <wsdl:output message="impl:cutResponse" name="cutResponse"/> @@ -275,6 +288,15 @@ <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:http://exmo.inrialpes.fr/align/service" use="encoded"/> </wsdl:output> </wsdl:operation> + <wsdl:operation name="align"> + <wsdlsoap:operation soapAction=""/> + <wsdl:input name="align"> + <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:http://exmo.inrialpes.fr/align/service" use="encoded"/> + </wsdl:input> + <wsdl:output name="alignResponse"> + <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:http://exmo.inrialpes.fr/align/service" use="encoded"/> + </wsdl:output> + </wsdl:operation> <wsdl:operation name="cut"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="cutRequest">