axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Apap <f...@optonline.net>
Subject RE: Problem with my first service
Date Sat, 12 Apr 2003 16:02:11 GMT
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-----
From: Frank Apap [mailto:fsa3@optonline.net] 
Sent: Saturday, April 12, 2003 1:33 AM
To: axis-user@ws.apache.org
Subject: Problem with my first service
 
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

Mime
View raw message