axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alastair FETTES" <afet...@mdacorporation.com>
Subject RE: [Axis2] trimming down the xml in axis2 1.3
Date Thu, 13 Dec 2007 02:17:29 GMT
Hi Samir.

First off let me state that I understand about not changing the clients
of your webservice and feel your pain.  I agree that you can't just go
changing your clients because of a COTS product upgrade.  :)

My point was more along the lines of the fact that I wasn't sure _why_
they have to change.

The two XML documents that you showed are technically equivalent:

<ns:getAuthXResponse xmlns:ns="http://edge.avaya.com/xsd">
  <ns:return type="com.avaya.edge.ResultBean">
    <ns:errorCode>0</ns:errorCode>
    <ns:errorMsg>Success</ns:errorMsg>
  </ns:return>
</ns:getAuthXResponse>

Is this not technically the same as...? (except for the type attribute
on the return?)

<ns:getAuthXResponse xmlns:ns="http://edge.avaya.com/xsd">
  <ns:return>
    <errorCode xmlns="http://edge.avaya.com/xsd">0</errorCode>
    <errorMsg xmlns="http://edge.avaya.com/xsd">Success</errorMsg>
  </ns:return>
</ns:getAuthXResponse>

Would the first and second not both validate off the same XML Schema?
Unless they aren't XML aware readers.

Alastair

-----Original Message-----
From: samir shaikh [mailto:aquasamba@yahoo.com] 
Sent: Wednesday, December 12, 2007 5:59 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2] trimming down the xml in axis2 1.3

Alastair,

I have a very convincing argument for glorified text readers who want to
hit a url and get text back to use my service. Rather then custom coding
all that I've configured Axis2 to accept HTTP GET parameters as input
and return back an xml, just as it would for an xml call. If I can
somehow configure my response to them the same as what it was with
axis1.1.1 i.e.
without the "ns:" in the field tags then I'll be able to not force a
change on their end. 

This is what I return back.

- <ns:getAuthXResponse
xmlns:ns="http://edge.avaya.com/xsd">
- <ns:return type="com.avaya.edge.ResultBean">
  <ns:errorCode>0</ns:errorCode>
  <ns:errorMsg>Success</ns:errorMsg>
  </ns:return>
  </ns:getAuthXResponse>

This is what they expect

- <ns:getAuthXResponse
xmlns:ns="http://edge.avaya.com/xsd">
- <ns:return>
  <errorCode
xmlns="http://edge.avaya.com/xsd">0</errorCode>
  <errorMsg
xmlns="http://edge.avaya.com/xsd">Success</errorMsg>
  </ns:return>
  </ns:getAuthXResponse>


Samir


--- Alastair FETTES <afettes@mdacorporation.com>
wrote:

> Samir.
> 
> If your clients can't handle the difference between <ns:fieldName 
> xmlns:ns="foo">0</ns:fieldName> and <fieldName 
> xmlns="foo">0</fieldName> then I wouldn't bother using SOAP or web 
> services.
> These are equivalent
> in XML.  I can understand suppressing the prefix in regards to 
> efficency and the size of the message but not to support a client that

> doesn't handle XML properly.
> 
> Otherwise it's just a glorified text reader...
> 
> Alastair
> 
> -----Original Message-----
> From: samir shaikh [mailto:aquasamba@yahoo.com]
> Sent: Wednesday, December 12, 2007 5:31 PM
> To: axis-user@ws.apache.org
> Subject: Re: [Axis2] trimming down the xml in axis2
> 1.3
> 
> Martin,
> 
> You mean using QName in the client code?
> 
> I'm trying to tune my server to not send back excessive xml. I cannot 
> change the xml I send back to my clients. the extra "ns:" is causing 
> me trouble after upgrading from axis2 1.1.1 to axis2
> 1.3 e.g.
> <ns:fieldName>0</ns:fieldName>. My clients expect 
> <fieldName>0</fieldName>.
> 
> Samir
> 
> --- Martin Gainty <mgainty@hotmail.com> wrote:
> 
> > you can always use null..e.g.
> >  QName paramQName = new QName("", paramName);
> > 
> > M--
> > ----- Original Message -----
> > From: "samir shaikh" <aquasamba@yahoo.com>
> > To: <axis-user@ws.apache.org>
> > Sent: Wednesday, December 12, 2007 7:20 PM
> > Subject: RE: [Axis2] trimming down the xml in
> axis2
> > 1.3
> > 
> > 
> > > Raghu,
> > >
> > > Thanks for your help. I tried that out but I
> want
> > to
> > > suppress it on the server. I think WSDL2Java is
> > for
> > > generating a client, right?
> > >
> > > I'm hoping to find some configuration in
> > services.xml
> > > or axis2.xml... any idea?
> > >
> > > Samir
> > >
> > >
> > > --- Raghu Upadhyayula
> <rupadhyayula@responsys.com>
> > > wrote:
> > >
> > > > Samir,
> > > >
> > > > Try WSDL2Java with -sp option to suppress the
> namespace prefix.
> > > >
> > > > Thanks
> > > > Raghu
> > > >
> > > > -----Original Message-----
> > > > From: samir shaikh
> [mailto:aquasamba@yahoo.com]
> > > > Sent: Wednesday, December 12, 2007 2:20 PM
> > > > To: axis-user@ws.apache.org
> > > > Subject: [Axis2] trimming down the xml in
> axis2
> > 1.3
> > > >
> > > > Hi,
> > > >
> > > > I'm trying to trim down the xml exchanged when
> > using
> > > > a
> > > > axis2 client and server. Is there a way I can
> configure the
> > > > serializer to not prefix namespace with every
> element e.g.
> > <ns:errorCode>0</ns:errorCode>
> > > > can
> > > > just be <errorCode>0<errorCode>. Also not send
> > back
> > > > the additional headers and field types with
> each call.
> > > > I was able to do that in Axis1.3 with the wsdd
> > file.
> > > > Can someone point me to where that is done in
> > Axis2.
> > > >
> > > > Thanks a lot.
> > > >
> > > > Samir
> > > >
> > > >
> > > >
> > > >
> > >
> >
>
________________________________________________________________________
> > > > ____________
> > > > Be a better friend, newshound, and know-it-all
> with Yahoo! Mobile.
> 
> > > > Try it now.
> > > >
> > >
> >
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> > > >
> > > >
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > 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
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
>
________________________________________________________________________
> ____
> > ________
> > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile.

> > > Try it now.
> >
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > 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
> > 
> > 
> 
> 
> 
>  
>
________________________________________________________________________
> ____________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> 
=== message truncated ===



 
________________________________________________________________________
____________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

---------------------------------------------------------------------
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


Mime
View raw message