Return-Path: Delivered-To: apmail-axis-java-user-archive@www.apache.org Received: (qmail 56478 invoked from network); 12 Feb 2011 00:44:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Feb 2011 00:44:49 -0000 Received: (qmail 64583 invoked by uid 500); 12 Feb 2011 00:44:48 -0000 Delivered-To: apmail-axis-java-user-archive@axis.apache.org Received: (qmail 63936 invoked by uid 500); 12 Feb 2011 00:44:47 -0000 Mailing-List: contact java-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@axis.apache.org Delivered-To: mailing list java-user@axis.apache.org Received: (qmail 63511 invoked by uid 99); 12 Feb 2011 00:44:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Feb 2011 00:44:46 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [77.238.189.215] (HELO nm18-vm0.bullet.mail.ird.yahoo.com) (77.238.189.215) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 12 Feb 2011 00:44:36 +0000 Received: from [77.238.189.234] by nm18.bullet.mail.ird.yahoo.com with NNFMP; 12 Feb 2011 00:44:15 -0000 Received: from [212.82.108.124] by tm15.bullet.mail.ird.yahoo.com with NNFMP; 12 Feb 2011 00:44:15 -0000 Received: from [127.0.0.1] by omp1033.mail.ird.yahoo.com with NNFMP; 12 Feb 2011 00:44:15 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 227104.1206.bm@omp1033.mail.ird.yahoo.com Received: (qmail 64700 invoked by uid 60001); 12 Feb 2011 00:44:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1297471455; bh=WHVFcKRczhYpkxyAzxILQXpVdoBxmBewX2HCoFJkDHY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type; b=xRKDNQVtEq9wQNLFdByZtpcHGe+tfU2jcb+8JEMLB0Me2I6FrlCv6CXtqkk0mkkMTIq3PIavvAQ6NaNMtBCkTuCNiUkkNwOR8FSDFyNU8N5CHrUKoWl3UwWXFa0KV+CbdrplbDbMnuOYlQxbiR4ijjCdaGeqU6ClYTyz0XkxKy8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type; b=YlHG3CDpaFl4M+IDnnAnw97a+ekA3IfDNV1c9HJ9IzFMx1a7FbdmLjLa8D1vVk3oC9pUfQsf2LiS1a8o2kcGy+C3lB1HalL17aBy6bqFxEid+uCMvSe6Mpf97LKnimWdPgQPJghSbr34UJaoMXiymk9fYUIsYtPL5EbxdkrmcSA=; Message-ID: <134731.63292.qm@web29710.mail.ird.yahoo.com> X-YMail-OSG: AE6mJ6IVM1mtN6zZi5oJs11ZMsx3pUCq9lvgkrf0dy5ZboA IKfk1PasS.Gc5iXSIdGNIwcsweAKio6A0vNdSZ8O5BYfZ.5jtNer_vvYjKnt Gc56LisLRY7xN6FaBT4Cqds_.8hFIjx2YFntCT7iWjbtafag091h1a.CSYvg 2mviVxoSr2yP9FZIsZ1peysKuI7JUlRC1uSVMBGjusPtHfjwKboAy5eUBNnc BDtPrdiWEnr9sAGu9ab2gw03oi8s9HRuUlYey5KwVMaiwHXSt_AEfvbrJ0YB B2xkKJx6I Received: from [130.209.6.41] by web29710.mail.ird.yahoo.com via HTTP; Sat, 12 Feb 2011 00:44:15 GMT X-Mailer: YahooMailClassic/11.4.20 YahooMailWebService/0.8.109.292656 Date: Sat, 12 Feb 2011 00:44:15 +0000 (GMT) From: Sardar Hussain Subject: [Axis2] Axis2 SOAP Request having array of integers To: java-user@axis.apache.org Cc: java-dev@axis.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-664332801-1297471455=:63292" X-Virus-Checked: Checked by ClamAV on apache.org --0-664332801-1297471455=:63292 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi, I have an array of integers in an Axis2 web service method, and I am using = operationclient to send my soap request. My web service method is as follows public int calculateMean(int [] array) { int sum=3D0; for (int i=3D0;iHi,

I have an array of integers in an = Axis2 web service method, and I am using operationclient to send my soap re= quest.
My web service method is as follows
public int calculateMean(i= nt [] array) {

int sum=3D0;
for (int i=3D0;i<array.length;i++)=
           sum+=3Darr= ay[i];
return sum/array.length;
}

My SOAPEnvelop is as follows= , however it throws error.


SOAPFactory fac =3D OMAbstractFactory= .getSOAP11Factory();
        SOAPEnve= lope envelope =3D fac.getDefaultEnvelope();
    &nbs= p;  
        OMNamespace o= mNs =3D fac.createOMNamespace(
       = ;         getNameSpace(wsdl), "ns");
        OMNamespace argNM=3Df= ac.createOMNamespace("", "");
       =
       OMElement method =3D fac.createOM= Element("calculateMean", omNs);
      &nbs= p;
        OMElement arg1 =3D fac.cr= eateOMElement("a", argNM);
                arg1 =3D  getBinaryOfArra= y();
       
   &n= bsp;    method.addChild(arg1);
    &n= bsp;  
        envelope.ge= tBody().addChild(method);
}
public OMElement getBinaryOfArray(){
&= nbsp;      
      &nb= sp; int[] a=3D new int[9];
        a[0]=3D9;
        a[1]=3D8;
 &nbs= p;      a[2]=3D6;
      &nb= sp; XMLStreamReader arrayRead =3D BeanUtil.getPullParser(a);
  = ;      StreamWrapper parser =3D new StreamWrapper(array= Read);
        StAXOMBuilder omBuilder =3D=     OMXMLBuilderFactory.createStAXOMBuilder(OMAbstractFactor= y.getOMFactory(), parser);
        OMEleme= nt arrayElement =3D omBuilder.getDocumentElement();
    &= nbsp;  
        return arrayEle= ment;
}

However the above code doesnot invoke the required method= .

Can anybody help how to create a SOAPEnvelope for a client to cal= l this service method.
Regards,

Sardar

= =0A=0A=0A=0A --0-664332801-1297471455=:63292--