Re: [Axis2] Architecture Question (Concurrency)

2009-08-11 Thread Deepal jayasinghe
Marc Lefebvre wrote:
> I am deploying a POJO webservice using Axis2 and Java2Wsdl, etc...  
> Its all working nicely, but in developing the java code of my
> webservice I had some questions about HOW internally Axis works so
> that I can be sure of some possible issues that may arise.
>  
> Does Axis create a separate thread for each webservice call?  I am
> assuming yes at this point.
Yes, each request is handle by a separate thread. In the case of
SimpleHTTP Server we use Thread pool, and in the case of App server, we
use the thread given by the app server.
>  
> If so, then, in the webservice any data structure that is accessed by
> these threads must be thread safe.  Right?
As long as you have written the code not to have class variables, then
it would. Depending on the service scope we create different number of
service class instances.  For example, for request scope we create new
service instance for each service scope, whereas for Application scope
we have single instance of the service class.

>  
> So, for example, if I had a HashMap that gets populated, read, and
> deleted by webservice calls, I need to use the concurrent libraries
> version of this HashMap.  Right?   Otherwise there could be contention
> issues.
I think that would be a good idea.
>  
> I am assuming the Axis framework does not provide ANY kind of
> protection against concurrency issues.
>  
> Are there any other issues I should keep in mind in developing the
> webservice due to the architecture of Axis?
I think stateless nature is something you need to keep in mind, do not
try to store values in your service class, instead use different
contexts provided by Axis2.

Thanks,
Deepal
>  
> Thanks...
>  


-- 
Thank you!


http://blogs.deepal.org
http://deepal.org



Re: Axis2 and Tomcat's SECURITY Flag

2009-08-11 Thread Greg Logan

Andreas Veithen wrote:

Greg,

My guess is that Axis2 doesn't have the right permissions to list the
content of the WEB-INF/modules directory. I had a quick look at the
Axis2 code and it seems to handle an I/O error in the same way as an
empty directory. On the other hand, the documentation of
FilePermission says that "A pathname that ends in "/*" [...] indicates
all the files and directories contained in that directory." The would
suggest that you only granted permissions to the files in the
WEB-INF/modules directory, but not the permission to read (list) the
directory itself. Probably you need to add the following permission as
well:

permission java.io.FilePermission
"${catalina.base}/webapps/player/WEB-INF/modules", "read";


No change change, sorry :(
After playing with the permissions some more I get a new, different
error message regardless of that line being present or not.

My permissions now look like:

// = Axis2 Permissions 
//
grant {
  // For some mysterious reason these 2 are required outside the
Axis-specific permissions
  // No idea what the codebase should be
  permission java.io.FilePermission
"/var/lib/tomcat6/webapps/player/WEB-INF/*", "read";
  permission java.lang.RuntimePermission "getClassLoader";
};

grant codeBase "file:/var/lib/tomcat6/webapps/player/-" {
  permission java.lang.RuntimePermission "createClassLoader";
  permission java.lang.RuntimePermission "setContextClassLoader";
  permission java.lang.RuntimePermission "checkPropertiesAccess";
  permission java.lang.RuntimePermission "getClassLoader";
  permission java.lang.RuntimePermission "getProtectionDomain";
  permission java.lang.RuntimePermission
"defineClassInPackage.org.apache.jasper.runtime";
  permission java.lang.RuntimePermission "shutdownHooks";
  permission java.lang.RuntimePermission "accessDeclaredMembers";
  permission java.util.PropertyPermission "*", "read,write";
  permission java.net.SocketPermission "example.usask.ca", "resolve,
connect";
  permission java.io.FilePermission
"${catalina.base}/webapps/player/WEB-INF/modules/*", "read,write";
  permission java.io.FilePermission
"${catalina.base}/webapps/player/WEB-INF/services/*", "read,write";
  permission java.io.FilePermission
"${catalina.base}/webapps/player/WEB-INF/scriptServices/*", "read";
  permission java.io.FilePermission
"${catalina.base}/webapps/player/WEB-INF/lib", "read";
  permission java.io.FilePermission
"${catalina.base}/webapps/player/WEB-INF/lib/*", "read";
  //TODO:  Figure out what parts of /tmp Axis uses and lock this down
  permission java.io.FilePermission "/tmp/*", "read,write";
  permission java.io.FilePermission "/usr/share/tomcat6/lib", "read";
  permission java.io.FilePermission
"${catalina.home}/bin/bootstrap.jar", "read";
  permission java.io.FilePermission "${java.home}/lib/ext/*", "read";
  // Other directories that are in the classpath
  permission java.io.FilePermission "/usr/share/java/*", "read";
};

The log now complains:

SEVERE: Servlet /player threw load() exception
java.lang.ClassNotFoundException:
org.apache.axis2.deployment.scheduler.Scheduler
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)

Again, code works fine without the security manager.  I've specifically
allowed read permission to the appropriate directory, but it still
throws that error.


If that is confirmed, could you please open a JIRA report about the
fact that Axis2 doesn't warn the user about an unreadable modules (and
services) directory?


Do I still file the report?  I can't reproduce the error anymore :/

G


Andreas

On Tue, Aug 11, 2009 at 21:19, Greg Logan wrote:

Hi List,

I'm trying to get my Axis2 application to run on a Tomcat 6.0.18 install
running on an Ubuntu server.  This server runs with the Java 2 Security
framework in Tomcat turned ON, so solutions involving turning it off won't
work for this case :P

Unfortunately I keep running into permissions issues, and there does not
appear to be any definitive (or working!) documentation as to precisely what
permissions Axis2 needs.  I've tried a number of different permissions
approaches, but I just can't seem to get the application going.

For example, adding the following to the permissions:

// = Axis2 Permissions 
//
grant {
 // For some mysterious reason these 2 are required outside the
Axis-specific permissions
 // No idea what the codebase should be
 permission java.io.FilePermission
"${catalina.base}/webapps/player/WEB-INF/-", "read";
 permission java.lang.RuntimePermission "getClassLoader";
};

grant codeBase "file:/var/lib/tomcat6/webapps/player/-" {
 permission java.lang.RuntimePermission "createClassLoader";
 permission java.lang.RuntimePermission "setContextClassLoader";
 permission j

[Axis2] Architecture Question (Concurrency)

2009-08-11 Thread Marc Lefebvre
I am deploying a POJO webservice using Axis2 and Java2Wsdl, etc...   Its
all working nicely, but in developing the java code of my webservice I
had some questions about HOW internally Axis works so that I can be sure
of some possible issues that may arise.
 
Does Axis create a separate thread for each webservice call?  I am
assuming yes at this point.
 
If so, then, in the webservice any data structure that is accessed by
these threads must be thread safe.  Right?
 
So, for example, if I had a HashMap that gets populated, read, and
deleted by webservice calls, I need to use the concurrent libraries
version of this HashMap.  Right?   Otherwise there could be contention
issues.
 
I am assuming the Axis framework does not provide ANY kind of protection
against concurrency issues.
 
Are there any other issues I should keep in mind in developing the
webservice due to the architecture of Axis?
 
Thanks...
 


Axis2 - response message time out

2009-08-11 Thread Ramya K Grama
Hello,
I'm designing a web service (using Axis2) which makes a database (Stored
procedure) call through Hibernate.
The stored procedure in turn does a series of business logic and makes a
call to Subsystem B and waits for x time till the response comes back. If
there is a timeout then throws an error. If not, gets the return data and
passes it onto the web service, which then creates the SOAP response and
sends it out.

My question and concern is regarding the "timeout" logic. How can the
"timeout" be set in the web service layer (Skeleton). Coz if I dont tell the
Skeleton to wait for that period of time, the connection might time out.
Or to put it in another way, how do I override the default DB
connection/response timeout with the expected timeout delay.
Should this be done in the web service layer or in the hibernate layer
(since we are using Hibernate to connect to the database) or should it be
done in both?

Your help is highly appreciated!

Thanks,
wsnewbie


Axis2 - session management

2009-08-11 Thread Ramya K Grama
Hello,
I'm using Axis2/Java to create a web service wherein the request and
response xmls are very much the same except for some additional data from
the db that gets added on to the request as a response.
Also, there is a lot of CDATA sections in the request that need to be sent
back in the response as is without any modification.

In designing this service, we've come up with the strategy of saving the
incoming SOAP request.xml(in memory) somewhere so that it can be used to
recreate the response + updated data from the db (stuffing in empty tags
with data from db).

Is this a good approach as far as Axis2 is concerned. If so what/how would
be teh best place of storing the request.xml. Are there any multi-threading
issues that i need to be concerned about. What would be a fool-proof and
optimal approach of doing this in Axis2.

>From my initial research, I've found that OperationContext with SOAPSession
scope can be used for this. Am I correct here?

Also, since there are a lot of CDATA sections in the request and response
xmls, is there anything special that needs to be done?

Your feedback will be very helpful in designing my service further.

Thanks,
wsNewbie.


Re: Axis2 and Tomcat's SECURITY Flag

2009-08-11 Thread Andreas Veithen
Greg,

My guess is that Axis2 doesn't have the right permissions to list the
content of the WEB-INF/modules directory. I had a quick look at the
Axis2 code and it seems to handle an I/O error in the same way as an
empty directory. On the other hand, the documentation of
FilePermission says that "A pathname that ends in "/*" [...] indicates
all the files and directories contained in that directory." The would
suggest that you only granted permissions to the files in the
WEB-INF/modules directory, but not the permission to read (list) the
directory itself. Probably you need to add the following permission as
well:

permission java.io.FilePermission
"${catalina.base}/webapps/player/WEB-INF/modules", "read";

If that is confirmed, could you please open a JIRA report about the
fact that Axis2 doesn't warn the user about an unreadable modules (and
services) directory?

Andreas

On Tue, Aug 11, 2009 at 21:19, Greg Logan wrote:
> Hi List,
>
> I'm trying to get my Axis2 application to run on a Tomcat 6.0.18 install
> running on an Ubuntu server.  This server runs with the Java 2 Security
> framework in Tomcat turned ON, so solutions involving turning it off won't
> work for this case :P
>
> Unfortunately I keep running into permissions issues, and there does not
> appear to be any definitive (or working!) documentation as to precisely what
> permissions Axis2 needs.  I've tried a number of different permissions
> approaches, but I just can't seem to get the application going.
>
> For example, adding the following to the permissions:
>
> // = Axis2 Permissions 
> //
> grant {
>  // For some mysterious reason these 2 are required outside the
> Axis-specific permissions
>  // No idea what the codebase should be
>  permission java.io.FilePermission
> "${catalina.base}/webapps/player/WEB-INF/-", "read";
>  permission java.lang.RuntimePermission "getClassLoader";
> };
>
> grant codeBase "file:/var/lib/tomcat6/webapps/player/-" {
>  permission java.lang.RuntimePermission "createClassLoader";
>  permission java.lang.RuntimePermission "setContextClassLoader";
>  permission java.lang.RuntimePermission "checkPropertiesAccess";
>  permission java.lang.RuntimePermission "getClassLoader";
>  permission java.lang.RuntimePermission "getProtectionDomain";
>  permission java.lang.RuntimePermission
> "defineClassInPackage.org.apache.jasper.runtime";
>  permission java.lang.RuntimePermission "shutdownHooks";
>  permission java.lang.RuntimePermission "accessDeclaredMembers";
>  permission java.util.PropertyPermission "*", "read,write";
>  permission java.net.SocketPermission "ex.com", "resolve, connect";
>  permission java.io.FilePermission
> "${catalina.base}/webapps/player/WEB-INF/modules/*", "read,write";
>  permission java.io.FilePermission
> "${catalina.base}/webapps/player/WEB-INF/services/*", "read,write";
>  permission java.io.FilePermission "${catalina.home}/common/classes",
> "read";
>  permission java.io.FilePermission "${catalina.home}/shared/classes",
> "read";
>  permission java.io.FilePermission "${catalina.base}/common/classes",
> "read";
>  permission java.io.FilePermission "${catalina.base}/shared/classes",
> "read";
>  permission java.io.FilePermission "${catalina.home}/common/i18n/*", "read";
>  permission java.io.FilePermission "${catalina.home}/common/lib/*", "read";
>  permission java.io.FilePermission "${catalina.home}/bin/bootstrap.jar",
> "read";
>  permission java.io.FilePermission
> "${catalina.base}/webapps/player/WEB-INF/scriptServices/*", "read";
>  permission java.io.FilePermission "${java.home}/lib/ext/*", "read";
>  // Other directories that are in the classpath
>  permission java.io.FilePermission "/usr/share/java/*", "read";
> };
>
> gets me this result (note that this *exact* deployed war works fine when
> security is off, so the module *is* there):
>
> org.apache.axis2.AxisFault: The system is attempting to engage a module that
> is not available: addressing
>        at
> org.apache.axis2.engine.AxisConfiguration.engageModule(AxisConfiguration.java:506)
>        at
> org.apache.axis2.engine.AxisConfiguration.engageGlobalModules(AxisConfiguration.java:633)
>
>
> The app does work when security is turned off, and also works when granted
> java.security.AllPermissions, but that's really not ideal.  Does anyone have
> a working set of permissions for Axis2?
>


Re: Axis2 and Tomcat's SECURITY Flag

2009-08-11 Thread Greg Logan

Martin Gainty wrote:

verify ws-addressing-.mar is in
axis2/WEB-INF/modules?


Exists


axis2/WEB-INF/conf/axis2.xml contains



Is there


axis2/web-inf/modules/modules.list contains
addressing-.mar


Is also there.

To be clear:  This exact webapp works fine when the Tomcat security flag 
is set to 'no' (ie, disabled), but fails when set to 'yes'.  The 
application itself should not be the problem...


G

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité


Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.





Date: Tue, 11 Aug 2009 13:19:08 -0600
From: greg.lo...@usask.ca
Subject: Axis2 and Tomcat's SECURITY Flag
To: axis-user@ws.apache.org

Hi List,

I'm trying to get my Axis2 application to run on a Tomcat 6.0.18 install 
running on an Ubuntu server.  This server runs with the Java 2 Security 
framework in Tomcat turned ON, so solutions involving turning it off 
won't work for this case :P


Unfortunately I keep running into permissions issues, and there does not 
appear to be any definitive (or working!) documentation as to precisely 
what permissions Axis2 needs.  I've tried a number of different 
permissions approaches, but I just can't seem to get the application going.


For example, adding the following to the permissions:

// = Axis2 Permissions 
//
grant {
   // For some mysterious reason these 2 are required outside the 
Axis-specific permissions

   // No idea what the codebase should be
   permission java.io.FilePermission 
"${catalina.base}/webapps/player/WEB-INF/-", "read";

   permission java.lang.RuntimePermission "getClassLoader";
};

grant codeBase "file:/var/lib/tomcat6/webapps/player/-" {
   permission java.lang.RuntimePermission "createClassLoader";
   permission java.lang.RuntimePermission "setContextClassLoader";
   permission java.lang.RuntimePermission "checkPropertiesAccess";
   permission java.lang.RuntimePermission "getClassLoader";
   permission java.lang.RuntimePermission "getProtectionDomain";
   permission java.lang.RuntimePermission 
"defineClassInPackage.org.apache.jasper.runtime";

   permission java.lang.RuntimePermission "shutdownHooks";
   permission java.lang.RuntimePermission "accessDeclaredMembers";
   permission java.util.PropertyPermission "*", "read,write";
   permission java.net.SocketPermission "ex.com", "resolve, connect";
   permission java.io.FilePermission 
"${catalina.base}/webapps/player/WEB-INF/modules/*", "read,write";
   permission java.io.FilePermission 
"${catalina.base}/webapps/player/WEB-INF/services/*", "read,write";
   permission java.io.FilePermission "${catalina.home}/common/classes", 
"read";
   permission java.io.FilePermission "${catalina.home}/shared/classes", 
"read";
   permission java.io.FilePermission "${catalina.base}/common/classes", 
"read";
   permission java.io.FilePermission "${catalina.base}/shared/classes", 
"read";
   permission java.io.FilePermission "${catalina.home}/common/i18n/*", 
"read";
   permission java.io.FilePermission "${catalina.home}/common/lib/*", 
"read";
   permission java.io.FilePermission 
"${catalina.home}/bin/bootstrap.jar", "read";
   permission java.io.FilePermission 
"${catalina.base}/webapps/player/WEB-INF/scriptServices/*", "read";

   permission java.io.FilePermission "${java.home}/lib/ext/*", "read";
   // Other directories that are in the classpath
   permission java.io.FilePermission "/usr/share/java/*", "read";
};

gets me this result (note that this *exact* deployed war works fine when 
security is off, so the module *is* there):


org.apache.axis2.AxisFault: The system is attempting to engage a module 
that is not available: addressing
 at 
org.apache.axis2.engine.AxisConfiguration.engageModule(AxisConfiguration.java:506)
 at 
org.apache.axis2.engine.AxisConfiguration.engageGlobalModules(AxisConfiguration.java:633)



The app does work when security is turned off, and also works when 
granted java.security.AllPermissions, but that's really not ideal.  Does 
anyone have a working set of permissions

RE: Axis2 and Tomcat's SECURITY Flag

2009-08-11 Thread Martin Gainty

verify ws-addressing-.mar is in
axis2/WEB-INF/modules?

axis2/WEB-INF/conf/axis2.xml contains


axis2/web-inf/modules/modules.list contains
addressing-.mar

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Tue, 11 Aug 2009 13:19:08 -0600
> From: greg.lo...@usask.ca
> Subject: Axis2 and Tomcat's SECURITY Flag
> To: axis-user@ws.apache.org
> 
> Hi List,
> 
> I'm trying to get my Axis2 application to run on a Tomcat 6.0.18 install 
> running on an Ubuntu server.  This server runs with the Java 2 Security 
> framework in Tomcat turned ON, so solutions involving turning it off 
> won't work for this case :P
> 
> Unfortunately I keep running into permissions issues, and there does not 
> appear to be any definitive (or working!) documentation as to precisely 
> what permissions Axis2 needs.  I've tried a number of different 
> permissions approaches, but I just can't seem to get the application going.
> 
> For example, adding the following to the permissions:
> 
> // = Axis2 Permissions 
> //
> grant {
>// For some mysterious reason these 2 are required outside the 
> Axis-specific permissions
>// No idea what the codebase should be
>permission java.io.FilePermission 
> "${catalina.base}/webapps/player/WEB-INF/-", "read";
>permission java.lang.RuntimePermission "getClassLoader";
> };
> 
> grant codeBase "file:/var/lib/tomcat6/webapps/player/-" {
>permission java.lang.RuntimePermission "createClassLoader";
>permission java.lang.RuntimePermission "setContextClassLoader";
>permission java.lang.RuntimePermission "checkPropertiesAccess";
>permission java.lang.RuntimePermission "getClassLoader";
>permission java.lang.RuntimePermission "getProtectionDomain";
>permission java.lang.RuntimePermission 
> "defineClassInPackage.org.apache.jasper.runtime";
>permission java.lang.RuntimePermission "shutdownHooks";
>permission java.lang.RuntimePermission "accessDeclaredMembers";
>permission java.util.PropertyPermission "*", "read,write";
>permission java.net.SocketPermission "ex.com", "resolve, connect";
>permission java.io.FilePermission 
> "${catalina.base}/webapps/player/WEB-INF/modules/*", "read,write";
>permission java.io.FilePermission 
> "${catalina.base}/webapps/player/WEB-INF/services/*", "read,write";
>permission java.io.FilePermission "${catalina.home}/common/classes", 
> "read";
>permission java.io.FilePermission "${catalina.home}/shared/classes", 
> "read";
>permission java.io.FilePermission "${catalina.base}/common/classes", 
> "read";
>permission java.io.FilePermission "${catalina.base}/shared/classes", 
> "read";
>permission java.io.FilePermission "${catalina.home}/common/i18n/*", 
> "read";
>permission java.io.FilePermission "${catalina.home}/common/lib/*", 
> "read";
>permission java.io.FilePermission 
> "${catalina.home}/bin/bootstrap.jar", "read";
>permission java.io.FilePermission 
> "${catalina.base}/webapps/player/WEB-INF/scriptServices/*", "read";
>permission java.io.FilePermission "${java.home}/lib/ext/*", "read";
>// Other directories that are in the classpath
>permission java.io.FilePermission "/usr/share/java/*", "read";
> };
> 
> gets me this result (note that this *exact* deployed war works fine when 
> security is off, so the module *is* there):
> 
> org.apache.axis2.AxisFault: The system is attempting to engage a module 
> that is not available: addressing
>  at 
> org.apache.axis2.engine.AxisConfiguration.engageModule(AxisConfiguration.java:506)
>  at 
> org.apache.axis2.engine.AxisConfiguration.engageGlobalModules(AxisConfiguration.java:633)
> 
> 
> The app does work when security is turned off, and also works when 
> granted java.security.AllPermissions, but that's really not ideal.  Does 
> anyone have a working set of permissions for Axis2?

_
Get free photo software

Rampart2 1.4 Setting to set transport level user different than message level user

2009-08-11 Thread Sumit Shah
Hello,

I am trying to find out a config setting to set transport level user
different than the message level user. 


What I have is the following scenario:

1. I have a service call that uses a no-auth privileges user as the
transport level user.
2. I set the actual business user in the Message level security in the
WSSecurity header as a UsernameToken. 


Rampart is able to correctly authenticate the message level user, but
the transport level user gets passed down to the business logic which
fails authorization. 

Is there a way to pass the message level user instead of the transport
level user to the business logic?

Thanks
Sumit


SAMPLE SOAP Request


http://impl.webservices.ams.com";
xmlns:ref="http://ref.sr.domain.com/";
xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>

   http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse
curity-secext-1.0.xsd">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
urity-utility-1.0.xsd">2009-08-11T19:36:20Z2009-08-11T19:53:00Zhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
urity-utility-1.0.xsd">sumitshahhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-t
oken-profile-1.0#PasswordText">XX

   

  

 

cp0805a

 

  

   




Re: NoClassDefFoundError

2009-08-11 Thread Jack Sprat
I found the source of my problem - the class package was incorrect in
the  specified in the services.xml file.



I hope this helps someone else who comes across this error.



Regards,

T



--- On Tue, 8/11/09, Jack Sprat  wrote:

From: Jack Sprat 
Subject: NoClasDefFoundError
To: axis-user@ws.apache.org
Date: Tuesday, August 11, 2009, 10:12 AM

I made a few changes to an Axis2 1.4.1 service and now get the following error 
when I start my Tomcat 5.5 server:



java.lang.NoClassDefFoundError: org/apache/axis2/handlers/AbstractHandler



I've added all JARs from the Axis2 1.4.1 distribution but the error persists.



I've searched around and not found anything that applies. Can someone point me 
in the right direction?



Thanks,

T






  


  

Axis2 and Tomcat's SECURITY Flag

2009-08-11 Thread Greg Logan

Hi List,

I'm trying to get my Axis2 application to run on a Tomcat 6.0.18 install 
running on an Ubuntu server.  This server runs with the Java 2 Security 
framework in Tomcat turned ON, so solutions involving turning it off 
won't work for this case :P


Unfortunately I keep running into permissions issues, and there does not 
appear to be any definitive (or working!) documentation as to precisely 
what permissions Axis2 needs.  I've tried a number of different 
permissions approaches, but I just can't seem to get the application going.


For example, adding the following to the permissions:

// = Axis2 Permissions 
//
grant {
  // For some mysterious reason these 2 are required outside the 
Axis-specific permissions

  // No idea what the codebase should be
  permission java.io.FilePermission 
"${catalina.base}/webapps/player/WEB-INF/-", "read";

  permission java.lang.RuntimePermission "getClassLoader";
};

grant codeBase "file:/var/lib/tomcat6/webapps/player/-" {
  permission java.lang.RuntimePermission "createClassLoader";
  permission java.lang.RuntimePermission "setContextClassLoader";
  permission java.lang.RuntimePermission "checkPropertiesAccess";
  permission java.lang.RuntimePermission "getClassLoader";
  permission java.lang.RuntimePermission "getProtectionDomain";
  permission java.lang.RuntimePermission 
"defineClassInPackage.org.apache.jasper.runtime";

  permission java.lang.RuntimePermission "shutdownHooks";
  permission java.lang.RuntimePermission "accessDeclaredMembers";
  permission java.util.PropertyPermission "*", "read,write";
  permission java.net.SocketPermission "ex.com", "resolve, connect";
  permission java.io.FilePermission 
"${catalina.base}/webapps/player/WEB-INF/modules/*", "read,write";
  permission java.io.FilePermission 
"${catalina.base}/webapps/player/WEB-INF/services/*", "read,write";
  permission java.io.FilePermission "${catalina.home}/common/classes", 
"read";
  permission java.io.FilePermission "${catalina.home}/shared/classes", 
"read";
  permission java.io.FilePermission "${catalina.base}/common/classes", 
"read";
  permission java.io.FilePermission "${catalina.base}/shared/classes", 
"read";
  permission java.io.FilePermission "${catalina.home}/common/i18n/*", 
"read";
  permission java.io.FilePermission "${catalina.home}/common/lib/*", 
"read";
  permission java.io.FilePermission 
"${catalina.home}/bin/bootstrap.jar", "read";
  permission java.io.FilePermission 
"${catalina.base}/webapps/player/WEB-INF/scriptServices/*", "read";

  permission java.io.FilePermission "${java.home}/lib/ext/*", "read";
  // Other directories that are in the classpath
  permission java.io.FilePermission "/usr/share/java/*", "read";
};

gets me this result (note that this *exact* deployed war works fine when 
security is off, so the module *is* there):


org.apache.axis2.AxisFault: The system is attempting to engage a module 
that is not available: addressing
at 
org.apache.axis2.engine.AxisConfiguration.engageModule(AxisConfiguration.java:506)
at 
org.apache.axis2.engine.AxisConfiguration.engageGlobalModules(AxisConfiguration.java:633)



The app does work when security is turned off, and also works when 
granted java.security.AllPermissions, but that's really not ideal.  Does 
anyone have a working set of permissions for Axis2?


Re: complex response in a response without a complex type

2009-08-11 Thread Miguel Angel Iglesias
Hi, thanks a lot for your response, I already have a web service
successfully deployed, my actual problem is the one with the complex
type, I also use a javabean for the response, this is what I got as
response:


−

XYZ
XYZ
XYZ
XYZ
XYZ
XYZ
XYZ
XYZ
XYZ
XYZ



But according with the spec I must eliminate the  element, the response should be:


XYZ
XYZ
XYZ
XYZ
XYZ
XYZ
XYZ
XYZ
XYZ
XYZ


thats the real issue...

Disculpa que responda en inglés, pero temo que se molesten con nosotros
si armamos un hilo en español ;-)

greetings/saludos





El mar, 11-08-2009 a las 12:18 -0500, mapa...@segurosazteca.com.mx
escribió:
> Hi Miguel Angel , i sent you this, hope this works for you 
> 
> For the complex response just create a java bean and this has to be
> the response of your method in the web service response, or also could
> me a simpls xml string 
> 
> 1) Bajar última versión de war de axis2 y deployar en tomcat 
> 2) Ir a "Directorio de instalacion Tomcat\" webapps y buscar la
> carpeta axis2, entrar a WEB-INF y copiar todo lo que contiene 
> 3) Pegar la seleccion anterior dentro de la carpeta WEB-INF del
> proyecto que se creo. Los cambios en adelante seran en las carpetas
> del proyecto web 
> 4) Crear la carpeta services dentro de WEB-INF (si es que no existe) 
> 5) Escribir las clases que se necesiten para el webservice (bottom
> up) 
> 6) En services (del paso 4) crear una carpeta(este nombre debe ser
> descriptivo del WebService) y dentro de ella copiar la estructura de
> directorios resultante de las clases (estructura de directorios =
> paquetes) 
> 7) En la carpeta services se encuentra un archivo .aar, el cual se
> debe descomprimir y extraer de el el archivo services.xml 
> 8) Dentro de la carpeta del punto 6 crear la carpeta META-INF y ahí
> copiar el archivo services.xml 
> 9) Editar el services XML para especificarle cuál es la clase fachada.
> En el tag service, en su atributo name, poner el nombre de la carpeta
> de paso 6. En el tag parameter cambiar el texto contenido en el tag
> opr el nombre de la clase fachada. En tag operation en su atributo
> name, escribir el nombre del metodo de la clase escrita. 
> 10) Compilar el proyecto 
> 11) deployar en tomcat 
> 12) Para comprobar que el WS (web service) se hizo bien se debe de
> abrir un navegador web y escribir lo siguiente: 
> 
> http://localhost:8080/NombreDelProyecto/services/CarpetaCreadaPaso6?wsdl 
> 
> 
> Regards 
> 
> Miguel Pardo 
> Lider de Proyecto 
> 
> 
> 
> 
> De: 
> Miguel Angel Iglesias
>  
> Para: 
> axis-user@ws.apache.org 
> Fecha: 
> 11/08/2009 12:00 pm 
> Asunto: 
> complex response in a response
> without a complex type
> 
> 
> __
> 
> 
> 
> 
> Hello, one of our clients ask us to process a soap 1.1 request like
> this
> one:
> 
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> 
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> 
> 
>  
> 
> 
> 
> 123456
> 
> 01 
> 
> 000
> 
> 
> 
> 0 000 
> 
> 00 
> 
>  
> 
> 
> 
>  
> 
> 
> 
> I can process the request without problems, but they want the response
> in this way:
> 
> 
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; ; 
> 
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> 
> 
>  
> 
>  
> 
> 123456 
> 
> 01 
> 
> 001 
> 
> 123456 
> 
> 20081129 
> 
> 10012 
> 
>  
> 
>  
> 
> 
> 
> I do not have much experience in web services or axis2, but I dont get
> how to send a complex response without a wrapper... 
> 
> So please, any suggestion you might have will be very helpful
> 
> -- 
> Ing. Miguel Angel Iglesias
> Gerente de Producción
> CellnPay SA de CV
> Oficina: 52 (55) 55498918 ext 136
> Cel: +52 (55)5530384897
> 
> 
> 
-- 
Ing. Miguel Angel Iglesias
Gerente de Producción
CellnPay SA de CV
Oficina: 52 (55) 55498918 ext 136
Cel: +52 (55)5530384897



Re: complex response in a response without a complex type

2009-08-11 Thread mapardo
Hi Miguel Angel , i sent you this, hope this works for you

For the complex response just create a java bean and this has to be the 
response of your method in the web service response, or also could me a 
simpls xml string 

1) Bajar última versión de war de axis2 y deployar en tomcat
2) Ir a "Directorio de instalacion Tomcat\" webapps y buscar la carpeta 
axis2, entrar a WEB-INF y copiar todo lo que contiene 
3) Pegar la seleccion anterior dentro de la carpeta WEB-INF del proyecto 
que se creo. Los cambios en adelante seran en las carpetas del proyecto 
web
4) Crear la carpeta services dentro de WEB-INF (si es que no existe)
5) Escribir las clases que se necesiten para el webservice (bottom up)
6) En services (del paso 4) crear una carpeta(este nombre debe ser 
descriptivo del WebService) y dentro de ella copiar la estructura de 
directorios resultante de las clases (estructura de directorios = 
paquetes)
7) En la carpeta services se encuentra un archivo .aar, el cual se debe 
descomprimir y extraer de el el archivo services.xml
8) Dentro de la carpeta del punto 6 crear la carpeta META-INF y ahí copiar 
el archivo services.xml
9) Editar el services XML para especificarle cuál es la clase fachada. En 
el tag service, en su atributo name, poner el nombre de la carpeta de paso 
6. En el tag parameter cambiar el texto contenido en el tag opr el nombre 
de la clase fachada. En tag operation en su atributo name, escribir el 
nombre del metodo de la clase escrita.
10) Compilar el proyecto
11) deployar en tomcat
12) Para comprobar que el WS (web service) se hizo bien se debe de abrir 
un navegador web y escribir lo siguiente:

http://localhost:8080/NombreDelProyecto/services/CarpetaCreadaPaso6?wsdl


Regards

Miguel Pardo
Lider de Proyecto





De:
Miguel Angel Iglesias 
Para:
axis-user@ws.apache.org
Fecha:
11/08/2009 12:00 pm
Asunto:
complex response in a response without a complex type




Hello, one of our clients ask us to process a soap 1.1 request like this
one:

http://www.w3.org/2001/XMLSchema-instance&qu ot; 


 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 

 xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/&q uot;> 

 



 123456

 01 

000

 

0 000 

00 

 



  

 

I can process the request without problems, but they want the response
in this way:


http://www.w3.org/2001/XMLSchema-instance&qu ot; 


xmlns:xsd="http://www.w3.org/2001/XMLSchema"; ; 

 xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/&q uot;> 

 

  

 123456 

 01 

 001 

 123456 

 20081129 

 10012 

  

  



I do not have much experience in web services or axis2, but I dont get
how to send a complex response without a wrapper... 

So please, any suggestion you might have will be very helpful

-- 
Ing. Miguel Angel Iglesias
Gerente de Producción
CellnPay SA de CV
Oficina: 52 (55) 55498918 ext 136
Cel: +52 (55)5530384897




NoClasDefFoundError

2009-08-11 Thread Jack Sprat
I made a few changes to an Axis2 1.4.1 service and now get the following error 
when I start my Tomcat 5.5 server:



java.lang.NoClassDefFoundError: org/apache/axis2/handlers/AbstractHandler



I've added all JARs from the Axis2 1.4.1 distribution but the error persists.



I've searched around and not found anything that applies. Can someone point me 
in the right direction?



Thanks,

T






  

complex response in a response without a complex type

2009-08-11 Thread Miguel Angel Iglesias

Hello, one of our clients ask us to process a soap 1.1 request like this
one:

http://www.w3.org/2001/XMLSchema-instance&qu ot; 

 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 

 xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/&q uot;> 

 



 123456

 01 

000

 

0 000 

00 

 



  

 

I can process the request without problems, but they want the response
in this way:


http://www.w3.org/2001/XMLSchema-instance&qu ot; 

xmlns:xsd="http://www.w3.org/2001/XMLSchema"; ; 

 xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/&q uot;> 

 

  

 123456 

 01 

 001 

 123456 

 20081129 

 10012 

  

  



I do not have much experience in web services or axis2, but I dont get
how to send a complex response without a wrapper... 

So please, any suggestion you might have will be very helpful

-- 
Ing. Miguel Angel Iglesias
Gerente de Producción
CellnPay SA de CV
Oficina: 52 (55) 55498918 ext 136
Cel: +52 (55)5530384897



RE: Using ws-addressing in asynchronous services communication

2009-08-11 Thread Martin Gainty

i would leave MessageId alone
as MessageID is the id for each predefined Incoming/Outgoing Message

did you try to add a new ID as a Parameter e.g:
MessageContext mc= new MessageContext();
final ConfigurationContext context =
ConfigurationContextFactory.createEmptyConfigurationContext();
mc.setConfigurationContext(context);
Integer uniqueId=new java.lang.Integer(AnIntegerWhichIsPassedIn);
mc.getConfigurationContext().getAxisConfiguration()
.addParameter("SomeUniqueID", uniqueId);

hth
Martin Gainty 
__ 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




Date: Tue, 11 Aug 2009 16:20:44 +0200
Subject: Using ws-addressing in asynchronous services communication
From: hakon.sageh...@bccs.uib.no
To: axis-user@ws.apache.org

Hi all,

A general ws question so hopefully someone takes the time to answer.

I have a thought setup of two web services and one client using WS-addressing 
communicating asynchronous . And wanted to hear if this is possible. I've got 
two services A and  B, A is a main service computing some thing and this takes 
a long time, so I will send the result of this computation to service B. Where 
to put the result will be given to service A by the client using the Replayto 
header in WS-addressing spec. So fa so good I think, but it would be nice for 
the client to get an id back from service A that it can give to service B for 
quering, "is data from service a related to this invocation with id", where id 
is the id given to the client by service A.  So my questionis is it possiblefor 
service  A to give a id to the client while it replays the end result of the 
computation to service B. Or can this be acomplished using the massage id's ??


cheers, Håkon
-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)

_
Express your personality in color! Preview and select themes for Hotmail®. 
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009

Re: axis2 1.0 ( war package ) .. problem with application handler

2009-08-11 Thread Sagara Gunathunga
Deepal/Niraj , sorry for my misunderstanding.

On Tue, Aug 11, 2009 at 8:37 PM, Deepal Jayasinghe wrote:
> Sagara, nope that did not help..
>
> Niraj:
> When you try to create a client inside the application server like
> tomcat, what happen is, it tries to create the service client with the
> server's configuration context. If you do not know about the
> configuration context, that is the run time of Axis2, which consist of
> all the data.
>
> If you do not want server's configuration for the client, what you
> have to do is not to use the default constructor of the service
> client. Rather create a new configuration context from an axis2.xml
> you want and use that.
>
> You can find more information about this :
> http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.html
>
> On Tue, Aug 11, 2009 at 10:45 AM, Sagara
> Gunathunga wrote:
>> Hi Niraj,
>>
>> You have defined  your Handlers in the globe level using axis2.xml
>> file, then it will engage in globally  in Axis2 that the reason for
>> your issue. One possible solution is remove that handler definition
>> from axis2.xml and deploy your handlers as a Axis2 module[1]
>> separately, where you can define your handler definition in module.xml
>> file instead of axis2.xml .Then you can engage that module only for
>> required services on service.xml file  using > ref="moduleName"/> tag.
>>
>> [1] - http://ws.apache.org/axis2/1_5/modules.html
>>
>>
>> Thanks ,
>>
>>
>> On Tue, Aug 11, 2009 at 7:20 PM, Nath, Niraj wrote:
>>> Hi,
>>>
>>>    We use axis2 1.0 war package in our application. We have hosted a set of 
>>> services at our end they all are working fine. We also have a handler 
>>> inserted for authenticating the clients who call our web services.
>>>
>>> Now we have some requirement where we are acting as a client to a set of 
>>> services hosted somewhere else. We are seeing that the handler which we 
>>> inserted is coming into play here too & so it's trying to authenticate the 
>>> outgoing soap request. This is not what we wanted. We only wanted to 
>>> intercept the soap requests which are coming to our server & not the other 
>>> way round.
>>>
>>> May be we have inserted our phase at the wrong location. Can someone help 
>>> here to put the phase at the correct location? I'm attaching the axis2.xml 
>>> file where we are inserting the phase.
>>>
>>> The inserted handler is at line 221-224 ( or search for EcamsHandler)..
>>>
>>> Appreciate any help. Thanks
>>>
>>> Regards
>>>
>>> Niraj Nath
>>>
>>>
>>
>>
>>
>> --
>> Sagara Gunathunga
>>
>> Blog - http://ssagara.blogspot.com
>> Web - http://sagaras.awardspace.com/
>>
>
>
>
> --
> http://blogs.deepal.org
>



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/


Re: axis2 1.0 ( war package ) .. problem with application handler

2009-08-11 Thread Deepal Jayasinghe
Sagara, nope that did not help..

Niraj:
When you try to create a client inside the application server like
tomcat, what happen is, it tries to create the service client with the
server's configuration context. If you do not know about the
configuration context, that is the run time of Axis2, which consist of
all the data.

If you do not want server's configuration for the client, what you
have to do is not to use the default constructor of the service
client. Rather create a new configuration context from an axis2.xml
you want and use that.

You can find more information about this :
http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.html

On Tue, Aug 11, 2009 at 10:45 AM, Sagara
Gunathunga wrote:
> Hi Niraj,
>
> You have defined  your Handlers in the globe level using axis2.xml
> file, then it will engage in globally  in Axis2 that the reason for
> your issue. One possible solution is remove that handler definition
> from axis2.xml and deploy your handlers as a Axis2 module[1]
> separately, where you can define your handler definition in module.xml
> file instead of axis2.xml .Then you can engage that module only for
> required services on service.xml file  using  ref="moduleName"/> tag.
>
> [1] - http://ws.apache.org/axis2/1_5/modules.html
>
>
> Thanks ,
>
>
> On Tue, Aug 11, 2009 at 7:20 PM, Nath, Niraj wrote:
>> Hi,
>>
>>    We use axis2 1.0 war package in our application. We have hosted a set of 
>> services at our end they all are working fine. We also have a handler 
>> inserted for authenticating the clients who call our web services.
>>
>> Now we have some requirement where we are acting as a client to a set of 
>> services hosted somewhere else. We are seeing that the handler which we 
>> inserted is coming into play here too & so it's trying to authenticate the 
>> outgoing soap request. This is not what we wanted. We only wanted to 
>> intercept the soap requests which are coming to our server & not the other 
>> way round.
>>
>> May be we have inserted our phase at the wrong location. Can someone help 
>> here to put the phase at the correct location? I'm attaching the axis2.xml 
>> file where we are inserting the phase.
>>
>> The inserted handler is at line 221-224 ( or search for EcamsHandler)..
>>
>> Appreciate any help. Thanks
>>
>> Regards
>>
>> Niraj Nath
>>
>>
>
>
>
> --
> Sagara Gunathunga
>
> Blog - http://ssagara.blogspot.com
> Web - http://sagaras.awardspace.com/
>



-- 
http://blogs.deepal.org


Re: attachment lost while calling another service

2009-08-11 Thread Sagara Gunathunga
Hi ,

AFAIK you could use ConfigurationContext  or ServiceGroupContext to
share data among several services but I'm not sure is it appropriate
to share binary data using those runtime contexts . Familiarizing
Axis2 session management[1] and Axis2  Context Hierarchy[2] may help
you to come up with decent design for this.

[1] -  http://wso2.org/library/articles/axis2-session-management
[2] -  
https://www.wso2.org/library/tutorials/understanding-axis2-context-hierarchy
thanks ,

On Tue, Aug 11, 2009 at 7:31 PM, Rajeevr wrote:
>
> Hi,
>
> I donot think question asked by Niraj is related to the problem i am facing.
> Please corret me if i am wronge.
>
> My problem statement remains same - how to get attachment data from one
> Eclpse project web service to another Eclipse project web service?
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/attachment-lost-while-calling-another-service-tp24917812p24918274.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/


Re: axis2 1.0 ( war package ) .. problem with application handler

2009-08-11 Thread Sagara Gunathunga
Hi Niraj,

You have defined  your Handlers in the globe level using axis2.xml
file, then it will engage in globally  in Axis2 that the reason for
your issue. One possible solution is remove that handler definition
from axis2.xml and deploy your handlers as a Axis2 module[1]
separately, where you can define your handler definition in module.xml
file instead of axis2.xml .Then you can engage that module only for
required services on service.xml file  using  tag.

[1] - http://ws.apache.org/axis2/1_5/modules.html


Thanks ,


On Tue, Aug 11, 2009 at 7:20 PM, Nath, Niraj wrote:
> Hi,
>
>    We use axis2 1.0 war package in our application. We have hosted a set of 
> services at our end they all are working fine. We also have a handler 
> inserted for authenticating the clients who call our web services.
>
> Now we have some requirement where we are acting as a client to a set of 
> services hosted somewhere else. We are seeing that the handler which we 
> inserted is coming into play here too & so it's trying to authenticate the 
> outgoing soap request. This is not what we wanted. We only wanted to 
> intercept the soap requests which are coming to our server & not the other 
> way round.
>
> May be we have inserted our phase at the wrong location. Can someone help 
> here to put the phase at the correct location? I'm attaching the axis2.xml 
> file where we are inserting the phase.
>
> The inserted handler is at line 221-224 ( or search for EcamsHandler)..
>
> Appreciate any help. Thanks
>
> Regards
>
> Niraj Nath
>
>



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/


Axis 1.5 and rest url parameters seem to be broken

2009-08-11 Thread Jonathan Roberts
Hello, 

I've just tried to upgrade to axis 1.5 from 1.4.1.  Axis can't seem to
map the operation to my url's for rest requests.

This was all working in the previous version.

My WSLD has something like this:

  


But I just get errors making a GET request to the url:

[ERROR] The endpoint reference (EPR) for the Operation not found is
/services/services/WorkspaceService/user/jdoe/resource/default/ and the
WSA Action = null
org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
Operation not found is
/services/services/WorkspaceService/user/jdoe/resource/default/ and the
WSA Action = null
at
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.
java:89)
at org.apache.axis2.engine.Phase.invoke(Phase.java:334)
at
org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:251)


Anyone have any luck getting this kinda thing to work in 1.5?

Thanks,
Jon Roberts


Using ws-addressing in asynchronous services communication

2009-08-11 Thread Håkon Sagehaug
Hi all,

A general ws question so hopefully someone takes the time to answer.

I have a thought setup of two web services and one client using
WS-addressing communicating asynchronous . And wanted to hear if this is
possible. I've got two services A and  B, A is a main service computing some
thing and this takes a long time, so I will send the result of this
computation to service B. Where to put the result will be given to service A
by the client using the Replayto header in WS-addressing spec. So fa so good
I think, but it would be nice for the client to get an id back from service
A that it can give to service B for quering, "is data from service a related
to this invocation with id", where id is the id given to the client by
service A.  So my questionis is it possiblefor service  A to give a id to
the client while it replays the end result of the computation to service B.
Or can this be acomplished using the massage id's ??

cheers, Håkon

-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)


Re: attachment lost while calling another service

2009-08-11 Thread Rajeevr

Hi,

I donot think question asked by Niraj is related to the problem i am facing.
Please corret me if i am wronge. 

My problem statement remains same - how to get attachment data from one
Eclpse project web service to another Eclipse project web service?



-- 
View this message in context: 
http://www.nabble.com/attachment-lost-while-calling-another-service-tp24917812p24918274.html
Sent from the Axis - User mailing list archive at Nabble.com.



axis2 1.0 ( war package ) .. problem with application handler

2009-08-11 Thread Nath, Niraj
Hi,

We use axis2 1.0 war package in our application. We have hosted a set of 
services at our end they all are working fine. We also have a handler inserted 
for authenticating the clients who call our web services.

Now we have some requirement where we are acting as a client to a set of 
services hosted somewhere else. We are seeing that the handler which we 
inserted is coming into play here too & so it's trying to authenticate the 
outgoing soap request. This is not what we wanted. We only wanted to intercept 
the soap requests which are coming to our server & not the other way round.

May be we have inserted our phase at the wrong location. Can someone help here 
to put the phase at the correct location? I'm attaching the axis2.xml file 
where we are inserting the phase.

The inserted handler is at line 221-224 ( or search for EcamsHandler)..

Appreciate any help. Thanks

Regards
 
Niraj Nath





true
false
false
false





30



true





false

admin
axis2













false






false


false


false



















http://www.w3.org/2004/08/wsdl/in-only";
 class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
http://www.w3.org/2004/08/wsdl/in-out";
 class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>





6060























6060












HTTP/1.1
chunked


HTTP/1.1
chunked










































			



















































attachment lost while calling another service

2009-08-11 Thread Rajeevr

Hi ,

I am sending an attachment file while calling another web service. I coded
it by SWA as given at http://wso2.org/library/1675. I can retrieve that
attachment file in the next service. 

This is true only when the next service is in the same eclipse project. When
trying calling another project's web service I cannot find the added
attachments. I think attachments are added in MessgaeContext and while
calling another project's web service it gets the new life and hence we can
not get those previous data.

Can some one help me how to get that attachment in next eclipse project's
service?


Regards,
Rajeev

-- 
View this message in context: 
http://www.nabble.com/attachment-lost-while-calling-another-service-tp24917812p24917812.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: Fw: WSDD missing and error generating

2009-08-11 Thread Chinmoy Chakraborty
Miha,

I can not help you in this regard. May be someone else can help you out.

Chinmoy


2009/8/11 Miha Vitorovic 

>
> Chimony,
>
> it's time for some extra context. I am using the AXIS to comminicate from
> IBM Lotus Domino server (acting as a client), to MS CRM (server) Web
> Service.
>
> I have produced the sources with the J2EE Eclipse perspective with the
> default options aganis the Tomcat 6.0 server, then copied the generated
> sources into a Domino library. The folder in the Eclipse project you
> indicated does not contani Axis2.xml. To make it work I added the following
> files to the Domino server JVM/lib/ext folder (found this on the IBM site):
>
> axis.jar
> commons-logging.jar
> commons-discovery-0.2.jar
>
> Then I ceated a Domino agent that uses these libraries to pump data from
> Domino to CRM.
>
> The agent worked fine, but suddently started throwing errors. So now I am
> cnofused, since the process went smoothly, and then suddenly started to
> produce errors for no apparent reasons.
> Maybe it was until that point it was picking up the client-config.wsdd from
> the axis.jar, but then suddenly stopped to. If you feel that might be the
> case, I may try reloading the server to see if this helps.
>
> Searching the web, I discovered, that it is possible to load the WSDD file
> "manually" in the agent itself, but then couldn't find one. When I started
> to research the ways to generate the WSDD, I again got stopped by the error.
>
> I would also like to note, that the Domino server itself seems to hold some
> sort of an Axis spin-off (but from an old version of the API) which I
> couldn't use, since it does not contain all the functionality of the newer
> Axis API and has serious bugs of its own. On a side note, that process did
> produce a WSDD file, but it is not usable since it is generated against a
> differnet packages.
>
> I have also seen that many people suggest producing WSDD by hand from WSDL
> definistion, but I don't find that feasible, since the MS CRM WSDL is a 800k
> monstrosity that takes minutes to get processed even Wsdl2Java, so I can't
> imagine how long would a manual process take.
>
> My was hoping to get help generating WSDD file from the
>
> In short, so far I have had the luck of things working as they should, so I
> did not have to get familiar with all the technical details of the Axis
> package. The cosequence is, that I do not know much
>
>
> ---
>  Miha Vitorovic
>  Inženir v tehničnem področju
>  Customer Support Engineer
>
>   NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
>   Phone +386 1 4746 500  Fax +386 1 4746 501 
> http://www.NIL.si
>
>
>   From: Chinmoy Chakraborty 
>  To: axis-user@ws.apache.org
>  Date: 11.08.2009 10:30
>  Subject: Re: Fw: WSDD missing and error generating
>
> --
>
>
>
> If you are using axis2 then you should have axis2.xml file inside 'conf'
> directory inside ..\WEB-INF' directory. Axis2.xml holds all the config data.
> If you are missing the file then you have problems.
>
> Have you migrated from axis 1.x to axis2? If yes then you can have a look
> into: 
> *http://ws.apache.org/axis2/1_5/migration.html*
> .
>
> Chinmoy
>
> 2009/8/11 Miha Vitorovic <*mvitoro...@nil.si* >
>
> I have donwloaded Axis2 1.4.1 but as far as I know, I am using Axis (1)
> portion of the API. Eclipse generated all the code for me :-) If you tell me
> what to check, I'll gladly do it.
>
> Thanks and best regards,
> ---
>  Miha Vitorovic
>  Inženir v tehničnem področju
>  Customer Support Engineer
>
>   NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
>   Phone +386 1 4746 500  Fax +386 1 4746 501 
> *http://www.NIL.si*
>
>   From: Chinmoy Chakraborty <*cch...@gmail.com* >  To: *
> axis-u...@ws.apache.org*   Date: 11.08.2009 10:06
> Subject: Re: Fw: WSDD missing and error generating
>
> --
>
>
>
>
> are you using Axis 1.x or Axis2 1.x.x?
>
>
>
>
> 2009/8/11 Miha Vitorovic <*mvitoro...@nil.si* >
>
> Anyone please?
>
> Best regards,
> ---
>  Miha Vitorovic
>  Inženir v tehničnem področju
>  Customer Support Engineer
>
>   NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
>   Phone +386 1 4746 500  Fax +386 1 4746 501 
> *http://www.NIL.si*
> - Forwarded by Miha Vitorovic/Nil on 11.08.2009 09:53 -   From: Miha
> Vitorovic/Nil  To: *axis-u...@ws.apache.org* 
> Date: 10.08.2009 10:25  Subject: WSDD missing and error generating
>
>
> --
>
>
> Hi all,
>
> I have a program, that suddenly started throwing this error:
>
> org.apache.axis.InternalException: org.apache.axis.ConfigurationException:
> org.apache.axis.ConfigurationException: No engine configuration file -
> aborting!
> org.apache.axis.ConfigurationException: No engine configuration file -
> aborting!
>   at
> org.apach

soapcall(param0=valueA, param1=valueB), why param names?

2009-08-11 Thread J. Hondius

Hi axis users,

I have nice pojo webservices in axis.
I'm building a client in php.

My pojo java function in class Employee is like this:
 public String getPreference(String user, String pref)

The generated WSDL speaks of method getPreference and its parameters 
param0 and param1.


The php code goes like this:
 $sc = new SoapClient("http://localhost:9762/services/Employee?wsdl";);
 $response = $sc->getPref(array('param0' => $user, 'param1' => 
$pref)->return;


Without calling the parameters by their names (param0 etc) it does not 
work. See example below

 $response = $sc->getPref(array($user, $pref)->return;

My questions:

1. Why?
2. Is this a setting or is there a way around calling the params by 
their names?



Greetings from sunny Holland, Joek Hondius



Re: Fw: WSDD missing and error generating

2009-08-11 Thread Miha Vitorovic
Chimony,

it's time for some extra context. I am using the AXIS to comminicate from 
IBM Lotus Domino server (acting as a client), to MS CRM (server) Web 
Service.

I have produced the sources with the J2EE Eclipse perspective with the 
default options aganis the Tomcat 6.0 server, then copied the generated 
sources into a Domino library. The folder in the Eclipse project you 
indicated does not contani Axis2.xml. To make it work I added the 
following files to the Domino server JVM/lib/ext folder (found this on the 
IBM site):

axis.jar
commons-logging.jar
commons-discovery-0.2.jar

Then I ceated a Domino agent that uses these libraries to pump data from 
Domino to CRM.

The agent worked fine, but suddently started throwing errors. So now I am 
cnofused, since the process went smoothly, and then suddenly started to 
produce errors for no apparent reasons.
Maybe it was until that point it was picking up the client-config.wsdd 
from the axis.jar, but then suddenly stopped to. If you feel that might be 
the case, I may try reloading the server to see if this helps.

Searching the web, I discovered, that it is possible to load the WSDD file 
"manually" in the agent itself, but then couldn't find one. When I started 
to research the ways to generate the WSDD, I again got stopped by the 
error.

I would also like to note, that the Domino server itself seems to hold 
some sort of an Axis spin-off (but from an old version of the API) which I 
couldn't use, since it does not contain all the functionality of the newer 
Axis API and has serious bugs of its own. On a side note, that process did 
produce a WSDD file, but it is not usable since it is generated against a 
differnet packages.

I have also seen that many people suggest producing WSDD by hand from WSDL 
definistion, but I don't find that feasible, since the MS CRM WSDL is a 
800k monstrosity that takes minutes to get processed even Wsdl2Java, so I 
can't imagine how long would a manual process take.

My was hoping to get help generating WSDD file from the 

In short, so far I have had the luck of things working as they should, so 
I did not have to get familiar with all the technical details of the Axis 
package. The cosequence is, that I do not know much 


---
  Miha Vitorovic
  Inženir v tehničnem področju
  Customer Support Engineer

   NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
   Phone +386 1 4746 500  Fax +386 1 4746 501 http://www.NIL.si



From:
Chinmoy Chakraborty 
To:
axis-user@ws.apache.org
Date:
11.08.2009 10:30
Subject:
Re: Fw: WSDD missing and error generating



If you are using axis2 then you should have axis2.xml file inside 'conf' 
directory inside ..\WEB-INF' directory. Axis2.xml holds all the config 
data. If you are missing the file then you have problems.
 
Have you migrated from axis 1.x to axis2? If yes then you can have a look 
into: http://ws.apache.org/axis2/1_5/migration.html.
 
Chinmoy

2009/8/11 Miha Vitorovic 

I have donwloaded Axis2 1.4.1 but as far as I know, I am using Axis (1) 
portion of the API. Eclipse generated all the code for me :-) If you tell 
me what to check, I'll gladly do it. 

Thanks and best regards, 
---
 Miha Vitorovic
 Inženir v tehničnem področju
 Customer Support Engineer

  NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
  Phone +386 1 4746 500  Fax +386 1 4746 501 http://www.NIL.si 


From: 
Chinmoy Chakraborty  
To: 
axis-user@ws.apache.org 
Date: 
11.08.2009 10:06 
Subject: 
Re: Fw: WSDD missing and error generating





are you using Axis 1.x or Axis2 1.x.x? 
  


  
2009/8/11 Miha Vitorovic  

Anyone please? 

Best regards, 
---
 Miha Vitorovic
 Inženir v tehničnem področju
 Customer Support Engineer

  NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
  Phone +386 1 4746 500  Fax +386 1 4746 501 http://www.NIL.si 
- Forwarded by Miha Vitorovic/Nil on 11.08.2009 09:53 - 
From: 
Miha Vitorovic/Nil 
To: 
axis-user@ws.apache.org 
Date: 
10.08.2009 10:25 
Subject: 
WSDD missing and error generating




Hi all, 

I have a program, that suddenly started throwing this error: 

org.apache.axis.InternalException: org.apache.axis.ConfigurationException: 
org.apache.axis.ConfigurationException: No engine configuration file - 
aborting! 
org.apache.axis.ConfigurationException: No engine configuration file - 
aborting! 
  at 
org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:175)
 

  at org.apache.axis.AxisEngine.init(AxisEngine.java:172) 
  at org.apache.axis.AxisEngine.(AxisEngine.java:156) 
  at org.apache.axis.client.AxisClient.(AxisClient.java:52) 
  at org.apache.axis.client.Service.getAxisClient(Service.java:104) 
  at org.apache.axis.client.Service.(Service.java:113) 

Researching this, I have seen that the problem is most likely related to a 
missing WSDD, but now I am faced with two problems. 

First is more of a question: why did this suddenly start happening, i.e.

Re: Fw: WSDD missing and error generating

2009-08-11 Thread Chinmoy Chakraborty
If you are using axis2 then you should have axis2.xml file inside 'conf'
directory inside ..\WEB-INF' directory. Axis2.xml holds all the config data.
If you are missing the file then you have problems.

Have you migrated from axis 1.x to axis2? If yes then you can have a look
into: http://ws.apache.org/axis2/1_5/migration.html.

Chinmoy

2009/8/11 Miha Vitorovic 

>
> I have donwloaded Axis2 1.4.1 but as far as I know, I am using Axis (1)
> portion of the API. Eclipse generated all the code for me :-) If you tell me
> what to check, I'll gladly do it.
>
> Thanks and best regards,
> ---
>  Miha Vitorovic
>  Inženir v tehničnem področju
>  Customer Support Engineer
>
>   NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
>   Phone +386 1 4746 500  Fax +386 1 4746 501 
> http://www.NIL.si
>
>
>   From: Chinmoy Chakraborty  To: axis-user@ws.apache.org
>  Date: 11.08.2009 10:06 Subject: Re: Fw: WSDD missing and error generating
> --
>
>
>
> are you using Axis 1.x or Axis2 1.x.x?
>
>
>
>
> 2009/8/11 Miha Vitorovic <*mvitoro...@nil.si* >
>
> Anyone please?
>
> Best regards,
> ---
>  Miha Vitorovic
>  Inženir v tehničnem področju
>  Customer Support Engineer
>
>   NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
>   Phone +386 1 4746 500  Fax +386 1 4746 501 
> *http://www.NIL.si*
> - Forwarded by Miha Vitorovic/Nil on 11.08.2009 09:53 -   From: Miha
> Vitorovic/Nil  To: *axis-u...@ws.apache.org* 
> Date: 10.08.2009 10:25  Subject: WSDD missing and error generating
>
> --
>
>
> Hi all,
>
> I have a program, that suddenly started throwing this error:
>
> org.apache.axis.InternalException: org.apache.axis.ConfigurationException:
> org.apache.axis.ConfigurationException: No engine configuration file -
> aborting!
> org.apache.axis.ConfigurationException: No engine configuration file -
> aborting!
>   at
> org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:175)
>   at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
>   at org.apache.axis.AxisEngine.(AxisEngine.java:156)
>   at org.apache.axis.client.AxisClient.(AxisClient.java:52)
>   at org.apache.axis.client.Service.getAxisClient(Service.java:104)
>   at org.apache.axis.client.Service.(Service.java:113)
>
> Researching this, I have seen that the problem is most likely related to a
> missing WSDD, but now I am faced with two problems.
>
> First is more of a question: why did this suddenly start happening, i.e.
> why didn't it happen from the start. The axis configuration is the same all
> the time, and the code also.
>
> The second problem is, that I cannot generate the WSDD file from the WSDL.
> Searching the Internet the correct options seem to be:
>
> WSDL2Java -o . -d Session -s -S true ws.wsdl
>
>
> But I get the following exception from it:
> C:\temp\wsdd>C:\Miha\axis2-1.4.1\bin\wsdl2java.bat -o . -d Session -s -S
> true -uri CrmService.wsdl
> Using AXIS2_HOME:   C:\Miha\axis2-1.4.1
> Using JAVA_HOME:C:\Progra~1\Java\jre1.6.0_07
> Retrieving document at 'CrmService.wsdl'.
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: No proper databinding
> has taken place
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
> at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: No proper
> databinding has taken place
> at
> org.apache.axis2.wsdl.codegen.extension.DefaultDatabindingExtension.engage(DefaultDatabindingExtension.java:41)
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
> ... 2 more
>
> Thanks in advance for any help that you may offer.
> ---
>  Miha Vitorovic
>  Inženir v tehničnem področju
>  Customer Support Engineer
>
>   NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
>   Phone +386 1 4746 500  Fax +386 1 4746 501 
> *http://www.NIL.si*
>
>


Re: Fw: WSDD missing and error generating

2009-08-11 Thread Miha Vitorovic
I have donwloaded Axis2 1.4.1 but as far as I know, I am using Axis (1) 
portion of the API. Eclipse generated all the code for me :-) If you tell 
me what to check, I'll gladly do it.

Thanks and best regards,
---
  Miha Vitorovic
  Inženir v tehničnem področju
  Customer Support Engineer

   NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
   Phone +386 1 4746 500  Fax +386 1 4746 501 http://www.NIL.si



From:
Chinmoy Chakraborty 
To:
axis-user@ws.apache.org
Date:
11.08.2009 10:06
Subject:
Re: Fw: WSDD missing and error generating



are you using Axis 1.x or Axis2 1.x.x?
 


 
2009/8/11 Miha Vitorovic 

Anyone please? 

Best regards, 
---
 Miha Vitorovic
 Inženir v tehničnem področju
 Customer Support Engineer

  NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
  Phone +386 1 4746 500  Fax +386 1 4746 501 http://www.NIL.si 
- Forwarded by Miha Vitorovic/Nil on 11.08.2009 09:53 - 
From: 
Miha Vitorovic/Nil 
To: 
axis-user@ws.apache.org 
Date: 
10.08.2009 10:25 
Subject: 
WSDD missing and error generating



Hi all, 

I have a program, that suddenly started throwing this error: 

org.apache.axis.InternalException: org.apache.axis.ConfigurationException: 
org.apache.axis.ConfigurationException: No engine configuration file - 
aborting! 
org.apache.axis.ConfigurationException: No engine configuration file - 
aborting! 
  at 
org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:175)
 

  at org.apache.axis.AxisEngine.init(AxisEngine.java:172) 
  at org.apache.axis.AxisEngine.(AxisEngine.java:156) 
  at org.apache.axis.client.AxisClient.(AxisClient.java:52) 
  at org.apache.axis.client.Service.getAxisClient(Service.java:104) 
  at org.apache.axis.client.Service.(Service.java:113) 

Researching this, I have seen that the problem is most likely related to a 
missing WSDD, but now I am faced with two problems. 

First is more of a question: why did this suddenly start happening, i.e. 
why didn't it happen from the start. The axis configuration is the same 
all the time, and the code also. 

The second problem is, that I cannot generate the WSDD file from the WSDL. 
Searching the Internet the correct options seem to be: 

WSDL2Java -o . -d Session -s -S true ws.wsdl 


But I get the following exception from it: 
C:\temp\wsdd>C:\Miha\axis2-1.4.1\bin\wsdl2java.bat -o . -d Session -s -S 
true -uri CrmService.wsdl 
Using AXIS2_HOME:   C:\Miha\axis2-1.4.1 
Using JAVA_HOME:C:\Progra~1\Java\jre1.6.0_07 
Retrieving document at 'CrmService.wsdl'. 
Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: 
org.apache.axis2.wsdl.codegen.CodeGenerationException: No proper 
databinding has taken place 
at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
 

at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) 
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) 
Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: No 
proper databinding has taken place 
at 
org.apache.axis2.wsdl.codegen.extension.DefaultDatabindingExtension.engage(DefaultDatabindingExtension.java:41)
 

at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
 

... 2 more 

Thanks in advance for any help that you may offer. 
---
 Miha Vitorovic
 Inženir v tehničnem področju
 Customer Support Engineer

  NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
  Phone +386 1 4746 500  Fax +386 1 4746 501 http://www.NIL.si



Re: Fw: WSDD missing and error generating

2009-08-11 Thread Chinmoy Chakraborty
are you using Axis 1.x or Axis2 1.x.x?




2009/8/11 Miha Vitorovic 

>
> Anyone please?
>
> Best regards,
> ---
>  Miha Vitorovic
>  Inženir v tehničnem področju
>  Customer Support Engineer
>
>   NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
>   Phone +386 1 4746 500  Fax +386 1 4746 501 
> http://www.NIL.si
> - Forwarded by Miha Vitorovic/Nil on 11.08.2009 09:53 -
>   From: Miha Vitorovic/Nil To: axis-user@ws.apache.org Date: 10.08.2009
> 10:25 Subject: WSDD missing and error generating
> --
>
>
> Hi all,
>
> I have a program, that suddenly started throwing this error:
>
> org.apache.axis.InternalException: org.apache.axis.ConfigurationException:
> org.apache.axis.ConfigurationException: No engine configuration file -
> aborting!
> org.apache.axis.ConfigurationException: No engine configuration file -
> aborting!
>   at
> org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:175)
>   at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
>   at org.apache.axis.AxisEngine.(AxisEngine.java:156)
>   at org.apache.axis.client.AxisClient.(AxisClient.java:52)
>   at org.apache.axis.client.Service.getAxisClient(Service.java:104)
>   at org.apache.axis.client.Service.(Service.java:113)
>
> Researching this, I have seen that the problem is most likely related to a
> missing WSDD, but now I am faced with two problems.
>
> First is more of a question: why did this suddenly start happening, i.e.
> why didn't it happen from the start. The axis configuration is the same all
> the time, and the code also.
>
> The second problem is, that I cannot generate the WSDD file from the WSDL.
> Searching the Internet the correct options seem to be:
>
> WSDL2Java -o . -d Session -s -S true ws.wsdl
>
>
> But I get the following exception from it:
> C:\temp\wsdd>C:\Miha\axis2-1.4.1\bin\wsdl2java.bat -o . -d Session -s -S
> true -uri CrmService.wsdl
> Using AXIS2_HOME:   C:\Miha\axis2-1.4.1
> Using JAVA_HOME:C:\Progra~1\Java\jre1.6.0_07
> Retrieving document at 'CrmService.wsdl'.
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: No proper databinding
> has taken place
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
> at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: No proper
> databinding has taken place
> at
> org.apache.axis2.wsdl.codegen.extension.DefaultDatabindingExtension.engage(DefaultDatabindingExtension.java:41)
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
> ... 2 more
>
> Thanks in advance for any help that you may offer.
> ---
>  Miha Vitorovic
>  Inženir v tehničnem področju
>  Customer Support Engineer
>
>   NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
>   Phone +386 1 4746 500  Fax +386 1 4746 501 
> http://www.NIL.si


Calling WSDL2Java from Java class inside eclipse plugin

2009-08-11 Thread Philipp Zech

Hi,

I'm currently working on an eclipse plugin allowing me to right-click a
WSDL file in a project and following, to generate the WS stubs by
selecting a menu item which triggers the code generation (actually, the
same as wsdl2java on the command line).
I'm facing no errors are any similar stuff, but every time I want to
generate some code, only the needed build.xml file is generated, no
errors or exceptions are thrown.
For the ease of understanding I will post party of the source:

   Map optionsMap =
initializeGeneratorProperties();

   AxisService service = WSAdapterGeneratorUtil
   .getAxisService(WSDLFile);
   CodeGenConfiguration codegenConfig = new
CodeGenConfiguration(
   optionsMap);
   codegenConfig.setAxisService(service);

   WSDLReader reader = WSDLFactory.newInstance()
   .newWSDLReader();


codegenConfig.setWsdlDefinition(reader.readWSDL(WSDLFile));

   codegenConfig.setBaseURI(WSAdapterGeneratorUtil
   .getBaseUri(WSDLFile));

new CodeGenerationEngine(codegenConfig).generate();


The above excerpt shows from my point of view the proper way of doing so
(generating code). Below is the source of the
initializeGeneratorProperties(); method, maybe I'm forgetting about some
options in the optionsMap:

   Map optionsMap = new HashMap();
   optionsMap.put("uri", new CommandLineOption("uri",
   new String[] { WSDLFile }));
   optionsMap.put("p", new CommandLineOption("p",
   new String[] { "at.sample.path" }));
   optionsMap
   .put("l", new CommandLineOption("l", new String[] {
"java" }));
   optionsMap
   .put("o", new CommandLineOption("o", new String[] {
genDir }));
   optionsMap.put("d", new CommandLineOption("d",
   new String[] { "xmlbeans" }));
   optionsMap.put("pn", new CommandLineOption("pn",
   new String[] { "Soap" }));

Well, as this code is error free (in case of exceptions and errors, I
hope to get some useful help quite soon, as for me, I can't figure out
the small bug or misconfiguration or what else leads to this strange
behaviour, that I won't get any classes to be generated.
Thanks a lot in advance,

Philipp


Fw: WSDD missing and error generating

2009-08-11 Thread Miha Vitorovic
Anyone please?

Best regards,
---
  Miha Vitorovic
  Inženir v tehničnem področju
  Customer Support Engineer

   NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
   Phone +386 1 4746 500  Fax +386 1 4746 501 http://www.NIL.si
- Forwarded by Miha Vitorovic/Nil on 11.08.2009 09:53 -

From:
Miha Vitorovic/Nil
To:
axis-user@ws.apache.org
Date:
10.08.2009 10:25
Subject:
WSDD missing and error generating


Hi all,

I have a program, that suddenly started throwing this error:

org.apache.axis.InternalException: org.apache.axis.ConfigurationException: 
org.apache.axis.ConfigurationException: No engine configuration file - 
aborting!
org.apache.axis.ConfigurationException: No engine configuration file - 
aborting!
  at 
org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:175)
  at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
  at org.apache.axis.AxisEngine.(AxisEngine.java:156)
  at org.apache.axis.client.AxisClient.(AxisClient.java:52)
  at org.apache.axis.client.Service.getAxisClient(Service.java:104)
  at org.apache.axis.client.Service.(Service.java:113)

Researching this, I have seen that the problem is most likely related to a 
missing WSDD, but now I am faced with two problems.

First is more of a question: why did this suddenly start happening, i.e. 
why didn't it happen from the start. The axis configuration is the same 
all the time, and the code also.

The second problem is, that I cannot generate the WSDD file from the WSDL. 
Searching the Internet the correct options seem to be:

WSDL2Java -o . -d Session -s -S true ws.wsdl


But I get the following exception from it:
C:\temp\wsdd>C:\Miha\axis2-1.4.1\bin\wsdl2java.bat -o . -d Session -s -S 
true -uri CrmService.wsdl
Using AXIS2_HOME:   C:\Miha\axis2-1.4.1
Using JAVA_HOME:C:\Progra~1\Java\jre1.6.0_07
Retrieving document at 'CrmService.wsdl'.
Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: 
org.apache.axis2.wsdl.codegen.CodeGenerationException: No proper 
databinding has taken place
at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: No 
proper databinding has taken place
at 
org.apache.axis2.wsdl.codegen.extension.DefaultDatabindingExtension.engage(DefaultDatabindingExtension.java:41)
at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
... 2 more

Thanks in advance for any help that you may offer.
---
  Miha Vitorovic
  Inženir v tehničnem področju
  Customer Support Engineer

   NIL Data Communications,  Tivolska cesta 48,  1000 Ljubljana,  Slovenia
   Phone +386 1 4746 500  Fax +386 1 4746 501 http://www.NIL.si