tag:blogger.com,1999:blog-785895453418216075.post5957072031468622844..comments2023-08-23T09:18:07.636-07:00Comments on Tug's Blog: JAX-WS: How to configure the service end point at runtime?Tug Grallhttp://www.blogger.com/profile/12028480831632266604noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-785895453418216075.post-85861774032052965772016-03-01T18:17:25.773-08:002016-03-01T18:17:25.773-08:00Thanks a lot, it really helped me to resolve the i...Thanks a lot, it really helped me to resolve the issue quickly. Thumbs upAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-785895453418216075.post-74598397085100236942014-06-13T16:24:19.598-07:002014-06-13T16:24:19.598-07:00Hello Tug,
Thank you for your blog on invoking a ...Hello Tug,<br /><br />Thank you for your blog on invoking a JAX-WS service. It is 2014, 5 years after your blog, and I've found it just as useful as people have found it useful in 2009.<br /><br />Thanks again,<br />SAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-785895453418216075.post-41214782241576546042012-09-03T07:08:17.736-07:002012-09-03T07:08:17.736-07:00Really usefull thanks!, lost a whole morning addin...Really usefull thanks!, lost a whole morning adding ports programatically to my Service (useless for this matter), until i went google and found this.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-785895453418216075.post-76379232764360013172012-02-24T06:10:24.379-08:002012-02-24T06:10:24.379-08:00Thanks a lot for creating this post.
This saved a...Thanks a lot for creating this post.<br /><br />This saved a lot of time for me.<br /><br />I just googled and easily located this post. <br /><br />Thanks again !!!Yogihttps://www.blogger.com/profile/15382350910254695035noreply@blogger.comtag:blogger.com,1999:blog-785895453418216075.post-2970773890102330302011-06-07T09:12:55.895-07:002011-06-07T09:12:55.895-07:00Thanks Tug! What a crappy design, it would have ta...Thanks Tug! What a crappy design, it would have taken me quite a while to figure that out.Ethannoreply@blogger.comtag:blogger.com,1999:blog-785895453418216075.post-3247908471835017842011-05-31T03:16:27.401-07:002011-05-31T03:16:27.401-07:00Thanks soooo much you are a half-god and just save...Thanks soooo much you are a half-god and just saved my life :))Yunnyyyhttps://www.blogger.com/profile/14019775260742831822noreply@blogger.comtag:blogger.com,1999:blog-785895453418216075.post-50692149579095464022011-04-23T19:07:19.123-07:002011-04-23T19:07:19.123-07:00Thanks a ton it has been a great help, now to conf...Thanks a ton it has been a great help, now to configure the service end point at runtime? is without a doubt simple and easy with the help of your information. KudosMutuelle santehttp://www.mutuelle-sante-fsp.comnoreply@blogger.comtag:blogger.com,1999:blog-785895453418216075.post-81252226432296216212009-05-27T03:51:53.942-07:002009-05-27T03:51:53.942-07:00Thank you! Using the Binding Provider to set the e...Thank you! Using the Binding Provider to set the endpoint URL is exactly what I was looking for. Often the soap:address is wrong because of load balancers etc.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-785895453418216075.post-19334048612547736682009-02-25T23:33:00.000-08:002009-02-25T23:33:00.000-08:00It is a very simple service that I have created an...It is a very simple service that I have created and published in Netbeans 6.5/Glassfish V2. Something like:<BR/>----<BR/>/*<BR/> * To change this template, choose Tools | Templates<BR/> * and open the template in the editor.<BR/> */<BR/><BR/>package org.demo.service;<BR/><BR/>import java.util.Iterator;<BR/>import java.util.List;<BR/>import java.util.logging.Level;<BR/>import java.util.logging.Logger;<BR/>import javax.annotation.Resource;<BR/>import javax.jws.WebMethod;<BR/>import javax.jws.WebParam;<BR/>import javax.jws.WebService;<BR/>import javax.persistence.EntityManager;<BR/>import javax.persistence.PersistenceContext;<BR/>import javax.transaction.NotSupportedException;<BR/>import javax.transaction.UserTransaction;<BR/>import org.demo.entity.Employee;<BR/><BR/>/**<BR/> *<BR/> * @author tgrall<BR/> */<BR/>@WebService()<BR/>public class EmployeeService {<BR/><BR/><BR/> @PersistenceContext(unitName="HumanRessourcesPU")<BR/> private EntityManager em;<BR/><BR/> @Resource private UserTransaction utx;<BR/><BR/><BR/> /**<BR/> * Web service operation<BR/> */<BR/> @WebMethod(operationName = "getEmployee")<BR/> public Employee getEmployee(@WebParam(name = "id")<BR/> Integer id) {<BR/> Employee employee = null;<BR/> try {<BR/> utx.begin();<BR/> employee = em.find(Employee.class, id);<BR/> utx.commit();<BR/> } catch (Exception ex) {<BR/> Logger.getLogger(EmployeeService.class.getName()).log(Level.SEVERE, null, ex);<BR/> }<BR/> return employee;<BR/> }<BR/><BR/><BR/> @WebMethod (operationName="createEmployee")<BR/> public String createEmployee(Employee employee) throws Exception {<BR/> utx.begin();<BR/> em.persist(employee);<BR/> utx.commit();<BR/> return "Employee Created";<BR/> }<BR/><BR/><BR/> @WebMethod (operationName="getEmployees")<BR/> public List<Employee> getEmployees() {<BR/> List results = em.createNamedQuery("Employee.findAll").getResultList();<BR/> return results;<BR/> }<BR/><BR/>}<BR/>------<BR/><BR/>With a very simple table Employee created in JavaDBTug Grallhttps://www.blogger.com/profile/12028480831632266604noreply@blogger.comtag:blogger.com,1999:blog-785895453418216075.post-27875007167351309842009-02-19T11:54:00.000-08:002009-02-19T11:54:00.000-08:00And when are we going to have the EmployeeServiceS...And when are we going to have the EmployeeServiceServiceService to service that service ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-785895453418216075.post-35273929306762040442009-02-17T16:39:00.000-08:002009-02-17T16:39:00.000-08:00Thanks Tug, that is useful.Thanks Tug, that is useful.Tonyhttps://www.blogger.com/profile/16719976089855203933noreply@blogger.com