{"id":29310,"date":"2015-12-04T15:00:44","date_gmt":"2015-12-04T13:00:44","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=29310"},"modified":"2018-09-18T16:33:58","modified_gmt":"2018-09-18T13:33:58","slug":"jax-ws-endpoint-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/","title":{"rendered":"JAX-WS Endpoint Example"},"content":{"rendered":"<p>In this example we shall see how to use JAX-WS Endpoint. Literally\u00a0talking about web service endpoint, it is a resource that is to be referred and to which web service message should be addressed.<\/p>\n<p>This endpoint can either be in published or unpublished state and JAX-WS&#8217;s <code>Endpoint<\/code> class is used to achieve this purpose. <code>Endpoint<\/code> class has 2 important methods <code>publish()<\/code> used to publish or start the web service, and <code>stop()<\/code> used to un-publish or stop the web service.<\/p>\n<p>To understand this concept in detail let&#8217;s first understand the two considerable terms SEI (Service Endpoint Interface) and SIB (Service Implementation Bean).<\/p>\n<p>To implement a\u00a0SOAP based web service using JAX-WS API&#8217;s, it could be done using a single class\u00a0but as the\u00a0best practices tells us, we should first define an interface that declares all the methods to be exposed as a Web Service, and its implementation should define those methods. The interface in question is\u00a0SEI\u00a0and the\u00a0implementation is SIB.<\/p>\n<p>Proceeding now to the code:<\/p>\n<h2>1. Implementing Web Service<\/h2>\n<h3>1.1 Writing Service Endpoint Interface<\/h3>\n<p><span style=\"text-decoration: underline;\"><em>CalculatorServer.java<\/em><\/span>:<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.examples.endpoint;\r\n\r\nimport javax.jws.WebMethod;\r\nimport javax.jws.WebService;\r\n\r\n@WebService\r\npublic interface CalculatorServer {\r\n\t@WebMethod\r\n\tint sum(int a, int b);\r\n\r\n\t@WebMethod\r\n\tint diff(int a, int b);\r\n\r\n\t@WebMethod\r\n\tint multiply(int a, int b);\r\n\r\n\t@WebMethod\r\n\tint divide(int a, int b);\r\n}\r\n<\/pre>\n<h3>1.2 Writing Service Implementation Bean<\/h3>\n<p><span style=\"text-decoration: underline;\"><em>CalculatorServerImpl.java<\/em><\/span>:<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.examples.endpoint;\r\n\r\nimport javax.jws.WebService;\r\n\r\n@WebService(endpointInterface = \"com.javacodegeeks.examples.endpoint.CalculatorServer\")\r\npublic class CalculatorServerImpl implements CalculatorServer {\r\n\t@Override\r\n\tpublic int sum(int a, int b) {\r\n\t\treturn a+b;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic int diff(int a, int b) {\r\n\t\treturn a-b;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic int multiply(int a, int b) {\r\n\t\treturn a*b;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic int divide(int a, int b) {\r\n\t\treturn a\/b;\r\n\t}\r\n}\r\n<\/pre>\n<p>As we see here this class is implementation of Service Endpoint Interface.<\/p>\n<h2>2. Publishing Web Service<\/h2>\n<p><span style=\"text-decoration: underline;\"><em>CalculatorServerPublisher.java<\/em><\/span>:<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.examples.endpoint;\r\n\r\nimport javax.xml.ws.Endpoint;\r\n\r\npublic class CalculatorServerPublisher {\r\n\tpublic static void main(String[] args) {\r\n\t\tEndpoint ep = Endpoint.create(new CalculatorServerImpl());\r\n\t\t\r\n\t\tep.publish(\"http:\/\/127.0.0.1:10000\/calcServer\");\r\n\t\t\r\n\t\t\/\/Do something\r\n\t\t\r\n\t\t\/\/Comment below line if service is meant to be running always\r\n\t\tep.stop();\r\n\t}\r\n}\r\n<\/pre>\n<p>Notice in the above program, we are using Endpoint&#8217;s class static method <code>create()<\/code> to get its instance. On this instance, we call <code>publish()<\/code> method to start the web service, or in other words, we are creating an endpoint here. <code>create()<\/code> method used in above example accepts one argument that is the service implementation bean instance. <code>publish()<\/code> method used here accepts one argument that is he URI specifying the address and protocol to be used.<br \/>\nThere&#8217;s another method <code>stop()<\/code> used in above example whose purpose is to stop publishing the endpoint.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Another way to publish web service is using Endpoint&#8217;s class static <code>publish()<\/code> method as follows:<\/p>\n<p><code>Endpoint.publish(\"http:\/\/127.0.0.1:10000\/calcServer\", new CalculatorServerImpl());<\/code><\/p>\n<p>On starting this main program, a java service shall get started and following kind of message shall get displayed in the console on successful publishing of web service:<\/p>\n<pre class=\"brush:bash\">Nov 28, 2015 8:18:11 PM com.sun.xml.internal.ws.model.RuntimeModeler getRequestWrapperClass\r\nINFO: Dynamically creating request wrapper Class com.javacodegeeks.examples.endpoint.jaxws.Multiply\r\nNov 28, 2015 8:18:11 PM com.sun.xml.internal.ws.model.RuntimeModeler getResponseWrapperClass\r\nINFO: Dynamically creating response wrapper bean Class com.javacodegeeks.examples.endpoint.jaxws.MultiplyResponse\r\nNov 28, 2015 8:18:11 PM com.sun.xml.internal.ws.model.RuntimeModeler getRequestWrapperClass\r\nINFO: Dynamically creating request wrapper Class com.javacodegeeks.examples.endpoint.jaxws.Divide\r\nNov 28, 2015 8:18:11 PM com.sun.xml.internal.ws.model.RuntimeModeler getResponseWrapperClass\r\nINFO: Dynamically creating response wrapper bean Class com.javacodegeeks.examples.endpoint.jaxws.DivideResponse\r\nNov 28, 2015 8:18:11 PM com.sun.xml.internal.ws.model.RuntimeModeler getRequestWrapperClass\r\nINFO: Dynamically creating request wrapper Class com.javacodegeeks.examples.endpoint.jaxws.Sum\r\nNov 28, 2015 8:18:11 PM com.sun.xml.internal.ws.model.RuntimeModeler getResponseWrapperClass\r\nINFO: Dynamically creating response wrapper bean Class com.javacodegeeks.examples.endpoint.jaxws.SumResponse\r\nNov 28, 2015 8:18:11 PM com.sun.xml.internal.ws.model.RuntimeModeler getRequestWrapperClass\r\nINFO: Dynamically creating request wrapper Class com.javacodegeeks.examples.endpoint.jaxws.Diff\r\nNov 28, 2015 8:18:11 PM com.sun.xml.internal.ws.model.RuntimeModeler getResponseWrapperClass\r\nINFO: Dynamically creating response wrapper bean Class com.javacodegeeks.examples.endpoint.jaxws.DiffResponse<\/pre>\n<h2>3. Checking WSDL file for endpoint definition<\/h2>\n<p>The WSDL file for this example can be accessed at URL:<\/p>\n<p><code>http:\/\/127.0.0.1:10000\/calcServer?wsdl<\/code><\/p>\n<p>Here is how the WSDL file for this example would look like:<\/p>\n<pre class=\"brush:xml; highlight:[93,94,95,96,97]\">&lt;definitions xmlns:soap=\"http:\/\/schemas.xmlsoap.org\/wsdl\/soap\/\"\r\n\txmlns:tns=\"http:\/\/endpoint.examples.javacodegeeks.com\/\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\"\r\n\txmlns=\"http:\/\/schemas.xmlsoap.org\/wsdl\/\" targetNamespace=\"http:\/\/endpoint.examples.javacodegeeks.com\/\"\r\n\tname=\"CalculatorServerImplService\"&gt;\r\n\t&lt;types&gt;\r\n\t\t&lt;xsd:schema&gt;\r\n\t\t\t&lt;xsd:import namespace=\"http:\/\/endpoint.examples.javacodegeeks.com\/\"\r\n\t\t\t\tschemaLocation=\"http:\/\/127.0.0.1:10000\/calcServer?xsd=1\" \/&gt;\r\n\t\t&lt;\/xsd:schema&gt;\r\n\t&lt;\/types&gt;\r\n\t&lt;message name=\"multiply\"&gt;\r\n\t\t&lt;part name=\"parameters\" element=\"tns:multiply\" \/&gt;\r\n\t&lt;\/message&gt;\r\n\t&lt;message name=\"multiplyResponse\"&gt;\r\n\t\t&lt;part name=\"parameters\" element=\"tns:multiplyResponse\" \/&gt;\r\n\t&lt;\/message&gt;\r\n\t&lt;message name=\"divide\"&gt;\r\n\t\t&lt;part name=\"parameters\" element=\"tns:divide\" \/&gt;\r\n\t&lt;\/message&gt;\r\n\t&lt;message name=\"divideResponse\"&gt;\r\n\t\t&lt;part name=\"parameters\" element=\"tns:divideResponse\" \/&gt;\r\n\t&lt;\/message&gt;\r\n\t&lt;message name=\"sum\"&gt;\r\n\t\t&lt;part name=\"parameters\" element=\"tns:sum\" \/&gt;\r\n\t&lt;\/message&gt;\r\n\t&lt;message name=\"sumResponse\"&gt;\r\n\t\t&lt;part name=\"parameters\" element=\"tns:sumResponse\" \/&gt;\r\n\t&lt;\/message&gt;\r\n\t&lt;message name=\"diff\"&gt;\r\n\t\t&lt;part name=\"parameters\" element=\"tns:diff\" \/&gt;\r\n\t&lt;\/message&gt;\r\n\t&lt;message name=\"diffResponse\"&gt;\r\n\t\t&lt;part name=\"parameters\" element=\"tns:diffResponse\" \/&gt;\r\n\t&lt;\/message&gt;\r\n\t&lt;portType name=\"CalculatorServer\"&gt;\r\n\t\t&lt;operation name=\"multiply\"&gt;\r\n\t\t\t&lt;input message=\"tns:multiply\" \/&gt;\r\n\t\t\t&lt;output message=\"tns:multiplyResponse\" \/&gt;\r\n\t\t&lt;\/operation&gt;\r\n\t\t&lt;operation name=\"divide\"&gt;\r\n\t\t\t&lt;input message=\"tns:divide\" \/&gt;\r\n\t\t\t&lt;output message=\"tns:divideResponse\" \/&gt;\r\n\t\t&lt;\/operation&gt;\r\n\t\t&lt;operation name=\"sum\"&gt;\r\n\t\t\t&lt;input message=\"tns:sum\" \/&gt;\r\n\t\t\t&lt;output message=\"tns:sumResponse\" \/&gt;\r\n\t\t&lt;\/operation&gt;\r\n\t\t&lt;operation name=\"diff\"&gt;\r\n\t\t\t&lt;input message=\"tns:diff\" \/&gt;\r\n\t\t\t&lt;output message=\"tns:diffResponse\" \/&gt;\r\n\t\t&lt;\/operation&gt;\r\n\t&lt;\/portType&gt;\r\n\t&lt;binding name=\"CalculatorServerImplPortBinding\" type=\"tns:CalculatorServer\"&gt;\r\n\t\t&lt;soap:binding transport=\"http:\/\/schemas.xmlsoap.org\/soap\/http\"\r\n\t\t\tstyle=\"document\" \/&gt;\r\n\t\t&lt;operation name=\"multiply\"&gt;\r\n\t\t\t&lt;soap:operation soapAction=\"\" \/&gt;\r\n\t\t\t&lt;input&gt;\r\n\t\t\t\t&lt;soap:body use=\"literal\" \/&gt;\r\n\t\t\t&lt;\/input&gt;\r\n\t\t\t&lt;output&gt;\r\n\t\t\t\t&lt;soap:body use=\"literal\" \/&gt;\r\n\t\t\t&lt;\/output&gt;\r\n\t\t&lt;\/operation&gt;\r\n\t\t&lt;operation name=\"divide\"&gt;\r\n\t\t\t&lt;soap:operation soapAction=\"\" \/&gt;\r\n\t\t\t&lt;input&gt;\r\n\t\t\t\t&lt;soap:body use=\"literal\" \/&gt;\r\n\t\t\t&lt;\/input&gt;\r\n\t\t\t&lt;output&gt;\r\n\t\t\t\t&lt;soap:body use=\"literal\" \/&gt;\r\n\t\t\t&lt;\/output&gt;\r\n\t\t&lt;\/operation&gt;\r\n\t\t&lt;operation name=\"sum\"&gt;\r\n\t\t\t&lt;soap:operation soapAction=\"\" \/&gt;\r\n\t\t\t&lt;input&gt;\r\n\t\t\t\t&lt;soap:body use=\"literal\" \/&gt;\r\n\t\t\t&lt;\/input&gt;\r\n\t\t\t&lt;output&gt;\r\n\t\t\t\t&lt;soap:body use=\"literal\" \/&gt;\r\n\t\t\t&lt;\/output&gt;\r\n\t\t&lt;\/operation&gt;\r\n\t\t&lt;operation name=\"diff\"&gt;\r\n\t\t\t&lt;soap:operation soapAction=\"\" \/&gt;\r\n\t\t\t&lt;input&gt;\r\n\t\t\t\t&lt;soap:body use=\"literal\" \/&gt;\r\n\t\t\t&lt;\/input&gt;\r\n\t\t\t&lt;output&gt;\r\n\t\t\t\t&lt;soap:body use=\"literal\" \/&gt;\r\n\t\t\t&lt;\/output&gt;\r\n\t\t&lt;\/operation&gt;\r\n\t&lt;\/binding&gt;\r\n\t&lt;service name=\"CalculatorServerImplService\"&gt;\r\n\t\t&lt;port name=\"CalculatorServerImplPort\" binding=\"tns:CalculatorServerImplPortBinding\"&gt;\r\n\t\t\t&lt;soap:address location=\"http:\/\/127.0.0.1:10000\/calcServer\" \/&gt;\r\n\t\t&lt;\/port&gt;\r\n\t&lt;\/service&gt;\r\n&lt;\/definitions&gt;\r\n<\/pre>\n<p>Notice the highlighted Service tag in the above WSDL file. This tag represents endpoint(s) where the service&#8217;s functionality is available.<\/p>\n<h2>4. Multithreading the endpoint publisher<\/h2>\n<p>The endpoint publisher that we configured above is single threaded and hence, can only handle one request at a time. In the actual or production environment, endpoint publisher shall be serving many concurrent requests.<\/p>\n<p>To achieve this purpose, jax-ws provides api to set executor to the endpoint. This means that Executor shall be used to dispatch any incoming request to the service implementor.<\/p>\n<p>Following is the sample program demonstrating this functionality:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>CalculatorServerMultiThreadedImpl.java<\/em><\/span>:<\/p>\n<pre class=\"brush:java; highlight:[12]\">package com.javacodegeeks.examples.endpoint;\r\n\r\nimport java.util.concurrent.ExecutorService;\r\nimport java.util.concurrent.Executors;\r\n\r\nimport javax.xml.ws.Endpoint;\r\n\r\npublic class CalculatorServerMultiThreadedImpl {\r\n\tpublic static void main(String[] args) {\r\n\t\tExecutorService es = Executors.newFixedThreadPool(5);\r\n\t\tEndpoint ep = Endpoint.create(new CalculatorServerImpl());\r\n\t\tep.setExecutor(es);\r\n\t\tep.publish(\"http:\/\/127.0.0.1:10000\/calcServer\");\r\n\t}\r\n}\r\n<\/pre>\n<p>Notice in the above program, we have used api <code>setExecutor()<\/code> to set the appropriate ThreadPool implementation.<br \/>\nRest everything related to publishing the web service remains same.<\/p>\n<h2>5. Directory structure of the\u00a0JAX-WS Endpoint Example<\/h2>\n<p>The directory structure of the above example in eclipse shall look like:<\/p>\n<p><figure id=\"attachment_29707\" aria-describedby=\"caption-attachment-29707\" style=\"width: 316px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/DirectoryStructure1.jpg\"><img decoding=\"async\" class=\"wp-image-29707\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/DirectoryStructure1-300x256.jpg\" alt=\"JAX-WS Endpoint - Directory Structure for Endpoint Example\" width=\"316\" height=\"269\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/DirectoryStructure1-300x256.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/DirectoryStructure1.jpg 393w\" sizes=\"(max-width: 316px) 100vw, 316px\" \/><\/a><figcaption id=\"caption-attachment-29707\" class=\"wp-caption-text\">Directory Structure for Endpoint Example<\/figcaption><\/figure><\/p>\n<h2>6. Download the Source Code<\/h2>\n<p>This was an example of publishing a SOAP Web Service using <code>Endpoint<\/code> class.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <strong><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/EndpointExample.zip\">EndpointExample<\/a><\/strong><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this example we shall see how to use JAX-WS Endpoint. Literally\u00a0talking about web service endpoint, it is a resource that is to be referred and to which web service message should be addressed. This endpoint can either be in published or unpublished state and JAX-WS&#8217;s Endpoint class is used to achieve this purpose. Endpoint &hellip;<\/p>\n","protected":false},"author":75,"featured_media":1240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[461],"tags":[1262,1264,467],"class_list":["post-29310","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jws","tag-endpoint","tag-jax-ws","tag-soap"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JAX-WS Endpoint Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn more about JAX-WS? Then check out our detailed example on JAX-WS Endpoint!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JAX-WS Endpoint Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn more about JAX-WS? Then check out our detailed example on JAX-WS Endpoint!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-04T13:00:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-09-18T13:33:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Saurabh Arora\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Saurabh Arora\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/\"},\"author\":{\"name\":\"Saurabh Arora\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5bf4e0274824642c44536b83ddbfaf6c\"},\"headline\":\"JAX-WS Endpoint Example\",\"datePublished\":\"2015-12-04T13:00:44+00:00\",\"dateModified\":\"2018-09-18T13:33:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/\"},\"wordCount\":544,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg\",\"keywords\":[\"Endpoint\",\"JAX-WS\",\"SOAP\"],\"articleSection\":[\"jws\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/\",\"name\":\"JAX-WS Endpoint Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg\",\"datePublished\":\"2015-12-04T13:00:44+00:00\",\"dateModified\":\"2018-09-18T13:33:58+00:00\",\"description\":\"Interested to learn more about JAX-WS? Then check out our detailed example on JAX-WS Endpoint!\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"jws\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/jws\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"JAX-WS Endpoint Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5bf4e0274824642c44536b83ddbfaf6c\",\"name\":\"Saurabh Arora\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/Saurabh-Arora-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/Saurabh-Arora-96x96.jpg\",\"caption\":\"Saurabh Arora\"},\"description\":\"Saurabh graduated with an engineering degree in Information Technology from YMCA Institute of Engineering, India. He is SCJP, OCWCD certified and currently working as Technical Lead with one of the biggest service based firms and is involved in projects extensively using Java and JEE technologies. He has worked in E-Commerce, Banking and Telecom domain.\",\"sameAs\":[\"http:\/\/www.javacodegeeks.com\/\",\"https:\/\/in.linkedin.com\/in\/saurabh-arora-78674b18\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/saurabh-arora\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JAX-WS Endpoint Example - Java Code Geeks","description":"Interested to learn more about JAX-WS? Then check out our detailed example on JAX-WS Endpoint!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/","og_locale":"en_US","og_type":"article","og_title":"JAX-WS Endpoint Example - Java Code Geeks","og_description":"Interested to learn more about JAX-WS? Then check out our detailed example on JAX-WS Endpoint!","og_url":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2015-12-04T13:00:44+00:00","article_modified_time":"2018-09-18T13:33:58+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Saurabh Arora","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Saurabh Arora","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/"},"author":{"name":"Saurabh Arora","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5bf4e0274824642c44536b83ddbfaf6c"},"headline":"JAX-WS Endpoint Example","datePublished":"2015-12-04T13:00:44+00:00","dateModified":"2018-09-18T13:33:58+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/"},"wordCount":544,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg","keywords":["Endpoint","JAX-WS","SOAP"],"articleSection":["jws"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/","url":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/","name":"JAX-WS Endpoint Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg","datePublished":"2015-12-04T13:00:44+00:00","dateModified":"2018-09-18T13:33:58+00:00","description":"Interested to learn more about JAX-WS? Then check out our detailed example on JAX-WS Endpoint!","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jws\/jax-ws-endpoint-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/"},{"@type":"ListItem","position":4,"name":"jws","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/jws\/"},{"@type":"ListItem","position":5,"name":"JAX-WS Endpoint Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5bf4e0274824642c44536b83ddbfaf6c","name":"Saurabh Arora","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/Saurabh-Arora-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/Saurabh-Arora-96x96.jpg","caption":"Saurabh Arora"},"description":"Saurabh graduated with an engineering degree in Information Technology from YMCA Institute of Engineering, India. He is SCJP, OCWCD certified and currently working as Technical Lead with one of the biggest service based firms and is involved in projects extensively using Java and JEE technologies. He has worked in E-Commerce, Banking and Telecom domain.","sameAs":["http:\/\/www.javacodegeeks.com\/","https:\/\/in.linkedin.com\/in\/saurabh-arora-78674b18"],"url":"https:\/\/examples.javacodegeeks.com\/author\/saurabh-arora\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/29310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=29310"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/29310\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1240"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=29310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=29310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=29310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}