You can't do what you want to do. The problem is SteaServiceSoapBindingStub, ...Skeleton, ...Impl are all generated from the binding, so they will all be in the binding's namespace's package. WSDL2Java can't split them up into different packages.
If you want to put the different WSDL constructs into different namespaces, so each namespace is mapped to a different package, you can do something like I did here. Starting with the AXIS sample AddressBook.wsdl, I created 4 namespaces, mostly via import statements: AddressTypes, AddressPortType, AddressBinding, and AddressService. Run 'java org.apache.axis.wsdl.WSDL2Java AddressBookService.wsdl' to see the results: (See attached file: AddressBookService.wsdl)(See attached file: AddressBookPortType.wsdl)(See attached file: AddressBookBinding.wsdl).
Russell Butek
[EMAIL PROTECTED]
Please respond to [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: AW: generated classes directory
Hi Russel,
�
would please give me a hint how I could change my wsdl file to achieve this.
�
I have the SteaServer interface in the de.ba.stea.soap package, the holder class in the de.ba.stea.helper package. I want to put the generated file SteaServerService SteaServerServiceLocater and SteaServiceSoapBindingStub in the package de.ba.stea.soap.client and the files SteaServiceSoapBindingSkeleton and SteaServiceSoapBindingImpl in the package de.ba.stea.soap.server.
�
I want to do this because I want to deploy on the client machine only the classes need by the client.
�
I downloaded� a document from� http://www.w3.org/TR/wsdl but I didn't understand much.
�
thank you for any help
�
Mohammed
�
hier is my file:
�
<?xml version="1.0" encoding="UTF-8"?>
�
<wsdl:definitions targetNamespace="http://soap.stea.ba.de"
�
xmlns="http://schemas.xmlsoap.org/wsdl/"
�
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
�
xmlns:impl="http://soap.stea.ba.de-impl" xmlns:intf="http://soap.stea.ba.de"
�
xmlns:tns2="http://helper.stea.ba.de" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
�
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
�
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
�
�<types>
� <schema targetNamespace="http://helper.stea.ba.de"���
�
xmlns="http://www.w3.org/2001/XMLSchema">
�
���� <complexType name="Status">
������ <sequence>
�������� <element name="errorMessage" nillable="true" type="xsd:string"/>
�������� <element name="errorCode" type="xsd:int"/>
������ </sequence>
���� </complexType>
�
���� <element name="Status" nillable="true" type="tns2:Status"/>
�� </schema>
�</types>
�
�� <wsdl:message name="transferResponse">
�<wsdl:part name="info" type="tns2:Status"/>
�� </wsdl:message>
�
�� <wsdl:message name="transferRequest">
�
����� <wsdl:part name="xmlAsString" type="SOAP-ENC:string"/>
�
����� <wsdl:part name="dienstellennummer" type="xsd:int"/>
�
����� file://<wsdl:part name="info" type="tns2:Status"/>
�
�� </wsdl:message>
�
�� <wsdl:portType name="SteaServer">
�
����� <wsdl:operation name="transfer" parameterOrder="xmlAsString dienstellennummer info">
��<wsdl:input message="intf:transferRequest"/>
��<wsdl:output message="intf:transferResponse"/>
����� </wsdl:operation>
�
�� </wsdl:portType>
�
�
�
�� <wsdl:binding name="SteaServiceSoapBinding" type="intf:SteaServer">
�
����� <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
�
����� <wsdl:operation name="transfer">
�
�������� <wsdlsoap:operation soapAction=""/>
� <wsdl:input>
��<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"������
�
namespace="transfer" use="encoded"
��/>
� </wsdl:input>
�
� <wsdl:output>
��<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"�������
�
namespace="http://soap.stea.ba.de" use="encoded"/>
� </wsdl:output>
�
����� </wsdl:operation>
�
�� </wsdl:binding>
�
�
�
�� <wsdl:service name="SteaServerService">
�
����� <wsdl:port binding="intf:SteaServiceSoapBinding" name="SteaService">
�
�������� <wsdlsoap:address location="http://localhost:8080/axis/services/SteaService"/>
�
����� </wsdl:port>
�
�� </wsdl:service>
�
</wsdl:definitions>
-----Urspr�ngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 10. Juli 2002 14:33
An: [EMAIL PROTECTED]
Betreff: Re: generated classes directory
It is not possible to repackage individual files via WSDL2Java. This is actually a bad idea. If all of these files are generated from WSDL types that are all in the same namespace, they should all reside in the same package; otherwise you lose the one-to-one package-to-namespace/namespace-to-package mapping.
The most you can do with WSDL2Java is to redirect the root directory to something other than the current directory.
If you can change your WSDL, you can change the namespaces for your portType, binding, and service so that they're in unique packages. That will almost give you what you want. All the portType stuff (testServer) would be in one package, all the binding stuff (testServerSoapBindingStub, testServerSoapBindingSkeleton, testServerSoapBindingImpl) would be in another, and all the service stuff (testServerServiceLocator, testServerService) would be in a third.
Russell Butek
[EMAIL PROTECTED]
Please respond to [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: generated classes directory
Hi,
is there a way to tell the WSDL2Java tools where to put the generated classes? I actaully want the tools for example �to put the classes testServerServiceLocator, testServerService and the testServerSoapBindingStub In the test.soap.client directory and the classes testServer, testServerSoapBindingSkeleton and the testServerSoapBindingImpl In the test.soap.server directory and the holder classes In the test.holder directory. Is this possible?
thanks
Mohammed
=?ISO-8859-2?Q?AddressBookService=2Ewsdl?=
Description: Binary data
=?ISO-8859-2?Q?AddressBookPortType=2Ewsdl?=
Description: Binary data
=?ISO-8859-2?Q?AddressBookBinding=2Ewsdl?=
Description: Binary data
