This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
However, there are errors with the simpleclient. I get an error (posted at the end) when I try and run simpleclient. The errors occur because of the import statements: import helloservice.endpoint.HelloService; import helloservice.endpoint.Hello;
The error "package helloservice.endpoint does not exist" is present in the code. I guess it's configuration errors and something to do with wsimport, but shouldn't this be done automatically by NetBeans?
I have created another web services client using the 'new' -> 'web services client' NetBeans option, which works fine with the helloservice. It contains no import statements and the resultant project layout and client classes look very different to the simpleclient example.
I would appreciate any clarification or pointers in the right direction, Thanks Deborah
[code] init: deps-clean: Deleting directory C:\Documents and Settings\debgre\My Documents\NetBeansProjects\examples\jaxws\simpleclient\build clean: init: deps-jar: wsimport-init: Created dir: C:\Documents and Settings\debgre\My Documents\NetBeansProjects\examples\jaxws\simpleclient\build\generated\wsimport\client Created dir: C:\Documents and Settings\debgre\My Documents\NetBeansProjects\examples\jaxws\simpleclient\build\generated\wsimport\binaries wsimport-client-check-HelloService: wsimport-client-HelloService: Consider using <depends>/<produces> so that wsimport won't do unnecessary compilation parsing WSDL...
wsimport-client-generate: Created dir: C:\Documents and Settings\debgre\My Documents\NetBeansProjects\examples\jaxws\simpleclient\build\jar Copying 3 files to C:\Documents and Settings\debgre\My Documents\NetBeansProjects\examples\jaxws\simpleclient\build\jar\META-INF wsimport-client-compile: Compiling 1 source file to C:\Documents and Settings\debgre\My Documents\NetBeansProjects\examples\jaxws\simpleclient\build\jar C:\Documents and Settings\debgre\My Documents\NetBeansProjects\examples\jaxws\simpleclient\src\java\simpleclient\HelloClient.java:13: package helloservice.endpoint does not exist import helloservice.endpoint.HelloService; C:\Documents and Settings\debgre\My Documents\NetBeansProjects\examples\jaxws\simpleclient\src\java\simpleclient\HelloClient.java:14: package helloservice.endpoint does not exist import helloservice.endpoint.Hello; C:\Documents and Settings\debgre\My Documents\NetBeansProjects\examples\jaxws\simpleclient\src\java\simpleclient\HelloClient.java:19: cannot find symbol symbol : class HelloService location: class simpleclient.HelloClient static HelloService service; C:\Documents and Settings\debgre\My Documents\NetBeansProjects\examples\jaxws\simpleclient\src\java\simpleclient\HelloClient.java:39: cannot find symbol symbol : class Hello location: class simpleclient.HelloClient Hello port = service.getHelloPort(); 4 errors BUILD FAILED (total time: 1 second) /code
mail.jar This JAR file contains the JavaMail API and all service providers.
activation.jar This JAR file contains the classes that make up the JavaBeans Activation Framework (JAF).
dom4j.jar dom4j is an open-source XML framework for Java. It allows you to read, write, navigate, create, and modify XML documents. It integrates with DOM and SAX and is seamlessly integrated with full XPath support. The dom4j.jar file contains all the dom4j code and the XPath engine without the SAX and DOM interfaces. This is the JAR file to use if you are using JAXP and crimson.jar or xerces.jar.
saaj-api.jar and saaj-ri.jar These two JAR files contain the APIs and Reference Implementation of SOAP with Attachments API for Java (SAAJ), which provide API and implementation to generate SOAP messages.
jaxrpc-api.jar and jaxrpc-ri.jar These two JAR files contain the JAX-RPC APIs and Reference Implementation of Java API for XML-based Remote Procedure Call (RPC), which enable Java developers to build web applications and Web services that incorporate XML-based RPC functionality according to the SOAP specification.
jaxm-api.jar and jaxm-runtime.jar These two JAR files contain the APIs and Reference Implementation of the Java API for XML Messaging (JAXM), which is an XML-based messaging system for sending and receiving SOAP messages.
jaxr-api.jar and jaxr-ri.jar These two files contain the APIs and Reference Implementation for JAXR or the Java API for XML Registries, which provides a uniform standard API for accessing different kinds of XML registries. It includes detailed bindings between the JAXR information model and both the ebXML Registry and the UDDI registry specifications.
jaxp-api.jar JAXP is the Java API for XML Processing. It supports processing of XML documents using DOM, SAX, and XSLT.
castor-0.9.3.9-xml.jar Castor is an XML data-binding framework. Unlike DOM and SAX, which deal with the structure of an XML document, Castor enables you to deal with the data defined in an XML document through an object model that represents that data. Castor can marshal almost any beanlike Java object to and from XML.
commons-logging.jar This JAR file contains a logging library package.
fscontext.jar and providerutil.jar These two files contain the file-system service provider. and finally mount j2ee api jars.
I am also new to web services and had exactly the same problem with the simpleclient example of the tutorial. I believe the JAR files have nothing to do with it, all the necessary libraries are already included into the NetBeans project. The following helps. - In the Projects tab, locate the project simpleclient. - Unfold Web Service References, select HelloService - Right-click the mouse, Refresh Client - Select the checkbox "Also replace local wsdl file with original wsdl located at" - Click <Yes>
I am also new to web services and had exactly the same problem with the simpleclient example of the tutorial. I believe the JAR files have nothing to do with it, all the necessary libraries are already included into the NetBeans project. The following helps.
- In the Projects tab, locate the project simpleclient.
- Unfold Web Service References, select HelloService
- Right-click the mouse, Refresh Client
- Select the checkbox "Also replace local wsdl file with original wsdl located at"
- Click <Yes>
I'm an asp.net developer and new to everything in Java, and also has the same error: package helloservice.endpoint does not exist. I don't see Web Service References under simpleclient project.
However, when right click the mouse on simpleclient, choose new Web Service Client and add the url for wsdl. this has made the error disappear.
subject: Java EE 5 Tutorial - Problem with Web Services