You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Patrick Di Loreto (JIRA)" <ax...@ws.apache.org> on 2007/05/14 11:28:16 UTC

[jira] Created: (AXIS-2664) Axis generate invalid soap when using RPC/encoded where exists omittable fields (minOccurs=0) and nillable=false

Axis generate invalid soap when using RPC/encoded where exists omittable fields (minOccurs=0) and nillable=false
----------------------------------------------------------------------------------------------------------------

                 Key: AXIS-2664
                 URL: https://issues.apache.org/jira/browse/AXIS-2664
             Project: Axis
          Issue Type: Bug
          Components: Serialization/Deserialization
    Affects Versions: 1.4
            Reporter: Patrick Di Loreto


While using axis 1.4 with webMethods EAI system I have encountered the following problem :

Axis generate an invalid soap message in RPC/encoded WS where exists omittable (minOccurs="0") fields and nillable = "false".
Axis don't omit the field when null but put it in soap message with nill value.

Exploring source code I have found the following check in SerializerBean.java class at row : 222

                            // if meta data says minOccurs=0, then we can skip
                            // it if its value is null and we aren't doing SOAP
                            // encoding.
                            if (isOmittable && !isEncoded) {
                                continue;
                            }

It seams a choice to not apply omittable behavior while using soap/encoding. Is it correct ? Is it a standard ? WebMethods aspect that this field was omitted and not nill.

I fixed it just as follow :

                            // if meta data says minOccurs=0, then we can skip
                            // it if its value is null and we aren't doing SOAP
                            // encoding.
                            if (isOmittable){ // && !isEncoded) {
                                continue;
                            }

What can I aspect on next version of Axis ? 

Thx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2664) Axis generate invalid soap when using RPC/encoded where exists omittable fields (minOccurs=0) and nillable=false

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507901 ] 

Tom Jordahl commented on AXIS-2664:
-----------------------------------

I think that for SOAP-encoded XML, you can always set an element to nil.
See Section 5.1 of the SOAP 1.1 spec:
  http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383513

Item 9 at the bottom of the section:
"9. A NULL value or a default value MAY be represented by omission of the accessor element. A NULL value MAY also be indicated by an accessor element containing the attribute xsi:null with value '1' or possibly other application-dependent attributes and values. "

So, you can remove the encoded check, but it is OK for it to be there.  And yes, I believe I was the person who put it there. :-)



> Axis generate invalid soap when using RPC/encoded where exists omittable fields (minOccurs=0) and nillable=false
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS-2664
>                 URL: https://issues.apache.org/jira/browse/AXIS-2664
>             Project: Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: 1.4
>            Reporter: Patrick Di Loreto
>
> While using axis 1.4 with webMethods EAI system I have encountered the following problem :
> Axis generate an invalid soap message in RPC/encoded WS where exists omittable (minOccurs="0") fields and nillable = "false".
> Axis don't omit the field when null but put it in soap message with nill value.
> Exploring source code I have found the following check in org.apache.axis.encoding.ser.BeanSerializer.java class at row : 222
>                             // if meta data says minOccurs=0, then we can skip
>                             // it if its value is null and we aren't doing SOAP
>                             // encoding.
>                             if (isOmittable && !isEncoded) {
>                                 continue;
>                             }
> It seams a choice to not apply omittable behavior while using soap/encoding. Is it correct ? Is it a standard ? WebMethods aspect that this field was omitted and not nill.
> I fixed it just as follow :
>                             // if meta data says minOccurs=0, then we can skip
>                             // it if its value is null and we aren't doing SOAP
>                             // encoding.
>                             if (isOmittable){ // && !isEncoded) {
>                                 continue;
>                             }
> What can I aspect on next version of Axis ? 
> Thx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS-2664) Axis generate invalid soap when using RPC/encoded where exists omittable fields (minOccurs=0) and nillable=false

Posted by "Patrick Di Loreto (JIRA)" <ax...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS-2664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Di Loreto updated AXIS-2664:
------------------------------------

    Description: 
While using axis 1.4 with webMethods EAI system I have encountered the following problem :

Axis generate an invalid soap message in RPC/encoded WS where exists omittable (minOccurs="0") fields and nillable = "false".
Axis don't omit the field when null but put it in soap message with nill value.

Exploring source code I have found the following check in org.apache.axis.encoding.ser.BeanSerializer.java class at row : 222

                            // if meta data says minOccurs=0, then we can skip
                            // it if its value is null and we aren't doing SOAP
                            // encoding.
                            if (isOmittable && !isEncoded) {
                                continue;
                            }

It seams a choice to not apply omittable behavior while using soap/encoding. Is it correct ? Is it a standard ? WebMethods aspect that this field was omitted and not nill.

I fixed it just as follow :

                            // if meta data says minOccurs=0, then we can skip
                            // it if its value is null and we aren't doing SOAP
                            // encoding.
                            if (isOmittable){ // && !isEncoded) {
                                continue;
                            }

What can I aspect on next version of Axis ? 

Thx

  was:
While using axis 1.4 with webMethods EAI system I have encountered the following problem :

Axis generate an invalid soap message in RPC/encoded WS where exists omittable (minOccurs="0") fields and nillable = "false".
Axis don't omit the field when null but put it in soap message with nill value.

Exploring source code I have found the following check in SerializerBean.java class at row : 222

                            // if meta data says minOccurs=0, then we can skip
                            // it if its value is null and we aren't doing SOAP
                            // encoding.
                            if (isOmittable && !isEncoded) {
                                continue;
                            }

It seams a choice to not apply omittable behavior while using soap/encoding. Is it correct ? Is it a standard ? WebMethods aspect that this field was omitted and not nill.

I fixed it just as follow :

                            // if meta data says minOccurs=0, then we can skip
                            // it if its value is null and we aren't doing SOAP
                            // encoding.
                            if (isOmittable){ // && !isEncoded) {
                                continue;
                            }

What can I aspect on next version of Axis ? 

Thx


> Axis generate invalid soap when using RPC/encoded where exists omittable fields (minOccurs=0) and nillable=false
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS-2664
>                 URL: https://issues.apache.org/jira/browse/AXIS-2664
>             Project: Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: 1.4
>            Reporter: Patrick Di Loreto
>
> While using axis 1.4 with webMethods EAI system I have encountered the following problem :
> Axis generate an invalid soap message in RPC/encoded WS where exists omittable (minOccurs="0") fields and nillable = "false".
> Axis don't omit the field when null but put it in soap message with nill value.
> Exploring source code I have found the following check in org.apache.axis.encoding.ser.BeanSerializer.java class at row : 222
>                             // if meta data says minOccurs=0, then we can skip
>                             // it if its value is null and we aren't doing SOAP
>                             // encoding.
>                             if (isOmittable && !isEncoded) {
>                                 continue;
>                             }
> It seams a choice to not apply omittable behavior while using soap/encoding. Is it correct ? Is it a standard ? WebMethods aspect that this field was omitted and not nill.
> I fixed it just as follow :
>                             // if meta data says minOccurs=0, then we can skip
>                             // it if its value is null and we aren't doing SOAP
>                             // encoding.
>                             if (isOmittable){ // && !isEncoded) {
>                                 continue;
>                             }
> What can I aspect on next version of Axis ? 
> Thx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2664) Axis generate invalid soap when using RPC/encoded where exists omittable fields (minOccurs=0) and nillable=false

Posted by "Marinó A. Jónsson (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537566 ] 

Marinó A. Jónsson commented on AXIS-2664:
-----------------------------------------

I just hit this snag.  My first google hit was issue AXIS-2054, which really explains in detail my problem.  The "resolution" for that issue, however, is too superficial and doesn't work for me.

The key point Patrick makes here is that when a field _is not_ nillable but _is_ omittable it should indeed be omitted.

So - a compromise might look something like this:

// if meta data says minOccurs=0, then we should skip
// it if its value is null and either it's not nillable or we 
// aren't doing SOAP encoding.
if (isOmittable && (!isNillable || !isEncoded)) {
    continue;
}

> Axis generate invalid soap when using RPC/encoded where exists omittable fields (minOccurs=0) and nillable=false
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS-2664
>                 URL: https://issues.apache.org/jira/browse/AXIS-2664
>             Project: Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: 1.4
>            Reporter: Patrick Di Loreto
>
> While using axis 1.4 with webMethods EAI system I have encountered the following problem :
> Axis generate an invalid soap message in RPC/encoded WS where exists omittable (minOccurs="0") fields and nillable = "false".
> Axis don't omit the field when null but put it in soap message with nill value.
> Exploring source code I have found the following check in org.apache.axis.encoding.ser.BeanSerializer.java class at row : 222
>                             // if meta data says minOccurs=0, then we can skip
>                             // it if its value is null and we aren't doing SOAP
>                             // encoding.
>                             if (isOmittable && !isEncoded) {
>                                 continue;
>                             }
> It seams a choice to not apply omittable behavior while using soap/encoding. Is it correct ? Is it a standard ? WebMethods aspect that this field was omitted and not nill.
> I fixed it just as follow :
>                             // if meta data says minOccurs=0, then we can skip
>                             // it if its value is null and we aren't doing SOAP
>                             // encoding.
>                             if (isOmittable){ // && !isEncoded) {
>                                 continue;
>                             }
> What can I aspect on next version of Axis ? 
> Thx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org