Axis 0.95 WSDL2Java generates stubs which don't compile

2006-05-03 Thread Iwan Memruk
Hi,

I use WSDL2Java to generate stubs for the attached WSDL.

The options are: -s -ss -p axis2_stubs

Here's the log I get when I run 'ant':

Buildfile: build.xml

init:

pre.compile.test:
 [echo] Stax Availability= true
 [echo] Axis2 Availability= true

compile.src:
[javac] Compiling 9 source files to D:\tmp\104\build\classes
[javac] 
D:\tmp\104\src\com\intalio\www\bpms\workflow\taskmanagementservices_20051109\TaskMetadata.java:859:
 textArray is already defined in parse(javax.xml.stream.XMLStreamReader)
[javac] java.lang.String[] textArray = 
stateMachine8.getTextArray();
[javac]^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error

BUILD FAILED
D:\tmp\104\build.xml:43: Compile failed; see the compiler error output for 
details.

I'm attaching the generated build.xml too, in case you need it.

Thanks a lot,
Iwan


http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tns="http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; targetNamespace="http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/"; name="TaskManagementServices">
	
		http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/"; 			
			xmlns:tns="http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/";>
			

	
		
		
	

			
			

	
		
		
	

			
			

	
		
	

			
			

	
		
		
		
	

			
			

	
		
		
			

	

			

		
		
	

			
			

	
		
		
		
	

			
			

	
		
		
		
	

			
			

	
		
	

			
			

	
		
	

			
			

	
		
		
		
	

			
			

	
		
		
			

	

			
		
		
		
	

			
			

	
		
		
		
		
		
	

			
			

	
		
		
		
		
	

			
			

	
		
		
		
	

			
			

	
		
		
			

	

			
		
		
		
	

			
			

	

			
			

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
  
			
			

	
	
	
		
			

			
		
	
	
		
			

			
		
	

			
		
	
	
		
	
	
		
	
	
		
		
	
	
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
			
			
			
			
			
			
		
		
			
			
			
			
			
			
			
			
		
		
			
			
			
			
			
			
			
			
		
		
			
			
			
			
			
			
			
			
		
		
			
			
			
			
			
			
			
			
		
		
			
			
			
			
			
			
			
			
			
			
		
		
			
			
			
			
			
			
			
			
			
			
		
		
			
			
			
			
			
			
			
			
		
		
			
			
			
			
			
			
		
	
	
		http://schemas.xmlsoap.org/soap/http"/>
		
			http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/getTaskList"/>
			

			
			

			
			

			
			

			
		
		
			http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/getTask"/>
			

			
			

			
			

			
			

			
			

			
		
		
			http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/setOutput"/>
			

			
			

			
			

			
			

			
			

			
		
		
			http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/complete"/>
			

			
			

			
			

			
			

			
			

			
		
		
			http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/setOutputAndComplete"/>
			

			
			

			
			

			
			

			
			

			
		
		
			http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/fail"/>
			

			
			

			
			

			
			

			
			

			
			

			
		
		
			http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/delete"/>
			

			
			

			
			

			
			

			
			

			
			

			
		
		
			http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/create"/>
			

			
			

			
			

			
			

			
			

			
		
		
			http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/init"/>
			

			
			

			
			

			
			

			
			

			
		
	
	
		
			http://www.example.org/"/>
		
	



build.xml
Description: application/xml


[Axis2] non-lazy initialization?

2005-12-13 Thread Iwan Memruk
Hello Axis2 folks,

  My  webservice  takes  a  lot  of  time  to initialize (load its
  statics).

  Is it possible to make Axis2 load its services during the webapp
  initialization stage?

  The  problem  is,  when  Axis2 initializes my service during the
  first  request, it takes lots of time and sometimes results in a
  HTTP timeout.

  Thanks in advance.

-- 
Best regards,
 Iwan  mailto:[EMAIL PROTECTED]



Re[4]: [Axis2] Axis2 0.93 doesn't find resources in .aar

2005-12-12 Thread Iwan Memruk
Hello Deepal,

Friday, December 9, 2005, 5:00:57 AM, you wrote:

DJ> Hi Iwan ;

DJ> To load your resources the right way is get the class loader from 
DJ> AxisService and using that load your resources. As an example say your
DJ> archive file name is foo.aar then the step is as follows;
DJ>1. If you are going to use that at the MessageReciever level , get the
DJ> axisService from msgContext and then
DJ>2. axisService.getClassLoader(); will give you the class loader
DJ> corresponding to the service , and using that you can load your resources in
DJ> archive file.

DJ> If you are in a place that you do not have a msgContext , then you have to
DJ> get your service from AxisConfiguration and ask its class loader.

How exactly can I do that?

Thanks!

DJ> Note : Since axis2 service are isolated (they have their own class loader) ,
DJ> the resources you put into archive file can not be taken from CCL.

DJ> Thanks,
DJ>  Deepal
DJ> 
DJ> ~Future is Open~

DJ> - Original Message - 
DJ> From: "Iwan Memruk" <[EMAIL PROTECTED]>
DJ> To: "Chathura Herath" <[EMAIL PROTECTED]>
DJ> Cc: 
DJ> Sent: Thursday, December 08, 2005 8:12 PM
DJ> Subject: Re[2]: [Axis2] Axis2 0.93 doesn't find resources in .aar


>> Hello Chathura,
>>
>> Thursday, December 8, 2005, 4:08:15 PM, you wrote:
>>
>> CH> Well i am not sure whethe i got your question right, if you are
>> CH> talking about deploying an service then the .aar files should go to
>> CH> $CATALINA_HOME\webapps\axis2\WEB-INF\services
>>
>> CH> or pls use our nice admin interface to upload the aar.
>>
>> CH> Chathura
>>
>> Thanks for your concern. Here's a more detailed explanation:
>>
>> 1. My application loads Hibernate config file (an XML) as a resource.
>> 2. It works locally, e.g. when unit-testing.
>> 3. It works when the service is deployed in the extracted form, i.e.
>> classes AND
>> resources in axis2/WEB-INF/classes, service as a directory in
>> WEB-INF/services etc. My Hibernate config gets loaded OK.
>> 4. When deployed as an .aar, the resources are not found, even though
>> they are included in the .aar together with the classes.
>>
>> CH> On 12/8/05, Iwan Memruk <[EMAIL PROTECTED]> wrote:
>>>> Hello axis-user,
>>>>
>>>>   Axis2 version 0.93
>>>>
>>>>   ..doesn't load resources from .aar for me.
>>>>
>>>>   And so did 0.92.
>>>>
>>>>   If i deploy the resources to axis2/WEB-INF/classes, they get loaded
>>>>   OK.
>>>>
>>>>   Someone else faced this problem?
>>>>
>>>> --
>>>> Best regards,
>>>>  Iwan  mailto:[EMAIL PROTECTED]
>>>>
>>>>
>>
>>
>> CH> --
>> CH> Chathura Herath
>> CH> http://www.bloglines.com/blog/chathurah
>>
>>
>>
>>
>> -- 
>> Best regards,
>> Iwanmailto:[EMAIL PROTECTED]
>>
>> 





-- 
Best regards,
 Iwanmailto:[EMAIL PROTECTED]



[Axis2] Building Axis2 services with Maven2

2005-12-09 Thread Iwan Memruk
Hello All,

  Does anyone have any suggestions how to make Maven2 create valid
  Axis2 service packages?

  Maven2 does not include libs into packaged JAR's, thus the
  service doesn't work if deployed as is.

  Maven2 does include dependencies into packaged WAR's, but they
  have different structure, not applicable for Axis2.

  As for now, I put required runtime JAR's into
  /main/resources/libs and they do get included right where they
  have to be.

  But that makes me keep libs together with the source code which
  is not a good idea, since I do use Maven2.

  Thanks in advance.

-- 
Best regards,
 Iwan  mailto:[EMAIL PROTECTED]



Re[2]: [Axis2] Axis2 0.93 doesn't find resources in .aar

2005-12-09 Thread Iwan Memruk
Hello Ajith,

Friday, December 9, 2005, 5:16:30 AM, you wrote:

AR> Hmm..
AR> I guess the problem is likely to be that hibernate internally
AR> tries toload some of its classes by itself  and picks up a wrong
AR> classloader! I'm not an expert of Hibernate but is there a way to
AR> specifythe classloader when creating/calling hibernate methods ?

I  must  specify that the problem is not with Hibernate. The Hibernate
mapping file was just an example. Other resources, such as spring bean
XML descriptor and others don't get loaded either.

Deepal  --  could you please explain -- does it work out of the box or
did you have to do the trick with getting the classloader that you had
described to me?

The  problem  is, I could get the classloader as you specified, but it
would break the code elegance (my business code is agnostic w.r.t. the
service  platform  used). Plus Hibernate does not allow to specify the
classloader to use in order to load its config.

Thanks everybody for helping.

AR> On 12/9/05, Deepal Jayasinghe <[EMAIL PROTECTED]> wrote:Hi Iwan;

AR> I just checked and it worked me as required.

AR> Thanks,
AR>  Deepal
AR> 
AR> ~Future is Open~

AR> - Original Message -
AR> From: "Iwan Memruk" <[EMAIL PROTECTED]>
AR> To: 
AR> Sent: Thursday, December 08, 2005 5:42 PM
AR> Subject: [Axis2] Axis2 0.93 doesn't find resources in .aar


>> Hello axis-user,
>>
>>  Axis2 version 0.93
>>
>>  ..doesn't load resources from .aar for me.
>>
>>  And so did 0.92.
>>
>>  If i deploy the resources to axis2/WEB-INF/classes, they get loaded
>>  OK.
>>
>>  Someone else faced this problem?
>>
>> --
>> Best regards,
>>Iwan  mailto:[EMAIL PROTECTED]
>>
>>











-- 
Best regards,
 Iwanmailto:[EMAIL PROTECTED]



Re[2]: [Axis2] Axis2 0.93 doesn't find resources in .aar

2005-12-08 Thread Iwan Memruk
Hello Chathura,

Thursday, December 8, 2005, 4:08:15 PM, you wrote:

CH> Well i am not sure whethe i got your question right, if you are
CH> talking about deploying an service then the .aar files should go to
CH> $CATALINA_HOME\webapps\axis2\WEB-INF\services

CH> or pls use our nice admin interface to upload the aar.

CH> Chathura

Thanks for your concern. Here's a more detailed explanation:

1. My application loads Hibernate config file (an XML) as a resource.
2. It works locally, e.g. when unit-testing.
3. It works when the service is deployed in the extracted form, i.e. classes AND
resources in axis2/WEB-INF/classes, service as a directory in
WEB-INF/services etc. My Hibernate config gets loaded OK.
4. When deployed as an .aar, the resources are not found, even though
they are included in the .aar together with the classes.

CH> On 12/8/05, Iwan Memruk <[EMAIL PROTECTED]> wrote:
>> Hello axis-user,
>>
>>   Axis2 version 0.93
>>
>>   ..doesn't load resources from .aar for me.
>>
>>   And so did 0.92.
>>
>>   If i deploy the resources to axis2/WEB-INF/classes, they get loaded
>>   OK.
>>
>>   Someone else faced this problem?
>>
>> --
>> Best regards,
>>  Iwan  mailto:[EMAIL PROTECTED]
>>
>>


CH> --
CH> Chathura Herath
CH> http://www.bloglines.com/blog/chathurah




-- 
Best regards,
 Iwanmailto:[EMAIL PROTECTED]



[Axis2] Axis2 0.93 doesn't find resources in .aar

2005-12-08 Thread Iwan Memruk
Hello axis-user,

  Axis2 version 0.93

  ..doesn't load resources from .aar for me.

  And so did 0.92.

  If i deploy the resources to axis2/WEB-INF/classes, they get loaded
  OK.
  
  Someone else faced this problem?

-- 
Best regards,
 Iwan  mailto:[EMAIL PROTECTED]



Re: WSDL not displayed

2005-12-08 Thread Iwan Memruk
Hello axis-user,

  I forgot to mention: it is Axis2 0.93 on Tomcat

IM> Hello axis-user,

IM>   The service contains a META-INF dir with a service.wsdl file.

IM>   During the service inspection process, the wsdl gets found OK and is
IM>   put into a HashMap.

IM>   In the method ArchiveReader.buildServiceGroup():

>> if (SERVICE_ELEMENT.equals(rootelementName)) {
>> AxisService axisService = engine.getCurrentFileItem().
>> getService(DescriptionBuilder.getShortFileName(
>>
>> engine.getCurrentFileItem().getName()));
>> if (axisService == null) {
>> axisService = new AxisService(
>> new
>> QName(DescriptionBuilder.getShortFileName(
>>
>> engine.getCurrentFileItem().getName(;
>>
>> engine.getCurrentFileItem().addService(axisService);
>> }
>> axisService.setParent(axisServiceGroup);
>>
>> axisService.setClassLoader(engine.getCurrentFileItem().getClassLoader());
>> ServiceBuilder serviceBuilder = new
>> ServiceBuilder(axisConfig, axisService);
>> AxisService service =
>> serviceBuilder.populateService(services);
>> ArrayList serviceList = new ArrayList();
>> serviceList.add(service);
>> return serviceList;

IM>The debugger shows that the wsdlServices parameter of this method
IM>contains an entry for the service.wsdl file.

IM>Seems like this part has to call
IM> axisService.setWSDLDefinition() to
IM>assign the wsdl file to the service. But it doesn't.

IM>Please help me find out whether this is a bug or I am doing
IM>something wrong.




-- 
Best regards,
 Iwanmailto:[EMAIL PROTECTED]



WSDL not displayed

2005-12-08 Thread Iwan Memruk
Hello axis-user,

  The service contains a META-INF dir with a service.wsdl file.

  During the service inspection process, the wsdl gets found OK and is
  put into a HashMap.

  In the method ArchiveReader.buildServiceGroup():

> if (SERVICE_ELEMENT.equals(rootelementName)) {
> AxisService axisService = engine.getCurrentFileItem().
> getService(DescriptionBuilder.getShortFileName(
> engine.getCurrentFileItem().getName()));
> if (axisService == null) {
> axisService = new AxisService(
> new QName(DescriptionBuilder.getShortFileName(
> engine.getCurrentFileItem().getName(;
> engine.getCurrentFileItem().addService(axisService);
> }
> axisService.setParent(axisServiceGroup);
> 
> axisService.setClassLoader(engine.getCurrentFileItem().getClassLoader());
> ServiceBuilder serviceBuilder = new ServiceBuilder(axisConfig, 
> axisService);
> AxisService service = serviceBuilder.populateService(services);
> ArrayList serviceList = new ArrayList();
> serviceList.add(service);
> return serviceList;

   The debugger shows that the wsdlServices parameter of this method
   contains an entry for the service.wsdl file.

   Seems like this part has to call axisService.setWSDLDefinition() to
   assign the wsdl file to the service. But it doesn't.

   Please help me find out whether this is a bug or I am doing
   something wrong.

-- 
Best regards,
 Iwan  mailto:[EMAIL PROTECTED]