Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 95820 invoked from network); 28 Oct 2008 13:39:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Oct 2008 13:39:52 -0000 Received: (qmail 34792 invoked by uid 500); 28 Oct 2008 13:39:56 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 34775 invoked by uid 500); 28 Oct 2008 13:39:56 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 34763 invoked by uid 99); 28 Oct 2008 13:39:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2008 06:39:56 -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 lp.bilo@gmail.com designates 209.85.217.19 as permitted sender) Received: from [209.85.217.19] (HELO mail-gx0-f19.google.com) (209.85.217.19) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2008 13:38:41 +0000 Received: by gxk12 with SMTP id 12so3963435gxk.16 for ; Tue, 28 Oct 2008 06:39:20 -0700 (PDT) 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:references; bh=t8fmCxplbaGRPqHzzoiefKkQC1lPambZt2TTCwL++OE=; b=f2MlZK3qRnMGrnM65AMy/ul+pbq56ZrROIBf5wY3Sa5GgWxbAHsQKz/KvT+WdojASI jYa7lnRSTdrcik/+UIx7qCxpEgOmfePCHC0Fbrhsd55JbcQhUdZUOugyEfWFbbRdMmLu 8BaKi4ML18i1ds5oUBBL2W1LEK7z+9KW1gpQs= 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:references; b=JQ3DXx77Ev8upHr+HtcsrBJArH4kpZqYZdmCxMV4wfgknNebz8Uu3Fd/jGFEKj+/wR y0cds/gTJVRVjYldkoQAYW92ABmIigvkTdbiGcWTqen0uCu2OFezUWLBrqyeQbU1hm4K HLU2UEpFeN2vTivxViTlpVnyD2lSV472Jlzvs= Received: by 10.151.27.15 with SMTP id e15mr14369365ybj.78.1225201160798; Tue, 28 Oct 2008 06:39:20 -0700 (PDT) Received: by 10.150.134.17 with HTTP; Tue, 28 Oct 2008 06:39:20 -0700 (PDT) Message-ID: Date: Tue, 28 Oct 2008 13:39:20 +0000 From: "=?ISO-8859-1?Q?Lu=EDs_Bilo?=" To: "Apache AXIS C Developers List" Subject: Re: REST requests, adb's and namespaces In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_28800_7754176.1225201160719" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_28800_7754176.1225201160719 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline In that case the patch my colleague developed follows in attachment. With these changes rest requests won't have any issues as long as the namespace is defined @ services.xml in the following manner for each operation: =09 urn:get_message =09 GET =09 message/{uuid}/ There is one optimization that can be done, which is allowing a default namespace for the whole service to be defined as a parameter also @ services.xml, and only when needed overidding for one operation the way it is now. On Tue, Oct 28, 2008 at 6:00 AM, Dimuthu Gamage wrote: > Hi Luis, > It is a very interesting question. Thanks for raising it. > > I got to know, Java solved this problem by adding the necessary namespace= s > when building the request axiom from (name, value) pairs. Since they have > the schema model at the time of processing the request, they don't need a= ny > parameter to specify in the services.xml as you suggested. > > But since in Axis2/C we don't have the message schema at the processing > request, we have to go for one of your suggestion. I prefer the first one > editing services.xml because it is more analogue to what Axis2/Java is > doing. Or we can give an option to the code generator to ignore the > namespace validation. But since we are using Axis2/Java codegen tool, it = is > not practicle to add an option that only Axis2/C need and Axis2/Java does= n't > need. So I think soluiton 1 is more preferrable. > > If you already have that patch working, you are really welcomed to add it= to > Axis2/C. > > > Thanks > Dimuthu > > > > On Mon, Oct 27, 2008 at 9:35 PM, Lu=EDs Bilo wrote: >> >> Greetings, >> >> I've been using axis for a while now, supporting simultaneously rest >> and soap requests. I'm also using the adb codegeneration tool from >> axis2/java project (c data bindings creation from wsdl document ). Now >> there is one issue when using the auto generated adb's and REST >> requests. As you know adb will also ensure the parameters in the >> request have the correct namespace. Problem is only using rest >> requests we can specify that namespace. When using rest it would be >> possible to parse the request with axiom, and ignore the namespace. >> But with adb's that is not an option and rest requests fail within adb >> serializarion as they miss the required namespace. This seems like a >> flaw to me, unless i'm missing something here in which case i'd like >> to hear some feedback. >> >> Anyways in order to address this issue we've come across 2 solutions. >> The first was to include an attribute for each operation @ >> services.xml specifying the default namespace which is then used in >> rest requests (patched src/core/deployment/svc_builder.c). The second >> solution was to patch the xls document that specifies adb generation, >> so there is no namespace verification for any adb (patched >> /org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl from >> axis2/java). What are your thoughs on this matter? Is this something >> you will be addressing in future versions of Axis2/c? >> >> Regards, >> Lu=EDs Bilo >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org >> For additional commands, e-mail: axis-c-dev-help@ws.apache.org >> > > > > -- > Thanks, > Dimuthu Gamage > > http://www.dimuthu.org > http://www.wso2.org > ------=_Part_28800_7754176.1225201160719 Content-Type: text/x-diff; name=op_ns_uri.diff Content-Transfer-Encoding: base64 X-Attachment-Id: f_fmukgocv0 Content-Disposition: attachment; filename=op_ns_uri.diff ZGlmZiAtdSBheGlzMmMxLjUuY2xlYW4vc3JjL2NvcmUvZGVwbG95bWVudC9heGlzMl9kZXBsb3lt ZW50LmggYXhpczJjLXNyYy0xLjUuMC9zcmMvY29yZS9kZXBs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mFtZV9hdHQgPSBheGlvbV9lbGVtZW50X2dldF9hdHRyaWJ1dGUob3Bf ZWxlbWVudCwgZW52LCBxYXR0bmFtZSk7CisKKwogICAgICAgICBheHV0aWxfcW5hbWVfZnJlZShx YXR0bmFtZSwgZW52KTsKICAgICAgICAgcWF0dG5hbWUgPSBOVUxMOworCiAgICAgICAgIGlmICgh b3BfbmFtZV9hdHQpCiAgICAgICAgIHsKICAgICAgICAgICAgIEFYSVMyX0VSUk9SX1NFVChlbnYt PmVycm9yLCBBWElTMl9FUlJPUl9PUF9OQU1FX01JU1NJTkcsCkBAIC01NDYsOSArNTUyLDIwIEBA CiAgICAgICAgICAgICBBWElTMl9MT0dfRVJST1IoZW52LT5sb2csIEFYSVMyX0xPR19TSSwgIiIp OwogICAgICAgICAgICAgcmV0dXJuIE5VTEw7CiAgICAgICAgIH0KLQogICAgICAgICBvcF9uYW1l ID0gYXhpb21fYXR0cmlidXRlX2dldF92YWx1ZShvcF9uYW1lX2F0dCwgZW52KTsKLSAgICAgICAg cW9wbmFtZSA9IGF4dXRpbF9xbmFtZV9jcmVhdGUoZW52LCBvcF9uYW1lLCBOVUxMLCBOVUxMKTsK KworCS8qIGdldHRpbmcgb3BlcmF0aW9uIG5hbWVzcGFjZSB1cmkgKi8KKworICAgICAgICBxYXR0 dXJpX25zID0gYXh1dGlsX3FuYW1lX2NyZWF0ZShlbnYsIEFYSVMyX0FUVFVSSV9OUywgTlVMTCwg TlVMTCk7CisgICAgICAgIG9wX3VyaV9uc19hdHQgPSBheGlvbV9lbGVtZW50X2dldF9hdHRyaWJ1 dGUob3BfZWxlbWVudCwgZW52LCBxYXR0dXJpX25zKTsKKworCWlmIChvcF91cmlfbnNfYXR0KQor CSAgICBvcF91cmlfbnMgPSBheGlvbV9hdHRyaWJ1dGVfZ2V0X3ZhbHVlKG9wX3VyaV9uc19hdHQs IGVudik7CisKKyAgICAgICAgYXh1dGlsX3FuYW1lX2ZyZWUocWF0dHVyaV9ucywgZW52KTsKKwor CisgICAgICAgIHFvcG5hbWUgPSBheHV0aWxfcW5hbWVfY3JlYXRlKGVudiwgb3BfbmFtZSwgb3Bf dXJpX25zLCBOVUxMKTsKICAgICAgICAgb3BfZGVzYyA9IGF4aXMyX29wX2NyZWF0ZShlbnYpOwog ICAgICAgICBheGlzMl9vcF9zZXRfcW5hbWUob3BfZGVzYywgZW52LCBxb3BuYW1lKTsKICAgICAg ICAgYXh1dGlsX3FuYW1lX2ZyZWUocW9wbmFtZSwgZW52KTsK ------=_Part_28800_7754176.1225201160719 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-dev-help@ws.apache.org ------=_Part_28800_7754176.1225201160719--