java - JAX-WS. SOAP response body tag to custom tag -



java - JAX-WS. SOAP response body <return> tag to custom tag -

i receiving deploy time error in glassfish 4 when seek deploy jax-ws service @webresult annotated method. below artifacts.

@webservice(name = "testmartcatalog", targetnamespace = "http://www.testmart.com") public interface productcataloginterface { @webmethod(action = "fetch_categories", operationname = "fetchcategories") public abstract list<string> getproductcatagories(); @webmethod public abstract list<string> getproducts(string category); @webmethod public abstract boolean addproduct(string category, string product); @webmethod @webresult(name="product") public abstract list<product> getproductsv2(string category); } @webservice(endpointinterface="come.lets.learn.jaxws.productcataloginterface", portname="testmartcatalogport", servicename = "testmartcatalogservice") public class productcatalog implements productcataloginterface { productserviceimpl prodimpl = new productserviceimpl(); /* (non-javadoc) * @see come.lets.learn.jaxws.productcataloginterface#getproductcatagories() */ @override public list<string> getproductcatagories() { homecoming prodimpl.getproductcatagories(); } /* (non-javadoc) * @see come.lets.learn.jaxws.productcataloginterface#getproducts(java.lang.string) */ @override public list<string> getproducts(string category) { homecoming prodimpl.getproducts(category); } /* (non-javadoc) * @see come.lets.learn.jaxws.productcataloginterface#addproduct(java.lang.string, java.lang.string) */ @override public boolean addproduct(string category, string product) { homecoming prodimpl.addproduct(category, product); } /* (non-javadoc) * @see come.lets.learn.jaxws.productcataloginterface#getproductsv2(java.lang.string) */ @override public list<product> getproductsv2(string category) { homecoming prodimpl.getproductsv2(category); } } @xmlrootelement(name="product") @xmltype(proporder={"price", "sku", "name"}) public class product { private string name; private string sku; private double price; public product() { } public product(string name, string sku, double price) { this.name = name; this.sku = sku; this.price = price; } /** * @return name */ @xmlelement(name="productname") public string getname() { homecoming name; } /** * @param name name set */ public void setname(string name) { this.name = name; } /** * @return sku */ public string getsku() { homecoming sku; } /** * @param sku sku set */ public void setsku(string sku) { this.sku = sku; } /** * @return cost */ public double getprice() { homecoming price; } /** * @param cost price set */ public void setprice(double price) { this.price = price; } }

the exception stack trace @ time of deployment follows,

2014-06-19t13:54:18.859+0530|warning: deployment failed javax.xml.ws.webserviceexception: class come.lets.learn.jaxws.jaxws.getproductsv2response not have property of name product @ com.sun.xml.ws.server.sei.endpointresponsemessagebuilder$doclit.(endpointresponsemessagebuilder.java:258) @ com.sun.xml.ws.server.sei.tiehandler.createresponsemessagebuilder(tiehandler.java:212) @ com.sun.xml.ws.server.sei.tiehandler.(tiehandler.java:117) @ com.sun.xml.ws.db.databindingimpl.(databindingimpl.java:110) ........... caused by: javax.xml.bind.jaxbexception: product not valid property on class come.lets.learn.jaxws.jaxws.getproductsv2response @ com.sun.xml.bind.v2.runtime.jaxbcontextimpl.getelementpropertyaccessor(jaxbcontextimpl.java:985) @ com.sun.xml.ws.db.glassfish.jaxbricontextwrapper.getelementpropertyaccessor(jaxbricontextwrapper.java:120) @ com.sun.xml.ws.server.sei.endpointresponsemessagebuilder$doclit.(endpointresponsemessagebuilder.java:254) ... 61 more ............. 2014-06-19t13:54:18.890+0530|severe: exception during cleanup after start failed org.apache.catalina.lifecycleexception: manager has not yet been started @ org.apache.catalina.session.standardmanager.stop(standardmanager.java:934) @ org.apache.catalina.core.standardcontext.stop(standardcontext.java:6099) @ com.sun.enterprise.web.webmodule.stop(webmodule.java:720) .................. 2014-06-19t13:54:18.890+0530|severe: containerbase.addchild: start: org.apache.catalina.lifecycleexception: java.lang.runtimeexception: servlet web service endpoint '' failure @ org.apache.catalina.core.standardcontext.start(standardcontext.java:5920) @ com.sun.enterprise.web.webmodule.start(webmodule.java:691) @ org.apache.catalina.core.containerbase.addchildinternal(containerbase.java:1041) ............ caused by: java.lang.runtimeexception: servlet web service endpoint '' failure @ org.glassfish.webservices.wsservletcontextlistener.contextinitialized(wsservletcontextlistener.java:109) @ org.apache.catalina.core.standardcontext.contextlistenerstart(standardcontext.java:5362) .................. caused by: javax.xml.ws.webserviceexception: class come.lets.learn.jaxws.jaxws.getproductsv2response not have property of name product @ com.sun.xml.ws.server.sei.endpointresponsemessagebuilder$doclit.(endpointresponsemessagebuilder.java:258) @ com.sun.xml.ws.server.sei.tiehandler.createresponsemessagebuilder(tiehandler.java:212) ........... caused by: javax.xml.bind.jaxbexception: product not valid property on class come.lets.learn.jaxws.jaxws.getproductsv2response @ com.sun.xml.bind.v2.runtime.jaxbcontextimpl.getelementpropertyaccessor(jaxbcontextimpl.java:985) @ com.sun.xml.ws.db.glassfish.jaxbricontextwrapper.getelementpropertyaccessor(jaxbricontextwrapper.java:120) ............... 2014-06-19t13:54:18.890+0530|warning: java.lang.illegalstateexception: containerbase.addchild: start: org.apache.catalina.lifecycleexception: java.lang.runtimeexception: servlet web service endpoint '' failure java.lang.illegalstateexception: containerbase.addchild: start: org.apache.catalina.lifecycleexception: java.lang.runtimeexception: servlet web service endpoint '' failure @ org.apache.catalina.core.containerbase.addchildinternal(containerbase.java:1044) @ org.apache.catalina.core.containerbase.addchild(containerbase.java:1024) ............. 2014-06-19t13:54:18.890+0530|severe: exception while invoking class com.sun.enterprise.web.webapplication start method java.lang.exception: java.lang.illegalstateexception: containerbase.addchild: start: org.apache.catalina.lifecycleexception: java.lang.runtimeexception: servlet web service endpoint '' failure @ com.sun.enterprise.web.webapplication.start(webapplication.java:168) @ org.glassfish.internal.data.engineref.start(engineref.java:122) @ org.glassfish.internal.data.moduleinfo.start(moduleinfo.java:291) ................... 2014-06-19t13:54:18.890+0530|severe: exception during lifecycle processing java.lang.exception: java.lang.illegalstateexception: containerbase.addchild: start: org.apache.catalina.lifecycleexception: java.lang.runtimeexception: servlet web service endpoint '' failure @ com.sun.enterprise.web.webapplication.start(webapplication.java:168) @ org.glassfish.internal.data.engineref.start(engineref.java:122) ....................

java eclipse soap jax-ws glassfish-4

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -