This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Sun webservices tutorial Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Sun webservices tutorial" Watch "Sun webservices tutorial" New topic
Author

Sun webservices tutorial

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

I have some doubts in the tutorial (JX-RPC)
1. what is the purpose of config-interface.xml and jaxrpc-ri.xml files? I havent understood their differences?
2.The WSDL namespace is urn:Foo.
What does the above mean in config-interface.xml file? Is the namespace defined in WSDl schema?
3. What is service port? Does it refer to the exposed mehod ?

[ December 02, 2003: Message edited by: Pradeep Bhat ]
[ December 02, 2003: Message edited by: Pradeep Bhat ]

Groovy
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Without knowing in what context "urn:Foo" was used, I would guess that it's a sample namespace for the web service being deployed. In practice, that namespace would be named "urn:com-mycompany-webservices" or "http://mycompany.com/webservices" etc. It could be enlightening to just leave it as it is and see where it ends up in the resulting WSDL document...


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903


I did not find the mention of urn:Foo in the generated WSDL file. Am
I missing something ? I am new to Webservices.
[ December 02, 2003: Message edited by: Pradeep Bhat ]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

I am getting the following error when I build the static client
[echo] Compiling the client source code....
[javac] Compiling 1 source file to D:\jwsdp-1.2\tutorial\jwstutorial13\examp
les\jaxrpc\staticstub\build
[javac] D:\jwsdp-1.2\tutorial\jwstutorial13\examples\jaxrpc\staticstub\src\H
elloClient.java:45: cannot resolve symbol
[javac] symbol : method sayHello (java.lang.String)
[javac] location: interface staticstub.HelloIF
[javac] System.out.println(hello.sayHello("Duke!"));
[javac] ^
[javac] D:\jwsdp-1.2\tutorial\jwstutorial13\examples\jaxrpc\staticstub\src\H
elloClient.java:53: cannot resolve symbol
[javac] symbol : class MyHelloService_Impl
[javac] location: class staticstub.HelloClient
[javac] return (Stub)(new MyHelloService_Impl().getHelloIFPort());
[javac] ^
[javac] 2 errors

Looks like it is not able to find MyHelloService_Impl class. The class is not generated by the build. Can some one help me?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Pradeep Bhat:
3. What is service port? Does it refer to the exposed mehod ?

A portType is like an interface specifying any number of operations (which map to methods in the Java implementation class). Then there's a port which exposes the portType using some particular binding (usually HTTP GET, HTTP POST or SOAP).
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

What is the difference between service name and service port ? Service name consists of number of servive port, right?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Pradeep Bhat:
The class is not generated by the build.
Perhaps you forgot to generate it using wsdl2java?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Pradeep Bhat:
What is the difference between service name and service port ? Service name consists of number of servive port, right?
A service is just a container for the provided interfaces (ports).
In fact, here's an interesting attempt to describe the WSDL element relationships in UML.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

Perhaps you forgot to generate it using wsdl2java?

Lasse, I am using Sun's tutorial and running the application using JWSDP.
The build script is provided in the tutorial and I havent modified it. I am just following the instructions in the tutorial.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sun webservices tutorial
 
Similar Threads
Can they mix???
Web Services Patterns:Question
about Ernst book
A big welcome to this week's author
webservices vs CORBA