In the process of developing webservice, a lot of problems have arisen, and some problems in the development process are summarized as follows:
The first step: you need to have a WSDL file, such as SERVERINTERFACE.WSDL, to put it into your project
Step Two: Note the red part of the code, http://(server or IP address)/Engineering name/(WebService path in Web.xml file)/(Value of name in Project Services.xml)
If the following exception occurs, first, check the configuration file is incorrect, and second, in the project/webservices/services.xml file, add the following code to try
<wsdlURL>file:/wsdl/ServerInterface.wsdl</wsdlURL>
Note: WSDL is a package name in Project Engineering, SERVERINTERFACE.WSDL is a WSDL file you already have
Public Smserviceclient () {
Create0 ();
Endpoint smserviceporttypelocalendpointep = Service0. Addendpoint (New QName ("http://smsmonitor.asiainfo.com", " Smserviceporttypelocalendpoint "), New QName (" http://smsmonitor.asiainfo.com "," smserviceporttypelocalbinding ")," Xfire.local://smservice ");
Endpoints.put (New QName ("http://smsmonitor.asiainfo.com", "Smserviceporttypelocalendpoint"), SMSERVICEPORTTYPELOCALENDPOINTEP);
Endpoint smservicehttpportep = Service0. Addendpoint (New QName ("http://smsmonitor.asiainfo.com", "Smservicehttpport" ), New QName ("http://smsmonitor.asiainfo.com", "smservicehttpbinding"), "http://localhost/webserviceUnion/services /smservice ");
Endpoints.put (New QName ("http://smsmonitor.asiainfo.com", "Smservicehttpport"), Smservicehttpportep);
}
Org.codehaus.xfire.fault.XFireFault:Parameter {Http://smsmonitor.asiainfo.com}send does not exist!
At Org.codehaus.xfire.service.binding.AbstractBinding.read (abstractbinding.java:201)
At Org.codehaus.xfire.service.binding.DocumentBinding.readMessage (documentbinding.java:35)
At Org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke (soapbodyhandler.java:42)
At Org.codehaus.xfire.handler.HandlerPipeline.invoke (handlerpipeline.java:131)
At Org.codehaus.xfire.transport.DefaultEndpoint.onReceive (defaultendpoint.java:64)
At Org.codehaus.xfire.transport.AbstractChannel.receive (abstractchannel.java:38)
At Org.codehaus.xfire.transport.http.XFireServletController.invoke (xfireservletcontroller.java:304)
At Org.codehaus.xfire.transport.http.XFireServletController.doService (xfireservletcontroller.java:129)
At Org.codehaus.xfire.transport.http.XFireServlet.doPost (xfireservlet.java:116)
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.apache.catalina.core.StandardWrapperValve.invoke (standardwrappervalve.java:233)
At Org.apache.catalina.core.StandardContextValve.invoke (standardcontextvalve.java:191)
At Org.apache.catalina.core.StandardHostValve.invoke (standardhostvalve.java:128)
At Org.apache.catalina.valves.ErrorReportValve.invoke (errorreportvalve.java:102)
At Org.apache.catalina.core.StandardEngineValve.invoke (standardenginevalve.java:109)
At Org.apache.catalina.connector.CoyoteAdapter.service (coyoteadapter.java:286)
At Org.apache.coyote.http11.Http11AprProcessor.process (http11aprprocessor.java:857)
At Org.apache.coyote.http11.http11aprprotocol$http11connectionhandler.process (http11aprprotocol.java:565)
At Org.apache.tomcat.util.net.aprendpoint$worker.run (aprendpoint.java:1509)
At Java.lang.Thread.run (thread.java:619)