You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Franz Fehringer (JIRA)" <ax...@ws.apache.org> on 2006/01/03 16:43:00 UTC

[jira] Created: (AXISCPP-898) simple problem with simpleTypes

simple problem with simpleTypes
-------------------------------

         Key: AXISCPP-898
         URL: http://issues.apache.org/jira/browse/AXISCPP-898
     Project: Axis-C++
        Type: Bug
  Components: Client - Stub  
    Versions: 1.6 Alpha    
 Environment: W2KSP4 JDK 1.5.0_06 
    Reporter: Franz Fehringer


Given the construct
    <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
name="t_NonNegativeInt">
        <xsd:restriction base="xsd:integer">
            <xsd:minInclusive value="0"/>
            <xsd:maxExclusive value="2147483647"/>
        </xsd:restriction>
    </xsd:simpleType>
   <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
name="t_Age">
        <xsd:restriction base="t_NonNegativeInt"/>
   </xsd:simpleType>
wsdl2ws generates for the first case
typedef xsd__integer t_NonNegativeInt;
which seems absolutely correct to me
but for the second case an empty class t_Age, so the underlying integer is
not accessible.
I would expect
typedef t_NonNegativeInt t_Age;
for the second case.


-- 
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: (AXISCPP-898) simple problem with simpleTypes

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-898?page=all ]

nadir amra updated AXISCPP-898:
-------------------------------

    Attachment: wsdl2ws.jar

I am attaching the wsdl2ws.jar file that I hope fixes the problem prior to uploading the files to SVN.  The fixes in the code has fixed customer problems but I wanted to ensure that it is properly exercised.  The test bucket runs without problems. 

I plan on uploading to SVN within 2 days so if you can try it out and comment it would be helpful. 


> simple problem with simpleTypes
> -------------------------------
>
>                 Key: AXISCPP-898
>                 URL: http://issues.apache.org/jira/browse/AXISCPP-898
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Client - Stub
>    Affects Versions: 1.6 Alpha
>         Environment: W2KSP4 JDK 1.5.0_06 
>            Reporter: Franz Fehringer
>         Assigned To: nadir amra
>         Attachments: PegsTour.wsdl, PegsTour.xsd, wsdl2ws.jar
>
>
> Given the construct
>     <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_NonNegativeInt">
>         <xsd:restriction base="xsd:integer">
>             <xsd:minInclusive value="0"/>
>             <xsd:maxExclusive value="2147483647"/>
>         </xsd:restriction>
>     </xsd:simpleType>
>    <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_Age">
>         <xsd:restriction base="t_NonNegativeInt"/>
>    </xsd:simpleType>
> wsdl2ws generates for the first case
> typedef xsd__integer t_NonNegativeInt;
> which seems absolutely correct to me
> but for the second case an empty class t_Age, so the underlying integer is
> not accessible.
> I would expect
> typedef t_NonNegativeInt t_Age;
> for the second case.

-- 
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

        

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


[jira] Commented: (AXISCPP-898) simple problem with simpleTypes

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-898?page=comments#action_12363009 ] 

John Hawkins commented on AXISCPP-898:
--------------------------------------

Pleae can you attach the WSDlL that is causing you this issue so that we can reproduce the problem.

> simple problem with simpleTypes
> -------------------------------
>
>          Key: AXISCPP-898
>          URL: http://issues.apache.org/jira/browse/AXISCPP-898
>      Project: Axis-C++
>         Type: Bug
>   Components: Client - Stub
>     Versions: 1.6 Alpha
>  Environment: W2KSP4 JDK 1.5.0_06 
>     Reporter: Franz Fehringer

>
> Given the construct
>     <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_NonNegativeInt">
>         <xsd:restriction base="xsd:integer">
>             <xsd:minInclusive value="0"/>
>             <xsd:maxExclusive value="2147483647"/>
>         </xsd:restriction>
>     </xsd:simpleType>
>    <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_Age">
>         <xsd:restriction base="t_NonNegativeInt"/>
>    </xsd:simpleType>
> wsdl2ws generates for the first case
> typedef xsd__integer t_NonNegativeInt;
> which seems absolutely correct to me
> but for the second case an empty class t_Age, so the underlying integer is
> not accessible.
> I would expect
> typedef t_NonNegativeInt t_Age;
> for the second case.

-- 
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: (AXISCPP-898) simple problem with simpleTypes

Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-898?page=comments#action_12368373 ] 

Adrian Dick commented on AXISCPP-898:
-------------------------------------

Ok, I think I understand the problem here.

The WSDL2Ws tool correctly determines your t_NonNegativeInt is a simple type, due to it's being a derivate of the built-in simple type xsd:integer.
However, it incorrectly determines t_Age as a complex type.

Looking at the WSDL2Ws code, this is because the WSDL parsing portion hasn't added these to the table of simple types.  The first case works because some "special case" logic has already been added to check the immediate parent type.

As for a solution, we can either:
-  Look recursively at the parent types until we can determine correclty.
-  Alter the parsing code to flag these as simple types and add them to the lookup table.

The second option is my preference as it will avoid the need for "special case" code scattered throughout.

> simple problem with simpleTypes
> -------------------------------
>
>          Key: AXISCPP-898
>          URL: http://issues.apache.org/jira/browse/AXISCPP-898
>      Project: Axis-C++
>         Type: Bug
>   Components: Client - Stub
>     Versions: 1.6 Alpha
>  Environment: W2KSP4 JDK 1.5.0_06 
>     Reporter: Franz Fehringer
>  Attachments: PegsTour.wsdl, PegsTour.xsd
>
> Given the construct
>     <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_NonNegativeInt">
>         <xsd:restriction base="xsd:integer">
>             <xsd:minInclusive value="0"/>
>             <xsd:maxExclusive value="2147483647"/>
>         </xsd:restriction>
>     </xsd:simpleType>
>    <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_Age">
>         <xsd:restriction base="t_NonNegativeInt"/>
>    </xsd:simpleType>
> wsdl2ws generates for the first case
> typedef xsd__integer t_NonNegativeInt;
> which seems absolutely correct to me
> but for the second case an empty class t_Age, so the underlying integer is
> not accessible.
> I would expect
> typedef t_NonNegativeInt t_Age;
> for the second case.

-- 
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: (AXISCPP-898) simple problem with simpleTypes

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-898?page=comments#action_12455528 ] 
            
nadir amra commented on AXISCPP-898:
------------------------------------

Just to update you in this issue, I believe I have come up with a robust fix and will be putting up in SVN in the next few days.  I had to back out all of Fred's updates (sorry Fred :-( ) to come up with something that works.  Stay tuned.

> simple problem with simpleTypes
> -------------------------------
>
>                 Key: AXISCPP-898
>                 URL: http://issues.apache.org/jira/browse/AXISCPP-898
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Client - Stub
>    Affects Versions: 1.6 Alpha
>         Environment: W2KSP4 JDK 1.5.0_06 
>            Reporter: Franz Fehringer
>         Assigned To: nadir amra
>         Attachments: PegsTour.wsdl, PegsTour.xsd
>
>
> Given the construct
>     <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_NonNegativeInt">
>         <xsd:restriction base="xsd:integer">
>             <xsd:minInclusive value="0"/>
>             <xsd:maxExclusive value="2147483647"/>
>         </xsd:restriction>
>     </xsd:simpleType>
>    <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_Age">
>         <xsd:restriction base="t_NonNegativeInt"/>
>    </xsd:simpleType>
> wsdl2ws generates for the first case
> typedef xsd__integer t_NonNegativeInt;
> which seems absolutely correct to me
> but for the second case an empty class t_Age, so the underlying integer is
> not accessible.
> I would expect
> typedef t_NonNegativeInt t_Age;
> for the second case.

-- 
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

        

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


Re: [jira] Assigned: (AXISCPP-898) simple problem with simpleTypes

Posted by Franz Fehringer <fe...@isogmbh.de>.
One of my colleagues accidentally reactivated the problematic XSD 
construct several days ago and the generation yielded the same warning i 
got when i created the issue.
So it seems to me that the problem still persists.

Franz


Fred Preston schrieb:
>
> Hi Nadir,
>         I may have already fixed this problem in the WSDL2Ws code... 
>  Checkout the *RestrictedPattern17667Client* test in 
> \ws-axis\c\tests\auto_build\testcases\client.
>
> Regards,
>
> Fred Preston.
> Software Engineer
> WSCC
>
> Mail Point 127,  IBM Hursley Park
> Winchester, Hampshire, SO21 2JN, UK  
> Notes id:    Fred Preston/UK/IBM @ IBMGB
> Internet:      prestonf@uk.ibm.com
> Tel:             +44 1962 817180
> Internal:      247180
>
>
>
> *"nadir amra (JIRA)" <ax...@ws.apache.org>*
>
> 17/11/2006 06:49
> Please respond to
> "Apache AXIS C Developers List" <ax...@ws.apache.org>
>
>
> 	
> To
> 	axis-c-dev@ws.apache.org
> cc
> 	
> Subject
> 	[jira] Assigned: (AXISCPP-898) simple problem with simpleTypes
>
>
>
> 	
>
>
>
>
>
>      [ http://issues.apache.org/jira/browse/AXISCPP-898?page=all ]
>
> nadir amra reassigned AXISCPP-898:
> ----------------------------------
>
>    Assignee: nadir amra
>
> > simple problem with simpleTypes
> > -------------------------------
> >
> >                 Key: AXISCPP-898
> >                 URL: http://issues.apache.org/jira/browse/AXISCPP-898
> >             Project: Axis-C++
> >          Issue Type: Bug
> >          Components: Client - Stub
> >    Affects Versions: 1.6 Alpha
> >         Environment: W2KSP4 JDK 1.5.0_06
> >            Reporter: Franz Fehringer
> >         Assigned To: nadir amra
> >         Attachments: PegsTour.wsdl, PegsTour.xsd
> >
> >
> > Given the construct
> >     <xsd:simpleType 
> xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> > name="t_NonNegativeInt">
> >         <xsd:restriction base="xsd:integer">
> >             <xsd:minInclusive value="0"/>
> >             <xsd:maxExclusive value="2147483647"/>
> >         </xsd:restriction>
> >     </xsd:simpleType>
> >    <xsd:simpleType 
> xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> > name="t_Age">
> >         <xsd:restriction base="t_NonNegativeInt"/>
> >    </xsd:simpleType>
> > wsdl2ws generates for the first case
> > typedef xsd__integer t_NonNegativeInt;
> > which seems absolutely correct to me
> > but for the second case an empty class t_Age, so the underlying 
> integer is
> > not accessible.
> > I would expect
> > typedef t_NonNegativeInt t_Age;
> > for the second case.
>
> -- 
> 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
>
>        
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>


Re: [jira] Assigned: (AXISCPP-898) simple problem with simpleTypes

Posted by Fred Preston <PR...@uk.ibm.com>.
Hi Nadir,
        I may have already fixed this problem in the WSDL2Ws code... 
Checkout the RestrictedPattern17667Client test in 
\ws-axis\c\tests\auto_build\testcases\client.

Regards,

Fred Preston.
Software Engineer
WSCC

Mail Point 127,  IBM Hursley Park
Winchester, Hampshire, SO21 2JN, UK 
Notes id:    Fred Preston/UK/IBM @ IBMGB
Internet:      prestonf@uk.ibm.com
Tel:             +44 1962 817180
Internal:      247180




"nadir amra (JIRA)" <ax...@ws.apache.org> 
17/11/2006 06:49
Please respond to
"Apache AXIS C Developers List" <ax...@ws.apache.org>


To
axis-c-dev@ws.apache.org
cc

Subject
[jira] Assigned: (AXISCPP-898) simple problem with simpleTypes






     [ http://issues.apache.org/jira/browse/AXISCPP-898?page=all ]

nadir amra reassigned AXISCPP-898:
----------------------------------

    Assignee: nadir amra

> simple problem with simpleTypes
> -------------------------------
>
>                 Key: AXISCPP-898
>                 URL: http://issues.apache.org/jira/browse/AXISCPP-898
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Client - Stub
>    Affects Versions: 1.6 Alpha
>         Environment: W2KSP4 JDK 1.5.0_06 
>            Reporter: Franz Fehringer
>         Assigned To: nadir amra
>         Attachments: PegsTour.wsdl, PegsTour.xsd
>
>
> Given the construct
>     <xsd:simpleType xmlns="
http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_NonNegativeInt">
>         <xsd:restriction base="xsd:integer">
>             <xsd:minInclusive value="0"/>
>             <xsd:maxExclusive value="2147483647"/>
>         </xsd:restriction>
>     </xsd:simpleType>
>    <xsd:simpleType xmlns="
http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_Age">
>         <xsd:restriction base="t_NonNegativeInt"/>
>    </xsd:simpleType>
> wsdl2ws generates for the first case
> typedef xsd__integer t_NonNegativeInt;
> which seems absolutely correct to me
> but for the second case an empty class t_Age, so the underlying integer 
is
> not accessible.
> I would expect
> typedef t_NonNegativeInt t_Age;
> for the second case.

-- 
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

 

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



[jira] Assigned: (AXISCPP-898) simple problem with simpleTypes

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-898?page=all ]

nadir amra reassigned AXISCPP-898:
----------------------------------

    Assignee: nadir amra

> simple problem with simpleTypes
> -------------------------------
>
>                 Key: AXISCPP-898
>                 URL: http://issues.apache.org/jira/browse/AXISCPP-898
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Client - Stub
>    Affects Versions: 1.6 Alpha
>         Environment: W2KSP4 JDK 1.5.0_06 
>            Reporter: Franz Fehringer
>         Assigned To: nadir amra
>         Attachments: PegsTour.wsdl, PegsTour.xsd
>
>
> Given the construct
>     <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_NonNegativeInt">
>         <xsd:restriction base="xsd:integer">
>             <xsd:minInclusive value="0"/>
>             <xsd:maxExclusive value="2147483647"/>
>         </xsd:restriction>
>     </xsd:simpleType>
>    <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_Age">
>         <xsd:restriction base="t_NonNegativeInt"/>
>    </xsd:simpleType>
> wsdl2ws generates for the first case
> typedef xsd__integer t_NonNegativeInt;
> which seems absolutely correct to me
> but for the second case an empty class t_Age, so the underlying integer is
> not accessible.
> I would expect
> typedef t_NonNegativeInt t_Age;
> for the second case.

-- 
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

        

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


[jira] Updated: (AXISCPP-898) simple problem with simpleTypes

Posted by "Franz Fehringer (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-898?page=all ]

Franz Fehringer updated AXISCPP-898:
------------------------------------

    Attachment: PegsTour.wsdl
                PegsTour.xsd

> simple problem with simpleTypes
> -------------------------------
>
>          Key: AXISCPP-898
>          URL: http://issues.apache.org/jira/browse/AXISCPP-898
>      Project: Axis-C++
>         Type: Bug
>   Components: Client - Stub
>     Versions: 1.6 Alpha
>  Environment: W2KSP4 JDK 1.5.0_06 
>     Reporter: Franz Fehringer
>  Attachments: PegsTour.wsdl, PegsTour.xsd
>
> Given the construct
>     <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_NonNegativeInt">
>         <xsd:restriction base="xsd:integer">
>             <xsd:minInclusive value="0"/>
>             <xsd:maxExclusive value="2147483647"/>
>         </xsd:restriction>
>     </xsd:simpleType>
>    <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_Age">
>         <xsd:restriction base="t_NonNegativeInt"/>
>    </xsd:simpleType>
> wsdl2ws generates for the first case
> typedef xsd__integer t_NonNegativeInt;
> which seems absolutely correct to me
> but for the second case an empty class t_Age, so the underlying integer is
> not accessible.
> I would expect
> typedef t_NonNegativeInt t_Age;
> for the second case.

-- 
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: (AXISCPP-898) simple problem with simpleTypes

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-898?page=all ]

nadir amra resolved AXISCPP-898.
--------------------------------

    Fix Version/s:  1.6 Final
       Resolution: Fixed

OK, all of my testing seems to be passing, and various customer problems relating to the issue has been resolved.  

I had to back out a previous restriction fix due to the fact the fix was not comprehensive and also introduced a bug that prevented code from being generated in certain scenarios. 

The general tact I took is marking the user-defined simple types based on user-defined simple types via restrictions as simple types and adding them to the various lookup tables.

It actually worked pretty well.  In addition, fields are generated with the proper user-defined simple type instead of the primitive base type.  

Only thing left to do is to create a test case.

> simple problem with simpleTypes
> -------------------------------
>
>                 Key: AXISCPP-898
>                 URL: http://issues.apache.org/jira/browse/AXISCPP-898
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Client - Stub
>    Affects Versions: 1.6 Alpha
>         Environment: W2KSP4 JDK 1.5.0_06 
>            Reporter: Franz Fehringer
>         Assigned To: nadir amra
>             Fix For:  1.6 Final
>
>         Attachments: PegsTour.wsdl, PegsTour.xsd, wsdl2ws.jar
>
>
> Given the construct
>     <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_NonNegativeInt">
>         <xsd:restriction base="xsd:integer">
>             <xsd:minInclusive value="0"/>
>             <xsd:maxExclusive value="2147483647"/>
>         </xsd:restriction>
>     </xsd:simpleType>
>    <xsd:simpleType xmlns="http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"
> name="t_Age">
>         <xsd:restriction base="t_NonNegativeInt"/>
>    </xsd:simpleType>
> wsdl2ws generates for the first case
> typedef xsd__integer t_NonNegativeInt;
> which seems absolutely correct to me
> but for the second case an empty class t_Age, so the underlying integer is
> not accessible.
> I would expect
> typedef t_NonNegativeInt t_Age;
> for the second case.

-- 
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

        

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