axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xu cai" <jeffrey...@gmail.com>
Subject Re: Attribute "id" was already specified for element "multiRef" Exception, how to custmoize soap response.
Date Thu, 24 Aug 2006 05:30:45 GMT
Anne, thanks for your valuable reply, it helps and I learn much from it.



On 8/23/06, Anne Thomas Manes <atmanes@gmail.com> wrote:
>
> To turn off multi-refs, add this parameter to the WSDD:
>
>             <parameter name="sendMultiRefs" value="false"/>
>
> This is the Axis option you use to turn off multi-refs. The resulting
> message is SOAP compliant. (The SOAP spec doesn't require use of
> multi-refs, and it doesn't specify how to indicate whether to use them
> or not.)
>
> Regarding SOAP encoding versus literal:
>
> SOAP encoding is an out-dated data model for mapping language objects
> to XML. Literal maps the language object to a structure defined by XML
> Schema. When SOAP was first published in 2000, the XML Schema
> specification wasn't completed, so the SOAP authors defined their own
> data model. But SOAP encoding was not completely specified, and it
> often generates gnarly interoperability issues. The WS-I Basic Profile
> outlaws use of SOAP encoding, and in SOAP 1.2, support for SOAP
> encoding is optional.
>
> Another pertinent fact: SOAP encoding is much slower than literal.
>
> You can indicate that you want to use literal in the WSDL, WSDD, or
> Java2WSDL.
> In the WSDL binding, you specify:
>
>          <soap:body use="literal"/>
>
> In WSDD, you specify:
>
>           style="wrapped" use="literal"
>
> In Java2WSDL, you specify:
>
>        -y, --style WRAPPED
>       -u, --use LITERAL
>
> Anne
>
> On 8/22/06, xu cai <jeffreycai@gmail.com> wrote:
> >
> > hi Anne,
> >        Thanks for your valued reply.
> >        I appreciate it.
> >        Could you answer me some questions  further ?
> > 1) For options 3, How to turn off multi-refs ?
> > Is the multi-ref option a part of soap spec, or just a part of Axis
> > implementation ?
> >
> > 2) For option 4,  Use literal rather than SOAP encoding
> > what's the difference of literal and soap encoding ?
> > how to change encoding style ?
> > it's the axis implementation issue or spec issue ?
> >
> >
> >
> > On 8/19/06, Anne Thomas Manes <atmanes@gmail.com> wrote:
> > >
> > Options:
> >
> > 1. Change the schema and specify that the "id" attribute must be
> > namespace qualified,
> >    e.g., <x:attribute name="id" type="x:string" form="qualified"/>
> > 2. Change the schema and specify a different name for the attribute
> > 3. Turn off multi-refs
> > 4. Use literal rather than SOAP encoding
> >
> > Anne
> >
> > On 8/18/06, xu cai <jeffreycai@gmail.com> wrote:
> > >
> > > I got a weird issue.
> > > In my case, the soap response generated by axis engine is not a valid
> xml,
> > > because there are two "id" attribute in multiRef element.
> > >
> > > see  the snippet :
> > >
> > >    <multiRef id="id4" soapenc:root="0"
> > > soapenv:encodingStyle=" http://schemas.xmlsoap.org/
> > > soap/encoding/" id="mgw_monitoring_enabled" xsi:type="ns4:ReplyColumn"
> > > xmlns:ns4=" http://www.foo
> > > .com/" xmlns:soapenc="
> > > http://schemas.xmlsoap.org/soap/encoding/">Y</multiRef>
> > >
> > > the first "id" attribute is the id of the element, it's referenced by
> > other
> > > element. as you know, the soap response generated by axis always looks
> so,
> > > there are so many "mutiRef" element. ...
> > >
> > > the second "id" attribute is the caused by my wsdl file , it means the
> > "id"
> > > of this record, it's the content of the reply data.
> > > WSDL interface is finalized, I also think the "id" attribute make
> sense
> > and
> > > should be changed.
> > >
> > > So my question is,  is there any way to fix this porblem. allow
> customer
> > add
> > > a attribute "id" to their expected reply data ?
> > >
> > > Since "id" attribute is used by "multiRef", can we define "id"
> attribute
> > in
> > > wsdl ?  ....
> > >
> >  > many thanks
> > >
> > >
> > >
> > > --
> > > - xucai
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
> >
> > --
> > - xucai
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
- xucai

Mime
View raw message