I have a web service built with axis2. Also, I have used Java2WSDL utility provided by axis2 to generate a WSDL from my web service class (not the deployed services) at build time.
Then I generated a client via wsimport for both i.e. Deployed Web Service in J2EE Application Server and from generated WSDL file. The problem is that generated code is different in terms of packages and mamespaces and because of that the client generated from WSDL file is not working as it complains about the namespace mismatch....on jboss I see following exception; 13:46:04,524 ERROR [RPCMessageReceiver] Exception occurred while trying to invoke service method getLanguage org.apache.axis2.AxisFault: namespace mismatch require http://CustomerServiceWs found http://customer.webservices.temenos.com at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:177) at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:173) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:144) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) I used following command to generate my WSDL file from Class File; java2wsdl.bat -o C:\Temp -tn http://CustomerServiceWs -cn com.temenos.webservices.customer.CustomerServiceWS I can clearly see the difference in operation class definitions. For example one of the generated operation class for Deployed web service has following; @XmlRootElement(name = "getLanguage") public class GetLanguage { @XmlElementRef(name = "userDetails", namespace = "http://CustomerServiceWs", type = JAXBElement.class) protected JAXBElement<T24UserDetails> userDetails; @XmlElementRef(name = "customerKey", namespace = "http://CustomerServiceWs", type = JAXBElement.class) protected JAXBElement<String> customerKey; And for the same operation class generated via WSDL file has following; @XmlRootElement(name = "getLanguage") public class GetLanguage { @XmlElementRef(name = "userDetails", namespace = "http://customer.webservices.temenos.com", type = JAXBElement.class) protected JAXBElement<T24UserDetails> userDetails; @XmlElementRef(name = "customerKey", namespace = "http://customer.webservices.temenos.com", type = JAXBElement.class) protected JAXBElement<String> customerKey; As you can see the namespace is completely different and it won't work. Is there any hook I can provide while using java2wsdl to match the namespace of the operations? Could you please help me sort out this problem or suggest a better way to approach this problem. I tried to use the wsdl2java tools but I am unable to get my head around it... NOTE: Its not a requirement but I want to use wsimport instead of wsdl2java if possible Thanks in advance, -- SJunejo -- View this message in context: http://old.nabble.com/Difference-in-wsdl-between-deployed-web-service-and-java2wsdl-generated-tp34053369p34053369.html Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org