Elias Ta

Greenhorn
+ Follow
since Sep 29, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Elias Ta

Hi,
I am starting a new Struts2 project from scratch. It is based on Tomcat 5.5 and will utilize oracle as data source and Eclipse 3.4.
What I want is to be able to use Eclipse as my development environment and automate compilation and deployment through Ant. I could not find a book on setting up environment to prepare. Can you please give me some detailed insight how I can build and run Ant with in the Eclipse env?, I would also like to eventually use Hibernate but I cannot imagine the pieces put together. I would appreciate any insight

Thank you for your help
16 years ago
All I did is upgrade to tomcat 5.5.27 but also made sure I have the proper ojdbc14.jar and class12.jar.
However I am getting "CANNOT CREATE JDBC DRIVER OF CLASS '' FOR CONNECT URL 'NULL' " message.

Any idea?
Thanks
16 years ago
I upgraded from tomcat 5.0 to 5.5 and I am getting SQL exception "ERROR IN INITIALIZAING DB CONNECTION IN PAGESERVLET " as in the following sample code
try
{
InitialContext initialcontext = new InitialContext();
try
{
message.debug("getting context");
Context context = (Context)(new InitialContext()).lookup("java:comp/env");
message.debug("getting connection");
conn = ((DataSource)context.lookup("mydb")).getConnection();
message.debug("got connection");
processRequest(httpservletrequest, httpservletresponse);
}
catch(SQLException sqlexception)
{
message.error("ERROR: Initializing DB Connections in PageServlet");
}
finally
{
try
{
if(!conn.isClosed())
conn.close();
}
catch(SQLException sqlexception1) { }
}


a sample of my tomcat server.xml looks like this
<DefaultContext>
<Resource name="mydb" auth="container" type="javax.sql.DataSource" />

<ResourceParams name="mydb">

<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>

<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@10.3.4.5:1521:kwdev01</value>
</parameter>

<parameter>
<name>username</name>
<value>abc</value>
</parameter>

<parameter>
<name>password</name>
<value>abc</value>
</parameter>

<parameter>
<name>maxActive</name>
<value>200</value>
</parameter>

<parameter>
<name>maxIdle</name>
<value>50</value>
</parameter>

<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>

<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>

<parameter>
<name>removeAbandonedTimeout</name>
<value>300</value>
</parameter>

</ResourceParams>

</DefaultContext>
<!-- END ADDED FOR BRIGHTSERV -->
####################################

</Host>

</Engine>

</Service>

</Server>
16 years ago
Billy,
I am sorry to say this but the so called experts in this forum are either not willing to help or have very little real life experience in web services. They just want to look smart by asking back more questions than actually helping.
Compare to other forums like oracle, these guys are so just useless except looking down on people with questions.

I asked 6 questions and never got a single good answer, just a waste of time.
16 years ago
Ulf,
Ok this is where I am..
I was able to follow the axis2 doc. and created a simple POJO class , used the JAVA2WSDL script to create *.aar service deployed it on my tomcat/webapps/axis2 , and it was successfully consumed by my target customers ( which are actually on an external separate server with ASP evnironment). Ok so that was good. Now here is my challenge.
I have to be able to consume a web service , http://services.lpcorp.com/TestService/testservice.asmx ( which is built using ASP environment) and I tried creating a stub by following the axis2 documentation just on the command line.

1. WSDL2Java -uri http://services.lpcorp.com/TestService/testservice.asmx
-p org.apache.axis2.testservice -d adb -s

This is where I get all kinds of error like codeGenerationException : Error parsing WSDL, WSDLException, SAXParseException..

my questions are
1. how do I create a client with in the Axis2 for such webservice that is not WSDL formatted?
2. I am hoping to consume the web service with a call inside my helper classes with in J2EE architecture.. and I am confused how to set this up so since the scripts cannot be used in run environment..

My due date is in one week and I am desperately needing your help.

Thanks
16 years ago
John,
Can you share some idea how you got the web service and a client to work in tomcat application. I am stuck and would greatly appreciate your help
16 years ago
Thanks Ulf,
I am soooooooooooo confused with web service. Is there any example you have you would like to share where I can see a web service class and a client created from scratch and used with in a java tomcat application.
Why does Java have to be this puzzling?
16 years ago
when running
wsdl2java -uri http://services.lpcorp.com/TestService/testservice.asmx

These are some of the errors I get
1. The element "p" must be terminated by the matching end-tag "</p>"
2. org.apache.axis2.wsdl.codegen.CodeGenerationException : Error parsing WSDL
3. org.apache.axis2.WSDLException : PARSER EROR

I am using Java 1.4.13
Thanks
16 years ago
Hi all,
This is my third posting and didn't get much help so far..
I have been trying to just create a client to a web service (with valid wsld soap uri) using axis2 and I tried the wsld2java built in script and ended up with errors..
What I want is to be able to create a client class from scratch based on Axis2.

If you have actually implemented Axis2 client, please shed some light to me. Give me details what classes I need, and etc.. please don't tell me to review the Axis2 documentation ( I have already done so and it is no help).

Thanks,
Elias
16 years ago
I have a tomcat based web application running on JDK1.4.13 in tomcat 5.0.19 and there is a requirement that I would need to consume a web service. I downloaded Axis2 and tried to read the examples to develop a client to consume a web service.
My questions are
1. Do I need to upgrade my java to 1.5 ?
2. Can someone give me a simple example of a client class that I can learn from? To build the client class from scratch?

Thanks,
Elias
16 years ago
1. I downloaded axis2 in C:\axis2 and set AXIS2_HOME environment variable to point to C:\axis2
2. I have JAVA_HOME pointing to my java installation C:\Java_1.4.2

3. I was able to download the samples and run the ant build files that come with them to create the services and C:\axis2\samples\quickstart

My problem is I can't do the same thing on my little class I created and I am getting C:\lib not found when running ant generate.service which looks like some problem with classpathref="axis2.classpath" portion of build.xml

Why would it work on the samples and not with my class? I would appreciate if you could tell me what I need to do ?

My class is a simple as follows

public class TestService {
public String getMessage()
{
return "Hello Client";
}
}
16 years ago
I have ASP (wsdl based) test web services on http://services.lpcorp.com/TestService/testservice.asmx

I have downloaded Axis2 and test it with built in sample services in Tomcat webapps/axis2/services and it works.


Can someone please give me a sample client for the webservices.. I am lost on writing a client and could not understand the tutrial on apache axis2 site.. It is just so confusing..

Thanks,
16 years ago
Okay please help me with how to build a client for a webservice..
This is where I am
1. I downloaded Axis2 and went through with samples being able to deploy the services bla bla.. I didn't do anything but to follow the steps
2. I can't seem to understand building the client. They have five ways of doing it but I don't know what they are talking about..

Can you please give me a sample of client for a webservice that is on
http://services.lpcorp.com/TestService/testservice.asmx

I appreciate your help..
16 years ago
Thanks Bill..
This is what I did and failed ( It won't even get to the first line in the try block) , can you please suggest anything? Thanks so much..

1. I downloaded Axis into my tomcat/webapps/axis
2. set my classpath as
C:\axis\axis-1_4\lib\axis.jar;C:\axis\axis-1_4\lib\axis-ant.jar;C:\axis\axis-1_4\lib\commons-discovery-0.2.jar;C:\axis\axis-1_4\lib\commons-logging-1.0.4.jar;C:\axis\axis-1_4\lib\jaxrpc.jar;C:\axis\axis-1_4\lib\saaj.jar;C:\axis\axis-1_4\lib\wsdl4j-1.5.1.jar;

3. Went through check list for proper installation and confirmed that I have all required classes found..

4. The webservice url is http://services.lpcorp.com/TestService/testservice.asmx

and I use the following client to call..

package com.servicelane.helpers;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;

import org.apache.log4j.Category;
public class AxisClient {

private static Category message;
public String getTestMath() {
String retString = "";
try {
message.info("about to call endpoint");
String endpoint = "http://services.lpcorp.com/TestService testservice.asmx";

Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName("TestMath");
Integer i1 = new Integer(5);
Integer i2 = new Integer(9);

Integer ret = (Integer) call.invoke( new Object[] { i1, i2 } );
retString = ret.toString();
} catch (Exception e) {
message.info("Exception in trying to getTestmath is :" + e);
}
return retString;

} //end of local method
} // end of class
16 years ago
Hi,
I have a java web app running in Tomcat 5, I want to start calling webservices written in ASP .NET from the Java application.

What do I need (Do I need to install AXIS or SOAP ) ? and How do I do it ( and if you have a simple example) ?.

I have never done any webservices before...

Thanks in advance
16 years ago