Sgc Manorite

Greenhorn
+ Follow
since Jun 05, 2008
Merit badge: grant badges
For More
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 Sgc Manorite

Hi,

I have to write a new web service using axis 1.4 by using an existing bean with a new property - Integer companyId'. The existing bean is already been used by an existing web service deployed on production.

How can I add a new property to this bean without changing the wsdl which would break the calls on the consumer end? I don't need this property to show up in the response also and it's only for internal logic purposes.

Please advise.

Thanks in advance.
13 years ago
Sorry I should have attached the WSDL before. I have edited my original post and have pasted the WSDL for your reference and expert suggestions.
14 years ago
Hi,

Thanks for the correction regarding passing more than 1 group name in the request xml.
But even when I pass only one group name as follows, I get the group name in the array as null.

14 years ago
Hi,

I am using wrapped web service, getPoints with 3 params v.i.z. Group[] grp, XDate start, XDate end where Group is an array of object containing one member; name and XDate has one Date variable.

I deployed the web service using the foll. in my wsdd.



The WSDL...


I am calling the web service with th foll. request using soapUI tool.



The issue is that I'm getting null as the value for the Group[] param in my method. I do get three elements in the Group array but their value is null Where am I going wrong? Is the is the deployment descriptor that needs some change? Help is appreciated.

-Manorite





14 years ago
Thanks Jan,

I don't seem to be getting the exception any more from production server after doing the code change suggested by you. Appreciate it.
[ November 05, 2008: Message edited by: SGC Manorite ]
I have deployed a web service and I am using Axis jars (axis1.4.jar, axis2-kernel-1.3.jar, axis-ant.jar). The WSDL generated (after I click in the WSDL link) next to the web service name has some discrepancies from the WSDL generated before.

WSDL snippet of the old WSDL...

<wsdl:message name="getUserDetailsRequest">
<wsdl :p art name="credential type="tns1:Credential"/>
<wsdl :p art name="userDetailsCriteria" type="tns3:userDetailsCriteria"/>
</wsdl:message>
<wsdl:message name="userDetailsResponse">
<wsdl :p art name="getUserDetailsReturn" type="tns3:userDetailsResponse"/>
</wsdl:message>

<wsdl :p ortType name="UserServices">
<wsdl peration name="getUserDetails" parameterOrder="in0 in1">
<wsdl:input name="getUserDetailsRequest" message="impl:getUserDetailsRequest"/>
<wsdl utput name="userDetailsResponse" message="impl:userDetailsResponse"/>
</wsdl peration>
</wsdl :p ortType>

WSDL snippet of the new WSDL...
<wsdl:message name="getUserDetailsRequest">
<wsdl :p art name="in0" type="tns1:Credential"/>
<wsdl :p art name="in1" type="tns3:userDetailsCriteria"/>
</wsdl:message>
<wsdl:message name="userDetailsResponse">
<wsdl :p art name="getUserDetailsReturn" type="tns3:userDetailsResponse"/>
</wsdl:message>

<wsdl :p ortType name="UserServices">
<wsdl peration name="getUserDetails" parameterOrder="in0 in1">
<wsdl:input name="getUserDetailsRequest" message="impl:getUserDetailsRequest"/>
<wsdl utput name="userDetailsResponse" message="impl:userDetailsResponse"/>
</wsdl peration>
</wsdl :p ortType>

Notice the change in the "part name" of the old and new WSDls. There has been no change in the WSDD. Doe to this the old clients which I had created using the old WSDL does not work. Could anybody please commnet on why this happens and the fix? Thanks in advance.
[ November 06, 2008: Message edited by: SGC Manorite ]
15 years ago
I get the following exception when I execute the test cases in my unit test framework (comprising of cactus struts test case and jtest case frameworks).

org.jtestcase.JTestCaseException: Error retrieving params.
at org.jtestcase.JTestCase.getGlobalParams(Unknown Source)
at org.jtestcase.JTestCase.getGlobalParamLocale(Unknown Source)
at org.jtestcase.JTestCase.<init>(Unknown Source)
at com.xora.tests.common.BaseJunitAction.setUp(BaseJunitAction.java:64)
at com.xora.tests.login.LoginActionTest.setUp(LoginActionTest.java:29)
at junit.framework.TestCase.runBare(TestCase.java:132)
at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:217)
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:217)
at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:217)
at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:91)
at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:103)
at com.caucho.filters.GzipFilter.doFilter(GzipFilter.java:165)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:76)
at com.xora.apps.util.RequestLogger.doFilter(RequestLogger.java:292)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:76)
at com.xora.apps.util.UTF8EncodingFilter.doFilter(UTF8EncodingFilter.java:64)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:76)
at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:158)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:178)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:241)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:586)
at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:690)
at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:612)
at java.lang.Thread.run(Thread.java:595)

My application has dom4j.jar and JTestCase needs jaxen-jdom.jar. Is it a conflict between these jars? I do require the dom4j.jar in the my application and cannot remove it. Can anybody suggest something?
15 years ago

Originally posted by Jan Cumps:
As a last thing, can you please try to replace

with
Regards, Jan



Thanks for the help. I am not able to reproduce this issue on my local environment. Will have to monitor for this exception on production server after which I will update this post with my comments.

Originally posted by Jan Cumps:
Hi,

Your java code says: " AND b.is_client = 1".
The table definition says: IS_CLIENT_ACL NOT NULL NUMBER.
Can you provide the definition of the field is_client?
When I look at your code, and verify the table definition, that field seems to be the only place where things could go wrong.

Regards, Jan



Sorry for the typo. The code is: AND b.is_client_acl = 1

Originally posted by Jan Cumps:
can you please execute these two commands in sql*plus, and show us the results:
This might help us.
I would like to see the definition of:
users.resource_id
users.user_id
resources.resource_id
resources.resource_name
resources.is_client



Hi,
Here are the table descriptions...

TABLE users
Name Null? Type
----------------------------------------- -------- -----------------------
USER_ID NOT NULL NUMBER
RESOURCE_ID NOT NULL NUMBER

TABLE resources
Name Null? Type
----------------------------------------- -------- ------------------------
RESOURCE_ID NOT NULL NUMBER
RESOURCE_NAME VARCHAR2(100)
DESCRIPTION VARCHAR2(100)
IS_CLIENT_ACL NOT NULL NUMBER

Originally posted by Jeanne Boyarsky:
Welcome to JavaRanch!

Is it possible userId is not a number on some executions?



The userId never comes as a non-number or else we should be getting NumberFormatException when doing new Integer(userId). But even this exception is not coming up. Can't figure out where can the issue be? Please advise. Thanks!
I have a function as follows:

public int countUser(String userId) throws SQLException {

int count = 0;
String query = "SELECT COUNT (user_id)" +
" FROM users a, resources b"
" WHERE a.resource_id = b.resource_id"
" AND b.resource_name = 'Silver'"
" AND b.is_client = 1"
" AND a.user_id = ?";

PreparedStatement stmt = con.prepareStatement(query);
stmt.setObject(1, new Integer(userId), java.sql.Types.INTEGER);
ResultSet rset = stmt.executeQuery();
while(rset.next()) {
count = rset.getInt(1);
}
return count;
}

I get java.sql.SQLException: ORA-01722: invalid number while executing the query. Can't figure where I am going wrong. This works fine many times and this exception is not consistent. Please help.