axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <amilasuriarach...@gmail.com>
Subject Re: Wsdl2Java
Date Wed, 09 May 2007 15:05:42 GMT
here you have not specified the -u option or -g. So all the classes are
included in the
Stub file. and those clases are created in the wsdl target namespace (i.e.
http://tempuri.org)

Remember Stub and skelton classes are always created in the target namespace
package.
So put an entry to in the ns2p parameter list to http://tempuri.org and use
either -u and -g options as well

On 5/9/07, David Elliott <webbertsolutions@hotmail.com> wrote:
>
> Here is the target namespace
>
> <wsdl:definitions
>     name="PersonService"
>     targetNamespace="http://tempuri.org/"
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>     xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>     xmlns:tns="http://tempuri.org/"
>     xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
>     xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
>     xmlns:i0="urn:emp:service"
>     xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
>     xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
>     xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
>     xmlns:wsa10="http://www.w3.org/2005/08/addressing"
>     xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"><http://schemas.xmlsoap.org/ws/2004/09/mex%22%3E>
>
> Cheers,
>
> Dave
>
> ------------------------------
> From: mgainty@hotmail.com
> To: axis-user@ws.apache.org
> Subject: Re: Wsdl2Java
> Date: Mon, 7 May 2007 17:36:58 -0400
>
> what is the target namespace declaration for your wsdl
> e.g. here is what I have for StockQuoteService.wsdl
>
> <definitions targetNamespace="
> http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl"
>  xmlns="http://schemas.xmlsoap.org/wsdl/"
>  xmlns:tns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl"
>
>
> creates
> /src/com/ibm/w3/schemas/services/_2002/_11/_15/stockquote/wsdl/StockQuoteServiceCallbackHandler.java
> creates
> /src/com/ibm/w3/schemas/services/_2002/_11/_15/stockquote/wsdl/StockQuoteServiceStub.java
>
> ???
> Martin--
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please
> notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
> ----- Original Message -----
> *From:* David Elliott <webbertsolutions@hotmail.com>
> *To:* axis <axis-user@ws.apache.org>
> *Sent:* Monday, May 07, 2007 9:19 AM
> *Subject:* Wsdl2Java
>
>
> I am trying to have all the namespaces in the Webservice to get its own
> package name.
>
> Namespace          Package
> =======================
> urn:emp:data       emp.data
> urn:emp:service    emp.service
>
> When I run Wsdl2Java everything gets put in org.tempuri
>
> In looking at the documentation at:
> http://ws.apache.org/axis/java/reference.html I notice that
> the parameters are not the same as in the binary distribution.  I am on a
> Windows XP machine.
>
> Included below is
>
>    - a line from the WSDL
>    - the output from Wsdl2Java
>    - the bat file running and its parameters used
>    - the resulting directory structure and files
>
> Any help is appreciated.
>
> Dave
>
> ===========================================
>
> Here is a line from the WSDL that has the namespace I want to have as a
> seperate package
> <wsdl:import namespace="*urn:emp:service*" location="
> http://localhost:9000/PersonService/Service?wsdl=wsdl0" />
>
> ===========================================
>
>
> D) %AXIS2_HOME%/bin/WSDL2Java
> Using AXIS2_HOME:   C:\Apps\java\Libraries\Axis2\axis2-1.2
> Using JAVA_HOME:    C:\Program Files\Java\jre1.5.0_11
> Usage: WSDL2Java -uri <url or path> : A url or path to a WSDL
>           -o <path>                Specify a directory path for the
> generated code.
>           -a                       Generate async style code only
> (Default: off).
>           -s                       Generate sync style code only (Default:
> off). Takes precedence over -a.
>           -p <pkg1>                Specify a custom package name for the
> generated code.
>           -l <language>            Valid languages are java and csharp
> (Default: java).
>           -t                       Generate a test case for the generated
> code.
>           -ss                      Generate server side code (i.e.
> skeletons) (Default: off).
>           -sd                      Generate service descriptor (i.e.
> services.xml). (Default: off). Valid with -ss.
>           -d <databinding>         Valid databinding(s) are adb, xmlbeans,
> jibx, jaxme and jaxbri (Default: adb).
>           -g                       Generates all the classes. Valid only
> with -ss.
>           -pn <port_name>          Choose a specific port when there are
> multiple ports in the wsdl.
>           -sn <service_name>       Choose a specific service when there
> are multiple services in the wsdl.
>           -u                       Unpacks the databinding classes
>           -r <path>                Specify a repository against which code
> is generated.
>           -ns2p ns1=pkg1,ns2=pkg2  Specify a custom package name for each
> namespace specified in the wsdls schema.
>           -ssi                     Generate an interface for the service
> implementation (Default: off).
>           -wv                      WSDL Version. Valid Options : 2, 2.0,
> 1.1
>           -S                      Specify a directory path for generated
> source
>           -R                      Specify a directory path for generated
> resources
>           -em                      Specify an external mapping file
>           -f                      Flattens the generated files
>           -uw                      Switch on un-wrapping.
>           -xsdconfig <path to file> Use XMLBeans .xsdconfig file. Valid
> only with -d xmlbeans.
>
> ===========================================
>
> D) go.bat
> D) rd build /q/s
> D) set outdir=build
> D) set src=src
> D) set language=java
> D) set databinding=adb
> D) set uri=http://localhost:9000/PersonService/Service?wsdl
> D) C:\Apps\java\Libraries\Axis2\axis2-1.2/bin/WSDL2Java -uri "
> http://localhost:9000/PersonService/Service?wsdl" -o "build" -l "java" -d
> "adb" -S "src" -ns2p urn:emp:service=emp.service,urn:emp:data=emp.data
> Using AXIS2_HOME:   C:\Apps\java\Libraries\Axis2\axis2-1.2
> Using JAVA_HOME:    C:\Program Files\Java\jre1.5.0_11
> Retrieving document at '
> http://localhost:9000/PersonService/Service?wsdl=wsdl0', relative to '
> http://localhost:9000/PersonService/Service?wsdl'.
> Retrieving schema at 'http://localhost:9000/PersonService/Service?xsd=xsd1',
> relative to 'http://localhost:9000/PersonService/Service?wsdl=wsdl0'.
> Retrieving schema at 'http://localhost:9000/PersonService/Service?xsd=xsd2',
> relative to 'http://localhost:9000/PersonService/Service?wsdl=wsdl0'.
> Retrieving schema at 'http://localhost:9000/PersonService/Service?xsd=xsd0',
> relative to 'http://localhost:9000/PersonService/Service?wsdl=wsdl0'.
> Retrieving schema at 'http://localhost:9000/PersonService/Service?xsd=xsd2',
> relative to 'http://localhost:9000/PersonService/Service?xsd=xsd0'.
> Retrieving document at '
> http://localhost:9000/PersonService/Service?wsdl=wsdl0', relative to '
> http://localhost:9000/PersonService/Service?wsdl'.
> Retrieving schema at 'http://localhost:9000/PersonService/Service?xsd=xsd1',
> relative to 'http://localhost:9000/PersonService/Service?wsdl=wsdl0'.
> Retrieving schema at 'http://localhost:9000/PersonService/Service?xsd=xsd2',
> relative to 'http://localhost:9000/PersonService/Service?wsdl=wsdl0'.
> Retrieving schema at 'http://localhost:9000/PersonService/Service?xsd=xsd0',
> relative to 'http://localhost:9000/PersonService/Service?wsdl=wsdl0'.
> Retrieving schema at 'http://localhost:9000/PersonService/Service?xsd=xsd2',
> relative to 'http://localhost:9000/PersonService/Service?xsd=xsd0'.
>
> ===========================================
>
> D) dir /s
>  Volume in drive D is New Volume
>  Volume Serial Number is 5E9F-4C30
>  Directory of D:\Temp\java\PersonService
> 05/07/2007  08:34 AM    <DIR>          .
> 05/07/2007  08:34 AM    <DIR>          ..
> 05/07/2007  08:34 AM    <DIR>          build
> 05/07/2007  08:34 AM               316 go.bat
>                1 File(s)            316 bytes
>  Directory of D:\Temp\java\PersonService\build
> 05/07/2007  08:34 AM    <DIR>          .
> 05/07/2007  08:34 AM    <DIR>          ..
> 05/07/2007  08:34 AM             4,319 build.xml
> 05/07/2007  08:34 AM    <DIR>          src
>                1 File(s)          4,319 bytes
>  Directory of D:\Temp\java\PersonService\build\src
> 05/07/2007  08:34 AM    <DIR>          .
> 05/07/2007  08:34 AM    <DIR>          ..
> 05/07/2007  08:34 AM    <DIR>          org
>                0 File(s)              0 bytes
>  Directory of D:\Temp\java\PersonService\build\src\org
> 05/07/2007  08:34 AM    <DIR>          .
> 05/07/2007  08:34 AM    <DIR>          ..
> 05/07/2007  08:34 AM    <DIR>          tempuri
>                0 File(s)              0 bytes
>  Directory of D:\Temp\java\PersonService\build\src\org\tempuri
> 05/07/2007  08:34 AM    <DIR>          .
> 05/07/2007  08:34 AM    <DIR>          ..
> 05/07/2007  08:34 AM             4,711 PersonServiceCallbackHandler.java
> 05/07/2007  08:34 AM           910,363 PersonServiceStub.java
>                2 File(s)        915,074 bytes
>
>
>
> ------------------------------
> Get news, entertainment and everything you care about at Live.com. Check
> it out! <http://www.live.com/getstarted.aspx>
>
>
> ------------------------------
> Now you can see trouble…before he arrives. Check it out for yourself!<http://newlivehotmail.com/?ocid=RMT_TAGWL_migration_HM_viral_protection_0507>
>



-- 
Amila Suriarachchi,
WSO2 Inc.

Mime
View raw message