Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 8546 invoked from network); 21 Apr 2006 03:58:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Apr 2006 03:58:28 -0000 Received: (qmail 5655 invoked by uid 500); 21 Apr 2006 03:58:19 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 5633 invoked by uid 500); 21 Apr 2006 03:58:19 -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 5622 invoked by uid 99); 21 Apr 2006 03:58:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Apr 2006 20:58:18 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [209.68.5.9] (HELO relay00.pair.com) (209.68.5.9) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 20 Apr 2006 20:58:17 -0700 Received: (qmail 34134 invoked from network); 21 Apr 2006 03:57:55 -0000 Received: from unknown (HELO ?127.0.0.1?) (unknown) by unknown with SMTP; 21 Apr 2006 03:57:55 -0000 X-pair-Authenticated: 222.165.176.218 Message-ID: <4448583B.8070509@opensource.lk> Date: Fri, 21 Apr 2006 09:27:47 +0530 From: Deepal Jayasinghe User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-user@ws.apache.org Subject: Re: WSDL Vs Generated WSDL question References: <042020061555.4765.4447AF0B000E5AB90000129D22070206539C080C9A0E9D070A90D20E@comcast.net> <4447ED5D.8080903@comcast.net> In-Reply-To: <4447ED5D.8080903@comcast.net> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Lianghwa; The auto generated wsdl will only work if the server side uses RPCMessageReceiver, the problem is auto generation is based on java reflection and we can not get the exact original wsdl. So the best solution is either put ur original wsdl file there or if you want axis2 to generate wsdl file for you then use RPCMessageReceiver as the message receiver. Lianghwa Jou wrote: > Hi, > > Did you include your original WSDL in the .aar file ? > > I had a very similar problem when I tried the axis2 sample - > Axis2SampleDocLit. If you don't include the original WSDL in the .aar > file, Axis2 will generate one for you and it is very different from > the original WSDL. If you code your soap message based on this WSDL, > the axis2 will NOT accept the soap message. If you include the > original WSDL in the .aar file, the Axis2 still changes it from > rpc/literal to document/literal but it is basically the same as the > original wsdl. If you code your soap message based on this wsdl, it > will work fine. The axis2 generated wsdl is just not working right in > this case. If someone can tell me why, I will really appreciate it. > > I am using axis 0.95 as the server and php as the client. > > Lianghwa > > vea@comcast.net wrote: > >> Heya, >> >> Thanks for the catch! I corrected the namespace error. >> >> I know that I'm going to have to use my own WSDL since AXIS removes >> my schema imports - the generated WSDL's kinda useless since WSDL >> consumers like XMLSpy and .Net's WSDL.exe can't properly generate a >> request from it (One of the nicer elements of .Net is their generated >> WSDL embeds the schema inside the generated WSDL so you have to >> complete picture). Problem is, since my original WSDL is different >> from Axis's interpretation, I've found it's equally useless to >> provide my original WSDL because .Net cannot generate a client from >> it. It could call the web service correctly, but the response was >> bad because it was expecting the child element to be , not >> . My coworker and I were able to hand edit the .Net code >> to read the reponse, but we were aiming for interoperability off of >> the WSDL. >> I'm not sure what I want to do at this point. We've been playing >> around with the XSD in hopes we can create the response in a way that >> we don't lose interoperability. I *think* if we embded Product >> inside Products, we'll get a better result. We just lose the >> reusability of having Product as a top level element. I guess it's >> all part of learning! >> >> Thanks, >> >> Anna >> -------------- Original message ---------------------- >> From: "Anne Thomas Manes" >> >> >>> Note that you have a namespace declaration error in the in >>> Research.WSDL: >>> >>> xmlns:svc="svc" >>> >>> You need to fix this problem, but it won't fix the problem. Axis >>> likes to >>> change the repeating element name inside an array. I suggest that >>> you tell >>> Axis to use your WSDL rather than letting it generate its own. (use >>> in the WSDD). >>> >>> Anne >>> >>> On 4/18/06, vea@comcast.net wrote: >>> >>> >>>> Heya, >>>> >>>> I'm pretty new to AXIS/XSD/WSDL, so hopefully this is a easy >>>> question. >>>> I am using AXIS+Castor to create a WSDL first, Document/Literal >>>> wrapped >>>> web service >>>> that returns a list of products. I was aiming for a structure like: >>>> >>>> >>>> >>>> . >>>> . >>>> >>>> >>>> >>>> >>>> After running my WSDL/XSD through WSDL2Java and Castor's SourceGen, >>>> I am >>>> able to get a list >>>> of products using the AXIS client stubs, but the SOAP response doesn't >>>> match the structure >>>> above and I'm not sure why. It does match the generated WSDL, but >>>> I'm not >>>> sure why the WSDL >>>> changed the way it did. Anyone got any ideas? I've included my XSDs, >>>> WSDL, SOAP response, >>>> and generated WSDL below. >>>> >>>> Thanks, >>>> Anna >>>> >>>> Reasearch.xsd >>>> ============= >>>> >>>> >>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >>>> targetNamespace="http://xxx.com/xxx/xxx/xxx/xxx" >>>> elementFormDefault="qualified" >>>> attributeFormDefault="unqualified" >>>> xmlns:tns="http://xxx.com/xxx/xxx/xx/xxx"> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> type="xsd:string"/> >>>> >>> type="xsd:string"/> >>>> >>> type="xsd:string"/> >>>> >>> type="xsd:integer"/> >>>> >>> type="xsd:integer"/> >>>> >>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> name="threeYeareSharpeRatio" >>>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>> name="threeYearDownCap" type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> name="threeYearNegativeQtr" >>>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> name="threeYearDownsideRisk" >>>> type="tns:statType"/> >>>> >>> type="tns:statType"/> >>>> >>> type="xsd:boolean"/> >>>> >>> type="xsd:boolean"/> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> maxOccurs="unbounded"/> >>>> >>>> >>>> >>>> >>>> >>>> >>>> =================== >>>> ResearchService.xsd >>>> =================== >>>> >>>> >>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >>>> targetNamespace="http://xxx.com/xxx/xxx/xxx/xxx/service" >>>> elementFormDefault="qualified" >>>> attributeFormDefault="unqualified" >>>> xmlns:tns="http://xxx.com/xxx/xxx/xxx/xxx/service" >>>> xmlns:types="http://xxx.com/xxx/xxx/xxx/xxx"> >>>> >>>> >>>> >>> namespace="http://xxx.com/xxx/xxx/xxx/xxx" >>>> schemaLocation="Research.xsd"/> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> type="xsd:string"/> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> ============= >>>> Research.WSDL >>>> ============= >>>> >>> xmlns="http://schemas.xmlsoap.org/wsdl/" >>>> xmlns:tns="http://xxx.com/xxx/xxx/wsdl" >>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" >>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" >>>> xmlns:svc="http://xxx.com/xxx/xxx/xxx/xxx/service" >>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> >>>> >>>> >>> targetNamespace="http://xxx.com/xxx/xxx/wsdl" >>>> xmlns:svc="svc" >>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> >>>> >>> namespace=" >>>> http://xxx.com/xxx/xxx/xxx/xxx/service" >>>> >>>> >>> >>> schemaLocation="../xsd/ResearchService.xsd"/> >>> >>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> element="svc:getProductResponse" >>>> /> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> type="tns:ResearchPortType"> >>>> >>>> >>>> >>> soapAction="getProduct" /> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> binding="tns:ResearchSOAPBinding"> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> ============= >>>> SOAP response >>>> ============= >>>> >>>> >>>> >>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi=" >>>> http://www.w3.org/2001/XMLSchema-instance"> >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> Product1 >>> >>> >>>> >>>> SAM >>>> >>>> >>> >>> XXX >>> >>> >>>> >>>> 150 >>>> >>>> >>> >>> 150000 >>> >>> >>>> 0.44 >>>> >>>> 0.12 >>>> >>>> 0.44 >>>> >>>> 0.22 >>>> >>>> 0.02 >>>> >>>> 0.12 >>>> >>>> 0.33 >>>> >>>> 0.11 >>>> >>>> 0.23 >>>> >>>> >>>> 0.23 >>>> >>>> 0.56 >>>> >>>> 0.44 >>>> >>>> 0.16 >>>> >>>> 0.49 >>>> >>>> 0.64 >>>> >>>> 0.56 >>>> >>>> 0.74 >>>> >>>> 0.23 >>>> >>>> >>>> 0.93 >>>> >>>> 0.95 >>>> >>>> >>>> false >>>> >>>> >>> >>> false >>> >>> >>>> >>>> >>>> >>>> >>> >>> Product2 >>> >>> >>>> >>> >>> FUND >>> >>> >>>> >>> >>> YYY >>> >>> >>>> >>>> 20 >>>> >>>> >>> >>> 100000 >>> >>> >>>> 0.64 >>>> >>>> 0.12 >>>> >>>> 0.46 >>>> >>>> 0.78 >>>> >>>> 0.44 >>>> >>>> 0.38 >>>> >>>> 0.19 >>>> >>>> 0.76 >>>> >>>> 0.33 >>>> >>>> >>>> 0.56 >>>> >>>> 0.86 >>>> >>>> 0.23 >>>> >>>> 0.77 >>>> >>>> 0.88 >>>> >>>> 0.63 >>>> >>>> 0.55 >>>> >>>> 0.23 >>>> >>>> 0.56 >>>> >>>> >>>> 0.77 >>>> >>>> 0.34 >>>> >>>> >>>> true >>>> >>>> >>> >>> false >>> >>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> ============== >>>> Generated WSDL >>>> ============== >>>> >>>> >>> xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl=" >>>> http://xxx.com/xxx/xxx/wsdl" xmlns:intf="http://xxx.com/xxx/xxx/wsdl" >>>> xmlns:tns1="http://xxx.com/xxx/xxx/xxx/xxx/service" xmlns:tns2=" >>>> http://xxx.com/xxx/xxx/xxx/xxx" xmlns:wsdl=" >>>> http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap=" >>>> http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd=" >>>> http://www.w3.org/2001/XMLSchema"> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> type="tns2:product" /> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> name="getProductRequest" /> >>>> >>> name="getProductResponse" >>>> /> >>>> >>>> >>>> >>> type="impl:ResearchPortType"> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> name="ResearchSOAPPort"> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> >> >> >> >> > > > -- Thanks, Deepal ................................................................ ~Future is Open~