Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 40331 invoked from network); 12 Jan 2007 01:41:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2007 01:41:00 -0000 Received: (qmail 92983 invoked by uid 500); 12 Jan 2007 01:40:06 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 92926 invoked by uid 500); 12 Jan 2007 01:40:06 -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 92880 invoked by uid 99); 12 Jan 2007 01:40:05 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jan 2007 17:40:05 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of chadmichaeldavis@gmail.com designates 66.249.92.174 as permitted sender) Received: from [66.249.92.174] (HELO ug-out-1314.google.com) (66.249.92.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jan 2007 17:39:24 -0800 Received: by ug-out-1314.google.com with SMTP id j40so633149ugd for ; Thu, 11 Jan 2007 17:38:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=oWFbnStmhADv3Gu+XMO8obPw/8Rpvo/Bo1smQTRuJ9d2twHYlj8R+2Dh+ScwuFGVhLTA3PTT2AWOg891gZOW5hoam0kwdVkhcedfkrbsx3aG2G/nln1HqDwpevpZSu7olULwAfsY9nc9LiQaJ92+9LoyFO8nineTa4a1HMQCGvo= Received: by 10.82.138.6 with SMTP id l6mr24432bud.1168565929953; Thu, 11 Jan 2007 17:38:49 -0800 (PST) Received: by 10.82.174.8 with HTTP; Thu, 11 Jan 2007 17:38:49 -0800 (PST) Message-ID: <4fe4c4f50701111738r7d7e55aen15a71f8b0dbaebd7@mail.gmail.com> Date: Thu, 11 Jan 2007 18:38:49 -0700 From: ChadDavis To: axisUsers Subject: transport out has not been set MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org I'm trying to run a client from the new user guide. When I run it I get the message that the transport out has not been set. The code is directly from the user guide, but I 'll post it here for convenience. What causes this error? package org.apache.axis2.axis2userguide; import javax.xml.stream.XMLStreamException; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.Options; import org.apache.axis2.Constants; import org.apache.axis2.client.ServiceClient; public class SampleClient { private static EndpointReference targetEPR = new EndpointReference( "http://localhost:8080/axis2/services/UserGuideSampleService"); public static OMElement greetUserPayload(String personToGreet) { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace( "http://example1.org/example1", "example1"); OMElement method = fac.createOMElement("sayHello", omNs); OMElement value = fac.createOMElement("personToGreet", omNs); value.addChild(fac.createOMText(value, personToGreet)); method.addChild(value); return method; } public static void main(String[] args) { try { OMElement payload = SampleClient.greetUserPayload("John"); Options options = new Options(); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(payload); String response = result.getFirstElement().getText(); System.out.println(response); } catch (Exception e) { //(XMLStreamException e) { System.out.println(e.toString()); } } } --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org