Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Vasaunth Babu Raju

Greenhorn
+ Follow
since Jun 09, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vasaunth Babu Raju

Its working now........

Thanks Ivan.


Regards,
Vasanth
Hi,
First of all thanks for your reply.Your study guide is great it Rocks.


Regrarding the below reply,

Actually when I follow the below approach it runs perfectly.

1. Create an annotated end point for Hello as in previous mail.
2.use
wsgen -cp . com.service.HelloBean -wsdl

to generate ws artifacts.
3. Use the following code to publish the WS
Endpoint.publish("http://localhost:8080/HelloWorldWeb/Hello",
new HelloBean());

3. When I traverse to the below URL I see the corresponding WSDL.
http://localhost:8080/HelloWorldWeb/Hello

But My question is
How do I expose it as a servlet end point?
In other words, with out using Endpoint.publish("http://localhost:8080/HelloWorldWeb/Hello",new HelloBean()); How do I publish it in tomcat.

As you said previously, if JAX-WS generates a servlet, which URL should I use to access the WSDL? As I have no where configured the URL as in this case.


Thanks and awaiting for your reply,

Vasanth





I created a servlet end point following the below steps


Make a webapplication/ In eclipse you can make a project which is a dynamic web project.Let's write a POJO bean class which can be invoked by sending a SOAP Request which contains a string and it will return the response "Hello World" + input String.

POJO class:

@WebService
@SOAPBinding(style=SOAPBinding.Style.RPC)
public class HelloBean{

@WebMethod
public String hello(String name){
return "Hello " + name;
}
}

Note the annotation on the bean class. The class does not implements any interface.
Register this bean as a servlet in the web,xml

<servlet>
<servlet-name>helloBean</servlet-name>
<servlet-class>com.oyeJava.HelloBean</servlet-class>

</servlet>
<servlet-mapping>
<servlet-name>helloBean</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>

Deploy the war in your server and hit the service at:
http://<hostname>/JAX_WS_HelloWorld/hello?wsdl


When I connect to the above URL I get an exception stating "javax.servlet.ServletException: Class com.service.Hello is not a Servlet"


Kindly let men know how to proceed further?

What was the fault in the above code.

Regards,
Vasanth.
Dear Ranchers,

I am confused with different versions of specifications

For Example,

There are some difference in SOAP versions

SOAP1.1: SOAP 1.2
------------ ------------
faultcode Code
faultString Reason
actor Role

Similarly, in WSDL,
WSDL1 WSDL2
--------- ------------
portType Interface
port end point


Ranchers who have taken up scdjws-5 kindly guide me which one to follow?


Is Reading from RMH sufficient?


Kindly let me know on which version of specifications the current exam questions are based on?




Thanks in advance,

Vasanth

(SCJP,SCWCD)





I think that you can directly take up SCDJWS as the eligiblity critera is that you should have cleared SCJP(Any Version).

More over there is not much of corelation between the two exams, so you can directly take up SCDJWS.
What is the use of SOAP header relay attribute?

Any practical examples/code?