OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsrp-interop message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [wsrp-interop] Interpretation of minOccur=0 and nillable=tue in theenvelope.






I meant must be namespaced by "urn:oasis:names:tc:wsrp:v1:types".
Just a cut&paste error....

Mit freundlichen Gruessen / best regards,

        Richard Jacob
______________________________________________________
IBM Lab Boeblingen, Germany
Dept.8288, WebSphere Portal Server Development
WSRP Standardization Technical Lead
Phone: ++49 7031 16-3469  -  Fax: ++49 7031 16-4888
Email: mailto:richard.jacob@de.ibm.com


                                                                           
             Richard                                                       
             Jacob/Germany/IBM                                             
             @IBMDE                                                     To 
                                       "Klein, Avi" <avi.klein@sap.com>    
             06/01/2004 10:19                                           cc 
             AM                        wsrp-interop@lists.oasis-open.org   
                                                                   Subject 
                                       Re: [wsrp-interop] Interpretation   
                                       of minOccur=0 and nillable=tue in   
                                       the envelope.                       
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           








Hi Avi,

"Klein, Avi" <avi.klein@sap.com> wrote on 05/30/2004 08:45:02 AM:

> Hi all,
>
> This is an old issue we once had an E-mail thread on and is still
> unresolved for the SAP Consumer.
>

We had this discussion about minOccurs="0" and nillable="true" some time
ago and found that none of the stacks dealt with these attributes 100%
correctly. However the problems which came up here were mostly combinations
of these two on one element.
In general the various stack have differnet schema validation levels, some
complain some not.

> I would appreciate your input on how do you interpret the following case:
>
> In the WSDL, the specific data type contains an element which is
> “minOccur=0” and in runtime this element is in fact null. How should
> it be presented in the envelope:
> a. <elementname xsi:nill=true/>
> b. <elementname/>
> c. omitted al together

a. is not valid as long as nillable="true" is not set in the schema.
b. is valid, however the mapping of e.g. xml to java prevents this. For
example <element> could be a string. <element/> should be mapped to an
empty string (which is different from a String=null.
c. is valid and has the correct mapping

> In the WSDL, the specific data type contains an element which is
> “nillable="true" and in runtime this element is in fact null. How
> should it be presented in the envelope:
> a. <elementname xsi:nill=true/>
> b. <elementname/>
> c. omitted al together

a. is valid and the correct mapping
b. is valid, because the minOccurs/maxOccurs rules apply (both default to
1), however the same mapping rules apply here as above.
c. is not valid if minOccurs="0" is not set.

> I experience different behavior from the IBM producer and the Oracle
> producer for these cases: for example IBM producer permits xsi:
> nill=true for registration context in getMarkup while Oracle don’t.

Did you really cross-check it? Is there a serialization fault or does
Oracle simply not allow a non-registered Consumer?
I assume Oracle has registrationRequired set to true, which means you must
register first, and I could easily imagine in that case that
a getMarkup() with a nill registrationContext is rejected.
Mike, can you cross check?

> And Oracle allows omitting minOccur=0 elements while IBM don’t.

This statement makes me really nervous :-)
I would really be surprised if you experienced validation errors.
I think we have a lot of cases where minOccurs="0" elements are ommitted by
other consumers.
Can you please provide a message trace of a case where an element is
minOccurs="0", you ommit it on the message and we fail because of
validation?

In the message below the Oracle consumer fails validation (correctly)
because the request message indeed is invalid.
In MarkupParams the <locales> and <mimeTypes> elements are namespaced by
"http://www.w3.org/2001/XMLSchema";.
However they must be namespaced by "http://www.w3.org/2001/XMLSchema";.

> For the following request to Oracle producer:
> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:wn3="http://www.w3.org/1999/XMLSchema"; xmlns:wn2="http://www.
> w3.org/2000/10/XMLSchema" xmlns:wn1="http://www.w3.org/2001/XMLSchema";
> xmlns:wn0="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"; xmlns:wn4="urn:oasis:
> names:tc:wsrp:v1:wsdl" xmlns:tns="urn:oasis:names:tc:wsrp:v1:wsdl">
>        <SOAP-ENV:Body>
>              <prt0:getMarkup xmlns:prt0=C>
>                     <prt0:registrationContext>
>                            <prt0:registrationHandle>C:148.87.122.
> 191:4c7e10:f942d6eb23:-1f4</prt0:registrationHandle>
>                     </prt0:registrationContext>
>                     <prt0:portletContext>
>
<prt0:portletHandle>E:1:default</prt0:portletHandle
> >
>                     </prt0:portletContext>
>                     <prt0:runtimeContext>
>                            <prt0:userAuthentication>wsrp:none</prt0:
> userAuthentication>
>                            <prt0:portletInstanceKey/>
>                     </prt0:runtimeContext>
>                     <prt0:userContext>
>                            <prt0:userContextKey>USER.
> PRIVATE_DATASOURCE.un:testadmin</prt0:userContextKey>
>                     </prt0:userContext>
>                     <prt0:markupParams>
>                            <prt0:secureClientCommunication>false</
> prt0:secureClientCommunication>
>                            <wn1:locales>en-US</wn1:locales>
>                            <wn1:mimeTypes>text/html</wn1:mimeTypes>
>                            <prt0:mode>wsrp:view</prt0:mode>
>
<prt0:windowState>wsrp:normal</prt0:windowState>
>                            <prt0:navigationalState/>
>                     </prt0:markupParams>
>              </prt0:getMarkup>
>        </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> I get:
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd
> ="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.
> org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.
> org/soap/encoding/" xmlns:ns0="urn:oasis:names:tc:wsrp:v1:types"
> env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
>        <env:Body>
>              <env:Fault>
>                     <faultcode>env:Server</faultcode>
>                     <faultstring>Internal Server Error
> (deserialization error: deserialization error: expected element is
> missing: {http://www.w3.org/2001/XMLSchema}locales)</faultstring>
>              </env:Fault>
>        </env:Body>
> </env:Envelope>
>
>
> I’ll appreciate any lead on what does your producer expect to
> receive as a valid request (a sample of a received valid request
> envelope etc.).

Hope this helps.

Richard


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]