axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venkatakrishnan (JIRA)" <>
Subject [jira] Updated: (AXIS2-1252) java2wsdl generates unknown namespace
Date Thu, 12 Oct 2006 17:48:35 GMT
     [ ]

Venkatakrishnan updated AXIS2-1252:

    Attachment: Axis2-java2wsdl-Oct-12.diff

Hi Dims

So here is what I have done... let me know if this is ok

1) if we wish to map packages of arguments and return types to specific namespaces we use
the following option

  -p2n [org.apache.axis2 ,]   [a.b.c, http://x.y/z]  ... and so on.

For the packages that are not mapped here, Java2WSDL will use the generation of namespace
from packagename 

2) if we want all argument and return types to go into a single namespace we specify
 -p2n[all , http:/]     ..... notice the 'all' option

3)  If we want to overide the package to namespace generation scheme, then we have to implement
the NamespaceGenerator interface and state the implementing classname as...

   -nsg org.apache.axis2.CustomNamespaceGenerator.

In the absence of this option the DefaultNamespaceGenerator is used.  This is nothing but
the usual scheme that we have been using to generate namespaces from package names.

- in the absence of the -p2n option the existing behaviour of mapping java packages to namespace
will be in effect

The rationale behind this approach is...
- By default i.e when no optoins are specified java2wsdl will generate consistent namepsaces
such that reverse engineering back to the types is consistent
- If the user wants to override this behaviour that is where the above mentioned options should
be state i.e, in this case the user is making a deliberate choice

I have successfully built the code for the java2wsdl module alone. The bitter part is that
 I am yet again unable to get thro a complete Axis2 build... over serveral retries.  It fails
in the Integration module.   But then, since I have kept all class interfaces interact there
must be no breakages due to this.


- Venkat

> java2wsdl generates unknown namespace
> -------------------------------------
>                 Key: AXIS2-1252
>                 URL:
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: wsdl
>            Reporter: Kinichiro Inoguchi
>            Priority: Blocker
>         Attachments: Axis2-java2wsdl-Oct-12.diff
> This issue comes from user mailing list.
> 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="" xmlns:http=""
xmlns:mime="" xmlns:ns1="http://aaa.bbb/types" xmlns:xxx="http://aaa.bbb"
xmlns:soap="" xmlns:wsdl=""
>     <wsdl:types>
>       <xs:schema xmlns:xs="" 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="" xmlns:gen798="http://test/xsd"
xmlns:ax21="http://aaa.bbb/types" targetNamespace="http://aaa.bbb/types" attributeFormDefault="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:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message