Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 42519 invoked from network); 24 Aug 2007 08:52:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Aug 2007 08:52:20 -0000 Received: (qmail 6923 invoked by uid 500); 24 Aug 2007 08:52:10 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 6878 invoked by uid 500); 24 Aug 2007 08:52:10 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 6867 invoked by uid 99); 24 Aug 2007 08:52:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 01:52:10 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of deepalk@gmail.com designates 209.85.198.187 as permitted sender) Received: from [209.85.198.187] (HELO rv-out-0910.google.com) (209.85.198.187) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 08:52:02 +0000 Received: by rv-out-0910.google.com with SMTP id c24so539520rvf for ; Fri, 24 Aug 2007 01:51:42 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=AUrwlCdZ6bSwkRIdvMf7bYsnr9wvpPLRWl+2+xOB/7wSJBU1vIxmcr4B0B/EGWM8HSbbXuO1yFNpTtfM/1iWBUEIoCmMOWU+3IVTMwEvuRzEnBw+JR6IdDSpNKyLQMPoriP6oCf+kSIWSQAkRc5GjbVhYC2LzN+W1p4BVPAXbGg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=jG9Db7Sn+sGpdW6feW8C2ImPuyYlGC6Z1az3hHECgldHxaB6Yvl+cNvr8GSnDT8q3bjMqw2wWE5kSdxUp/UJUcrI9jN9xpQXiYwoS6X1tK8xl/G66yrBh8AhY6VZHhbuD7X6pcokd8DD4OumF84w/wDR5333frEAyNZsgL3MIWY= Received: by 10.141.128.19 with SMTP id f19mr1307207rvn.1187945501526; Fri, 24 Aug 2007 01:51:41 -0700 (PDT) Received: from ?10.100.1.132? ( [222.165.132.170]) by mx.google.com with ESMTPS id l31sm6423428rvb.2007.08.24.01.51.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 24 Aug 2007 01:51:40 -0700 (PDT) Message-ID: <46CE9C16.40008@gmail.com> Date: Fri, 24 Aug 2007 14:21:34 +0530 From: Deepal jayasinghe User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: axis-dev@ws.apache.org Subject: Re: problem with simple sync program References: <316ADBDBFE4F4D4AA4FEEF7496ECAEF94BE567@EVS1.ac.nuigalway.ie> In-Reply-To: <316ADBDBFE4F4D4AA4FEEF7496ECAEF94BE567@EVS1.ac.nuigalway.ie> X-Enigmail-Version: 0.95.3 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org hi Zaremba, Well it is bit difficult to answer you without knowing the service WSDL , so will you be able to provide me the WSDL file. Its better if you can create a JIRA attaching the wsdl. Thanks Deepal > Here is my program > > package test; > > import org.apache.axiom.om.OMAbstractFactory; > import org.apache.axiom.om.OMElement; > import org.apache.axiom.om.OMNamespace; > import org.apache.axiom.soap.SOAPEnvelope; > import org.apache.axiom.soap.SOAPFactory; > import org.apache.axis2.addressing.EndpointReference; > import org.apache.axis2.client.OperationClient; > import org.apache.axis2.client.Options; > import org.apache.axis2.client.ServiceClient; > import org.apache.axis2.context.MessageContext; > > public class Client { > > public static void main(String[] args) throws Exception { > ServiceClient client = new ServiceClient(); > OperationClient operationClient = client.createClient(ServiceClient.ANON_OUT_IN_OP); > //creating message context > MessageContext outMsgCtx = new MessageContext(); > //assigning message context�s option object into instance variable > Options opts = outMsgCtx.getOptions(); > //setting properties into option > opts.setTo(new EndpointReference("http://sws-challenge.org/shipper/v2/racer")); > opts.setAction("OrderOperation"); > > outMsgCtx.setEnvelope(creatSOAPEnvelope()); > operationClient.addMessageContext(outMsgCtx); > System.out.println("message =" + creatSOAPEnvelope()); > operationClient.execute(true); > MessageContext inMsgtCtx = operationClient.getMessageContext("In"); > SOAPEnvelope response = inMsgtCtx.getEnvelope(); > System.out.println(response); > > } > > public static SOAPEnvelope creatSOAPEnvelope() { > SOAPFactory fac = OMAbstractFactory.getSOAP11Factory(); > SOAPEnvelope envelope = fac.getDefaultEnvelope(); > OMNamespace omNs = fac.createOMNamespace("http://ws.apache.org/axis2/xsd", "q0"); > > OMElement method = fac.createOMElement("OrderOperationRequest", omNs); > > OMElement value = fac.createOMElement("quantity", omNs); > OMElement value1 = fac.createOMElement("packageWeight", omNs); > value.addChild(fac.createOMText("1")); > value1.addChild(fac.createOMText("1")); > > method.addChild(value); > method.addChild(value1); > > OMElement value3 = fac.createOMElement("collectionTime", omNs); > OMElement value4 = fac.createOMElement("readyPickup", omNs); > value4.addChild(fac.createOMText("2007-08-22T10:50:30.051Z")); > OMElement value5 = fac.createOMElement("latestPickup", omNs); > value5.addChild(fac.createOMText("2007-08-24T10:50:33.934Z")); > value3.addChild(value4); > value3.addChild(value5); > method.addChild(value3); > > envelope.getBody().addChild(method); > return envelope; > } > > > } > > And I have such output after runing them: > > message =112007-08-22T10:50:30.051Z2007-08-24T10:50:33.934Z > Exception in thread "main" org.apache.axis2.AxisFault: Data binding error > at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486) > at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343) > at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389) > at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) > at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) > at test.Client.main(Client.java:31) > > Here it's how looks like good one SOAP Request Envelope from web service explorer: > - > - > - > - > > > > > > > > > > > - > > > > > > > Argentina > > 1 > 1 > - > 2007-08-23T08:32:08.194Z > 2007-08-25T08:32:12.270Z > > > > > So what's wrong with my program ? I try to repair that through last few days. > > Best regards, > Wojciech Zaremba > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-dev-help@ws.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org