[jira] Created: (XFIRE-315) [WsGen] Anonymous types in wsdl:message cause NPE

View: New views
6 Messages — Rating Filter:   Alert me  

[jira] Created: (XFIRE-315) [WsGen] Anonymous types in wsdl:message cause NPE

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[WsGen] Anonymous types in wsdl:message cause NPE
-------------------------------------------------

         Key: XFIRE-315
         URL: http://jira.codehaus.org/browse/XFIRE-315
     Project: XFire
        Type: Bug

  Components: Generator  
    Versions: 1.0    
    Reporter: Kenny MacLeod
 Assigned to: Dan Diephouse
    Priority: Critical


When you try to use Wsdl11Generator (e.g,. from WsGenTask)  to generate WSDL bindings from a WSDL file which contains Messages with anonymous schema types, you get a NullPointerException from AbstractServiceGenerator.

Take the following WSDL fragment:

<wsdl:message name="MyMessage">
    <wsdl:part name="parameters" element="tns:MyResponse" />
</wsdl:message>

  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="MyResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="request" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>

If you look at WSDLServiceBuilder.createMessagePart(), you see the following logic:

        MessagePartInfo part = info.addMessagePart(element.getQName(), XmlSchemaElement.class);

        SchemaType st = null;
        if (element.getRefName() != null)
        {
            st = getBindingProvider().getSchemaType(element.getRefName(), service);
        }
        else if (element.getSchemaTypeName() != null)
        {
            st = getBindingProvider().getSchemaType(element.getSchemaTypeName(), service);
        }
       
        part.setSchemaType(st);


It appears that this code will only work for Messages with non-anonymous element types.  However, it looks as though it would be trivial to check whether the element has an anonymous type by adding another elese-if clause:

        else if (element.getSchemaType() != null)
        {
            st = element.getSchemaType();
        }


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


[jira] Commented: (XFIRE-315) [WsGen] Anonymous types in wsdl:message cause NPE

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://jira.codehaus.org/browse/XFIRE-315?page=comments#action_61536 ]

Dan Diephouse commented on XFIRE-315:
-------------------------------------

Hi, yeah I think I fixed this already in current CVS. Hopefully I'll be putting out a 1.1 beta release in the next 24 hours and you can test with that!

> [WsGen] Anonymous types in wsdl:message cause NPE
> -------------------------------------------------
>
>          Key: XFIRE-315
>          URL: http://jira.codehaus.org/browse/XFIRE-315
>      Project: XFire
>         Type: Bug

>   Components: Generator
>     Versions: 1.0
>     Reporter: Kenny MacLeod
>     Assignee: Dan Diephouse
>     Priority: Critical

>
>
> When you try to use Wsdl11Generator (e.g,. from WsGenTask)  to generate WSDL bindings from a WSDL file which contains Messages with anonymous schema types, you get a NullPointerException from AbstractServiceGenerator.
> Take the following WSDL fragment:
> <wsdl:message name="MyMessage">
>     <wsdl:part name="parameters" element="tns:MyResponse" />
> </wsdl:message>
>   <wsdl:types>
>     <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
>       <s:element name="MyResponse">
>         <s:complexType>
>           <s:sequence>
>             <s:element minOccurs="0" maxOccurs="1" name="request" type="s:string" />
>           </s:sequence>
>         </s:complexType>
>       </s:element>
>     </s:schema>
>   </wsdl:types>
> If you look at WSDLServiceBuilder.createMessagePart(), you see the following logic:
>         MessagePartInfo part = info.addMessagePart(element.getQName(), XmlSchemaElement.class);
>         SchemaType st = null;
>         if (element.getRefName() != null)
>         {
>             st = getBindingProvider().getSchemaType(element.getRefName(), service);
>         }
>         else if (element.getSchemaTypeName() != null)
>         {
>             st = getBindingProvider().getSchemaType(element.getSchemaTypeName(), service);
>         }
>        
>         part.setSchemaType(st);
> It appears that this code will only work for Messages with non-anonymous element types.  However, it looks as though it would be trivial to check whether the element has an anonymous type by adding another elese-if clause:
>         else if (element.getSchemaType() != null)
>         {
>             st = element.getSchemaType();
>         }

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


[jira] Resolved: (XFIRE-315) [WsGen] Anonymous types in wsdl:message cause NPE

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/XFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kenny MacLeod resolved XFIRE-315.
---------------------------------

    Resolution: Incomplete

> [WsGen] Anonymous types in wsdl:message cause NPE
> -------------------------------------------------
>
>                 Key: XFIRE-315
>                 URL: http://jira.codehaus.org/browse/XFIRE-315
>             Project: XFire
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 1.0
>            Reporter: Kenny MacLeod
>            Assignee: Dan Diephouse
>            Priority: Critical
>
> When you try to use Wsdl11Generator (e.g,. from WsGenTask)  to generate WSDL bindings from a WSDL file which contains Messages with anonymous schema types, you get a NullPointerException from AbstractServiceGenerator.
> Take the following WSDL fragment:
> <wsdl:message name="MyMessage">
>     <wsdl:part name="parameters" element="tns:MyResponse" />
> </wsdl:message>
>   <wsdl:types>
>     <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
>       <s:element name="MyResponse">
>         <s:complexType>
>           <s:sequence>
>             <s:element minOccurs="0" maxOccurs="1" name="request" type="s:string" />
>           </s:sequence>
>         </s:complexType>
>       </s:element>
>     </s:schema>
>   </wsdl:types>
> If you look at WSDLServiceBuilder.createMessagePart(), you see the following logic:
>         MessagePartInfo part = info.addMessagePart(element.getQName(), XmlSchemaElement.class);
>         SchemaType st = null;
>         if (element.getRefName() != null)
>         {
>             st = getBindingProvider().getSchemaType(element.getRefName(), service);
>         }
>         else if (element.getSchemaTypeName() != null)
>         {
>             st = getBindingProvider().getSchemaType(element.getSchemaTypeName(), service);
>         }
>        
>         part.setSchemaType(st);
> It appears that this code will only work for Messages with non-anonymous element types.  However, it looks as though it would be trivial to check whether the element has an anonymous type by adding another elese-if clause:
>         else if (element.getSchemaType() != null)
>         {
>             st = element.getSchemaType();
>         }

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Resolved: (XFIRE-315) [WsGen] Anonymous types in wsdl:message cause NPE

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/XFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kenny MacLeod resolved XFIRE-315.
---------------------------------

    Resolution: Incomplete

> [WsGen] Anonymous types in wsdl:message cause NPE
> -------------------------------------------------
>
>                 Key: XFIRE-315
>                 URL: http://jira.codehaus.org/browse/XFIRE-315
>             Project: XFire
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 1.0
>            Reporter: Kenny MacLeod
>            Assignee: Dan Diephouse
>            Priority: Critical
>
> When you try to use Wsdl11Generator (e.g,. from WsGenTask)  to generate WSDL bindings from a WSDL file which contains Messages with anonymous schema types, you get a NullPointerException from AbstractServiceGenerator.
> Take the following WSDL fragment:
> <wsdl:message name="MyMessage">
>     <wsdl:part name="parameters" element="tns:MyResponse" />
> </wsdl:message>
>   <wsdl:types>
>     <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
>       <s:element name="MyResponse">
>         <s:complexType>
>           <s:sequence>
>             <s:element minOccurs="0" maxOccurs="1" name="request" type="s:string" />
>           </s:sequence>
>         </s:complexType>
>       </s:element>
>     </s:schema>
>   </wsdl:types>
> If you look at WSDLServiceBuilder.createMessagePart(), you see the following logic:
>         MessagePartInfo part = info.addMessagePart(element.getQName(), XmlSchemaElement.class);
>         SchemaType st = null;
>         if (element.getRefName() != null)
>         {
>             st = getBindingProvider().getSchemaType(element.getRefName(), service);
>         }
>         else if (element.getSchemaTypeName() != null)
>         {
>             st = getBindingProvider().getSchemaType(element.getSchemaTypeName(), service);
>         }
>        
>         part.setSchemaType(st);
> It appears that this code will only work for Messages with non-anonymous element types.  However, it looks as though it would be trivial to check whether the element has an anonymous type by adding another elese-if clause:
>         else if (element.getSchemaType() != null)
>         {
>             st = element.getSchemaType();
>         }

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (XFIRE-315) [WsGen] Anonymous types in wsdl:message cause NPE

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/XFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=177893#action_177893 ]

hzy9981 commented on XFIRE-315:
-------------------------------

good job

> [WsGen] Anonymous types in wsdl:message cause NPE
> -------------------------------------------------
>
>                 Key: XFIRE-315
>                 URL: http://jira.codehaus.org/browse/XFIRE-315
>             Project: XFire
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 1.0
>            Reporter: Kenny MacLeod
>            Assignee: Dan Diephouse
>            Priority: Critical
>
> When you try to use Wsdl11Generator (e.g,. from WsGenTask)  to generate WSDL bindings from a WSDL file which contains Messages with anonymous schema types, you get a NullPointerException from AbstractServiceGenerator.
> Take the following WSDL fragment:
> <wsdl:message name="MyMessage">
>     <wsdl:part name="parameters" element="tns:MyResponse" />
> </wsdl:message>
>   <wsdl:types>
>     <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
>       <s:element name="MyResponse">
>         <s:complexType>
>           <s:sequence>
>             <s:element minOccurs="0" maxOccurs="1" name="request" type="s:string" />
>           </s:sequence>
>         </s:complexType>
>       </s:element>
>     </s:schema>
>   </wsdl:types>
> If you look at WSDLServiceBuilder.createMessagePart(), you see the following logic:
>         MessagePartInfo part = info.addMessagePart(element.getQName(), XmlSchemaElement.class);
>         SchemaType st = null;
>         if (element.getRefName() != null)
>         {
>             st = getBindingProvider().getSchemaType(element.getRefName(), service);
>         }
>         else if (element.getSchemaTypeName() != null)
>         {
>             st = getBindingProvider().getSchemaType(element.getSchemaTypeName(), service);
>         }
>        
>         part.setSchemaType(st);
> It appears that this code will only work for Messages with non-anonymous element types.  However, it looks as though it would be trivial to check whether the element has an anonymous type by adding another elese-if clause:
>         else if (element.getSchemaType() != null)
>         {
>             st = element.getSchemaType();
>         }

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (XFIRE-315) [WsGen] Anonymous types in wsdl:message cause NPE

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/XFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=177893#action_177893 ]

hzy9981 commented on XFIRE-315:
-------------------------------

good job

> [WsGen] Anonymous types in wsdl:message cause NPE
> -------------------------------------------------
>
>                 Key: XFIRE-315
>                 URL: http://jira.codehaus.org/browse/XFIRE-315
>             Project: XFire
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 1.0
>            Reporter: Kenny MacLeod
>            Assignee: Dan Diephouse
>            Priority: Critical
>
> When you try to use Wsdl11Generator (e.g,. from WsGenTask)  to generate WSDL bindings from a WSDL file which contains Messages with anonymous schema types, you get a NullPointerException from AbstractServiceGenerator.
> Take the following WSDL fragment:
> <wsdl:message name="MyMessage">
>     <wsdl:part name="parameters" element="tns:MyResponse" />
> </wsdl:message>
>   <wsdl:types>
>     <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
>       <s:element name="MyResponse">
>         <s:complexType>
>           <s:sequence>
>             <s:element minOccurs="0" maxOccurs="1" name="request" type="s:string" />
>           </s:sequence>
>         </s:complexType>
>       </s:element>
>     </s:schema>
>   </wsdl:types>
> If you look at WSDLServiceBuilder.createMessagePart(), you see the following logic:
>         MessagePartInfo part = info.addMessagePart(element.getQName(), XmlSchemaElement.class);
>         SchemaType st = null;
>         if (element.getRefName() != null)
>         {
>             st = getBindingProvider().getSchemaType(element.getRefName(), service);
>         }
>         else if (element.getSchemaTypeName() != null)
>         {
>             st = getBindingProvider().getSchemaType(element.getSchemaTypeName(), service);
>         }
>        
>         part.setSchemaType(st);
> It appears that this code will only work for Messages with non-anonymous element types.  However, it looks as though it would be trivial to check whether the element has an anonymous type by adding another elese-if clause:
>         else if (element.getSchemaType() != null)
>         {
>             st = element.getSchemaType();
>         }

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email