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 "John Baker (JIRA)" <ax...@ws.apache.org> on 2005/08/05 15:42:37 UTC

[jira] Created: (AXIS-2166) Axis appears to be ignoring minOccurs="0"

Axis appears to be ignoring minOccurs="0"
-----------------------------------------

         Key: AXIS-2166
         URL: http://issues.apache.org/jira/browse/AXIS-2166
     Project: Apache Axis
        Type: Bug
    Versions: 1.2.1    
 Environment: Linux, Tomcat 5
    Reporter: John Baker
 Attachments: serviceRequest.wsdl, stdout_20050804.zip

I am using a WSDL file supplied to be by a third party and I suspect it doesn't quite reflect what their .NET server is returning in the SOAP messages. I am getting this exception:

java.io.IOException: Non nillable element 'requestCategoryCode' is null.
        at
org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.
java:215)
        at
org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
zationContext.java:1426)
        at
org.apache.axis.encoding.SerializationContext.serialize(Serialization
Context.java:914)
        at
org.apache.axis.encoding.SerializationContext.serialize(Serialization
Context.java:702)
        at
org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.
java:230)
        at
org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
zationContext.java:1426)
        at
org.apache.axis.encoding.SerializationContext.serialize(Serialization
Context.java:914)

So looking at (an extract of) the XML received by Axis:

<AdministrationDetails><ComplaintTypeCode>PESTM</ComplaintTypeCode><ComplaintTypeText>Mice</ComplaintTypeText><AllocatedToCode>CRMTES</AllocatedToCode>
<AllocatedToText>CRMTestOfficer</AllocatedToText><HowReceivedCode>CC</HowReceivedCode><HowReceivedText>CallCentre</HowReceivedText><TimeReceived>2005-08-04T0 6:52:03.0000000+01:00</TimeReceived><StatusCode>REC</StatusCode><StatusText>Received</StatusText><AreaTeamCode>E</AreaTeamCode><AreaTeamText>Eastern AreaTeam</AreaTeamText></AdministrationDetails>

As you can see, RequestCategoryCode is not in the XML extract. Yet it is defined like this in the WSDL:

          <xs:element name="RequestCategoryCode" type="uni:CNCODE_CodeValue" minOccurs="0" nillable="true">

Now given I can't provide a test case, I've supplied the WSDL and the XML being returned from the .NET server.




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS-2166) Axis appears to be ignoring minOccurs="0"

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2166?page=all ]
     
Davanum Srinivas resolved AXIS-2166:
------------------------------------

    Resolution: Won't Fix

can't do much here...plz see Dennis' comments.

-- dims

> Axis appears to be ignoring minOccurs="0"
> -----------------------------------------
>
>          Key: AXIS-2166
>          URL: http://issues.apache.org/jira/browse/AXIS-2166
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Linux, Tomcat 5
>     Reporter: John Baker
>  Attachments: serviceRequest.wsdl, stdout_20050804.zip
>
> I am using a WSDL file supplied to be by a third party and I suspect it doesn't quite reflect what their .NET server is returning in the SOAP messages. I am getting this exception:
> java.io.IOException: Non nillable element 'requestCategoryCode' is null.
>         at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.
> java:215)
>         at
> org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
> zationContext.java:1426)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:914)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:702)
>         at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.
> java:230)
>         at
> org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
> zationContext.java:1426)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:914)
> So looking at (an extract of) the XML received by Axis:
> <AdministrationDetails><ComplaintTypeCode>PESTM</ComplaintTypeCode><ComplaintTypeText>Mice</ComplaintTypeText><AllocatedToCode>CRMTES</AllocatedToCode>
> <AllocatedToText>CRMTestOfficer</AllocatedToText><HowReceivedCode>CC</HowReceivedCode><HowReceivedText>CallCentre</HowReceivedText><TimeReceived>2005-08-04T0 6:52:03.0000000+01:00</TimeReceived><StatusCode>REC</StatusCode><StatusText>Received</StatusText><AreaTeamCode>E</AreaTeamCode><AreaTeamText>Eastern AreaTeam</AreaTeamText></AdministrationDetails>
> As you can see, RequestCategoryCode is not in the XML extract. Yet it is defined like this in the WSDL:
>           <xs:element name="RequestCategoryCode" type="uni:CNCODE_CodeValue" minOccurs="0" nillable="true">
> Now given I can't provide a test case, I've supplied the WSDL and the XML being returned from the .NET server.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-2166) Axis appears to be ignoring minOccurs="0"

Posted by "Dennis Sosnoski (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2166?page=comments#action_12318770 ] 

Dennis Sosnoski commented on AXIS-2166:
---------------------------------------

The error that you're reporting appears to relate to serializing an object, not deserializing one from XML. Aside from that, the WSDL you attached has two instances of elements named "RequestCategoryCode", and the one which is part of AdministrationDetailsType is defined as required, not optional. The received XML is invalid according to this schema.

> Axis appears to be ignoring minOccurs="0"
> -----------------------------------------
>
>          Key: AXIS-2166
>          URL: http://issues.apache.org/jira/browse/AXIS-2166
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Linux, Tomcat 5
>     Reporter: John Baker
>  Attachments: serviceRequest.wsdl, stdout_20050804.zip
>
> I am using a WSDL file supplied to be by a third party and I suspect it doesn't quite reflect what their .NET server is returning in the SOAP messages. I am getting this exception:
> java.io.IOException: Non nillable element 'requestCategoryCode' is null.
>         at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.
> java:215)
>         at
> org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
> zationContext.java:1426)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:914)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:702)
>         at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.
> java:230)
>         at
> org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
> zationContext.java:1426)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:914)
> So looking at (an extract of) the XML received by Axis:
> <AdministrationDetails><ComplaintTypeCode>PESTM</ComplaintTypeCode><ComplaintTypeText>Mice</ComplaintTypeText><AllocatedToCode>CRMTES</AllocatedToCode>
> <AllocatedToText>CRMTestOfficer</AllocatedToText><HowReceivedCode>CC</HowReceivedCode><HowReceivedText>CallCentre</HowReceivedText><TimeReceived>2005-08-04T0 6:52:03.0000000+01:00</TimeReceived><StatusCode>REC</StatusCode><StatusText>Received</StatusText><AreaTeamCode>E</AreaTeamCode><AreaTeamText>Eastern AreaTeam</AreaTeamText></AdministrationDetails>
> As you can see, RequestCategoryCode is not in the XML extract. Yet it is defined like this in the WSDL:
>           <xs:element name="RequestCategoryCode" type="uni:CNCODE_CodeValue" minOccurs="0" nillable="true">
> Now given I can't provide a test case, I've supplied the WSDL and the XML being returned from the .NET server.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-2166) Axis appears to be ignoring minOccurs="0"

Posted by "John Baker (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2166?page=comments#action_12317787 ] 

John Baker commented on AXIS-2166:
----------------------------------

The XML being sent back from the .NET server can be found in the attached log - search up from the bottom!

> Axis appears to be ignoring minOccurs="0"
> -----------------------------------------
>
>          Key: AXIS-2166
>          URL: http://issues.apache.org/jira/browse/AXIS-2166
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Linux, Tomcat 5
>     Reporter: John Baker
>  Attachments: serviceRequest.wsdl, stdout_20050804.zip
>
> I am using a WSDL file supplied to be by a third party and I suspect it doesn't quite reflect what their .NET server is returning in the SOAP messages. I am getting this exception:
> java.io.IOException: Non nillable element 'requestCategoryCode' is null.
>         at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.
> java:215)
>         at
> org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
> zationContext.java:1426)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:914)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:702)
>         at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.
> java:230)
>         at
> org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
> zationContext.java:1426)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:914)
> So looking at (an extract of) the XML received by Axis:
> <AdministrationDetails><ComplaintTypeCode>PESTM</ComplaintTypeCode><ComplaintTypeText>Mice</ComplaintTypeText><AllocatedToCode>CRMTES</AllocatedToCode>
> <AllocatedToText>CRMTestOfficer</AllocatedToText><HowReceivedCode>CC</HowReceivedCode><HowReceivedText>CallCentre</HowReceivedText><TimeReceived>2005-08-04T0 6:52:03.0000000+01:00</TimeReceived><StatusCode>REC</StatusCode><StatusText>Received</StatusText><AreaTeamCode>E</AreaTeamCode><AreaTeamText>Eastern AreaTeam</AreaTeamText></AdministrationDetails>
> As you can see, RequestCategoryCode is not in the XML extract. Yet it is defined like this in the WSDL:
>           <xs:element name="RequestCategoryCode" type="uni:CNCODE_CodeValue" minOccurs="0" nillable="true">
> Now given I can't provide a test case, I've supplied the WSDL and the XML being returned from the .NET server.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-2166) Axis appears to be ignoring minOccurs="0"

Posted by "John Baker (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2166?page=all ]

John Baker updated AXIS-2166:
-----------------------------

    Attachment: serviceRequest.wsdl

> Axis appears to be ignoring minOccurs="0"
> -----------------------------------------
>
>          Key: AXIS-2166
>          URL: http://issues.apache.org/jira/browse/AXIS-2166
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Linux, Tomcat 5
>     Reporter: John Baker
>  Attachments: serviceRequest.wsdl, stdout_20050804.zip
>
> I am using a WSDL file supplied to be by a third party and I suspect it doesn't quite reflect what their .NET server is returning in the SOAP messages. I am getting this exception:
> java.io.IOException: Non nillable element 'requestCategoryCode' is null.
>         at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.
> java:215)
>         at
> org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
> zationContext.java:1426)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:914)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:702)
>         at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.
> java:230)
>         at
> org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
> zationContext.java:1426)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:914)
> So looking at (an extract of) the XML received by Axis:
> <AdministrationDetails><ComplaintTypeCode>PESTM</ComplaintTypeCode><ComplaintTypeText>Mice</ComplaintTypeText><AllocatedToCode>CRMTES</AllocatedToCode>
> <AllocatedToText>CRMTestOfficer</AllocatedToText><HowReceivedCode>CC</HowReceivedCode><HowReceivedText>CallCentre</HowReceivedText><TimeReceived>2005-08-04T0 6:52:03.0000000+01:00</TimeReceived><StatusCode>REC</StatusCode><StatusText>Received</StatusText><AreaTeamCode>E</AreaTeamCode><AreaTeamText>Eastern AreaTeam</AreaTeamText></AdministrationDetails>
> As you can see, RequestCategoryCode is not in the XML extract. Yet it is defined like this in the WSDL:
>           <xs:element name="RequestCategoryCode" type="uni:CNCODE_CodeValue" minOccurs="0" nillable="true">
> Now given I can't provide a test case, I've supplied the WSDL and the XML being returned from the .NET server.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-2166) Axis appears to be ignoring minOccurs="0"

Posted by "John Baker (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2166?page=all ]

John Baker updated AXIS-2166:
-----------------------------

    Attachment: stdout_20050804.zip

> Axis appears to be ignoring minOccurs="0"
> -----------------------------------------
>
>          Key: AXIS-2166
>          URL: http://issues.apache.org/jira/browse/AXIS-2166
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Linux, Tomcat 5
>     Reporter: John Baker
>  Attachments: serviceRequest.wsdl, stdout_20050804.zip
>
> I am using a WSDL file supplied to be by a third party and I suspect it doesn't quite reflect what their .NET server is returning in the SOAP messages. I am getting this exception:
> java.io.IOException: Non nillable element 'requestCategoryCode' is null.
>         at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.
> java:215)
>         at
> org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
> zationContext.java:1426)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:914)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:702)
>         at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.
> java:230)
>         at
> org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
> zationContext.java:1426)
>         at
> org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:914)
> So looking at (an extract of) the XML received by Axis:
> <AdministrationDetails><ComplaintTypeCode>PESTM</ComplaintTypeCode><ComplaintTypeText>Mice</ComplaintTypeText><AllocatedToCode>CRMTES</AllocatedToCode>
> <AllocatedToText>CRMTestOfficer</AllocatedToText><HowReceivedCode>CC</HowReceivedCode><HowReceivedText>CallCentre</HowReceivedText><TimeReceived>2005-08-04T0 6:52:03.0000000+01:00</TimeReceived><StatusCode>REC</StatusCode><StatusText>Received</StatusText><AreaTeamCode>E</AreaTeamCode><AreaTeamText>Eastern AreaTeam</AreaTeamText></AdministrationDetails>
> As you can see, RequestCategoryCode is not in the XML extract. Yet it is defined like this in the WSDL:
>           <xs:element name="RequestCategoryCode" type="uni:CNCODE_CodeValue" minOccurs="0" nillable="true">
> Now given I can't provide a test case, I've supplied the WSDL and the XML being returned from the .NET server.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira