Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 33196 invoked from network); 23 Dec 2007 16:53:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Dec 2007 16:53:50 -0000 Received: (qmail 77134 invoked by uid 500); 23 Dec 2007 16:53:30 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 77111 invoked by uid 500); 23 Dec 2007 16:53:30 -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 77100 invoked by uid 99); 23 Dec 2007 16:53:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Dec 2007 08:53:30 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of atmanes@gmail.com designates 72.14.204.228 as permitted sender) Received: from [72.14.204.228] (HELO qb-out-0506.google.com) (72.14.204.228) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Dec 2007 16:53:06 +0000 Received: by qb-out-0506.google.com with SMTP id e34so964000qbe.6 for ; Sun, 23 Dec 2007 08:53:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=wFl1lMrkwFVWPqervz2XgVqTrIofr87jFOIGkE2vJKg=; b=tmfjTNhnbuE/Ij13psXGxRjn4XZAoJzmJS8FNX2IE3XtX1x9XWt8UdW3t0tohbapr5pCdrIEq4gp198DehfDT1kcr2PANHu9r/B90IjB5LTFAMHWgMDwZCwTCyUwMkTfacASyQLpyVPBx3p4IXZGvh7K0kWg2D9RNCJaFJQQyTE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NbAOYPLkxPkhKXhbE/UBAWOHYrW5fjB9R0IHXQlpN4z+3krcbuwDGysT2Iig+JwX4MocNREQqiSim+uv4EhtPFaFZ9E24+8XwzYgBbCbMtVDEbpv8cLpjYMcY+9CNFxorBmrxbw8K8qKnmtd9M8QjUpfy0uOLOglaXfulmck8sk= Received: by 10.65.212.3 with SMTP id o3mr5821949qbq.30.1198428789024; Sun, 23 Dec 2007 08:53:09 -0800 (PST) Received: by 10.65.230.10 with HTTP; Sun, 23 Dec 2007 08:53:08 -0800 (PST) Message-ID: Date: Sun, 23 Dec 2007 11:53:08 -0500 From: "Anne Thomas Manes" To: axis-user@ws.apache.org Subject: Re: [Axis2] Problem with getting array of complex type in wrapped style. In-Reply-To: <14477535.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <14477535.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org You've specified that the return type is xsd:anyType" call.setReturnType(org.apache.axis.encoding.XMLType.XSD_ANY); You need to specify the actual expected return type (JOffer, I think). Anne On Dec 23, 2007 6:51 AM, Sergey Bykov wrote: > > I have a service which is using wrapped\literal style. The result of this > service is the array of complex type. When I am using rpc\encoded style > everything work good, but when I change to wrapped/literal I get > org.xml.sax.SAXException: Deserializing parameter 'searchJOfferReturn': > could not find deserializer for type {http://www.w3.org/2001/XMLSchema}any. > This is the code of rpc\encoded invokation: > JOffer[] result = null; > try { > Service service = new Service(); > Call call = (Call) service.createCall(); > QName qn = new QName( "urn:BeanService", "Query" ); > call.registerTypeMapping(Query.class, qn, > new > org.apache.axis.encoding.ser.BeanSerializerFactory(Query.class, qn), > new > org.apache.axis.encoding.ser.BeanDeserializerFactory(Query.class, qn)); > QName jOfferQName = new QName("http://office.jobbank","JOffer"); > call.registerTypeMapping(JOffer.class, > jOfferQName, > new > org.apache.axis.encoding.ser.BeanSerializerFactory(JOffer.class,jOfferQName), > new > org.apache.axis.encoding.ser.BeanDeserializerFactory(JOffer.class,jOfferQName)); > call.setTargetEndpointAddress( > "http://localhost:8080/axis/services/OfficeService" ); > call.setOperationName( "searchJOffer"); > call.addParameter( "arg1", qn, ParameterMode.IN ); > call.setReturnType(org.apache.axis.encoding.XMLType.XSD_ANY); > result = (JOffer[])call.invoke(new Object[] { query }); > } > and service wsdl: > > - xmlns:apachesoap="http://xml.apache.org/xml-soap" > xmlns:impl="http://office.jobbank" xmlns:intf="http://office.jobbank" > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:tns1="http://broker.jobbank" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > - > - > - xmlns="http://www.w3.org/2001/XMLSchema"> > > > - > - > > > > > > > > - > - > - > > > > > > - xmlns="http://www.w3.org/2001/XMLSchema"> > > > - > - > > > > > > > - > > > - > > > - > > > - > > > - > > > - > > > - > > > - > > > - > - > name="publishJOfferRequest" /> > name="publishJOfferResponse" /> > > - > /> > name="updateJOfferResponse" /> > > - > /> > name="deleteJOfferResponse" /> > > - > /> > name="searchJOfferResponse" /> > > > - > transport="http://schemas.xmlsoap.org/soap/http" /> > - > > - > namespace="http://office.jobbank" use="encoded" /> > > - > namespace="http://office.jobbank" use="encoded" /> > > > - > > - > namespace="http://office.jobbank" use="encoded" /> > > - > namespace="http://office.jobbank" use="encoded" /> > > > - > > - > namespace="http://office.jobbank" use="encoded" /> > > - > namespace="http://office.jobbank" use="encoded" /> > > > - > > - > namespace="http://office.jobbank" use="encoded" /> > > - > namespace="http://office.jobbank" use="encoded" /> > > > > - > - > location="http://localhost:8080/axis/services/OfficeService" /> > > > > and here is the code of wrapped\literal: > JOffer[] result = null; > try { > Service service = new Service(); > Call call = (Call) service.createCall(); > QName qn = new QName( "urn:BeanService", "Query" ); > call.registerTypeMapping(Query.class, qn, > new > org.apache.axis.encoding.ser.BeanSerializerFactory(Query.class, qn), > new > org.apache.axis.encoding.ser.BeanDeserializerFactory(Query.class, qn)); > QName jOfferQName = new QName("http://office.jobbank","JOffer"); > call.registerTypeMapping(JOffer.class, > jOfferQName, > new > org.apache.axis.encoding.ser.BeanSerializerFactory(JOffer.class,jOfferQName), > new > org.apache.axis.encoding.ser.BeanDeserializerFactory(JOffer.class,jOfferQName)); > call.setTargetEndpointAddress( > "http://localhost:8080/axis/services/OfficeService" ); > call.setOperationName( "searchJOffer"); > call.setOperationStyle("wrapped"); > call.setOperationUse("literal"); > call.addParameter( "arg1", qn, ParameterMode.IN ); > call.setReturnType(org.apache.axis.encoding.XMLType.XSD_ANY); > result = (JOffer[])call.invoke(new Object[] { query }); > and wsdl for wrapped style: > > - xmlns:apachesoap="http://xml.apache.org/xml-soap" > xmlns:impl="http://office.jobbank" xmlns:intf="http://office.jobbank" > xmlns:tns1="http://broker.jobbank" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > - > - > - targetNamespace="http://office.jobbank" > xmlns="http://www.w3.org/2001/XMLSchema"> > > - > - > - > > > > > - > - > /> > > > - > - > type="impl:ArrayOf_xsd_string" /> > > > > > > > - > - > - > > > > > - > - > - > > > > > - > - > - > > > > > - > - > - > > > > > - > - > - > > > > > - > - > - > > > > > - > - > - > type="impl:JOffer" /> > > > > > - targetNamespace="http://broker.jobbank" > xmlns="http://www.w3.org/2001/XMLSchema"> > > - > - > type="impl:ArrayOf_xsd_string" /> > > > > > > - > > > - > > > - > > > - > > > - > > > - > > > - > > > - > > > - > - > name="publishJOfferRequest" /> > name="publishJOfferResponse" /> > > - > /> > name="updateJOfferResponse" /> > > - > /> > name="deleteJOfferResponse" /> > > - > /> > name="searchJOfferResponse" /> > > > - > transport="http://schemas.xmlsoap.org/soap/http" /> > - > > - > > > - > > > > - > > - > > > - > > > > - > > - > > > - > > > > - > > - > > > - > > > > > - > - > location="http://localhost:8080/axis/services/OfficeService" /> > > > > > I saw this problems in another posts but i didn't manage to find answer. > > Thanks, > Sergey > > -- > View this message in context: http://www.nabble.com/-Axis2--Problem-with-getting-array-of-complex-type-in-wrapped-style.-tp14477535p14477535.html > Sent from the Axis - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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