19
Jan

jdeveloper 11g ve tuscany

   Posted by: Muhammed YÜRÜRDURMAZ   in Bilgi Ve Deneyim

önce indirin

yeni bir proje oluşturun

tuscany jarlarını projeye ekleyin

interface ve implementation kodları

package com.aaa.testsca002;
import javax.jws.WebService;
@WebService
public interface IMerhabDunya {
public String getResponse(String message);
}
//-------------------
package com.aaa.testsca002;
import javax.jws.WebService;
@WebService
public class MerhabaDunya implements IMerhabDunya {
public MerhabaDunya() {
super();
}
public String getResponse( String message){
return message;
}
}

deneme.composite dosyası

<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns//1.0"
targetNamespace="http://debish"
name="deneme">
<service name="HelloWorldService" promote="HelloWorldComponent">
<interface. interface="com.aaa.testsca002.IMerhabDunya" />
<binding.ws />
</service>
<component name="HelloWorldComponent">
<implementation.  class="com.aaa.testsca002.MerhabaDunya"  />
</component>
</composite>

Ve çalıştırma class ı

package com.aaa.testsca002;
import org.apache.tuscany.sca.host.embedded.SCADomain;
public class DenemeMain {
public DenemeMain() {
super();
}
public final static void main(String[] args) throws Exception {
SCADomain scaDomain = SCADomain.newInstance("deneme.composite");
MerhabaDunya helloworld = scaDomain.getService(MerhabaDunya.class, "HelloWorldComponent");
while(true){
Thread.sleep(1000);
if(false)
break;
}
scaDomain.close();
}
}

project properties > compiler > copy file types to output directory alanına .composite ekle

ve çalıştırma class ını çalıştır.

loglarda servis adresi görünüyor servisi test edebilirsiniz.

Not tuscany 1.5 ile denenmiştir.

Bookmark and Share
Tags: , , , , ,

Tags: , , , , ,

This entry was posted on Tuesday, January 19th, 2010 at 20:10 and is filed under Bilgi Ve Deneyim. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Cevap veya Yorum Yaz

İsminiz
e-Mail (Burada yayınlanmayacak endişelenmeyin)
Web Siteniz
Yorumunuz

Switch to our mobile site