|
Well after trying all permutations I seem
to have gotten things working, although I would love some details on what the
right way to setup the wsdd and code are. In case anyone else out there has similar
problems it seems like the WSDL generated from ?WSDL
method was different from the one generated from java2wsdl. Once I used that one things
seemed to work out. Still a bit lost on the use of
wsdl2java. I only had to write like
8 lines of code and was able to use my client program with the WSDL I generated…
What does wsdl2java really save you? When is its use beneficial? /F -----Original Message----- I’ve been trying
everything I can think of and I can’t seem to find the right match of
wsdd and Client program. Either
that or I am doing something wrong generating the WSDL. I really could use some help!! What strings need to
match between service code, wsdd, and client code? Attached is the WSDL I am
using. Thanks /Frank -----Original Message----- I am trying to build from scratch my
first service and client apps. I
created a simple java program that currently does nothing but take in two
parameters and return an int. The
.java file is named CKEmailService.java (named for its future intended
use). I compiled it and copied the
class file the the WEB-INF/classes directory. Then I created a .wsdd file and deployed
it. The deploying seems to have
gone well since the service shows up in the list services servlet. Then I created a wsdl file by using the
?wsdl method. Following that I
created Client1.java (see below).
When I execute the program I get an error that it cannot find the
service in the wsdl. I am going to
paste some code and wsdd I wrote
that may make spotting my mistake simple for one of you pros :-] I have a feeling I am not naming
something correctly somewhere but I cant find where.(Btw, I got the
CKEmailServiceService from the wsdl). Thanks!!! --deploy.wsdd— <deployment
name="CKEmailService" xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <service
name="urn:ck-send-emails" provider="java:RPC"> <parameter
name="className" value="CKEmailService"/> <parameter
name="allowedMethods" value="*"/> <parameter
name="allowedRoles" value="*"/> <parameter
name="wsdlServicePort" value="CKEmail"/> </service> </deployment> .. Excerpt from Client1.java
QName servQN = new
QName("urn:ck-send-emails","CKEmailServiceService");
QName portQN = new QName("urn:ck-send-emails","CKEmail");
Service service = new Service( new
URL("file:CKEmailService.wsdl"), servQN );
Call call = (Call) service.createCall(
portQN, "sendMails" );
Object [] parms = new Object[2]; parms[0]
= new String("Abcdef");
parms[1] = new String("123");
Object result = call.invoke(parms);
System.out.println(((Integer)result).intValue()); …Error when I run Client1 Exception in thread "main"
javax.xml.rpc.ServiceException: Error processing WSDL document: javax.xml.rpc.ServiceException:
Error processing WSDL document: javax.xml.rpc.ServiceException:
Cannot find service:
{urn:ck-send-emails}CKEmailServiceService |
