Arvind Purohit

Ranch Hand
+ Follow
since Jun 18, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Arvind Purohit

I have written a webservice and tried to throw my custom exception but i am getting error please help me to solve it.

Server code







ERROR MESSAGE
Exception in thread "main" java.lang.NoSuchMethodError: javax.xml.ws.WebFault.messageName()Ljava/lang/String; at com.sun.xml.ws.model.RuntimeModeler.processExceptions(RuntimeModeler.java:1162) at com.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:898) at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:666) at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:420) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:254) at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:338) at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:201) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:505) at com.sun.xml.ws.transport.http.server.EndpointImpl.createEndpoint(EndpointImpl.java:257) at com.sun.xml.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:181) at com.sun.xml.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:123) at javax.xml.ws.Endpoint.publish(Endpoint.java:170) at mytest.com.inc.WebServiceTest.main(WebServiceTest.java:13)
13 years ago
Hi All I have list of module object. I want to show it to user and user can edit it and can save it also. In module object three members are there 1 String moduleName 2.boolean readFlag 3. writFlag.

The bean i am using is in Request Scop i don't want to use any other scop. My problem is setterOfThatList is not called when update button is clicked. Where as on the same page i used another inputText, setter of the variable which is connected to this inputText is called.

13 years ago
JSF
Hi All
I used JSF 1.2 and written this code
Now i want equivalent of this in jsf 2.0

Thanks A Lot


13 years ago
JSF
Hi All
My Requirement is to make a form using rich faces 4.0 where user can enter his address details like Country, State , City

Now i want Once Country is selected state should be selected according to country
i want to display only 10 state at a time so using autocomplete component.
Now my problem is if i am selecting any state it is showing id instead name of state or country.
secondly i want to give ajax support so that as soon as a state is selected city should be populated accordingly
i am doing like this
THANKS A LOT


Bean



13 years ago
JSF
Hi All
I am using JSF 2.0 , I have two beans UserBean ( Request Scope ) and UserInfoBean( Session Scope ).
I want to know how can initialize UserInfoBean from one method of UserBean( Request Scope ) so that i can access it from anywhere.

I also want to know performance wise which is better 1. Put a bean as session bean 2. put different different variable in session individually.
Thanks A Lot




13 years ago
JSF

Arvind Purohit wrote:Hi All
I am new to web services. I have written a java class.
But I am not getting how to deploy it. I mean do i need web server or app server . As this is simple java class i can not make WAR file to deploy it . So what is the method to deploy it and which server should i use.


When I am running this program from eclipse and typing http://localhost:9191/wisequotes?wsdl in browser i can see some wsdl file but when i am running this program from command line i am getting error No Class def found error WiseQuoteServer

13 years ago
Hi All
I am new to web services. I have written a java class.
But I am not getting how to deploy it. I mean do i need web server or app server . As this is simple java class i can not make WAR file to deploy it . So what is the method to deploy it and which server should i use.


13 years ago
Thanks You Ulf Dittmer
For your Reply. In this web services i am trying to concatenate two string. I want to know In which file should i write my business logic( ie concatenate of two string )
In SimpleServiceSkeleton file you can see //TODO : fill this with the necessary business logic but i am not getting how to write it.

Can you please give me a tutorial link or book which is explaining about Creation of Web service from WSDL using Axis and Eclipse theat will be a great help to me thank you. If you have any doubt .. how i have generate these code i can explain

Thanks A lot
13 years ago
Hi All
I am creating a web services steps are as follows

1. Created a dynamic web project
2. Created a WSDL file
3. Generate code from wsdl

Now i want to know in which generated java file i have to edit to implement my method
and how do i deploy it
I am giving yoy the wsdl file and also java file which are generated


Thank You
WSDL FILE



ConcatRequest


ConcatResponse


ExtensionMapper


SimpleServiceMessageReceiverInOut



SimpleServiceSkeleton



SimpleServiceSkeletonInterface









13 years ago
Hi All
I have Form In which User is entering his address details
Country State City Area PIN
this all fields are drop down list ( h:selectOneMenu )
When i select county it populates State and on selection of State It populates City so on
I am using a4j:support to call function.
My problem is user should be able to select State or city or pin by using keybord or by mouse
ie two event ( onkeyup and select ) shoud work
How to do it ???

THANKS YOU
14 years ago
JSF
Hi All
I have generated java code from wsdl file using eclipse axis2 plugin
i.e client side code, server side code, test client also
my question is how will i implement the method of service, i am confused
i am editing SimpleServiceSkeleton.java
it is saying "cannot cast String to sayHelloResponse"

i want to know
1. how i will implement myservice
2. to use this service how will generate .aar file
3. how to deploy it in local machine in tomcat
4. how will i test it
5. how will i write wsdl file which return array of my custom object ( eg array of Employee Class object )

The auto generated files are
1. ExtensionMapper.java
2. SayHelloRequest.java
3. SayHelloResponse
4. SimpleService
5. SimpleServiceCallbackHandler
6. SimpleServiceMessageReceiverInOut
7. SimpleServiceSkeleton
8. SimpleServiceSkeletonInterface
9. SimpleServiceStub
10. SimpleServiceTest

And also
services.xml
SimpleService.wsdl
build.xml

if you require i will send you code of this files

THANKING YOU
ARVIND






14 years ago
Hi All
I have created a web services, when i am calling webs service, it is giving
exception org.xml.sax.SAXException: Deserializing parameter 'return': could not find deserializer for type ..........

I want to know how do i write java serializied class and Deserialized class for my custom class
and how do i use to overcome this problem


Thanking You
Arvind
14 years ago

Ivan Krizsan wrote:Hi!
You should not store client-specific state in instance variables of the service.
In your example, there is no reason for having two operations. Instead you should have only one that takes an User object as input and returns an User.
Do not use instance variables in the service!

If you must have a stateful web service, then you can have an operation that receives some data, stores it in a database and assigns an unique id to it.
The id is returned to the client and, when invoking subsequent operations on the service that requires access to the data, the client supplies the unique id.
This is, however, still a bad idea, since it will seriously complicate scaling of the service - it is all good and well if you run in one single instance of the service, but imagine the case when you have a layer 4 switch or similar in front of a cluster of servers, each running an instance of the service. In such a scenario, you do not want to use one single database to store all the data, since it will become the bottleneck of the system.
Stateless web services do not need to share any data and can thus be easily scaled.
Best wishes!


Thanks a lot IVAN
I made a web services in which i am not using any instance variable
there is a method which takes arguments and return some thing. It works fine till i return any primitive data type or array of primitive data type, but fails when i try to return my own Object or array of Object . If a am testing through web browser then i am getting correct output

1. service class
2. used class
3. service.aml
4 build.xml
5 test class
6 error






















14 years ago
Hi All
I have developed a web services. I am getting problem when two different user are trying to access web services concurrently.
In web services two methods are there 1. setInputParameter 2. getUserService

suppose

Time User Operation
10:10 am user1 setInputParameter
10:15 am user2 setInputParameter
10:20 am user1 getUserService


User1 is getting result according to the input parameter seted by user2 not by ( him own )

I am using axis2 1.4 ,eclipse ant build,
My services are goes here
1. User class
2. service class
3. service.xml
3. build file
4. testclass





















14 years ago

Tom Reilly wrote:I don't know if this is your problem but you are not closing your connection, statement or result set. I see you are also eating the DatabaseInitializationException in getInstance().


Thanks for your reply...
I am not getting what do you want to say. how do i solve this problem

Thanks