新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     >>W3CHINA.ORG讨论区<<     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> Web服务(Web Services,WS), 语义Web服务(Semantic Web Services, SWS)讨论区: WSDL, SOAP, UDDI, DAML-S, OWL-S, SWSF, SWSL, WSMO, WSML,BPEL, BPEL4WS, WSFL, WS-*,REST, PSL, Pi-calculus(Pi演算), Petri-net,WSRF,
    [返回] W3CHINA.ORG讨论区 - 语义网·描述逻辑·本体·RDF·OWLW3CHINA.ORG讨论区 - Web新技术讨论『 Web Services & Semantic Web Services 』 → 服务发现与匹配系统架构设计——如何用protege的owls-editor奖wsdl转化成owl 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 10335 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: 服务发现与匹配系统架构设计——如何用protege的owls-editor奖wsdl转化成owl 举报  打印  推荐  IE收藏夹 
       本主题类别: Ontology Language | Web Services    
     xufeng5264 帅哥哟,离线,有人找我吗?
      
      
      等级:大一(高数修炼中)
      文章:21
      积分:135
      门派:XML.ORG.CN
      注册:2011/10/17

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给xufeng5264发送一个短消息 把xufeng5264加入好友 查看xufeng5264的个人资料 搜索xufeng5264在『 Web Services & Semantic Web Services 』的所有贴子 引用回复这个贴子 回复这个贴子 查看xufeng5264的博客楼主
    发贴心情 服务发现与匹配系统架构设计——如何用protege的owls-editor奖wsdl转化成owl


    大家好,我现在要开发一个基于语义的服务发现与匹配系统,大家看看我的架构有没有问题?
    此主题相关图片如下:
    按此在新窗口浏览图片

    此主题相关图片如下:
    按此在新窗口浏览图片
    现在遇到了问题,就是如何用owls-editor生成可解析的描述web service的owl文件,我直接单击右下角的import wsdl按钮保存生成的owl文件无法被owls-api解析,
    无法解析首先表现在
    Service service = ont.getService();
    语句得到的service为空(null)
    代码如下:
    package newTest1;
    import java.net.URI;
    import org.mindswap.owl.OWLFactory;
    import org.mindswap.owl.OWLKnowledgeBase;
    import org.mindswap.owl.OWLOntology;
    import org.mindswap.owls.OWLSFactory;
    import org.mindswap.owls.process.Process;
    import org.mindswap.owls.process.execution.ProcessExecutionEngine;
    import org.mindswap.owls.service.Service;
    import org.mindswap.query.ValueMap;

    public class OntoTest {

     public static void main(String[] args)throws Exception {

      URI uri = new URI("http://localhost:8088/newxufeng/shownumber.owl");

            // create a KB  
            OWLKnowledgeBase kb = OWLFactory.createKB();
            
            // set the Reasoner
            kb.setReasoner("Pellet");

            // create a generic reader and a 1.0 writer
            OWLOntology ont = kb.read(uri);
        
            // get the service
            Service service = ont.getService();
            
            // get the process of the service
            Process process = service.getProcess();

            // create an execution engine
            ProcessExecutionEngine exec = OWLSFactory.createExecutionEngine();

            // create an empty value map
            ValueMap values = new ValueMap();
            
            // set the value of input parameter
            values.setDataValue(process.getInput("InputString"), "man");    
            // execute the process with the given input bindings
         
            values = exec.execute(process, values);
        
            // get the output value as a string
            String outValue = values.getStringValue(process.getOutput());
            
            // display the result
            System.out.println("Output = " + outValue);

    大家共同研讨一下吧,因为导出owl文件的方法有误还是代码错误?


       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2011/10/31 14:06:00
     
     hyb22ndf 美女呀,离线,快来找我吧!
      
      
      等级:大一(高数修炼中)
      文章:14
      积分:103
      门派:XML.ORG.CN
      注册:2012/3/1

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给hyb22ndf发送一个短消息 把hyb22ndf加入好友 查看hyb22ndf的个人资料 搜索hyb22ndf在『 Web Services & Semantic Web Services 』的所有贴子 点击这里发送电邮给hyb22ndf  引用回复这个贴子 回复这个贴子 查看hyb22ndf的博客2
    发贴心情 
    我现在也在做这方面的研究——服务匹配的方法研究,很多地方不是很懂,请问能否加为好友,探讨一下,或者说给我指点迷津吧,谢啦,加我QQ吧,754457756

    ----------------------------------------------
    等待就是浪费青春

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2012/3/19 10:54:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 Web Services & Semantic Web Services 』的所有贴子 点击这里发送电邮给Google AdSense  访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/4/20 16:06:13

    本主题贴数2,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    62.500ms