You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by BOURLON Agnès <ag...@yahoo.fr> on 2002/12/18 19:35:17 UTC

property PROP_SEND_XSI

Hello,

I would like to know if a service Axis can work with the property
PROP_SEND_XSI =false
If yes, I don't understand what is the advantage to use the xsi types in the
envelope?
Thanks in adavance,
Agnes

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

Re: property PROP_SEND_XSI

Posted by BOURLON Agnès <ag...@yahoo.fr>.
Yes, probably... perhaps because of the information concerning the array
size (usefully during the  deserialization espacially if SAX is used..)
Thanks fur your help.
Agnes

----- Original Message -----
From: "Dennis Sosnoski" <dm...@sosnoski.com>
To: <ax...@xml.apache.org>
Sent: Thursday, December 19, 2002 7:39 PM
Subject: Re: property PROP_SEND_XSI


> That looks like the case I mentioned in my previous email, where the
> SOAP spec requires some form of type on an array definition. I don't
> think this can be omitted from a SOAP message without invalidating it.
>
>   - Dennis
>
> BOURLON Agnès wrote:
>
> >Dennis,
> >
> >I don't know if it 's that you need ... but this is a sample that our
client
> >generate :
> >The only complex type specified the "first" object and in this object,
the
> >only xsi specified parameters are the arrays (Foo[])
> >..
> ><soapenv:Body>
> >
> >  <ns1:myMethod
> >soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >xmlns:ns1="urn:MyService ">
> >
> >   <in0 xsi:type="ns2:MyRequest" xmlns:ns2="http://myservice.com">
> >
> >    <isOk>false</isOk>
> >
> >    <timeSlot>
> >
> >     <date>
> >
> >      <iso8601>2002-12-15T17:00+01:00</iso8601>
> >
> >     </date>
> >
> >    </timeSlot>
> >
> >    <information>
> >
> >     <label>This is the information</label>
> >
> >     <description>xxxx</description>
> >
> >    </information>
> >
> >    <fooList soapenc:arrayType="ns2:Foo[2]"
> >xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
> >
> >     <item>
> >
> >      <a1>17</aA>
> >
> >      <a2>
> >
> >       <b>String</b>
> >
> >      </a2>
> >
> >     </item>
> >
> >     <item>
> >
> >      <a1>18</aA>
> >
> >      <a2>
> >
> >       <b>String</b>
> >
> >      </a2>
> >
> >     </item>
> >
> >    </ fooList >
> >
> >   </in0>
> >
> >  </ns1:myMethod>
> >
> > </soapenv:Body>
> >
> >..
> >
> >
> >----- Original Message -----
> >From: "Dennis Sosnoski" <dm...@sosnoski.com>
> >To: <ax...@xml.apache.org>
> >Sent: Thursday, December 19, 2002 11:39 AM
> >Subject: Re: property PROP_SEND_XSI
> >
> >
> >
> >
> >>BOURLON Agnès wrote:
> >>
> >>
> >>
> >>>Do you know if it can work (no xsi type) with GLUE Server or Apache
SOAP
> >>>Server?
> >>>
> >>>
> >>>
> >>I haven't tried eliminating xsi type with either of those, but from what
> >>I've seen I think GLUE supports untyped RPC but Apache SOAP does not.
> >>Perhaps someone with more experience on these two can comment and
> >>correct me if I'm wrong.
> >>
> >>
> >>
> >>>And a last question.. if we set the PROP_SEND_XSI to false in our Axis
> >>>Client (that we use to test our service in Axis server) we noticed that
> >>>
> >>>
> >some
> >
> >
> >>>types in the envelope can contain the xsi types ....
> >>>For example in the case of the Array  type ..is it for fix the size
> >>>
> >>>
> >during
> >
> >
> >>>the deserialization?
> >>>
> >>>
> >>>
> >>As I read the SOAP 1.1 spec the Array type is required, though it can be
> >>a generic 'SOAP-ENC:arrayType="xsd:ur-type[4]', for instance. When this
> >>form is used the individual elements all need to give type information.
> >> From looking at the code I think Axis may put a stronger restriction on
> >>what can be sent, requiring that the type of the array elements be a
> >>specific serializable type. Either way some type information is going to
> >>be required for arrays. I don't know where else you've seen the types,
> >>if you have specific examples let me know.
> >>
> >>Having the types included should never be harmful as far as I know.
> >>
> >>  - Dennis
> >>
> >>
> >
> >___________________________________________________________
> >Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> >Yahoo! Mail : http://fr.mail.yahoo.com
> >
> >
> >

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

Re: property PROP_SEND_XSI

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
That looks like the case I mentioned in my previous email, where the 
SOAP spec requires some form of type on an array definition. I don't 
think this can be omitted from a SOAP message without invalidating it.

  - Dennis

BOURLON Agnès wrote:

>Dennis,
>
>I don't know if it 's that you need ... but this is a sample that our client
>generate :
>The only complex type specified the "first" object and in this object, the
>only xsi specified parameters are the arrays (Foo[])
>..
><soapenv:Body>
>
>  <ns1:myMethod
>soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:ns1="urn:MyService ">
>
>   <in0 xsi:type="ns2:MyRequest" xmlns:ns2="http://myservice.com">
>
>    <isOk>false</isOk>
>
>    <timeSlot>
>
>     <date>
>
>      <iso8601>2002-12-15T17:00+01:00</iso8601>
>
>     </date>
>
>    </timeSlot>
>
>    <information>
>
>     <label>This is the information</label>
>
>     <description>xxxx</description>
>
>    </information>
>
>    <fooList soapenc:arrayType="ns2:Foo[2]"
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
>
>     <item>
>
>      <a1>17</aA>
>
>      <a2>
>
>       <b>String</b>
>
>      </a2>
>
>     </item>
>
>     <item>
>
>      <a1>18</aA>
>
>      <a2>
>
>       <b>String</b>
>
>      </a2>
>
>     </item>
>
>    </ fooList >
>
>   </in0>
>
>  </ns1:myMethod>
>
> </soapenv:Body>
>
>..
>
>
>----- Original Message -----
>From: "Dennis Sosnoski" <dm...@sosnoski.com>
>To: <ax...@xml.apache.org>
>Sent: Thursday, December 19, 2002 11:39 AM
>Subject: Re: property PROP_SEND_XSI
>
>
>  
>
>>BOURLON Agnès wrote:
>>
>>    
>>
>>>Do you know if it can work (no xsi type) with GLUE Server or Apache SOAP
>>>Server?
>>>
>>>      
>>>
>>I haven't tried eliminating xsi type with either of those, but from what
>>I've seen I think GLUE supports untyped RPC but Apache SOAP does not.
>>Perhaps someone with more experience on these two can comment and
>>correct me if I'm wrong.
>>
>>    
>>
>>>And a last question.. if we set the PROP_SEND_XSI to false in our Axis
>>>Client (that we use to test our service in Axis server) we noticed that
>>>      
>>>
>some
>  
>
>>>types in the envelope can contain the xsi types ....
>>>For example in the case of the Array  type ..is it for fix the size
>>>      
>>>
>during
>  
>
>>>the deserialization?
>>>
>>>      
>>>
>>As I read the SOAP 1.1 spec the Array type is required, though it can be
>>a generic 'SOAP-ENC:arrayType="xsd:ur-type[4]', for instance. When this
>>form is used the individual elements all need to give type information.
>> From looking at the code I think Axis may put a stronger restriction on
>>what can be sent, requiring that the type of the array elements be a
>>specific serializable type. Either way some type information is going to
>>be required for arrays. I don't know where else you've seen the types,
>>if you have specific examples let me know.
>>
>>Having the types included should never be harmful as far as I know.
>>
>>  - Dennis
>>    
>>
>
>___________________________________________________________
>Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
>Yahoo! Mail : http://fr.mail.yahoo.com
>
>  
>


Re: property PROP_SEND_XSI

Posted by BOURLON Agnès <ag...@yahoo.fr>.
Dennis,

I don't know if it 's that you need ... but this is a sample that our client
generate :
The only complex type specified the "first" object and in this object, the
only xsi specified parameters are the arrays (Foo[])
..
<soapenv:Body>

  <ns1:myMethod
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:MyService ">

   <in0 xsi:type="ns2:MyRequest" xmlns:ns2="http://myservice.com">

    <isOk>false</isOk>

    <timeSlot>

     <date>

      <iso8601>2002-12-15T17:00+01:00</iso8601>

     </date>

    </timeSlot>

    <information>

     <label>This is the information</label>

     <description>xxxx</description>

    </information>

    <fooList soapenc:arrayType="ns2:Foo[2]"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

     <item>

      <a1>17</aA>

      <a2>

       <b>String</b>

      </a2>

     </item>

     <item>

      <a1>18</aA>

      <a2>

       <b>String</b>

      </a2>

     </item>

    </ fooList >

   </in0>

  </ns1:myMethod>

 </soapenv:Body>

..


----- Original Message -----
From: "Dennis Sosnoski" <dm...@sosnoski.com>
To: <ax...@xml.apache.org>
Sent: Thursday, December 19, 2002 11:39 AM
Subject: Re: property PROP_SEND_XSI


> BOURLON Agnès wrote:
>
> >Do you know if it can work (no xsi type) with GLUE Server or Apache SOAP
> >Server?
> >
> I haven't tried eliminating xsi type with either of those, but from what
> I've seen I think GLUE supports untyped RPC but Apache SOAP does not.
> Perhaps someone with more experience on these two can comment and
> correct me if I'm wrong.
>
> >And a last question.. if we set the PROP_SEND_XSI to false in our Axis
> >Client (that we use to test our service in Axis server) we noticed that
some
> >types in the envelope can contain the xsi types ....
> >For example in the case of the Array  type ..is it for fix the size
during
> >the deserialization?
> >
> As I read the SOAP 1.1 spec the Array type is required, though it can be
> a generic 'SOAP-ENC:arrayType="xsd:ur-type[4]', for instance. When this
> form is used the individual elements all need to give type information.
>  From looking at the code I think Axis may put a stronger restriction on
> what can be sent, requiring that the type of the array elements be a
> specific serializable type. Either way some type information is going to
> be required for arrays. I don't know where else you've seen the types,
> if you have specific examples let me know.
>
> Having the types included should never be harmful as far as I know.
>
>   - Dennis

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

Re: property PROP_SEND_XSI

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
BOURLON Agnès wrote:

>Do you know if it can work (no xsi type) with GLUE Server or Apache SOAP
>Server?
>
I haven't tried eliminating xsi type with either of those, but from what 
I've seen I think GLUE supports untyped RPC but Apache SOAP does not. 
Perhaps someone with more experience on these two can comment and 
correct me if I'm wrong.

>And a last question.. if we set the PROP_SEND_XSI to false in our Axis
>Client (that we use to test our service in Axis server) we noticed that some
>types in the envelope can contain the xsi types ....
>For example in the case of the Array  type ..is it for fix the size during
>the deserialization?
>
As I read the SOAP 1.1 spec the Array type is required, though it can be 
a generic 'SOAP-ENC:arrayType="xsd:ur-type[4]', for instance. When this 
form is used the individual elements all need to give type information. 
 From looking at the code I think Axis may put a stronger restriction on 
what can be sent, requiring that the type of the array elements be a 
specific serializable type. Either way some type information is going to 
be required for arrays. I don't know where else you've seen the types, 
if you have specific examples let me know.

Having the types included should never be harmful as far as I know.

  - Dennis


Re: property PROP_SEND_XSI

Posted by BOURLON Agnès <ag...@yahoo.fr>.
Hi Dennis,

Thanks for your reply.
I know how configure the client to send envelope without xsi types :
    call.setOption(AxisEngine.PROP_SEND_XSI, new Boolean("false"));

I just would like to know if we take the decision to authorize the client to
send envelope without xsi types towards our Axis Server (the client will not
be an Axis Client but a Microsoft client) ...if it's a good solution or if
it can bring some problems...
Thanks for your warning about the bug with the multihref... we don't use the
multihref (the property is set to false in the server-config.wsdd) so there
is no problem in our configuration, isn't it???

Do you know if it can work (no xsi type) with GLUE Server or Apache SOAP
Server?

And a last question.. if we set the PROP_SEND_XSI to false in our Axis
Client (that we use to test our service in Axis server) we noticed that some
types in the envelope can contain the xsi types ....
For example in the case of the Array  type ..is it for fix the size during
the deserialization?

Best regards,
Agnes


----- Original Message -----
From: "Dennis Sosnoski" <dm...@sosnoski.com>
To: <ax...@xml.apache.org>
Sent: Wednesday, December 18, 2002 8:07 PM
Subject: Re: property PROP_SEND_XSI


> Hi Agnes,
>
> Many older SOAP implementations require the types to be present, though
> with others (such as .NET) the default is to not use the types. Axis
> includes support for generating SOAP without the xsi types, but you have
> to configure it to operate this way. As far as I know, the normal way of
> doing this is through the sendXsiTypes parameter in the configuration -
> I'll paste in an example of a client-side WSDD that does this below.
>
> That said, there was a problem in the handling of objects being passed
> with sendXsiTypes=false
> (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15219). This was just
> corrected in the CVS code yesterday, so the fix should be included in
> the latest nightly build. I haven't tested it yet, will try to do that
> later today.
>
>   - Dennis
>
> Dennis M. Sosnoski
> Sosnoski Software Solutions, Inc.
> http://www.sosnoski.com
>
> client-config.wsdd example with sendXsiTypes=false:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
>  <globalConfiguration>
>   <parameter name="sendXsiTypes" value="false"/>
>  </globalConfiguration>
>  <transport name="http"
> pivot="java:org.apache.axis.transport.http.HTTPSender"/>
>  <transport name="java"
> pivot="java:org.apache.axis.transport.java.JavaSender"/>
>  <transport name="local"
> pivot="java:org.apache.axis.transport.local.LocalSender"/>
>  <typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> type="java:flightsraw.TimeTableBean" qname="ns1:TimeTableBean"
> xmlns:ns1="http://flightsraw"/>
>  <typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> type="java:flightsraw.CarrierBean" qname="ns2:CarrierBean"
> xmlns:ns2="http://flightsraw"/>
>  <typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> type="java:flightsraw.AirportBean" qname="ns3:AirportBean"
> xmlns:ns3="http://flightsraw"/>
>  <typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> type="java:flightsraw.RouteBean" qname="ns4:RouteBean"
> xmlns:ns4="http://flightsraw"/>
>  <typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> type="java:flightsraw.FlightBean" qname="ns5:FlightBean"
> xmlns:ns5="http://flightsraw"/>
> </deployment>
>
> BOURLON Agnès wrote:
>
> >Hello,
> >
> >I would like to know if a service Axis can work with the property
> >PROP_SEND_XSI =false
> >If yes, I don't understand what is the advantage to use the xsi types in
the
> >envelope?
> >Thanks in adavance,
> >Agnes
> >
> >___________________________________________________________
> >Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> >Yahoo! Mail : http://fr.mail.yahoo.com
> >
> >
> >

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

Re: property PROP_SEND_XSI

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Hi Agnes,

Many older SOAP implementations require the types to be present, though 
with others (such as .NET) the default is to not use the types. Axis 
includes support for generating SOAP without the xsi types, but you have 
to configure it to operate this way. As far as I know, the normal way of 
doing this is through the sendXsiTypes parameter in the configuration - 
I'll paste in an example of a client-side WSDD that does this below.

That said, there was a problem in the handling of objects being passed 
with sendXsiTypes=false 
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15219). This was just 
corrected in the CVS code yesterday, so the fix should be included in 
the latest nightly build. I haven't tested it yet, will try to do that 
later today.

  - Dennis

Dennis M. Sosnoski
Sosnoski Software Solutions, Inc.
http://www.sosnoski.com

client-config.wsdd example with sendXsiTypes=false:

<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" 
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <globalConfiguration>
  <parameter name="sendXsiTypes" value="false"/>
 </globalConfiguration>
 <transport name="http" 
pivot="java:org.apache.axis.transport.http.HTTPSender"/>
 <transport name="java" 
pivot="java:org.apache.axis.transport.java.JavaSender"/>
 <transport name="local" 
pivot="java:org.apache.axis.transport.local.LocalSender"/>
 <typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" 
type="java:flightsraw.TimeTableBean" qname="ns1:TimeTableBean" 
xmlns:ns1="http://flightsraw"/>
 <typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" 
type="java:flightsraw.CarrierBean" qname="ns2:CarrierBean" 
xmlns:ns2="http://flightsraw"/>
 <typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" 
type="java:flightsraw.AirportBean" qname="ns3:AirportBean" 
xmlns:ns3="http://flightsraw"/>
 <typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" 
type="java:flightsraw.RouteBean" qname="ns4:RouteBean" 
xmlns:ns4="http://flightsraw"/>
 <typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" 
type="java:flightsraw.FlightBean" qname="ns5:FlightBean" 
xmlns:ns5="http://flightsraw"/>
</deployment>

BOURLON Agnès wrote:

>Hello,
>
>I would like to know if a service Axis can work with the property
>PROP_SEND_XSI =false
>If yes, I don't understand what is the advantage to use the xsi types in the
>envelope?
>Thanks in adavance,
>Agnes
>
>___________________________________________________________
>Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
>Yahoo! Mail : http://fr.mail.yahoo.com
>
>  
>