AW: [WSS4J] Re: AW: WSDoAllReceiver/AxisUtil problem report

Dittmann Werner <[email protected]> Thu, 12 Feb 2004 08:24:59 +0100
Newsgroups gmane.text.xml.wss4j
Message-ID <79D5F4B2D775204D9C7852EE41C547730141A5B1@mchh2a1e.mchh.siemens.de>
Sashka, all,

there is also a fix in WSDoAllReceiver available that
uses another technique to update the Axis message. This
fix works AFAIK.

Regards,
Werner

> -----Urspr=FCngliche Nachricht-----
> Von: wss4j-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org=20
> [mailto:wss4j-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] Im Auftrag=20
> von Davanum Srinivas
> Gesendet: Mittwoch, 11. Februar 2004 17:28
> An: Sashka
> Cc: [email protected]
> Betreff: [WSS4J] Re: AW: WSDoAllReceiver/AxisUtil problem report
>=20
>=20
> yep, i am a member of Axis team and yes, this has been=20
> applied to the main source tree.
>=20
> --- Sashka <[email protected]> wrote:
> > Dims, hi
> > I'm using the axis 1.2(currently - alpha) version. If U'r a=20
> member of=20
> > an axis team so this change is upplied on general 1.2=20
> version, that's=20
> > fine. But if that's just a change in the axis.jar supplied in your=20
> > lib/, that means I bound to this specific jar version; each Axis=20
> > upgrade will require to add this fix. From user's point of=20
> view, for=20
> > me it violates the projects interoperability strongly. In=20
> such a case -
> >  could U add an non-default flag in your=20
> AxisUtil.updateSOAPMessage()=20
> > to run a workaround within it - with axis as is - by using=20
> ony one of=20
> > other Source classes - StreamSource or SAXSource, please?
> >=20
> > Sincerely
> > Sashka.=20
> >=20
> >=20
> > > Sashka,
> > >=20
> > > Which version of axis are u using? Yes, i fixed
> > > XMLUtils.sourceToInputSource() already. I will
> > > check in an updated axis in wss4j/lib directory soon.
> > >=20
> > > thanks,
> > > dims
> > >=20
> > > --- Sashka <[email protected]> wrote:
> > > > Dims, hi
> > > > Do you mean U'r going to fix it in the axis sources=20
> code - within=20
> > > > XMLUtils.sourceToInputSource()? - In this case wss4j loses the=20
> > > > compatibility with the axis, and the jar's order in the=20
> classpath=20
> > must=20
> > > > be restricted to wss4j before axis - that's not so convenient.
> > > >=20
> > > > Sincerely
> > > > Sashka
> > > >=20
> > > > > i will fix axis code (PrettyElementToStream ->=20
> ElementToStream)
> > > > >=20
> > > > > thanks,
> > > > > dims
> > > > >=20
> > > > > --- Dittmann Werner <[email protected]> wrote:
> > > > > > Hi,
> > > > > >=20
> > > > > > just checked in a modified version of WsDoAllReceiver that
> > > > > > perform the same serialization as WsDoAllSender. According
> > > > > > to my tests that could solve the problem. Pls check out.
> > > > > >=20
> > > > > > Dims, Axis performs a "PrettyElementToStream" in the course
> > > > > > of its serialization when it converts DOMSource to bytes.
> > > > > > Refer to "sourceToInputSource(Source source)"
> > > > > > in XMLUtils. Thus setting the flag in SOAPBody=20
> wouldn't help,
> > > > > > wouldn't it?
> > > > > >=20
> > > > > > Regards,
> > > > > > Werner
> > > > > >=20
> > > > > > > -----Urspr=FCngliche Nachricht-----
> > > > > > > Von: wss4j-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org=20
> > > > > > > [mailto:wss4j-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]=20
> Im Auftrag=20
> > > > > > > von Dittmann Werner
> > > > > > > Gesendet: Dienstag, 10. Februar 2004 16:22
> > > > > > > An: 'dims-/[email protected]'; 'Sashka'; wss4j-
> > [email protected]
> > > > > > > Betreff: [WSS4J] AW: AW: WSDoAllReceiver/AxisUtil problem =

> > report
> > > > > > >=20
> > > > > > >=20
> > > > > > > sorry, Dims. Don't have a current Axis tree=20
> > > > > > > on my system, need to set-up the environment,
> > > > > > > will take a day or two.
> > > > > > >=20
> > > > > > > Regards,
> > > > > > > Werner
> > > > > > >=20
> > > > > > > > -----Urspr=FCngliche Nachricht-----
> > > > > > > > Von: Davanum Srinivas [mailto:dims-/[email protected]]=20
> > > > > > > > Gesendet: Dienstag, 10. Februar 2004 14:03
> > > > > > > > An: Dittmann Werner; 'Sashka'; wss4j-
> > > > [email protected]
> > > > > > > > Betreff: Re: AW: WSDoAllReceiver/AxisUtil problem =
report
> > > > > > > >=20
> > > > > > > >=20
> > > > > > > > Can one of you set disableFormatting to true in Axis'=20
> > > > > > > > SOAPBody.java (line 93) and see if that
> > > > > > > > helps? if it does, i can add a global switch to disable =

> > > > formatting.
> > > > > > > >=20
> > > > > > > > thanks,
> > > > > > > > dims
> > > > > > > >=20
> > > > > > > > --- Dittmann Werner <[email protected]> =
wrote:
> > > > > > > > > Sashka,
> > > > > > > > >=20
> > > > > > > > > just to make sure: as I understand your report
> > > > > > > > > the problem is soemwhere in class DOMSource?
> > > > > > > > >=20
> > > > > > > > > Well, I checked this beast (contained in Axis
> > > > > > > > > sources) and found that it does nothing to the
> > > > > > > > > content at all, just stores the node an provides
> > > > > > > > > a way to access the node.
> > > > > > > > >=20
> > > > > > > > > That means, that the problem is somewhere in Axis
> > > > > > > > > serialization as we just replace the nodes,
> > > > > > > > > basically.
> > > > > > > > >=20
> > > > > > > > > Dims, do you know of any problem there?
> > > > > > > > >=20
> > > > > > > > > BTW, while implementing and testing the interop
> > > > > > > > > scenarios I discovered a similar problem. That's
> > > > > > > > > the reason why I do a String.trim() on the String
> > > > > > > > > input parameter at the server side to get rid
> > > > > > > > > of unwanted \n. Well, I didn't follow up that
> > > > > > > > > problem then, but it seems that something is wrong
> > > > > > > > > with Axis serialization when there is a new node.
> > > > > > > > >=20
> > > > > > > > > Regards,
> > > > > > > > > Werner
> > > > > > > > >=20
> > > > > > > > >=20
> > > > > > > > >=20
> > > > > > > > > > -----Urspr=FCngliche Nachricht-----
> > > > > > > > > > Von: Sashka [mailto:[email protected]]=20
> > > > > > > > > > Gesendet: Dienstag, 10. Februar 2004 12:38
> > > > > > > > > > An: Dittmann Werner; Davanum Srinivas
> > > > > > > > > > Betreff: WSDoAllReceiver/AxisUtil problem report
> > > > > > > > > >=20
> > > > > > > > > >=20
> > > > > > > > > > Werner, Dims, hi.
> > > > > > > > > > It seems there is a problem in the call to=20
> > > > > > > > > >  AxisUtil.updateSOAPMessage(doc, sm) in=20
> > WSDoAllReceiver -=20
> > > > the=20
> > > > > > > > > > document=20
> > > > > > > > > > is corrupted while the message is updated in this=20
> > point:
> > > > > > > > > > ///---------------------
> > > > > > > > > >     WSSecurityEngineResult wsResult =3D null;
> > > > > > > > > >     try {
> > > > > > > > > >         wsResult =3D
> > > > > > > > > >                 secEngine.processSecurityHeader(
> > > > > > > > > >                         doc,
> > > > > > > > > >                         null,
> > > > > > > > > >                         cbHandler,
> > > > > > > > > >                         sigCrypto,
> > > > > > > > > >                         decCrypto);
> > > > > > > > > >     } catch (Exception ex) {
> > > > > > > > > >         throw new AxisFault(
> > > > > > > > > >                 "WSDoAllReceiver: security=20
> processing=20
> > > > failed",
> > > > > > > > > >                 ex);
> > > > > > > > > >     }
> > > > > > > > > >     try {
> > > > > > > > > >       AxisUtil.updateSOAPMessage(doc, sm);=20
> /// <<---=20
> > Here
> > > > > > > > > >     ...........
> > > > > > > > > > ///-------------------------
> > > > > > > > > >=20
> > > > > > > > > > Full description.
> > > > > > > > > > ------------------
> > > > > > > > > > I'm testing the WSS4J with a standard basic axis=20
> > sample:
> > > > > > > > > > samples.addr.=20
> > > > > > > > > > On the call AddressBook.addEntry(String=20
> name, Address=20
> > > > > > > > addr) <executed=20
> > > > > > > > > > as rpc/encoded, for more exactness> I receive=20
> > unexpected=20
> > > > > > > > server-side=20
> > > > > > > > > > exception while Address object deserialization:
> > > > > > > > > > //----- start of except. stack ------------
> > > > > > > > > >     java.lang.NumberFormatException: For=20
> input string:=20
> > > > > > > '\n1 ' at=20
> > > > > > > > > >     java.lang.NumberFormatException.forInputString=20
> > > > > > > > > >                               =20
> > > > > > > (NumberFormatException.java:48) at=20
> > > > > > > > > >     java.lang.Integer.parseInt(Integer.java:426) at =

> > > > > > > > > >    =20
> java.lang.Integer.&lt;init&gt;(Integer.java:567) at
> > > > > > > > > >    =20
> > sun.reflect.NativeConstructorAccessorImpl.newInstance0
> > > > > > > > > >                                     =20
> (Native Method)=20
> > at=20
> > > > > > > > > >    =20
> > sun.reflect.NativeConstructorAccessorImpl.newInstance
> > > > > > > > > >                       =20
> > > > > > > (NativeConstructorAccessorImpl.java:39) at=20
> > > > > > > > > >    =20
> > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> > > > > > > > > >                       =20
> > > > > > > > (DelegatingConstructorAccessorImpl.java:27) at=20
> > > > > > > > > >    =20
> > > > > > > > > >=20
> > > > > > > > java.lang.reflect.Constructor.newInstance
> > > > (Constructor.java:274) at=20
> > > > > > > > > >    =20
> > > > org.apache.axis.encoding.ser.SimpleDeserializer.makeValue
> > > > > > > > > >                       =20
> (SimpleDeserializer.java:284)=20
> > at=20
> > > > > > > > > >    =20
> > > > org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement
> > > > > > > > > >                       =20
> (SimpleDeserializer.java:214)=20
> > at=20
> > > > > > > > > >    =20
> >=20
> =3D=3D=3D message truncated =3D=3D=3D
>=20
>=20
> =3D=3D=3D=3D=3D
> Davanum Srinivas - http://webservices.apache.org/~dims/
>=20
>=20
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick
> _______________________________________________
> wss4j-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wss4j-devel
>=20


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click