Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 42894 invoked from network); 30 Jun 2006 19:56:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Jun 2006 19:56:51 -0000 Received: (qmail 72707 invoked by uid 500); 30 Jun 2006 19:56:43 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 72699 invoked by uid 500); 30 Jun 2006 19:56:43 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 72688 invoked by uid 99); 30 Jun 2006 19:56:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jun 2006 12:56:42 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of duff.john@gmail.com designates 66.249.92.170 as permitted sender) Received: from [66.249.92.170] (HELO ug-out-1314.google.com) (66.249.92.170) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jun 2006 12:56:42 -0700 Received: by ug-out-1314.google.com with SMTP id m3so895738ugc for ; Fri, 30 Jun 2006 12:56:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NS6UiTglVR2UAeKQxRtjjWGACjWdEpyfOAOArjMDDFHqvoLR8AqxYuLAQH9CFT1wjyQkrIa1ZvKs3tUjMKhhtY6r9wnUG3oT2AbEFBK3JMdMnaLFQopJDU++QbsaF3y8lbh6hUs0L//IgfjzVmW/qcbPjA9Pg8wUPp/foRn/yFE= Received: by 10.66.219.11 with SMTP id r11mr3419692ugg; Fri, 30 Jun 2006 12:56:20 -0700 (PDT) Received: by 10.66.220.9 with HTTP; Fri, 30 Jun 2006 12:56:20 -0700 (PDT) Message-ID: <1ac073b90606301256s25001c1cv1565729da345321@mail.gmail.com> Date: Fri, 30 Jun 2006 15:56:20 -0400 From: "John Duff" To: axis-user@ws.apache.org Subject: Re: Axis2 Service without OMElement In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1ac073b90606301124r6b41214dt94e9fc27ce202cd@mail.gmail.com> <1ac073b90606301244r2838c1a2j52284812830c5ec@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I havn't configured the services.xml for rpc, what do I need to change for that? thanks a lot, John On 6/30/06, robert lazarski wrote: > You've configured your services.xml to use the right message receiver, > ie RPC, right ? Other than that, show us a stack strace and maybe we > can help. Keep in mind these tests do run. > > The other thing is I do believe the RPC code has had some bug fixes > since the 1.0 release. You may want to use the nightlies: > > http://people.apache.org/dist/axis2/nightly/ > > HTH, > Robert > http://www.braziloutsource.com/ > > On 6/30/06, John Duff wrote: > > I found the example you are talking about and am trying yo use it but > > am running into some problems. this is what i have: > > > > String opName = "sayName"; > > EndpointReference targetEPR = > > new EndpointReference("http://127.0.0.1:" + port + > > "/axis2/services/FirstService/"); > > > > > > QName operationName = new QName(opName); > > > > Options options = new Options(); > > options.setTo(targetEPR); > > options.setTransportInProtocol(Constants.TRANSPORT_HTTP); > > > > ConfigurationContext configContext; > > > > try { > > configContext = > > ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, > > null); > > > > RPCServiceClient sender = new RPCServiceClient(configContext, null); > > sender.setOptions(options); > > > > ArrayList args = new ArrayList(); > > args.add("John"); > > > > /* > > ArrayList ret = new ArrayList(); > > ret.add(String.class);*/ > > > > OMElement response = sender.invokeBlocking(operationName, > > args.toArray()); > > System.out.println(response.toString()); > > } catch (AxisFault e) { > > // TODO Auto-generated catch block > > e.printStackTrace(); > > } > > > > > > Getting a class cast exception, thanks a lot for the help > > > > -John > > > > On 6/30/06, robert lazarski wrote: > > > Take a look at RPCMessageReceiver and RPCServiceClient . There's a > > > test in the src disto that shows how: > > > > > > modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java > > > > > > HTH, > > > Robert > > > http://www.braziloutsource.com/ > > > > > > > > > On 6/30/06, John Duff wrote: > > > > Hi, > > > > > > > > I have looked at a number of samples and Axis2 seems to make things > > > > pretty simple, but with all the services the parameters and the return > > > > types are OMElement. I want to create a service that uses a simple > > > > String or int type as a parameter/return type. I can create this > > > > service very easily, and it deploys fine, but when I write the client > > > > I am having problems. In earlier versions of Axis it seems like you > > > > could pass parameters to the call very easily, but in 2.0 you must > > > > pass a OMElement. > > > > > > > > For a simple Web Service method such as this: > > > > > > > > public String sayName(String name) > > > > { > > > > return "Hello " + name + "!!!"; > > > > } > > > > > > > > Is there a way to call an instance of ServiceClient.sendReceive > > > > passing in a String or Object parameter, dosn't seem like it. How > > > > would I construct the OMElement to do something like this? I would > > > > like to avoid generating anything from the WSDL if that is at all > > > > possible, I really want to keep this simple. > > > > > > > > Thanks for the help, > > > > > > > > John > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > > > > For additional commands, e-mail: axis-user-help@ws.apache.org > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > > > For additional commands, e-mail: axis-user-help@ws.apache.org > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > > For additional commands, e-mail: axis-user-help@ws.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-user-help@ws.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org