• Post Reply Bookmark Topic Watch Topic
  • New Topic

IBMs WSTK 2.4.1  RSS feed

 
David Follow
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
currently I am trying to get the NasdaqQuote sample WebService to run.I am using the WSTK 2.4.1 under Tomcat 3.x and Win2000.
I went through the tutorial "Implementing Web Services" and noticed a few things.
1) I cannot compile NasdaqQuotesClient.java properly. I keep getting errors in the following line
WSDLDocument wsdl = sd.getServiceImplementation().getWSDLDocument();
that it doesn't know about WSDLDocument. However, this is just a minor problem and I didn't investigate it any further since I have trouble deploying the service in the first place.
2) Trouble deploying the service
I set up Tomcat so it knows http://localhost:8080/wsdl and put the .wsld files in there. I also created http://localhost:8080/wsdl/Web-inf/classes and put the three .class files in it. NasdaqQuote.class, NasdaqQuotes.class, NasdaqQuotesDeploy.class of course in the package structure
the ANT creates me.
I now execute my deploy command as follows:
java -cp C:/Programme/wstk-2.4/tutorial/NasdaqQuotes/build/classes;E:/projects/norcom/lib/xerces.jar;%WSTK_HOME%/soap/lib/mail.jar;%WSTK_HOME%/soap/lib/activation.jar;%WSTK_HOME%\lib\wstk.j ar;%WSTK_HOME%\uddi4j\lib\uddi4j.jar;%WSTK_HOME%\wsdl4j\lib\wsdl4j.jar;%WSTK_HOME%\soap\lib\soap.jar; com.ibm.samples.nasdaqQuotes.NasdaqQuotesDeploy http://localhost:8080/wsdl/NasdaqQuotes_Service.wsdl C:\Programme\wstk-2.4\tutorial\NasdaqQuotes\deploy\NasdaqQuotes_Service-deploy.xml http://localhost:8080/soap/servlet/rpcrouter
I get the following error (oh well, forgot to tell you that I registered with the IBM UDDI test registry successfully)
Here is the stdout:
Service Provider Published
WSTK Tutorial
5AF10DF0-D1E9-11D5-8833-0004AC49CC1E
Ouch, the call failed:
Fault Code = SOAP-ENV:Server.Exception:
Fault String = java.lang.NoSuchMethodError
Ouch, the call failed:
Fault Code = SOAP-ENV:Server.Exception:
Fault String = java.lang.NoSuchMethodError
Exception in thread "main" com.ibm.wstk.service.registry.ServiceInterfaceNotFoundException: Service interface not found:
Could not locate service interface. Namespace: urn:NasdaqQuotes-interface Location: http://localhost:8080/wsdl/NasdaqQ
uotes_Service-interface.wsdl.
at com.ibm.wstk.service.registry.ServiceRegistryProxy.updateTModelKeys(ServiceRegistryProxy.java:2404)
at com.ibm.wstk.service.registry.ServiceRegistryProxy.publish(ServiceRegistryProxy.java:478)
at com.ibm.samples.nasdaqQuotes.NasdaqQuotesDeploy.main(NasdaqQuotesDeploy.java:63)
Done!
In the registry I can see that I have a business registered but it doesn't register my service :-(
Any help would be greatly appriciated!
I believe I am just missing on some minor parts, don't I ?
Further, I haven't modified the WSLDs or XML files.
TIA,
Detlef
 
Doug Davis
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post this to the WSTK forum on Alphaworks. http://www.alphaworks.ibm.com/tech/webservicestoolkit
-Dug
 
David Follow
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I already did even before I posted it here, but unfortunately I don't get any response back. Hope I posted it to the right forum (Web services technical)
Detlef

Originally posted by Doug Davis:
Please post this to the WSTK forum on Alphaworks. http://www.alphaworks.ibm.com/tech/webservicestoolkit
-Dug

 
faisal mahmood
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please talk more about this kit.
I only heard about it before but never tried it.
Also, I thought WebServices is beta.
Faisal
 
Doug Davis
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1 - Make sure WSDL4J is in your classpath.
2 - Make sure xerces is in your classpath.
just guesses...
-Dug
 
David Follow
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got so desparete that I placed dall JARs that seemed reasonalbe in my classpath incl. Xerces, UDD4j, WSDL4j etc. but still no luck :-(
Detlef
 
Doug Davis
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to make sure xerces is at the front of your classpath (don't ask). As for WSDLDocument, I just checked and
WSDLDocument is in wstk.jar.
-Dug
 
David Follow
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dug,
thanks and I verfied, however, the JAVA code calls the following: import com.ibm.wsdl.WSDLDocument; however, WSDLDocument resides in the
com.ibm.wstk.wsdl package - should I now change the source code or am I missing something??
TIA, Detlef
Originally posted by Doug Davis:
You need to make sure xerces is at the front of your classpath (don't ask). As for WSDLDocument, I just checked and
WSDLDocument is in wstk.jar.
-Dug

 
Doug Davis
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see it in ...wstl.wsdl too - I would change the code and give it a try.
-Dug
 
Tiger Scott
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not get a compliation error- those things must have to do with the classpath settings. But when I try to run the the deploy- I get the flwg error:
com.ibm.wstk.service.registry.ServiceRegistryProxyException: Error getting authentication token for [userid: "myuddiid", cred: "myuudipwd"]. Verify that the UDDI userid and cred settings are correct in the wstkProperties.xml file.
nested exception is:
[SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: null; targetException=java.lang.IllegalArgumentException: Error opening socket: null]
My id/pwd are correct in the wstkProperties.xml file and that is what it displys in the error.
TIA
Sanjay


 
David Follow
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which registry are you using?
If you use IBMs registry you must register there first!
Detlef
 
David Follow
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maybe I do have a classpath problem at compile time coz now I get the compiler error:
compile:
[javac] Compiling 1 source file to C:\Programme\wstk-2.4\tutorial\NasdaqQuotes\build\classes
[javac] C:\Programme\wstk-2.4\tutorial\NasdaqQuotes\src\com\ibm\samples\nasdaqQuotes\NasdaqQuotesClient.java:43: inv
oke(com.ibm.wstk.service.client.ServiceRequest) in com.ibm.wstk.service.client.ServiceProxy cannot be applied to (java.l
ang.String,java.lang.String[],java.lang.String,org.apache.soap.encoding.SOAPMappingRegistry)
[javac] Response res = proxy.invoke(operation, args, encStyle, getSMR());
[javac] ^
[javac] 1 error
can anybody plase post the correct build.xml to this forum! PLEASE!
TIA,
Detlef
 
faisal mahmood
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Out of my interest, did you compile using ant or any other compiler that comes with the kit?
It look different from normal javac compilation messages.
Faisal
 
Tiger Scott
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Detlef,
I am using the IBm test registry and I am regd there- I am using that id/pwd.
Thanks
Sanjay
 
David Follow
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
somebody else send me a modified client source code with a totally different signature than the one that ships with the WSTK and now it works fine.
Well, I can register a service at IBM test reg. but looking a service up with WSDL still fails :-(
Detlef
Originally posted by faisal mahmood:
Out of my interest, did you compile using ant or any other compiler that comes with the kit?
It look different from normal javac compilation messages.
Faisal

 
David Follow
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sanjay,
I had some trouble with registering a service to IBM test reg also. I am using Tomcat and the problem was that Xerces must be the very first entry in the CLASSPATH to tomcat. So try to find set CLASSPATH=%CP% in tomcat.bat and replace it with
rem --- SOAP ---
set CP=C:\Programme\tomcat\lib\xerces.jar;%CP%
rem --- end SOAP ---
set CLASSPATH=%CP%
that fixed my problem registering. Further, but I am sure you did so, use wstkconfig to add a pwd and login to your UDDI registry.
Hope I could help,
Detlef

Originally posted by Sanjay Bahal:
Detlef,
I am using the IBm test registry and I am regd there- I am using that id/pwd.
Thanks
Sanjay

 
Tiger Scott
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Detlef,
The wstk install process incl the pwd/id in the properties file. Wstk picks the correct id/pwd but the authToken call fails.
I do not know what is causing it. Something to do with https? I am executing the ssl code in the class.
Sanjay
 
David Follow
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try to work without HTTPS and SSL - just an idea.
Detlef
Originally posted by Sanjay Bahal:
Detlef,
The wstk install process incl the pwd/id in the properties file. Wstk picks the correct id/pwd but the authToken call fails.
I do not know what is causing it. Something to do with https? I am executing the ssl code in the class.
Sanjay

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!