No. DoAxis2 should do it like some good CORBA code generators do it! 
maybe check that with IONA

i.e. 

In the original version of the stubs or skeleton files or the metod impl file 
(at DEC time), the code generator placed special pairs of markups after each 
method header. And the programmer was then asked to place all to be preserved
code inbetween such markups.

While the new code gen runs, it has to check for the existence of the original 
version of the file (same name), find for each method a potential existing old 
one and if found, check for code inside this markups and copy the code 
inbetween 
from the original file to the new generating file. maybe not always perfect but
much better then nothing.

And this can apply not only to .java code files but all other kind of to be
generated files where ever such markups are placed. such way, embedded placed 
code can and shall persist accross code gens. 

We had the same, at least similar troubles with some CORBA implementations and
we got tired to see our developed code gone while we incrementally developed our
CORBA IDL file. 

Josef.Stadelmann
@winterthur.ch



-----Ursprüngliche Nachricht-----
Von: Philipp Leitner [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 11. April 2007 16:19
An: [email protected]
Betreff: Re: [Axis2] wsdl2java overriding my files


OK, after your last posting I was finally able to understand what you 
actually want to do :-)

-- you have generated stubs with wsdl2java in the past, changed them and 
are now re-running wsdl2java, and want to somehow preserve your changes.

I am quite sure that this is not possible with Axis or Axis2 - simply 
because the logic necessary behind such a feature would be tremendious. 
You would have to know what the file looked like originally, do kind of 
a 'diff' between the original and the changed version, generate the new 
stubs and (and this is the really hard part) know where to put the 
changes so that they are 'semantically equivalent'. I daresay this is in 
general impossible.

/philipp

Anil VVNN schrieb:
> I couldn't able to find the solution yet. Could somebody shed light on this.
> Thanks.
> 
> 
> Philipp Leitner-2 wrote:
>> Hmm, I might be wrong, but I think that the package that wsdl2java 
>> generates the data objects to depend on the namespace of these objects 
>> in the WSDL file ... but I am quite sure that there is some way you can 
>> overwrite this with a parameter (can't check right now). Best if you dig 
>> into the wsdl2java source and look yourself.
>>
>> /philipp
>>
>> Anil VVNN schrieb:
>>> Philipp,
>>>
>>> Unfortunately, this did not work. This is what I did,
>>>
>>> <arg line="-p com.myprj.webservice.generated"/>
>>>
>>> Actually its generating some of the files (Stub, Skeleton and
>>> MessageReceiverInOut) to "com.myprj.webservice.generated" folder but
>>> other
>>> wrapper objects of complex types are still writing to
>>> "com.myprj.webservice"
>>> folder.
>>>
>>> Did I miss anything. Thanks.
>>>
>>>
>>>
>>> Philipp Leitner-2 wrote:
>>>> The thing is, you should let these files be generated into a /different/ 
>>>> package :-)
>>>>
>>>> Try
>>>>
>>>> <arg line="-p com.myprj.webservice.generated"/>
>>>>
>>>> This should do the trick.
>>>>
>>>> /philipp
>>>>
>>>> Anil VVNN schrieb:
>>>>> Philipp,
>>>>>
>>>>> Are you referring to "<arg line="-p com.myprj.webservice"/>" in my ant
>>>>> script. if so, I removed this line but it is still overriding the files
>>>>> under com.myprj.webservice directory. 
>>>>>
>>>>> Observed that it is not overriding code of Stub, Skeleton and
>>>>> MessageReceiverInOut but it is overriding wrapper objects of complex
>>>>> types. 
>>>>>
>>>>> What I mean is, here is my wsdl file,
>>>>>
>>>>> <element name="MessageRequest">
>>>>>   <complexType>
>>>>>       <sequence>
>>>>>                   <element name="transporter" nillable="true"
>>>>> type="tns:Transporter"/>
>>>>>      </sequence>
>>>>>   </complexType>
>>>>> </element>
>>>>>       <complexType abstract="true" name="Transporter"/>
>>>>>   <complexType name="ABCTransporter">
>>>>>   <complexContent>
>>>>>         <extension base="tns:Transporter">
>>>>>             <sequence>
>>>>>                   <element name="StartDate" nillable="true" 
>>>>> type="xsd:string"/>
>>>>>                                 <element name="EndDate" nillable="true"
>>>>> type="xsd:string"/>
>>>>>                           </sequence>
>>>>>         </extension>
>>>>>                </complexContent>
>>>>>      </complexType>
>>>>>
>>>>> Transporter is an Interface and ABCTransporter implementation class in
>>>>> my
>>>>> object model. But I want to modify corresponding wrapper objects
>>>>> (Transporter  and ABCTransporter ) created by wsdl2java, so I did but
>>>>> when I
>>>>> run wsdl2java again, it creates new wrapper objects of Transporter and
>>>>> ABCTransporter and I loose my changes.
>>>>>
>>>>> Any ideas how would I do to not to override these wrapper objects.
>>>>> Thanks.
>>>>>
>>>>>   
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Philipp Leitner-2 wrote:
>>>>>> you should pass a target package as argument to wsdl2java to prevent
>>>>>> it 
>>>>>> from overriding existing source files.
>>>>>>
>>>>>> /philipp
>>>>>>
>>>>>> Anil VVNN schrieb:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Any option to not to override files if they are already present. As I
>>>>>>> have
>>>>>>> modified few classes (wrapper objects of complex types) and skeleton
>>>>>>> code.
>>>>>>>
>>>>>>> Here is my call in ant scripts,
>>>>>>>
>>>>>>>       <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true"
>>>>>>> classpathref="axis.classpath">
>>>>>>>         <arg line="-uri ./ws/${src.xml.dir}/${wsdl.file}"/>
>>>>>>>         <arg line="-ss"/>
>>>>>>>         <arg line="-sd"/>
>>>>>>>         <arg line="-ssi"/>
>>>>>>>         <arg line="-d adb"/>
>>>>>>>         <arg line="-g"/>
>>>>>>>         <arg line="-p com.myprj.webservice"/>
>>>>>>>         <arg line="-o ${basedir}/ws/src/java"/>
>>>>>>>         <arg line="-S ."/>
>>>>>>>       </java>
>>>>>>>
>>>>>>> Thanks.
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>
>>>>>>
>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to