Re: Axis2 1.2 sanity check: Can generated POJO service/client handle 0-length array?

2007-06-12 Thread Jarek Kucypera

Anne Thomas Manes wrote:


If your goal is point-to-point integration between a single client and
server, then the code-first development model is fine. But if your
goal is to implement a service-oriented system, enable reuse of
capabilities, reduce redundancy, and increase flexibility and agility,
then the code-first development model is a bad practice.


Actually we used contract first approach, but it just happened, that
we could afford to write the contract in Java.


Service-oriented systems require governance of data types and
semantics. I'm sure you've noticed that if you use the code-first
approach, then Axis will generate a unique set of types and namespaces
for your application. Proliferation of schema types will make reuse
extremely challenging, resulting in reduced flexibility and agility,
and a complete failure of a SOA initiative.



As we wrote separate interface layer, we could give (and we gave)
descriptive names and namespaces, not reflecting  the guts of our apps.
We just used java instead of wsdl to write interfaces to our apps.

J.K.


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



Re: Axis2 1.2 sanity check: Can generated POJO service/client handle 0-length array?

2007-06-12 Thread Jarek Kucypera

Anne Thomas Manes wrote:


I trust you recognize
the value of clean separation between your application object model
and a database data model and the DAO design pattern. 


Of course I do. My point is that I wanna write the interface layer
of my system in Java, not int WSDL, of course for the price of not using
all of the wsdl/schema/xml features.
Actually we are doing it in our current project: we created
core engine for the business logic and a separate,thin interface layer.
The interface is simple enaugh to write it as a set of
of beans and service classes whose only task is to translate params/
results and call the core. Due to simplicity of the interface and the fact
we don't need any of  additional ws features like addressing,
reasonable POJO support just fits this scenario.


There is an impedance mismatch between XML data structures and Java
object models, just as there is an impedance mismatch between SQL data
models and Java object models. In many cases the mismatch is
insignificant, but it's a bad idea to assume that it doesn't exist.

Noone does assume that. And in those "many cases" it's worth to pay the 
price

of simplicity to avoid diving into wsdl.


I agree that Axis2 could handle POJO deployment better, but even if it
were the best that it could be, I seriously doubt that it could handle
everything automatically.


I don't  expect POJO to handle everything,.
But reasonable propagation of exceptions is a minimum for it to be usable.

J.K.

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



Re: Axis2 1.2 sanity check: Can generated POJO service/client handle 0-length array?

2007-06-06 Thread Jarek Kucypera




Fortunately axis2 guys improve the POJO deployment, they fixed some
things in 1.2 (also added some
annotations support), but it still requires somo work to be fully
functional.


Jarek,

When you get a chance, please let us know what breaks or does not work 
via JIRA.


See 2603 and 1754. As a result, I'm unable to deploy any service that 
throws exceptions, as
the generated wsdl is invalid (inheritance) and even if it wasn't, the 
exceptions wouldn't be wired (propagated to

clients) properly.

J.K.

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



Re: Axis2 1.2 sanity check: Can generated POJO service/client handle 0-length array?

2007-05-25 Thread Jarek Kucypera

Davanum Srinivas wrote:

When you get a chance, please let us know what breaks or does not work 
via JIRA.


Sure, in a week or two I plan to have it analysed.

J.K.

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



Re: Axis2 1.2 sanity check: Can generated POJO service/client handle 0-length array?

2007-05-25 Thread Jarek Kucypera

Dennis Sosnoski wrote:

 But generally the idea of deploying POJOs directly is a very limited 
approach, at best only suitable for small applications, and if you're 
doing anything substantial you're probably going to need to start 
controlling the XML conversions at some point. 



No, why ? Do you really want to have detailed control over bytecode 
emitted by the java compiler you use ? Of course not, even when you work 
on large applications.
I think the analogy suits to pojo deployment. With sound pojo support I 
don't see necessity for digging in xml.


J.K.

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



Re: Axis2 1.2 sanity check: Can generated POJO service/client handle 0-length array?

2007-05-25 Thread Jarek Kucypera

Glen Mazza wrote:


I believe that's called "contract last" development

No, IMO it depends on how you (miss)use the concept of "contract" or 
interface,

not on which language you use to write the contract. I would be very
glad to be able to write the contract in Java and expose it as wsdl via
axis2 :)


(JAX-WS and JAXB) has an excellent implementation in that regard, just
by using annotations you can specify which methods are to become web
services.  

Fortunately axis2 guys improve the POJO deployment, they fixed some 
things in 1.2 (also added some
annotations support), but it still requires somo work to be fully 
functional.


J.K.

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



Re: Axis2 1.2 sanity check: Can generated POJO service/client handle 0-length array?

2007-05-25 Thread Jarek Kucypera

Dennis Sosnoski wrote:

I haven't tried out the Axis2 POJO support, but in general anything 
you do using POJOs directly is going to be both inflexible and very 
limited in terms of the XML support. 


With all respect, xml here is the tool, not the purpose. I would like to 
expose my serwice without any knowlege of wsdl and xml and focus just on 
the bussiness logic, even for the price of not utilizng all the features 
of xml. Even with axis2 1.2 it's hardly possible.


J.K.

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



[Axis2 1.1.1] Exceptions and POJO services

2007-04-16 Thread Jarek Kucypera

If I declare a (non-void) service method to throw an exception,
the resulting wsdl describes the corresponding exception
type as anyType, like this:

 
  
 

Is there a way to throw custom exceptions (return faults of custom
types) from POJO based services, so that the fault type is
described in the wsdl ?

J.K.

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



Re: AXIS2 1.1.1 problem with BASIC AUTH

2007-04-12 Thread Jarek Kucypera

Don't you also need to set the 'preemtive' flag, like this:
authenticator.setPreemptiveAuthentication(true);
?

J.K.

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



Re: http authentication with Axis2

2007-03-20 Thread Jarek Kucypera

pat wrote:

In case of axis2 1.1.1 this should help:
auth.setPreemptiveAuthentication(true);

The lack of documentation is disappointing , isn't it ...?

J.K.


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



Re: [AXIS 2] Deploying on Tomacat 6.0.10

2007-03-17 Thread Jarek Kucypera

Glen Mazza wrote:


In Tomcat 5.5.x, at least, there is a common/lib (shared/lib is also OK)
directory you can place those two jars in, and they should be accessible
to the axis2.war (and its underlying services) upon restart of Tomcat.
Google for the two jar files you need--I think they come from the Sun
site but I'm unsure.
 


You can also put them in WEB-INF/lib.


This question, and that of the other poster with XSL files, is
presenting a problem I had earlier, of precisely *where* (which
directory, etc.) to put JAR resources in an .aar file to make them
accessible to the service.  


In 'lib' subdirectory of the service directory/atchive.

J.K.

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



Re: [AXIS 2] Deploying on Tomacat 6.0.10

2007-03-17 Thread Jarek Kucypera

John Kristian wrote:


Is it sufficient to place Axis2 .jar files in the WEB-INF/lib of a web
application?  (Assuming the web application is the only user of Axis2.)
Or must they go in Tomcat's global class loader?
 

Yes, WEB-INF/lib is sufficient. Axis2 (at least 1.1.1 which I use) comes 
with .war distribution,

so you cant get and examine it .

J.K.



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



[axis2 1.1.1] Pojo service & date fields

2007-03-15 Thread Jarek Kucypera

I deploy a POJO service, which operates on records that contain fields
created from java.util.Date. In the resulting (automatically generated)
WSDL, those fields are defined like this:



But when the service returns object with such a field set to null,
the field appears in the soap message as nil, like this:



So it looks like this field is actually "nillable", bot the WSDL does
not add nillable="true" tag to the field description, as you can see
above.
Is this an issue ? And should I adjust the WSDL (I need the dates set to
null), or maybe this is legal from a formal point of view ?

J.K.

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



Re: [Axis2] How to increase Java Heap Space for my service?

2007-03-13 Thread Jarek Kucypera

Rainer Menzner wrote:


Hi,

my web service reproducibly runs out of Java heap space when I test it 
under high load. It is most probably not a programming error nor is it 
a bug in axis. I'm passing large files which then are processed by the 
request.


Can I increase the heap space when starting the service, maybe by 
adjusting an axis or tomcat configuration file?


Heap size is set in command line when starting jvm instance, it can't be 
controlled
from within a java program. In case of tomcat refer to the 
catalina.bat/sh script you

use to start it and set jvm command line options -Xms and -Xmx.

J.K.

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



Re: how to get custom WSDL during runtime instead of generated WSDL in Axis 2

2007-03-08 Thread Jarek Kucypera

Krishnamoorthy J (HCL Financial Services) wrote:


Hi,

 

What is the option similar to wsdlFile property of service-config.wsdd 
(Axis 1.4) in Axis 2?


 

How to get the custom WSDL file displayed instead of Axis generated 
WSDL in Axis2 1.1.1?


 

Put the wsdl in the META-INF folder of the service, next to the 
services.xml file. Consider also
setting true in 
services.xml, I'm not

sure how exactly it influences the wsdl displayed, but i think it may help.

J.K.


Re: [axis2 1.1.1] my own WSDL

2007-03-05 Thread Jarek Kucypera

Jarek Kucypera wrote:

Ok, I must put following parameter inside the  tag:
true

g-sus, is there any comprehensive documentation of services.xml ?

J.K.


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



Re: Axis2 deploy on Tomcat

2007-03-05 Thread Jarek Kucypera

[EMAIL PROTECTED] wrote:


note The full stack trace of the root cause is available in the Apache To=
mcat/6.0.9 logs.

 



Have you followed this hint ?
My guess - you may lack log4j, but the logs shall tell you what's happening.
And I think the native library has nothing to do with your problem.

J.K.

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



[axis2 1.1.1] my own WSDL

2007-03-05 Thread Jarek Kucypera

I'm trying to create a web service from POJO and my own WSDL -
everything is is ok except one thing: I can't make axis use
the custom WSDL. The WSDL is actually the one automatically
generated by axis itsself with a few minor changes (just some
 sections as for now). I put the WSDL as
META-INF\service(s).wsdl but axis is generating it's own
WSDL all the time. What may go wrong ?

J.K.

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



Re: HTTP Authorization Header

2007-03-02 Thread Jarek Kucypera

Thomas michelbach wrote:


Hi,
 
I'm trying to pass the Authorization header via HTTP.

Is there a way to do that?


Yes there is, set this flag in the authenticator:

auth.setPreemptiveAuthentication(true);

J.K.



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



[Axis2 1.1.1] Parametrizing POJO deployment

2007-02-27 Thread Jarek Kucypera

I created my service from POJO and now I need to parametrize the
resulting sevice and the WSDL: first I need to incject some textual
documentation about complex data types, it's fields and particualr port
types' methods, as wsdl:documentation tags. And second, I want to
influence the "nillable" parameter that axis adds to most of the
structure fields. (How) Can I achieve it with POJO and automatic
WSDL generation ?

And more general question: is there any reference documentation about
services.xml file ? (Except the source axis code ;)

J.K.

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



Re: Web service client authentication

2007-02-16 Thread Jarek Kucypera

Derek Weeks wrote:

This constant does not appear to exist in Axis2 version 1.1 or 1.1.1. 
Should the

constant be one of these?


Following  is how it works for me with axis2 1.1.1

HttpTransportProperties.Authenticator auth = new 
HttpTransportProperties.Authenticator();

auth.setPreemptiveAuthentication(true);
auth.setAuthSchemes(Arrays.asList(new 
String[]{HttpTransportProperties.Authenticator.BASIC}));

auth.setUsername("test_user");
auth.setPassword("test_password");
stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,auth);

J.K.

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



[axis2] Basic authentication (client side)

2007-02-15 Thread Jarek Kucypera

Can somebody please show me a working example of  client
side basic authentication with axis2 1.1.1 ?
Below is my current code (xmlbeans client) which does not work:

HttpTransportProperties.Authenticator auth = new 
HttpTransportProperties.Authenticator();

auth.setUsername("test_user");
auth.setPassword("test_password");
stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,auth); 

stub.ping(); // here a remote method is called, but the Autorization 
http header is not sent


// J.K.

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



wsdl2java issues

2007-02-14 Thread Jarek Kucypera

Hello everyone

I've moved from axis1 to axis2 1.1.1 lately and here are two issues I 
encountered using wsdl2java commandline tool:


1) I fail to generate neither server nor client, when WSDL contains
include statement. To be specific, the WSDL is divided into two parts:
the main one describes ports, bindings and the service and the other
one describes data types, here is some outline of the WSDLs:

main.wsdl:






 ...
 ...
 ...
 ...


types.wsdl

... here type descriptions go


I get the following exception:
"org.apache.axis2.schema.SchemaCompilationException: The referenced
element '...' was not found!"
Both WSDL seems to be correct, as I can generete the stuff, when
I merge the WSDLs into single file AND also - axis1.x handles the
include successfully.

2) Adb databinding fails to generate classes and fields for enums
derived from string. For a schema complex type attribute like this:

 
  
  
 

no field appears in the respcetive Java class generated from the complex
type having this attribute - and no class is generated from the enum
type. Fortunately xmlbeans bindings handles this perfectly - an emum
style Java class is generated and appropriate fields appear.
BTW early versions of axis1 had also problems with such enum ;)
Do the developers follow similar path ? ;)

2a) The generated adb Java class names are just ugly, like this:
xsdtypename_typex for x=1,2,3,... . This is not a
problem but the "_typex"  suffixes are just disturbing.

Has anyone also met those problems ?

Regards,
J.K.

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