<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1110217236838726038</id><updated>2011-09-10T03:25:14.811-07:00</updated><category term='Seminer'/><category term='Spring Web Services'/><title type='text'>Shared Experience</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://demirm.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1110217236838726038/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://demirm.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>mdemir</name><uri>http://www.blogger.com/profile/18166494826796405673</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://1.bp.blogspot.com/_biu-4xlxrHQ/SjihHD7qVMI/AAAAAAAAAIY/hwVCV5OjOdE/S220/Untitled-1.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1110217236838726038.post-8842953561807499518</id><published>2010-11-02T05:40:00.000-07:00</published><updated>2010-11-02T05:51:06.978-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Seminer'/><title type='text'>Ege Üniversitesi Java Günü</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_TpkS7DGDKiQ/TM6_w30N-lI/AAAAAAAAj00/nY6IOY8_FV0/s320/ceturk-ege-universitesi-java-gunu-banner-2010-b.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 210px;" src="http://1.bp.blogspot.com/_TpkS7DGDKiQ/TM6_w30N-lI/AAAAAAAAj00/nY6IOY8_FV0/s320/ceturk-ege-universitesi-java-gunu-banner-2010-b.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Uzun bir aradan sonra yine yeniden JAVA günü:)&lt;br /&gt;&lt;br /&gt;6 Kasım'da Ege Üniversitesi'nde düzenlenecek &lt;a href="http://www.ceturk.com/"&gt;CETURK&lt;/a&gt; Java Günü etkinliğinde ben de "&lt;span style="font-weight: bold;"&gt;Eclipse - İhtiyacınız Olan Tek IDE&lt;/span&gt;" isimli bir sunum yapacağım. İzmir'de görüşmek üzere...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Etkinlik Programı&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;10:00-10:15     Açılış Konuşması     Ege Üniversitesi Bilgisayar Mühendisliği&lt;br /&gt;10:15-10:30     CETURK     Mehmet ACA&lt;br /&gt;10:30-11:45     Veritabanı Temel Kavramları ve ORACLE Veritabanına Genel Bakış     Talip Hakan ÖZTÜRK&lt;br /&gt;11:45-12:00     Ara &lt;br /&gt;12:00-13:15     Java Distributed Cache     Talip ÖZTÜRK&lt;br /&gt;13:15-14:15     Öğlen Arası &lt;br /&gt;14:15-15:30     Java Geliştiricileri için Kullanışlı Araçlar     Okan KAHRAMAN&lt;br /&gt;15:30-15:45     Ara &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;15:45-17:00     Eclipse – İhtiyacınız Olan Tek IDE     Mustafa DEMİR&lt;/span&gt;&lt;br /&gt;17:15-17:30     Ara &lt;br /&gt;17:30-18:00     Panel – Java , Oracle ve Kariyer     Tüm Konuşmacılar&lt;br /&gt;18:00-18:15     Kitap Çekilişi&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1110217236838726038-8842953561807499518?l=demirm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://demirm.blogspot.com/feeds/8842953561807499518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1110217236838726038&amp;postID=8842953561807499518' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1110217236838726038/posts/default/8842953561807499518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1110217236838726038/posts/default/8842953561807499518'/><link rel='alternate' type='text/html' href='http://demirm.blogspot.com/2010/11/ege-universitesi-java-gunu.html' title='Ege Üniversitesi Java Günü'/><author><name>mdemir</name><uri>http://www.blogger.com/profile/18166494826796405673</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://1.bp.blogspot.com/_biu-4xlxrHQ/SjihHD7qVMI/AAAAAAAAAIY/hwVCV5OjOdE/S220/Untitled-1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_TpkS7DGDKiQ/TM6_w30N-lI/AAAAAAAAj00/nY6IOY8_FV0/s72-c/ceturk-ege-universitesi-java-gunu-banner-2010-b.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1110217236838726038.post-354506317607830079</id><published>2009-06-30T01:48:00.000-07:00</published><updated>2009-06-30T01:58:56.737-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Seminer'/><title type='text'>CETURK Java Teknolojileri Etkinliği 7 - İstanbul</title><content type='html'>Geçtiğimiz günlerde Ankara'da ODTU KKM'de yapılan CETURK Java Teknolojileri etkinliğinin tekrarını bu kez İstanbul'da IBM'de gerçekleştiriyoruz. Etkinlik detaylarını incelemek ve kayıt işlemleri için CETURK etkinlik sayfasına &lt;a href="http://www.ceturk.com/etkinlikkayit.asp?id=75"&gt;buradan &lt;/a&gt;ulaşabilirsiniz.&lt;br /&gt;&lt;br /&gt;Java'ya gönül veren, azda olsa tozunu yutmuş :) katılımcılar ile birlikte verimli bir etkinlik geçirmemiz dileğiyle, 04.07.2009 cumartesi günü IBM Türk binasında görüşmek üzere...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1110217236838726038-354506317607830079?l=demirm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://demirm.blogspot.com/feeds/354506317607830079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1110217236838726038&amp;postID=354506317607830079' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1110217236838726038/posts/default/354506317607830079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1110217236838726038/posts/default/354506317607830079'/><link rel='alternate' type='text/html' href='http://demirm.blogspot.com/2009/06/ceturk-java-teknolojileri-etkinligi-7.html' title='CETURK Java Teknolojileri Etkinliği 7 - İstanbul'/><author><name>mdemir</name><uri>http://www.blogger.com/profile/18166494826796405673</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://1.bp.blogspot.com/_biu-4xlxrHQ/SjihHD7qVMI/AAAAAAAAAIY/hwVCV5OjOdE/S220/Untitled-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1110217236838726038.post-591466893509190392</id><published>2009-06-17T04:38:00.001-07:00</published><updated>2010-11-02T05:58:45.759-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Spring Web Services'/><title type='text'>Spring Web Services Framework - Details</title><content type='html'>Before going into implementation details, lets cover some spring web services concepts.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-size:100%;" &gt;WebServiceMessage&lt;/span&gt;&lt;br /&gt;A webServiceMessage represents the platform independent XML message. Related interface (&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;org.springframework.ws.WebServiceMessage&lt;/span&gt;&lt;/span&gt;) contains  methods for getting the payload of the request. When developing web services using spring web services framework, you generally deal with the payload of the message. If you need to access the SOAP specific part of the message, then all you need is to cast the web service message to the SoapMessage.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-size:100%;" &gt;SoapMessage&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;org.springframework.ws.soap.SoapMessage&lt;/span&gt;&lt;/span&gt; class extends the &lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;org.springframework.ws.WebServiceMessage&lt;/span&gt; &lt;span style="font-family:times new roman;"&gt;&lt;/span&gt;&lt;/span&gt;interface for accessing the SOAP headers, attachments etc.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;Message Factories&lt;/span&gt;&lt;br /&gt;To create empty web service messages, it is required to configure a message factory. These classes also help us with generating web service messages from different input streams, such as from &lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;java.io.File&lt;/span&gt;&lt;/span&gt;. Message factories must implement the &lt;span style="font-size:85%;"&gt;&lt;code style="font-family: courier new;" class="interfacename"&gt;WebServiceMessageFactory&lt;/code&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;interface. There are two concreate implementation of this interface.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;org.springframework.ws.soap.saaj.SaajSoapMessageFactory&lt;/li&gt;&lt;li&gt;org.springframework.ws.soap.axiom.AxiomSoapMessageFactory&lt;/li&gt;&lt;/ul&gt;Former uses SAAJ(SOAP Attachements API for JAVA). This standart is a part of JEE 1.4 so it is most supportable API for most application servers. But there is one handicap using SAAJ. It uses DOM(Document Object Model) API and SOAP messages are kept in memory. For applications sending and receiving large web service messages, as you guess, there will be some performance&amp;amp;memory problems:)&lt;br /&gt;Latter uses AXis 2 Object Model to create web service messages. AXIOM is based on STAX(Streaming API for XML) API and hence can be more efficient for larger xml messages.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-size:100%;" &gt;MessageContext&lt;/span&gt;&lt;br /&gt;Client request some information and server responses the requested information. In spring web services, this conversation is kept in MessageContext. Both web service request and response can be accessable from concreate implementation of MessageContext interface.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-size:100%;" &gt;Transport Context&lt;/span&gt;&lt;br /&gt;Sometimes, you need to access to the connection layer. In spring ws, you can get current connection via &lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;org.springframework.ws.transport.context.TransportContextHolder&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;public WebServiceConnection getWebServiceConnection(){&lt;br /&gt;TransportContext transportContext = TransportContextHolder.getTransportContext();&lt;br /&gt;return transportContext.getConnection();&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Now we can get the remote address of the client after casting the webServiceConnection to the appropriate transport class.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;public String getClientIP(){&lt;br /&gt;HttpServletConnection httpServletConnection = (HttpServletConnection) getWebServiceConnection();&lt;br /&gt;return httpServletConnection.getHttpServletRequest().getRemoteAddr();&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;Transport &lt;span style="font-size:100%;"&gt;Types&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Why spring ws cares xml payload instead of request URL? Answer is quite simple. Because it supports multiple transport mechanisms. If it supports only HTTP Transport, then dealing with request URL is enough. So lets look at all supportable transports in brief.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;HTTP Transport&lt;/li&gt;&lt;li&gt;JMS Transport&lt;/li&gt;&lt;li&gt;E-Mail Transport&lt;/li&gt;&lt;li&gt;Embedded HTTP Server Transport&lt;/li&gt;&lt;/ol&gt;Widely used one is the HTTP Transport. Requests are taken by servlets (dispatcher servlets). In your web.xml file, add a servlet definition like below.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;web-app&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;servlet&amp;gt;&lt;br /&gt;&amp;lt;servlet-name&amp;gt;spring-ws&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;&amp;lt;servlet-class&amp;gt;&lt;br /&gt;org.springframework.ws.transport.http.MessageDispatcherServlet&lt;br /&gt;&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;&amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/servlet&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;&amp;lt;servlet-name&amp;gt;spring-ws&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;&amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/web-app&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Spring web services doesn't let us deep into SOAP or WSDL details. We only deal with data contract (Xml Schema Definition). Spring ws has automatic wsdl publishing feature. When application context starts up, it look for wsdl bean definitions. Found bean definitions are exposed as wsdl with their bean names. For example in our spring-ws.servlet.xml file contains such a bean definition:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;bean id="orders"&lt;br /&gt;class="org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition"&amp;gt;&lt;br /&gt;&amp;lt;constructor-arg value="/WEB-INF/wsdl/Orders.wsdl"/&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Orders.wsdl can be accessed via URL:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;http://localhost:8080/spring-ws/orders.wsdl&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This code is taken from reference documentation and expose existing wsdl file to the clients.However, in our sample application, we are going to publish our wsdl using only data contract file.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-size:100%;" &gt;Endpoints&lt;/span&gt;&lt;br /&gt;Webservice messages are delivered to these points. They supply the related data for business layer by extracting the information from web service messages. Endpoints implement the PayloadEndpoint interface.&lt;br /&gt;But sometimes, if you need to access message context in your endpoints, then your class should implement the MessageEndpoint interface. By accessing to message context, it is possible to access entire message including the SOAP header which means we can get SOAP header and attachments.&lt;br /&gt;&lt;br /&gt;There are different abstract endpoint classes that we can implement based on whether we will use OXM(Object XML Mapping) or not.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;AbstractDomPayloadEndpoint - uses W3C DOM API&lt;/li&gt;&lt;li&gt;AbstractJDomPayloadEndpoint - uses JDOM API&lt;/li&gt;&lt;li&gt;AbstractXomPayloadEndpoint - uses XOM API&lt;/li&gt;&lt;li&gt;and other XML API's Payload Endpoint Interfaces&lt;/li&gt;&lt;/ol&gt;If you are using OXM, then your endpoint classes implement the AbstractMarshallingPayloadEndpoint interaface.&lt;br /&gt;&lt;br /&gt;All these interfaces has a invokeInternal method. Method result and arguements change according to related API. If it is AbstractMarshallingPayloadEndpoint, then method result and method arguement, as you guess, &lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;java.lang.Object&lt;/span&gt;&lt;/span&gt; (Marshalled/Unmarshalled XML Request/Response).&lt;br /&gt;&lt;br /&gt;After J2EE 1.5, annotations are part of our development life. Spring ws also supports annotation based endpoint configuration. To do this, we mark our classes with &lt;span style=";font-family:courier new;font-size:85%;"  &gt;@Endpoint&lt;/span&gt; annotation. if we extend our endpoints from abstract classes (using inheritance), invokeInternal method will be invoked when request arrives. But when we configure our endpoints using &lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;@Endpoint&lt;/span&gt;&lt;/span&gt; annotation, it is possible to handle more than one request. At this point, we use &lt;span style=";font-family:courier new;font-size:85%;"  &gt;@PayloadRoot&lt;/span&gt; method annotation. PayloadRoot annotation maps requests to the method by looking at the root element of the payload. For instance, an orderRequest arrives to the endpoint with the following structure:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&amp;gt;&lt;br /&gt;&amp;lt;SOAP-ENV:Body&amp;gt;&lt;br /&gt;&amp;lt;orderRequest xmlns="http://samples" id="42"/&amp;gt;&lt;br /&gt;&amp;lt;/SOAP-ENV:Body&amp;gt;&lt;br /&gt;&amp;lt;/SOAP-ENV:Envelope&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And our end point is configured as below:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;package samples;&lt;br /&gt;&lt;br /&gt;import org.springframework.ws.server.endpoint.annotation.Endpoint;&lt;br /&gt;import org.springframework.ws.server.endpoint.annotation.PayloadRoot;&lt;br /&gt;&lt;br /&gt;@Endpoint&lt;br /&gt;public class AnnotationOrderEndpoint {&lt;br /&gt;private final OrderService orderService;&lt;br /&gt;&lt;br /&gt;public AnnotationOrderEndpoint(OrderService orderService) {&lt;br /&gt;this.orderService = orderService;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@PayloadRoot(localPart = "orderRequest", namespace = "http://samples")&lt;br /&gt;public Order getOrder(OrderRequest orderRequest) {&lt;br /&gt;return orderService.getOrder(orderRequest.getId());&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@PayloadRoot(localPart = "order", namespace = "http://samples")&lt;br /&gt;public void order(Order order) {&lt;br /&gt;orderService.createOrder(order);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Endpoint looks the namespace and localpart of the payload(in this example orderRequest element - root element of the SOAP Body) and delegates message to our &lt;span style="font-style: italic;"&gt;getOrder&lt;/span&gt; method.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;Endpoint Mappings&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;Taken requests are mapped to the endpoints in three way:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0); font-style: italic;font-size:100%;" &gt;PayloadRootQNameEndpointMapping&lt;/span&gt;&lt;br /&gt;This type of mapping is done by looking at the qualified name of the root element of the payload.&lt;br /&gt;&lt;br /&gt;In above orderRequest, root element of the payload (SOAP Body) is orderRequest element.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;orderRequest xmlns="http://samples" id="42"/&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Endpoint mapping configuration is done by adding related bean to our springws-servlet.xml.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;bean id="endpointMapping" class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping"&amp;gt;&lt;br /&gt;&amp;lt;property name="mappings"&amp;gt;&lt;br /&gt;  &amp;lt;props&amp;gt;&lt;br /&gt;      &amp;lt;prop key="{http://samples}orderRequest"&amp;gt;getOrderEndpoint&amp;lt;/prop&amp;gt;&lt;br /&gt;      &amp;lt;prop key="{http://samples}order"&amp;gt;createOrderEndpoint&amp;lt;/prop&amp;gt;&lt;br /&gt;  &amp;lt;/props&amp;gt;&lt;br /&gt;&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;bean id="getOrderEndpoint" class="samples.GetOrderEndpoint"&amp;gt;&lt;br /&gt;&amp;lt;constructor-arg ref="orderService"/&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;bean id="createOrderEndpoint" class="samples.CreateOrderEndpoint"&amp;gt;&lt;br /&gt;&amp;lt;constructor-arg ref="orderService"/&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;beans&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;SoapActionEndpointMapping&lt;/span&gt;&lt;br /&gt;Requests are mapped according to SOAPAction HTTP header. Every client sends this information to the server.&lt;br /&gt;&lt;br /&gt;For mapping configuration, add below bean to your spring ws configuration file:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;beans&amp;gt;&lt;br /&gt;&amp;lt;bean id="endpointMapping" class="org.springframework.ws.soap.server.endpoint.mapping.SoapActionEndpointMapping"&amp;gt;&lt;br /&gt; &amp;lt;property name="mappings"&amp;gt;&lt;br /&gt;     &amp;lt;props&amp;gt;&lt;br /&gt;         &amp;lt;prop key="http://samples/RequestOrder"&amp;gt;&lt;br /&gt;              getOrderEndpoint&lt;br /&gt;         &amp;lt;/prop&amp;gt;&lt;br /&gt;         &amp;lt;prop key="http://samples/CreateOrder"&amp;gt;&lt;br /&gt;              createOrderEndpoint&lt;br /&gt;         &amp;lt;/prop&amp;gt;&lt;br /&gt;     &amp;lt;/props&amp;gt;&lt;br /&gt; &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;bean id="getOrderEndpoint" class="samples.GetOrderEndpoint"&amp;gt;&lt;br /&gt; &amp;lt;constructor-arg ref="orderService"/&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;bean id="createOrderEndpoint" class="samples.CreateOrderEndpoint"&amp;gt;&lt;br /&gt; &amp;lt;constructor-arg ref="orderService"/&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;MethodEndpointMapping&lt;/span&gt;&lt;br /&gt;Besides these mapping types, as i mentioned before, mapping can also be done using java 1.5 annotations (&lt;span style=";font-family:courier new;font-size:85%;"  &gt;@PayloadRoot&lt;/span&gt; and &lt;span style=";font-family:courier new;font-size:85%;"  &gt;@SoapAction&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;After looking the details, lets develop our server and related clients.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1110217236838726038-591466893509190392?l=demirm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://demirm.blogspot.com/feeds/591466893509190392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1110217236838726038&amp;postID=591466893509190392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1110217236838726038/posts/default/591466893509190392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1110217236838726038/posts/default/591466893509190392'/><link rel='alternate' type='text/html' href='http://demirm.blogspot.com/2009/06/spring-web-services-framework-sample.html' title='Spring Web Services Framework - Details'/><author><name>mdemir</name><uri>http://www.blogger.com/profile/18166494826796405673</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://1.bp.blogspot.com/_biu-4xlxrHQ/SjihHD7qVMI/AAAAAAAAAIY/hwVCV5OjOdE/S220/Untitled-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1110217236838726038.post-7294615006822010061</id><published>2009-01-23T04:25:00.000-08:00</published><updated>2009-01-23T07:47:44.502-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Spring Web Services'/><title type='text'>Web Services &amp; Spring Web Services Framework</title><content type='html'>&lt;span style="font-size:130%;"&gt;Web Service Development Styles&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When developing web services, there are two development styles, Contract Last(CL) and Contract First(CF). In first approach, development starts with coding and ends with WSDL (Web Service Description Language) generation from that. This approach is preffered when you have already implement your services. But in latter one, the WSDL contract is the starting point of development. Then continues with coding according to generated contract. This style widely preffered if services are not implemented yet.&lt;br /&gt;&lt;br /&gt;Spring Web Services framework is only supports the CF style development. The SWS &lt;a href="http://static.springsource.org/spring-ws/sites/1.5/reference/html/why-contract-first.html"&gt;reference &lt;/a&gt;explains the reasons for this.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Loose Coupling&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;SWS is also reduces the coupling between the WSDL and implementation. Instead of programs tying implemantion classes with WSDL,like wsdl2java, SWS handles requests by implemented &lt;span style="font-family:courier new;"&gt;Endpoint&lt;/span&gt; classes. Mapping of arrived messages and Endpoint classes is up to you. For this behaviour, SWS supplies related classes which maps messages to endpoints according to their content or SOAP headers. The main idea is mapping is done according to XML messages not by message calls.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Method of Working&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The execution of SWS can be depicted as the following figure.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_biu-4xlxrHQ/SXnEyVDO5dI/AAAAAAAAAAU/SKeB8eHTM2w/s1600-h/SWS+Execution.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 166px;" src="http://3.bp.blogspot.com/_biu-4xlxrHQ/SXnEyVDO5dI/AAAAAAAAAAU/SKeB8eHTM2w/s400/SWS+Execution.png" alt="" id="BLOGGER_PHOTO_ID_5294479205873935826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Request is taken by dispatcher servlet named in figure as Message Dispatcher Servlet. Endpoint mapping concrete classes maps the arrived request to the related endpoint bean. Mapping is done by looking at SOAP Action Headers (&lt;a href="http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/soap/server/endpoint/mapping/SoapActionEndpointMapping.html"&gt;SoapActionEndpointMapping&lt;/a&gt;) or by looking at the qualified name of the request payload root element (&lt;a href="http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/server/endpoint/mapping/PayloadRootQNameEndpointMapping.html"&gt;PayloadRootQNameEndpointMapping&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;At web service layer, required parts is taken from request and passed to business layer to do some business jobs. Moreover, after the execution of business job(s), response message is also prepared at this layer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Comming Soon&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Server Side Configuration&lt;/li&gt;&lt;li&gt;Client Side Configuration&lt;/li&gt;&lt;li&gt;Securing our Web Services&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;Authentication&lt;/li&gt;&lt;li&gt;Acegi Integration&lt;/li&gt;&lt;li&gt;Digital Signatures&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Encryption/Decryption&lt;/li&gt;&lt;li&gt;Timestamps&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1110217236838726038-7294615006822010061?l=demirm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://demirm.blogspot.com/feeds/7294615006822010061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1110217236838726038&amp;postID=7294615006822010061' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1110217236838726038/posts/default/7294615006822010061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1110217236838726038/posts/default/7294615006822010061'/><link rel='alternate' type='text/html' href='http://demirm.blogspot.com/2009/01/web-services-spring-web-services.html' title='Web Services &amp; Spring Web Services Framework'/><author><name>mdemir</name><uri>http://www.blogger.com/profile/18166494826796405673</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://1.bp.blogspot.com/_biu-4xlxrHQ/SjihHD7qVMI/AAAAAAAAAIY/hwVCV5OjOdE/S220/Untitled-1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_biu-4xlxrHQ/SXnEyVDO5dI/AAAAAAAAAAU/SKeB8eHTM2w/s72-c/SWS+Execution.png' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
