You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Kinichiro Inoguchi (JIRA)" <ji...@apache.org> on 2006/09/28 02:56:50 UTC

[jira] Commented: (AXIS2-1252) java2wsdl generates unknown namespace

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

[Deepal's answer]
This is not a bug , that is the how it  has implemented
As I can understand ,
the package name of the service is "test"

That is why it generate that namespace, so when sending the req need
send that with that namespace (pls have a look at the wsdl , req should
be according to thta)
and if you want to change the namespace you can do that too , changing
services.xml

[Davanum's opinion]
I completely understand that. What i wanted to do with the bug report
was to add a log.INFO saying that the schema target namespace is
"http://test/xsd" and if you want to change it then specify it on the
command line AND/OR at least mention this in docs for j2w how we
compute the schema target namespace.

> 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
>
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [jira] Commented: (AXIS2-1252) java2wsdl generates unknown namespace

Posted by Venkata Krishnan <fo...@gmail.com>.
Dims / Deepal

Also, what one can specify in the command line as an option is the
targetnamespace for the wsdl types and for the wsdl defintion.  The
namespaces for the data types that get used in the service methods (as
arguments or return values) are derived from the package names. Right now
there is no means (from whatever litter i know of this code) whereby one
could explicitly provide a map of datatypes and namespaces under which they
should qualify.  Am I right in this understanding?

Thanks

- Venkat

On 9/28/06, Kinichiro Inoguchi (JIRA) <ji...@apache.org> wrote:
>
>     [
> http://issues.apache.org/jira/browse/AXIS2-1252?page=comments#action_12438263]
>
> Kinichiro Inoguchi commented on AXIS2-1252:
> -------------------------------------------
>
> [Deepal's answer]
> This is not a bug , that is the how it  has implemented
> As I can understand ,
> the package name of the service is "test"
>
> That is why it generate that namespace, so when sending the req need
> send that with that namespace (pls have a look at the wsdl , req should
> be according to thta)
> and if you want to change the namespace you can do that too , changing
> services.xml
>
> [Davanum's opinion]
> I completely understand that. What i wanted to do with the bug report
> was to add a log.INFO saying that the schema target namespace is
> "http://test/xsd" and if you want to change it then specify it on the
> command line AND/OR at least mention this in docs for j2w how we
> compute the schema target namespace.
>
> > 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
> >
> > 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: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>