axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Sosnoski (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-530) elements without minOccurs="0" produce isnill="true" on the wire
Date Wed, 02 Mar 2005 19:20:53 GMT
     [ http://issues.apache.org/jira/browse/AXIS-530?page=comments#action_60065 ]
     
Dennis Sosnoski commented on AXIS-530:
--------------------------------------

This issue needs to be reopened. Axis RC3 still (or again) has this problem, as can be seen
when attempting to use the Amazon web service interface. Here's the WSDL schema for a request:

        <xs:element name="ItemSearch">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/>
                    <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/>
                    <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/>
                    <xs:element name="Validate" type="xs:string" minOccurs="0"/>
                    <xs:element name="Shared" type="tns:ItemSearchRequest" minOccurs="0"/>
                    <xs:element name="Request" type="tns:ItemSearchRequest" minOccurs="0"
maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>

here's what goes out on the wire:

POST /onca/soap?Service=AWSECommerceService HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.2RC3
...
 
<?xml version="1.0" encoding="UTF-8"?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
         <ItemSearch xmlns="http://webservices.amazon.com/AWSECommerceService/2005-01-19">
            <SubscriptionId>XXXXXXXXXXXXXXXX</SubscriptionId>
            <AssociateTag xsi:nil="true"/>
            <XMLEscaping xsi:nil="true"/>
            <Validate xsi:nil="true"/>
            <Shared>
               <Count lowestSetBit="2">12</Count>
               <ResponseGroup>Medium</ResponseGroup>
               <SearchIndex>Books</SearchIndex>
               <Title>Java XML</Title>
            </Shared>
            <Request xsi:nil="true"/>
         </ItemSearch>
      </soapenv:Body>
   </soapenv:Envelope>

Note the AssociateTag, XMLEscaping, and Validate elements in this request.

> elements without minOccurs="0" produce isnill="true" on the wire
> ----------------------------------------------------------------
>
>          Key: AXIS-530
>          URL: http://issues.apache.org/jira/browse/AXIS-530
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.0
>  Environment: Operating System: Other
> Platform: Other
>     Reporter: Andre Kramer
>     Assignee: Glen Daniels
>      Fix For: 1.2
>  Attachments: patch.tar.gz
>
> Elements that are marked optional in wsdl schema. e.g. profile field in:
> <complexType name="User">
>   <sequence>
>     <element name="profile" type="someComplexType" minOccurs="0"/>
>   </sequence>
> </complexType>
> <element name="User" type="types:User"/>
> Produces (inside SOAP body element) on the wire:
> <User>
>    <profile xsi:nil="true"/>
> </User>
> Since the profile schema element is not marked as nillable="true" (only 
> minOccurs="0") it would (at least) save bandwidth to just drop it altogether:
> <User>
> </User>
> [Both formats already work for deserialization.]
> thanks,
> Andre

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message