Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 58105 invoked from network); 21 Nov 2007 13:17:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Nov 2007 13:17:16 -0000 Received: (qmail 40246 invoked by uid 500); 21 Nov 2007 13:16:56 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 40230 invoked by uid 500); 21 Nov 2007 13:16:56 -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 40219 invoked by uid 99); 21 Nov 2007 13:16:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Nov 2007 05:16:56 -0800 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [217.32.164.137] (HELO smtp1.smtp.bt.com) (217.32.164.137) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Nov 2007 13:16:43 +0000 Received: from E03MVY2-UKDY.domain1.systemhost.net ([193.113.30.58]) by smtp1.smtp.bt.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 21 Nov 2007 13:16:34 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Urgent Date: Wed, 21 Nov 2007 13:16:31 -0000 Message-ID: <3FB82BBA8B4A1A4AA56DE3E538FC63CE0359D65E@E03MVY2-UKDY.domain1.systemhost.net> In-Reply-To: <937897.87615.qm@web44813.mail.sp1.yahoo.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Urgent Thread-Index: AcgsPXlHR3lQ6cJ+S46m7vztCRl/VgAAq88A From: To: X-OriginalArrivalTime: 21 Nov 2007 13:16:34.0518 (UTC) FILETIME=[BD47AF60:01C82C40] X-Virus-Checked: Checked by ClamAV on apache.org Hi Mohamed, In my opinion the wsdl definition is not really a definition. It specifies that it will receive a string. But it doesn't specify the meaning of it (i.e. xml, xml encoded as string). Therefore your wsdl is loosely defined and this gives freedom to the implementer to interpret it the way he wants. This results in unexpected behaviour. My advice is to adjust the wsdl and make a strict definition of the messages. This enforces the client to use the well specified description and gives less possibility for an own interpretation. Just my 2 cents. Regards, Sietse ________________________________ From: M.Khaled [mailto:mohamed_mohamed_186@yahoo.com]=20 Sent: 21 November 2007 12:52 To: axis-user@ws.apache.org Subject: Re: Urgent Paul =20 You think the server should decode the received string before parsing it, to reconvert the special charcters like '< and > to '<' and '>' ? =20 =20 Mohamed Paul Fremantle wrote: Mohamed =09 Now I'm confused. The WSDL defines a string. That says that the server is expecting a string. So if that string is going to an XML, then it *should* be encoded, because the datatype of the element is string not xml.=20 =09 If the server was expecting un-encoded XML then the WSDL should say: =09 =09 The client is doing the right thing (at least as far as the WSDL says) in encoding the XML with < etc.=20 =09 Paul =09 =09 On Nov 21, 2007 11:27 AM, M.Khaled wrote: =09 Hi Paul, =20 -This mail contains attached WSDL file which I used to create the client by axis. -And About the way I am creating the XML that I am sending it's similar to the foolowing:=20 =20 class Main{ String xml=3D"text"; Request req=3Dnew Request(); req.setAttr(xml);=20 Sender sender=3Dnew Sender(); sender.send(req); } =09 class Request{ String attr=3Dnull; getAttr(){ return attr; } setAttr(String s){=20 attr=3Ds; } =20 class Sender{ public Response send(Request req) { Response res=3D(Response) call.invoke(req); return res; } } =09 Paul Fremantle wrote:=20 Mohamed =09 The server is expecting it in XML form not string form. =09 Can you please post the WSDL. Also please explain how you are creating the XML that you are sending.=20 =09 Paul =09 =09 On Nov 21, 2007 10:41 AM, M.Khaled wrote: =09 First of all Thanks a lot for your quick response.Second I just want to tell you how the scenario going in here: (1)I am just working in the client side (meaning I just created the client by axis WSDL2JAVA command by passing the WSDL file to it).=20 =20 (2)And I have to set ant attribute value which is of type String to a specific object and this value is xml elements but in a string representation. =20 (3)This specific object will be passed to the invoke method of the Call object. =20 =20 (4)In the server side (which is out of my work scope, I am just using the URL for it and know nothing else about it) it is expecting that this value I passed is xml in a string representation.=20 =20 (5)So I tried your solution for base 64 encoding but the output was something like this: =09 HJvc3BlY3Q+ICBpZClJzs=20 and the server can't parse this form cause it is expecting that form: text =20 (6)And axis is generating this output:=20 <A> <B> text </B> </A> and the server can't parse this form. =20 That's the point I am still sticking in. If you have any other solution please advice.=20 =20 Thanks, Mohamed.=20 "Hoda, Nadeem [USA]" < hoda_nadeem@bah.com > wrote:=20 =20 If it is something very urgent, the easiest way is to base 64 encode the XML and pass the encoded string which is guaranteed to have no special characters.=20 =20 For example (server-side):=20 =20 import org.apache.xerces.impl.dv.util.Base64; =20 ... //send this string=20 String encodedXML =3D Base64.encode(rawXMLString); ... =20 Otherwise you can use attachments, but that is not an "urgent" scenario solution.=20 =20 Thanks,=20 =20 Nadeem=20 =20 ________________________________ From: M.Khaled [mailto: mohamed_mohamed_186@yahoo.com ]=20 Sent: Wednesday, November 21, 2007 1:41 PM To: axis-user@ws.apache.org Subject: Urgent=20 =09 =09 Hi, =20 I sent a question to the mailing list and got no answer till now.Could anyone help me? My question was about how to send xml as a string by axis client avoiding special character problem. =20 Thanks, Mohamed. ________________________________ Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now. =20 ________________________________ Never miss a thing. Make Yahoo your homepage. = --=20 Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair =09 blog: http://pzf.fremantle.org =20 paul@wso2.com =09 "Oxygenating the Web Service Platform", www.wso2.com =20 ________________________________ Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now. =20 =09 ---------------------------------------------------------------------=20 To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org =20 =09 --=20 Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair =09 blog: http://pzf.fremantle.org =20 paul@wso2.com =09 "Oxygenating the Web Service Platform", www.wso2.com =20 ________________________________ Get easy, one-click access to your favorites. Make Yahoo! your homepage. =20 --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org