cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-959) Incorrect namespace configuration when generating wsdl
Date Tue, 04 Sep 2007 20:26:45 GMT

    [ https://issues.apache.org/jira/browse/CXF-959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524861
] 

Daniel Kulp commented on CXF-959:
---------------------------------


Right.   Basically, the path right now looks like:

1) Build up JDOM version of the schema
2) Use DOMOutputter to convert JDOM to W3C DOM
3) Create XmlSchema object from W3C DOM.

In step 3, XmlSchema uses the Attribute nodes that are in the in the "http://www.w3.org/XML/1998/namespace"
namespace to find the namespace prefixes to populate the default NamespaceContext.   However,
due to the JDOM bug, it doesn't find any so the default NamespaceContext is empty.    Your
fix works around that by providing a valid NamespaceContext.






> Incorrect namespace configuration when generating wsdl
> ------------------------------------------------------
>
>                 Key: CXF-959
>                 URL: https://issues.apache.org/jira/browse/CXF-959
>             Project: CXF
>          Issue Type: Bug
>         Environment: Using CXF 2.0.1
>            Reporter: Brian Sawyer
>            Assignee: Daniel Kulp
>         Attachments: cxf-959.jar, cxf-959.patch, name-service.jar
>
>
> Following is an example service and its generated wsdl:
> import com.basistech.stuff.Name;
> @WebService(name="NameService", targetNamespace="urn:com.basistech.service")
> public interface NameService {
>     @WebMethod
>      public abstract List<Name> listAvailableNames();
> }
> <wsdl:definitions name="NameService" targetNamespace="http://nameService.basistech.com"
xmlns:ns1="http://nameService.basistech.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>   <wsdl:types>
>      <schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="http://stuff.basistech.com">
>          <complexType name="ArrayOfName">
>              <sequence>
>                   <element maxOccurs="unbounded" minOccurs="0" name="Name" nillable="true"
type="ns1:Name"/>
>              </sequence>
>          </complexType>
>          <complexType name="Name">
>              <sequence>
>                   <element minOccurs="0" name="data" nillable="true" type="string"/>
>                   <element minOccurs="0" name="uid" nillable="true" type="string"/>
>              </sequence>
>          </complexType>
>       </schema>
>  ArrayOfName is said to contain an element of type ns1:Name.  However, ns1 is set to
"http://nameService.basistech.com" when Name is actually located in the "http://stuff.basistech.com"
namespace.

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


Mime
View raw message