[ 
http://issues.apache.org/jira/browse/AXIS2-1252?page=comments#action_12441357 ] 
            
Venkatakrishnan commented on AXIS2-1252:
----------------------------------------

Hi Dims,

My understanding of the 'stn' option is that it is to be used as the namespace 
for the schema definitions of the wsdl types i.e. the types that are generated 
for the message parts.  

It so happened earlier that all data types would get pushed into this namespace 
i.e. even the ones that represented the arguments and return types in the 
service methods.  My personal opinion of this is that it is not clean but just 
about convenient.  However I am not sure how acceptable this has become in 
practice in the webservices world so much so this is getting to be absorbed as 
the right thing to do.

I would just about prefer the following: -
- the 'stn' be left alone as it is to specify the namespace for the wsdl types. 
 We don't try to mix this mix this option up.
- support the following for namespace generation for all other types 
      - if there is a  'package to namespace' mapping that is provided (or 
input) then use that mapping for the relevant packages.  The format for this 
can be either -nsMap[pkg1=ns1, pk2=ns2]  OR -nsMap pkg1=ns1 -nsMap pkg2=ns2 and 
so on.  I am open to also any other way of doing this.
      - wherever there is no package to namespace mapping specified then the 
namespace will be generated based on the package name.  For this we can 
probably provide little more flexibility by allowing users to overide the way a 
package name is converted to a namespace.  i.e a user who'd want to generate 
namespaces from package names using some other scheme may simply implement an 
interface and provide that implementation class as input.  The generator will 
then call this implementation for namespace generation.  

I am not at all comfortable with have all types in a single namespace by 
default.  If we had a scheme by which we assign types to namespaces then we 
have a consistent way getting back whatever we started from if we did a 
wsdl2java.  

If you are taken aback by this perspective of mine, then I am surely missing 
something here... please help me get that :)  Thanks.

- Venkat



> java2wsdl generates unknown namespace
> -------------------------------------
>
>                 Key: AXIS2-1252
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1252
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: wsdl
>            Reporter: Kinichiro Inoguchi
>            Priority: Blocker
>
> This issue comes from user mailing list.
> http://marc.theaimsgroup.com/?t=115937715900004&r=1&w=2
> java2wsdl generates unknown namespace, "http://test/xsd";.
> I'm using current nightly.
> My service class has method "sayHello", 
> and returns array of simple java beans "HelloBean".
> Then I run java2wsdl, sayHello and sayHelloResponse 
> are in namespace "http://aaa.bbb/types";.
> But, HelloBean is in unknown namespace "http://test/xsd";.
> Is this a bug ?
> C:\axis2-std-SNAPSHOT-bin\bin\java2wsdl.bat 
>   -cn test.TestService1 -cp . 
>   -tn http://aaa.bbb -tp xxx 
>   -stn http://aaa.bbb/types -stp yyy 
>   -sn TestService1 -of TestService1.wsdl
> generated WSDL is like this;
>   <wsdl:definitions xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; 
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; 
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
> xmlns:ns1="http://aaa.bbb/types"; xmlns:xxx="http://aaa.bbb"; 
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
> targetNamespace="http://aaa.bbb";>
>     <wsdl:types>
>       <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
> xmlns:ax22="http://test/xsd"; targetNamespace="http://test/xsd"; 
> attributeFormDefault="qualified" elementFormDefault="qualified">
>         <xs:element name="HelloBean" type="ax22:HelloBean" /> 
>         <xs:complexType name="HelloBean">
>           <xs:sequence>
>             <xs:element name="ret1" type="xs:string" /> 
>             <xs:element name="ret2" type="xs:int" /> 
>             <xs:element name="ret3" type="xs:long" /> 
>             <xs:element name="ret4" type="xs:double" /> 
>             <xs:element name="ret5" type="xs:float" /> 
>             <xs:element name="ret6" type="xs:short" /> 
>             <xs:element name="ret7" type="xs:boolean" /> 
>           </xs:sequence>
>         </xs:complexType>
>       </xs:schema>
>       <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
> xmlns:gen798="http://test/xsd"; xmlns:ax21="http://aaa.bbb/types"; 
> targetNamespace="http://aaa.bbb/types"; attributeFormDefault="qualified" 
> elementFormDefault="qualified">
>         <xs:element name="sayHello">
>           <xs:complexType>
>             <xs:sequence>
>               <xs:element name="var1" type="xs:string" /> 
>               <xs:element name="var2" type="xs:int" /> 
>               <xs:element name="var3" type="xs:long" /> 
>               <xs:element name="var4" type="xs:double" /> 
>               <xs:element name="var5" type="xs:float" /> 
>               <xs:element name="var6" type="xs:short" /> 
>               <xs:element name="var7" type="xs:boolean" /> 
>             </xs:sequence>
>           </xs:complexType>
>         </xs:element>
>         <xs:element name="sayHelloResponse">
>           <xs:complexType>
>             <xs:sequence>
>               <xs:element name="return" maxOccurs="unbounded" 
> type="gen798:HelloBean" nillable="true" /> 
>             </xs:sequence>
>           </xs:complexType>
>         </xs:element>
>       </xs:schema>
>     </wsdl:types>
>   ...

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to