Just to clarify: On Wed, 22 Dec 2004 09:52:19 +0100, WAJSBERG Julien RD-BIZZ <[EMAIL PROTECTED]> wrote: > Ephemeris Lappis a écrit : > <snip> > >Despite my problems with the java2wsdl task, i have finally use a 'wrapped' > >axis wsdl to generate my client stubs for a single operation service that > >takes a simple javabean argument (a string and an int). I use the SUN WTK > >2.1 with its first JSR172 implementation, that only supports the > >document/literal as specified. The service interface has been generated with > >2 arguments : the string and the int. In a former test, using a true > >document/literal wsdl, generated with the SUN JWSDK 1.3, the generated > >operation had a single argument of a generated javabean type, as expected. > >In this test case, a 2 attributes bean generates a 2 parameters method, but > >in a true project with 50 attributes javabeans... supposing client and > >server can communicate ! > > > > > You just have to wrap your 50 attributes in a java bean. > Like : > <soap:envelope> > <doSomething> > <myBean> > <firstElement/> > <secondElement/> > ... > </myBean> > </doSomething> > </soap:envelope> > > Since it's 'wrapped', you need to wrap the whole bean argument in > another element <doSomething>.
Not necessarily. In fact, that's not what you want to do. Instead you should name your bean doSomething, and then you don't need the extra layer of wrapping. The whole point of wrapped mode is to let you invoke the request using parameters rather than the bean. Document style requires you to invoke the request using the bean. So in a message where "doSomething" is the operation name, and it has two parameters, "firstElement" and "secondElement", in wrapped, it would look like this: <soap:envelope> <doSomething> <firstElement/> <secondElement/> </doSomething> </soap:envelope> and it document it would look like this: <soap:envelope> <myBean> <firstElement/> <secondElement/> </myBean> </soap:envelope> Wrapped is a programming convention that simulates RPC style, but it produces a doc/literal message. The conventions require the following: - the service is defined as document/literal - the input message definition contains a single part referencing an element which has the same name as the operation - the referenced element is defined as a complexType with a <sequence> constructor, where each element within the sequence represents an interface parameter > > >My deduction : 'wrapped' is not 'document' for JSR172 ! I think i've read > >the JSR172 requires WS-I Basic Profile compliance... > > > > > I don't know JSR172, but document-style services can really be anything > you like as long as it's correctly described in the WSDL. > > -- > Julien > Wrapped *is* document/literal (and WS-I compliant), and any toolkit that supports document/literal also supports a "wrapped" compliant definition (although it may not provide automatic marshalling of the bean for your). Note that Microsoft initially developed the wrapped programming convention, but the JAX-RPC spec also defines wrapped processing. I reiterate -- it is a programming convention -- meaning that it affects that way you write your Java code, but it does not affect the formation of the message on the wire. The purpose of "wrapped" is to allow developers to use an RPC-style programming model and generate document/literal messages. Anne