Problem in Static Stub Client
Hello...!!!
I am trying to learn web services using j2ee.
when I try to build the static stub client, using 'asant build', build always failed. I've already built the service n can see its wsdl in ie.
I have given all the process below after typing 'asant build'
(I also donn understand 1 thing, I have set all environment variables on D drive though it shows C drive[see ** below], o/s:win xp)
Plz. help asap.
Thanks in advance.
.Mohit
/*process after asant build command*/
Buildfile: build.xml
clean:
[delete] Deleting directory D:\Mohit\j2eetutorial14\examples\jaxrpc\staticstub\build
generate-stubs:
j2ee-home-test:
init:
prepare:
[echo] Creating the required directories....
[mkdir] Created dir: D:\Mohit\j2eetutorial14\examples\jaxrpc\staticstub\build
set-wscompile:
run-wscompile:
[echo] Running wscompile:
[echo] ** c:\sun\appserver/bin/wscompile.bat -gen:client -d build -classpath build ${config.wsdl.file}
[exec] error: error: file not found: ${config.wsdl.file}
[exec] Usage: wscompile [options] configuration_file
[exec] Use "wscompile -help" for a detailed description of options.
j2ee-home-test:
init:
prepare:
[echo] Creating the required directories....
compile-client:
[echo] Compiling the client source code....
[javac] Compiling 1 source file to D:\Mohit\j2eetutorial14\examples\jaxrpc\staticstub\build
[javac] D:\Mohit\j2eetutorial14\examples\jaxrpc\staticstub\src\HelloClient.java:46: cannot find symbol
[javac] symbol : class HelloIF
[javac] location: class staticstub.HelloClient
[javac] HelloIF hello = (HelloIF) stub;
[javac] ^
[javac] D:\Mohit\j2eetutorial14\examples\jaxrpc\staticstub\src\HelloClient.java:46: cannot find symbol
[javac] symbol : class HelloIF
[javac] location: class staticstub.HelloClient
[javac] HelloIF hello = (HelloIF) stub;
[javac] ^
[javac] D:\Mohit\j2eetutorial14\examples\jaxrpc\staticstub\src\HelloClient.java:56: cannot find symbol
[javac] symbol : class MyHelloService_Impl
[javac] location: class staticstub.HelloClient
[javac] return (Stub) (new MyHelloService_Impl().getHelloIFPort());
[javac] ^
[javac] 3 errors
i think these 2 lines are needed in <home>/examples/jaxrpc/common/build.properties to build jaxrpc examples
config.wsdl.file=config-wsdl.xml
config.interface.file=config-interface.xml
Similar Messages
-
How to implement an independent static stub client ? Please, help
Hi everybody!
I'm using the jwsdp1.2 and i got the static stub tutorial client to test my webservice. It works fine! However, i tried to compile the client code separately and it didn't worked. The jvm can't find the webservice class. So, the questions are:
- How to implement an independent static stub whithout the ant help?
- How can the client get the endpoint to create the proxy?
- Must I use any javax.xml.rpc interface (call or service maybe) to do the job?
- Could anybody show me some sample code?
Well, that's it. I'm waiting for some answer. Please, help me.
Tks in advance,
Rodrigo.Can you explain what you mean by "independent static stub" ?
JWSDP Tutorial explains all the steps required to create a static stubs client and invoke the service. In addition, https://jax-rpc.dev.java.net/whitepaper/1.1/index-part2.html#Scenario2 explains the detailed steps to achieve the same from command line.
Hope that helps.
Post your JAX-RPC related questions to [email protected] for a quicker resolution.
Send an email to [email protected] to subscribe to the alias.
Send an mail to [email protected] for a complete list of help commands.
-Arun -
Hi everyone
I am using Static Stub.
The add(2,3) method works but not the getName()
when String getName() invoked Null value is returned.
----------------------- my Static Stub Client -----------------------------
public class Tester
public static void main(String [] args) throws Exception {
// Make a service
EmployeeRecordServiceLocator service = new EmployeeRecordServiceLocator();
// Now use the service to get a stub .
EmployeeRecord port = service.getEmployeeRecord();
// Make the actual call
int adding = port.add(2,3);
System.out.println("Show adding -->" + adding );
port.setName("reza");
String myName = port.getName();
System.out.println("Show my name -->" + myName );
------------------------ my Java class which is being used ------------------------------------
package bankStaff;
import java.io.*;
public class EmployeeRecord
private String name ;
public String getName()
return name;
public void setName(String name)
this.name = name;
public int add(int a, int b)
return a+b;
The only way that will return a value is when I modify it as the following but don't think is correct.
Because it behaves as setter & getter at the same time!!!!!!!!!!
public String setName(String name)
return (this.name = name);
But When I use the EmployeeRecord class in standalone application (Non Web service) the String getName() works! It returns String value.
EmployeeRecord class used in standalone application
EmployeeRecord myVar = new EmployeeRecord():
myVar.setName(String name);
myVar.getName();
(Obivosualy the class EmployeeRecord has to be instantiated)
Q2 - Also How can we instantiate a class in the Web services or do we have to?
e.g. EmployeeRecord myVar = new EmployeeRecord():
BTW: I am using Eclipse 3.1
Any clues please?
Kind regardsHi
Find the build.properties located in the same directory of targets.xml
Add the j2ee.home location, in my case
j2ee.home= C:/Sun/AppServer
Good Luck
Marlene -
Building stubs & Client-side bindings
Hi everyone
I have created a simple web service from my EmployeeRecord class.
I am using Static Stub to test it.
The add(2,3) method works but not the getName()
when String getName() invoked Null value is returned.
----------------------- my Static Stub Client -----------------------------
public class Tester
public static void main(String [] args) throws Exception {
// Make a service
EmployeeRecordServiceLocator service = new EmployeeRecordServiceLocator();
// Now use the service to get a stub .
EmployeeRecord port = service.getEmployeeRecord();
// Make the actual call
int adding = port.add(2,3);
System.out.println("Show adding -->" + adding );
port.setName("reza");
String myName = port.getName();
System.out.println("Show my name -->" + myName );
------------------------ my Java class which is being used ------------------------------------
package bankStaff;
import java.io.*;
public class EmployeeRecord
private String name ;
public String getName()
return name;
public void setName(String name)
this.name = name;
public int add(int a, int b)
return a+b;
The only way that will return a value is when I modify it as the following but don't think is correct.
Because it behaves as setter & getter at the same time!!!!!!!!!!
public String setName(String name)
return (this.name = name);
But When I use the EmployeeRecord class in standalone application (Non Web service) the String getName() works! It returns String value.
EmployeeRecord class used in standalone application
EmployeeRecord myVar = new EmployeeRecord():
myVar.setName(String name);
myVar.getName();
(Obivosualy the class EmployeeRecord has to be instantiated)
Q2 - Also How can we instantiate a class in the Web services or do we have to?
e.g. EmployeeRecord myVar = new EmployeeRecord():
Any clues please?
Kind regards
rezaDoes debugger help ???
Please post the soln, if u solve
L. -
Problem in Web Service Client with JDeveloper 11 r2
I have a problem while make WS client in JDeveloper 11g R2... It's WS makes in .net
I get the next error:
*"An error occurred while opening"*
after
*"java.lang.IlegalStatementException: getReader(): null text buffer"*
Whit can help my?Were you able to test the WS using SOAP UI or the like ?
-
Urgent : problems in authenticating the client
Hi every one,
Im new to SSL and have a problem in authenticating the client with the server. when i disable
((SSLServerSocket)serversocket).setNeedClientAuth(true);
both the server and client work fine and i get the required output.
if i use -Djavax.net.ssl.truststore=trustStoreName and -Djavax.net.ssl.keyStore=keystoreName in the command line for the client then it works but i want to do it without the commandline options
I tried to debug the clients ssl handshake where it seams that if i dont mention the truststore and keystore in the command line it wont take the ones mentioned in the code.
If anyone has a solution for this or any idea can you please help me out im stuck on it for about a week now. Thanks in advance.
uzi
Message was edited by:
Deo_Zone
Message was edited by:
Deo_ZoneHi...
i'm new to ssl connection....i implement the code for ssl connection through java program...i use the following code
String keystore = "<java_home>/jre/lib/security/cacerts";
System.setProperty("javax.net.ssl.trustStore",keystore);
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.SECURITY_AUTHENTICATION,"simple");
env.put(Context.SECURITY_PRINCIPAL,adminName);
env.put(Context.SECURITY_CREDENTIALS,adminPassword);
env.put(Context.SECURITY_PROTOCOL,"ssl");
String ldapURL = "ldaps://mydc.speedrock.com:636";
env.put(Context.PROVIDER_URL,ldapURL);
DirContext ctx = new InitialLdapContext(env,null);
i use this code in my web application and using server tomcat 5.5 server...
Steps:
1. Started my tomcat server
2. attempt to change ActiveDirectory user password.
At this time i'm not importing AD server certificate into cacerts file..
In this situation it throws exception.
3. now i import the valid certificate into cacerts file using keytool command
keytool -import -alias xyzADCert -keystore <javahome>/jre/lib/security/cacerts -keypass changeit -storepass changeit -noprompt -file <java_home>/jre/lib/security/ca.cer;
when i run this command from console, import the certificate successfully....
4. now again attempts to change password...
In this situation it gives same previous exception....
But, when i restart the tomcat server and attempts change password, its working fine...
The same thing happens in case of delete certificate...
Steps:
1.Start the tomcat server
2. import valid certificate using keytool command
keytool -import -alias xyzADCert -keystore <javahome>/jre/lib/security/cacerts -keypass changeit -storepass changeit -noprompt -file <java_home>/jre/lib/security/ca.cer;
3. Try to change password....working fine
4. delete the certificate using keytool command
keytool -delete -alias xyzADCert -keystore <javahome>/jre/lib/security/cacerts -keypass changeit -storepass changeit
when i run this command certificate deleted from cacerts file....
for confirmation, once again i run this command...it gives alias does not exit message.
5. Now, i re attempts to change password with out restaring tomcat server...
instead of throwing exception like "simple bind failed", password updated in server for user.
6. But, when i restart the tomcat server, it gives the exception like "simple bind failed" when i try to change password.
my target is with out restarting server ..do change password successfully when i import the certificate and throw exception when i delete the certificate from cacerts file...
please give me some help... -
Problem defining a java client on tomcat to call the esb web service
Dear Support,
I have a java program that has been incorporated on the oracle SOA suite. We now have a problem defining a java client on tomcat to call the esb web service. The Oracle SOA part is running fine”.
The software versions we are using :
1 - Oracle SOA suite on 10.1.3.3 Oracle AS
2 – Java 1.5
3 – Tomcat 5.5
4 – OS XP ProfessionalIf you have a main method in jour generated WSclient class (by the proxy) add the following code below the //add your own code:
AddFileResponseType testResponse = myPort.addFile(testRequest);
where AddFileResponseType is the responsetype of the WS and addFile is the method to call. this is just an example of my own webservice.
Next stap is to put the cursor in the main method and choos debug or run.
This should invoke the main method en call the webservice
I hope this helps you
Kim -
Problem in run remote client with appclient
I am having problems to execute remote clients (remote machines) using script of client conteiner: appclient. Local it functions perfectly, however when executed in a remote machine, the application not run wheel.
Thanks!Have you looked at the Developer's Guide?
http://docs.sun.com/app/docs?q=clients&p=doc%2F819-0079
Specifically the section on creating clients with and without the app client container?
http://docs.sun.com/source/819-0079/dgacc.html -
Problem connecting only iFolder client
Hi everyone,
I begn with iFolder 3.8 and I've a problem with connecting the client.
For information, I've 3 separate iFolder servers, two of them work perfectly !
So, on one, I can't connect the Windows Client, I've an error "iFolder can't connect, please check the informations" (translation from french).
If I try to connect on the web access, it's OK, no problem with that.
The Simias.log file says that the connexion is successful with the client but it's not...
I try to reinstall the server several times with simias-server-setup, ifolder-admin-setup and ifolder-web-setup but no effects.
If someone as already experienced this and solved this problem, thank you for your help.OK, so I've solved my problem after hours.
I tried to reinstall completly the server and then, it works !
To conclude, if your iFolder server doesn't work at the first time, don't try to debug, format and reinstall. -
Problem with Oracle 9i client to access multiple oracle databases
I am having problem setting up oracle client 9i to access multiple oracle db. When I finish installing Oracle 8.x client, I simply replace the tnsnames.ora that the installation created with the ones that I have. I can access three different databases. I only need to add three diffrent entries in the tnsnames.ora file. I cannot be able to do this with Oracle 9i client. I follow the instruction from the CD installation to use local naming method. It appears that Oracle client try to create multiple entries on my tnsnames.ora file but I can only be able to access one db.
Any help is appreciated.
Thanks! HDthe old tnsnames.ora is working with Oracle 8 client. The new tnsnames.ora (if I use the Oracle Net config) have two entries, one is dev and the other is prod.
Thanks! -
Problem with update SCCM client to Sp1 CU3 on Windows 2008 server
Hi all,
I have problem with update SCCM client on Windows 2008 Server to 2012 Sp1 CU3. I have sent to deployment package with update (SP1 Cumulative Update 3 - server update) on four servers and after few minutes I have got in Monitoring\Deployment details four
this same errors in "Asset Details":
USER Message ID
Status type Description
NT\AUTHORITY\SYSTEM 1006
Error 3003
I love that types of error... which is har to find answer on google :-( I have tried but I haven't find any constructive :-( Did you met with something similar? Which log I should check (sorry - I'm still noob in SCCM2012) to update actual SCCM Client SP1
(5.00.7804.1000) to SP1 CU3 (5.00.7804.1400)?
Thank you.I see in fodler with CU3 updates, are four packages:
- SP1 Cumulative update 3 - x64 client update
- SP1 Cumulative update 3 - x86 client update
- SP1 Cumulative update 3 - server update
- SP1 Cumulative update 3 - console update
It will be stupid but... maybe I should deploy x64 client update package? -
Problem in spring rich client with numeric value
I am facing a problem in spring rich client.
I have a text field of NumericJTextField type which extends JTextField and it is storing value of long type.
In one constructor of this NumericJTextField ,we are creating new instance of NumericDocument which extends PlainDocument.
We are alos using document filter.
My problem is that,when i enter a numeric value starting with 0 for ex: 0123 then at the time of saving,
it automatically converts this numeric value into something else like 83 or 9 etc.
I dont know how and where this is happenning?
can anyone help mme in this?
Thanks!It's happening somewhere in the Spring code, where it translates a string into a number. Apparently it treats strings of digits which start with a zero as octal. (You know what that means now, right?)
I don't know much about Spring, but this isn't a Spring forum so I'm free to post my uneducated wild guesses here. Quite possibly this is a Spring FAQ which you would find on the Spring website. -
Problem to Setup Oracle9i Client
Problem to Setup Oracle Client
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.168.0.234PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
ORCL_172.168.0.234 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.168.0.234)(PORT = 1521))
(CONNECT_DATA =
(SID = nic)
(SERVER = DEDICATED)
But cannot connect.............
With Sever.....
is ORCL Service Name in Database Servet or Local Server........Suppose Listener by name LISTENER is lisiting on port 1521 and the IP address is 172.168.0.234. Let us assume that database sid is ORCL and the database is up and running.
To configure tnsname, put the following in tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.168.0.234)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl)
Now from the prompt check as follows.
C:\Documents and Settings>tnsping orcl
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-MAR-2
007 07:54:10
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = l172.168.0.234)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (990 msec)
C:\Documents and Settings>
Try to connect as following...
sqlplus scott/tiger@orcl
It should allow you to login.
tnsnames.ora configuration
http://download-uk.oracle.com/docs/cd/B10501_01/network.920/a96580/namingcf.htm#448222 -
Problems with Static and non-static stuff
Right now I am trying to work on a RPG and trying to make it all using classes instead of having a Applet run everything and want to call Methods to make / remove the buttons here is the Method I'm dealing with
public void placeButtons()
attackBtn.setBounds(200,700,75,25);
defendBtn.setBounds(200,725,75,25);
magicBtn.setBounds(275,700,75,25);
itemBtn.setBounds(275,725,75,25);
game.add(attackBtn); // Here is where I am having the problem (non-static method add(java.awt.Component) cannot be referenced from a static context)
attackBtn.addActionListener(this);
}Normally I would be making all my buttons in my main class but I want to know if I can make them in a separate class and load them in my main class so I can shorten my code by a ton.Generally speaking: Yes: you are only limited by your ingenuity and knowledge.
//call from other class
MyButtonClass mbc = new MyButtonClass();
MyPanel p = new MyPanel();
p.add(mbc.getMyMainButton());
//what everAlthough I would think that it may be better to get your entire Frame back for display or a panel... It just seems like it's going to be awkward to work with unless you're making some kind of button generator or something, but then it's your app and from your description, the code given should illustrate a way of getting to the answer you seek. -
Synchronisation problems between apple mail client on a MacBook Pro and Gmail
I am having synchronisation problems between apple mail client and gmail on the MacBook Pro, but no similar problems on the ipad and iphone. My mail is not being collected by the aplle mail client on the laptop, and now all my inbox for my gmail account has disappeared, although the Archive and sub folders under "Google" are still showing.
This is an intermittent problem.
I have previousy re-built the mailbox and solved the problem, but there must be something more fundamental going on, as the problem has occurred again.
Anyone have any tips?Sorry, but no. POP3 versus IMAP has nothing to do with keeping spam off your computer. Your ISP should be doing its filtering before the mail reached the mail server in either case, and your Mac would be doing its filtering after downloading the mail from the mail server in either case. (Your iPad does no filtering at all.)
Maybe you are looking for
-
Parallel currency 2nd local currency issue
Good morning everyone, I am handling and issue wherein I am finding a difference in the FS10N GL line items. Background- 1. Doc currency, 1st local currency and 2nd Local currency are the same i.e USD. 2. When I see any GL account in FS10N I dont see
-
How to get multiple image resoultion and paste it in new ms word doc or ecxel with file name
Hi any one help me to get the imge resolution and paste it in new ms word or excel i have 100 file i fixed the sizing for all the file by downsample using javascript i want to get the resolution of all the image and paste it with file name anyone ple
-
It's just a doubt.
-
Re-Downloading iTunes Purchases
After switching to Windows 7. I realised I backed up all of my iTunes purchases, except 1 season of a TV show. Is there ANY way for me to re-download them, or plead my case to Apple!?? Thank you in advance for any help
-
Consistency between CIFed data and BW data
Hai, I am transferring data from ECC to APO and also from ECC to BW. Now, I use both the data in APO for my planinng. In case of materials: When CIFing, I have a material, MAT1. With user exit that adds the source name at the begining making