You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Christian Ribeaud <ch...@finebrain.com> on 2007/05/26 08:26:31 UTC

HttpClient, PostMethod to SOAP Request

Hi, 

I desperately try to convert a working HttpClient POST method making an
authentication with 'application/soap+xml' as content type into a working
SOAP Request. The 'client' making the authentication is an instance of
org.apache.axis2.transport.SimpleAxis2Server and the link it tries to reach
starts with 'https://'.

The following code works fine:

HttpClient client = new HttpClient();
PostMethod post = new PostMethod(url);
StringRequestEntity entity = new StringRequestEntity(xmlMessage,
"application/soap+xml", "utf-8");
post.setRequestEntity(entity);
client.executeMethod(post);
String response = post.getResponseBodyAsString();

The following does not work:

ServiceClient sender = new ServiceClient();
EndpointReference targetEPR = new EndpointReference(url);
Options options = sender.getOptions();
options.setTo(targetEPR);
options.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP,
false);
options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);

sender.setOptions(options);
XMLStreamReader reader =
XMLInputFactory.newInstance().createXMLStreamReader(new
StringReader(xmlMess
age));
OMElement element = new StAXOMBuilder(reader).getDocumentElement();

OMElement result = sender.sendReceive(element);
OMElement ele = result.getFirstElement();
OMText binaryNode = (OMText) ele.getFirstOMChild();

What am I doing wrong? Any help would be gratefully appreciated. Thanks a
lot,

chris



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Recommendations for a new project?

Posted by Davanum Srinivas <da...@gmail.com>.
md,

Separate xsd's should be ok.

thanks,
dims

On 5/28/07, Michael.Davis@servicecanada.gc.ca
<Mi...@servicecanada.gc.ca> wrote:
> Thanks Davanum, that sounds like a "Yes Yes Yes" to me :-)
>
> One more question: It also feels like it makes sense to factor out the xsd files and include them in the wsdls, mainly to avoid duplication but also to allow the xsds to be reused in other types of applications. Are there any pitfalls to that practice that I'm not anticipating, such as issues with data binding libraries or something?
>
> cheers
> md
>
> > -----Original Message-----
> > From: Davanum Srinivas [mailto:davanum@gmail.com]
> > Sent: Monday, May 28, 2007 3:06 PM
> > To: axis-user@ws.apache.org
> > Subject: Re: Recommendations for a new project?
> >
> >
> > "No No No" :) Please use contract-first.
> >
> > thanks,
> > -- dims
> >
> > On 5/28/07, Michael.Davis@servicecanada.gc.ca
> > <Mi...@servicecanada.gc.ca> wrote:
> > > To me, Contact-First makes perfect sense. I haven't heard
> > the Axis experts say "No No No!" yet, so I figure I'll go with that.
> > >
> > > thanks
> > > md
> > >
> > > > -----Original Message-----
> > > > From: Luis Mariano Luporini [mailto:lluporini@gmail.com]
> > > > Sent: Monday, May 28, 2007 1:17 PM
> > > > To: axis-user@ws.apache.org
> > > > Subject: Re: Recommendations for a new project?
> > > >
> > > >
> > > > Michael:
> > > >
> > > >        I'm having this kind of questions as you stated in
> > your mails.
> > > > And think, probably, the better one would be to go with a
> > > > 'Contract-First' approach to keep the environment
> > controlled when one
> > > > needs to implement features/changes. This way your clients
> > > > will be happy
> > > > to get a consistent WSDL across releases.
> > > >
> > > >        But anyway I would like to hear your points on this.
> > > > Please, let
> > > > know if you come to some conclusions.
> > > >
> > > >        Thanks,
> > > >
> > > > Luis
> > > >
> > > >
> > > > Michael.Davis@servicecanada.gc.ca escribió:
> > > > > Ok, thanks again
> > > > >
> > > > >     -----Original Message-----
> > > > >     *From:* robert lazarski [mailto:robertlazarski@gmail.com]
> > > > >     *Sent:* Monday, May 28, 2007 12:36 PM
> > > > >     *To:* axis-user@ws.apache.org
> > > > >     *Subject:* Re: Recommendations for a new project?
> > > > >
> > > > >     JIBX has its own site and docs - I'd follow those
> > to get on the
> > > > >     right track.
> > > > >
> > > > >     Robert
> > > > >
> > > > >     On 5/28/07, *Michael.Davis@servicecanada.gc.ca
> > > > >     <ma...@servicecanada.gc.ca>*
> > > > >     <Michael.Davis@servicecanada.gc.ca
> > > > >     <ma...@servicecanada.gc.ca>> wrote:
> > > > >
> > > > >         Thanks very much. I am using Hibernate and
> > > > fortunately I have
> > > > >         complete control over the schema, so I'll check
> > out jibx.
> > > > >
> > > > >         So assuming I'm creating my own wsdl and will use
> > > > jibx, would
> > > > >         you generate code using wsdl2java or would you
> > start from
> > > > >         scratch? I suspect that starting from scratch
> > will allow for
> > > > >         cleaner and simpler code in the long run, because as the
> > > > >         number of operations grows then there will be more
> > > > >         opportunities for refactoring code rather than
> > > > having lots of
> > > > >         redundant generated code, am I right?
> > > > >
> > > > >         cheers
> > > > >         md
> > > > >
> > > > >             -----Original Message-----
> > > > >             *From:* robert lazarski
> > [mailto:robertlazarski@gmail.com
> > > > >             <ma...@gmail.com>]
> > > > >             *Sent:* Monday, May 28, 2007 12:18 PM
> > > > >             *To:* axis-user@ws.apache.org
> > > > <ma...@ws.apache.org>
> > > > >             *Subject: *Re: Recommendations for a new project?
> > > > >
> > > > >             From what you say I'd go with ADB
> > databinding, creating
> > > > >             and validating your WSDL via eclipse's WST.
> > If you are
> > > > >             using hibernate / jdo and such, I'd consider
> > > > jibx. If you
> > > > >             have complex schemas out of your control -
> > > > which is often
> > > > >             the case for me - use xmlbeans. Either way,
> > > > starting with
> > > > >             the WSDL for a 'contract first' approach is
> > often a good
> > > > >             choice.
> > > > >
> > > > >             If you've never done single sign on before I
> > > > recommend CAS:
> > > > >
> > > > >             http://www.ja-sig.org/products/cas/
> > > > >
> > > > >             See rampart for ws-security - available for
> > > > axis2 1.1.1 .
> > > > >             Search the archives for questions related to
> > > > soap headers
> > > > >             as the subject comes up frequently.
> > > > >
> > > > >             HTH,
> > > > >             Robert
> > > > >
> > > > >             On 5/28/07, *Michael.Davis@servicecanada.gc.ca
> > > > >
> > > > <ma...@servicecanada.gc.ca>*<Michael.Davis@serv
> > > > icecanada.gc.ca
> > > > >             <ma...@servicecanada.gc.ca>> wrote:
> > > > >
> > > > >                 I forgot to mention, in case it's
> > > > important. I'm using
> > > > >                 axis2 1.1.1, because due to
> > circumstances beyond my
> > > > >                 control, I'm forced to use jdk 1.4.2
> > and WebSphere
> > > > >                 6.1, and I couldn't get axis2 1.2 to
> > work with that
> > > > >                 combination.
> > > > >
> > > > >                 md
> > > > >
> > > > >                 > -----Original Message-----
> > > > >                 > From: Michael.Davis@servicecanada.gc.ca
> > > > >                 <ma...@servicecanada.gc.ca>
> > > > >                 > [mailto:Michael.Davis@servicecanada.gc.ca
> > > > >                 <ma...@servicecanada.gc.ca>]
> > > > >                 > Sent: Monday, May 28, 2007 11:44 AM
> > > > >                 > To: axis-user@ws.apache.org
> > > > >                 <ma...@ws.apache.org>
> > > > >                 > Subject: Recommendations for a new project?
> > > > >                 >
> > > > >                 >
> > > > >                 > Hi,
> > > > >                 >
> > > > >                 > I apologize in advance for a slightly
> > rambling and
> > > > >                 unfocussed
> > > > >                 > request for advice. The short questions
> > > > are: if you are a
> > > > >                 > really experienced Axis user, and are
> > starting a
> > > > >                 brand new
> > > > >                 > project, would you write everything
> > from scratch
> > > > >                 using Axiom?
> > > > >                 > Would you use one of the data binding
> > > > libraries such
> > > > >                 as JiBX?
> > > > >                 > Would you maintain your wsdl/xsd
> > files by hand?
> > > > >                 >
> > > > >                 > Now for the long version:
> > > > >                 >
> > > > >                 > I'm new to Axis and web services, but
> > have been
> > > > >                 programming
> > > > >                 > Java for several years.
> > > > >                 >
> > > > >                 > I'm working on a simple web service that
> > > > provides a
> > > > >                 > single-sign-on for our organization's
> > > > applications.
> > > > >                 The first
> > > > >                 > operation I'm working on is very
> > simple - it just
> > > > >                 takes three
> > > > >                 > strings (user name, password and
> > > > application name) and
> > > > >                 > returns a string containing a list of
> > permissions.
> > > > >                 >
> > > > >                 > It works fine, but I've implemented
> > it using the
> > > > >                 easiest way
> > > > >                 > possible. I just wrote a POJO class
> > with a method
> > > > >                 >
> > > > >                 > String authenticate( String, String, String )
> > > > >                 >
> > > > >                 > and ran Java2Wsdl using the basic
> > > > defaults. I don't
> > > > >                 > explicitly use any of the Axis apis.
> > > > >                 >
> > > > >                 > However, looking to the future, I can see
> > > > where I'll
> > > > >                 > eventually need to take more control, for
> > > > example I might
> > > > >                 > want to manipulate the SOAP headers and/or use
> > > > >                 WS-Security,
> > > > >                 > and I'll probably eventually want to pass
> > > > around more
> > > > >                 > complicated structures than strings.
> > > > >                 >
> > > > >                 > So I'm trying to determine the best
> > strategy. I'm
> > > > >                 slightly
> > > > >                 > bewildered with all of the choices:
> > > > >                 >
> > > > >                 > 1. Should I write the clients and
> > services from
> > > > >                 scratch using
> > > > >                 > the axiom libraries, or generate the stubs and
> > > > >                 skeletons?
> > > > >                 >
> > > > >                 > 2. If I write them from scratch, and
> > > > already have my own
> > > > >                 > model classes (representing such
> > things as users),
> > > > >                 should I
> > > > >                 > use one of the data binding libraries
> > > > such as XMLBeans or
> > > > >                 > JiBX? If so, which one?
> > > > >                 >
> > > > >                 > 3. Should I be maintaining my wsdl file
> > > > (and included
> > > > >                 schema
> > > > >                 > files) by hand (or using an appropriate
> > > > editing tool) in
> > > > >                 > order to maitain control over the various
> > > > types, as
> > > > >                 opposed
> > > > >                 > to generating it using Java2Wsdl
> > every time the
> > > > >                 interface changes?
> > > > >                 >
> > > > >                 > I can see that the Axis developers have
> > > > tried hard to
> > > > >                 provide
> > > > >                 > a spectrum of methods and interfaces from the
> > > > >                 easy/simple to
> > > > >                 > the complex/powerful. But I'd be very
> > > > interested to
> > > > >                 know what
> > > > >                 > methods a really experienced Axis
> > user would use.
> > > > >                 >
> > > > >                 > Many thanks,
> > > > >                 > Michael Davis
> > > > >                 >
> > > > >                 >
> > > >
> > ---------------------------------------------------------------------
> > > > >                 > To unsubscribe, e-mail:
> > > > >                 axis-user-unsubscribe@ws.apache.org
> > > > >                 <ma...@ws.apache.org>
> > > > >                 > For additional commands, e-mail:
> > > > >                 axis-user-help@ws.apache.org
> > > > >                 <ma...@ws.apache.org>
> > > > >                 >
> > > > >                 >
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > >
> > > > >                 To unsubscribe, e-mail:
> > > > >                 axis-user-unsubscribe@ws.apache.org
> > > > >                 <ma...@ws.apache.org>
> > > > >                 For additional commands, e-mail:
> > > > >                 axis-user-help@ws.apache.org
> > > > >                 <ma...@ws.apache.org>
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Davanum Srinivas :: http://davanum.wordpress.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Recommendations for a new project?

Posted by Mi...@servicecanada.gc.ca.
Thanks Davanum, that sounds like a "Yes Yes Yes" to me :-) 

One more question: It also feels like it makes sense to factor out the xsd files and include them in the wsdls, mainly to avoid duplication but also to allow the xsds to be reused in other types of applications. Are there any pitfalls to that practice that I'm not anticipating, such as issues with data binding libraries or something?

cheers
md

> -----Original Message-----
> From: Davanum Srinivas [mailto:davanum@gmail.com]
> Sent: Monday, May 28, 2007 3:06 PM
> To: axis-user@ws.apache.org
> Subject: Re: Recommendations for a new project?
> 
> 
> "No No No" :) Please use contract-first.
> 
> thanks,
> -- dims
> 
> On 5/28/07, Michael.Davis@servicecanada.gc.ca
> <Mi...@servicecanada.gc.ca> wrote:
> > To me, Contact-First makes perfect sense. I haven't heard 
> the Axis experts say "No No No!" yet, so I figure I'll go with that.
> >
> > thanks
> > md
> >
> > > -----Original Message-----
> > > From: Luis Mariano Luporini [mailto:lluporini@gmail.com]
> > > Sent: Monday, May 28, 2007 1:17 PM
> > > To: axis-user@ws.apache.org
> > > Subject: Re: Recommendations for a new project?
> > >
> > >
> > > Michael:
> > >
> > >        I'm having this kind of questions as you stated in 
> your mails.
> > > And think, probably, the better one would be to go with a
> > > 'Contract-First' approach to keep the environment 
> controlled when one
> > > needs to implement features/changes. This way your clients
> > > will be happy
> > > to get a consistent WSDL across releases.
> > >
> > >        But anyway I would like to hear your points on this.
> > > Please, let
> > > know if you come to some conclusions.
> > >
> > >        Thanks,
> > >
> > > Luis
> > >
> > >
> > > Michael.Davis@servicecanada.gc.ca escribió:
> > > > Ok, thanks again
> > > >
> > > >     -----Original Message-----
> > > >     *From:* robert lazarski [mailto:robertlazarski@gmail.com]
> > > >     *Sent:* Monday, May 28, 2007 12:36 PM
> > > >     *To:* axis-user@ws.apache.org
> > > >     *Subject:* Re: Recommendations for a new project?
> > > >
> > > >     JIBX has its own site and docs - I'd follow those 
> to get on the
> > > >     right track.
> > > >
> > > >     Robert
> > > >
> > > >     On 5/28/07, *Michael.Davis@servicecanada.gc.ca
> > > >     <ma...@servicecanada.gc.ca>*
> > > >     <Michael.Davis@servicecanada.gc.ca
> > > >     <ma...@servicecanada.gc.ca>> wrote:
> > > >
> > > >         Thanks very much. I am using Hibernate and
> > > fortunately I have
> > > >         complete control over the schema, so I'll check 
> out jibx.
> > > >
> > > >         So assuming I'm creating my own wsdl and will use
> > > jibx, would
> > > >         you generate code using wsdl2java or would you 
> start from
> > > >         scratch? I suspect that starting from scratch 
> will allow for
> > > >         cleaner and simpler code in the long run, because as the
> > > >         number of operations grows then there will be more
> > > >         opportunities for refactoring code rather than
> > > having lots of
> > > >         redundant generated code, am I right?
> > > >
> > > >         cheers
> > > >         md
> > > >
> > > >             -----Original Message-----
> > > >             *From:* robert lazarski 
> [mailto:robertlazarski@gmail.com
> > > >             <ma...@gmail.com>]
> > > >             *Sent:* Monday, May 28, 2007 12:18 PM
> > > >             *To:* axis-user@ws.apache.org
> > > <ma...@ws.apache.org>
> > > >             *Subject: *Re: Recommendations for a new project?
> > > >
> > > >             From what you say I'd go with ADB 
> databinding, creating
> > > >             and validating your WSDL via eclipse's WST. 
> If you are
> > > >             using hibernate / jdo and such, I'd consider
> > > jibx. If you
> > > >             have complex schemas out of your control -
> > > which is often
> > > >             the case for me - use xmlbeans. Either way,
> > > starting with
> > > >             the WSDL for a 'contract first' approach is 
> often a good
> > > >             choice.
> > > >
> > > >             If you've never done single sign on before I
> > > recommend CAS:
> > > >
> > > >             http://www.ja-sig.org/products/cas/
> > > >
> > > >             See rampart for ws-security - available for
> > > axis2 1.1.1 .
> > > >             Search the archives for questions related to
> > > soap headers
> > > >             as the subject comes up frequently.
> > > >
> > > >             HTH,
> > > >             Robert
> > > >
> > > >             On 5/28/07, *Michael.Davis@servicecanada.gc.ca
> > > >
> > > <ma...@servicecanada.gc.ca>*<Michael.Davis@serv
> > > icecanada.gc.ca
> > > >             <ma...@servicecanada.gc.ca>> wrote:
> > > >
> > > >                 I forgot to mention, in case it's
> > > important. I'm using
> > > >                 axis2 1.1.1, because due to 
> circumstances beyond my
> > > >                 control, I'm forced to use jdk 1.4.2 
> and WebSphere
> > > >                 6.1, and I couldn't get axis2 1.2 to 
> work with that
> > > >                 combination.
> > > >
> > > >                 md
> > > >
> > > >                 > -----Original Message-----
> > > >                 > From: Michael.Davis@servicecanada.gc.ca
> > > >                 <ma...@servicecanada.gc.ca>
> > > >                 > [mailto:Michael.Davis@servicecanada.gc.ca
> > > >                 <ma...@servicecanada.gc.ca>]
> > > >                 > Sent: Monday, May 28, 2007 11:44 AM
> > > >                 > To: axis-user@ws.apache.org
> > > >                 <ma...@ws.apache.org>
> > > >                 > Subject: Recommendations for a new project?
> > > >                 >
> > > >                 >
> > > >                 > Hi,
> > > >                 >
> > > >                 > I apologize in advance for a slightly 
> rambling and
> > > >                 unfocussed
> > > >                 > request for advice. The short questions
> > > are: if you are a
> > > >                 > really experienced Axis user, and are 
> starting a
> > > >                 brand new
> > > >                 > project, would you write everything 
> from scratch
> > > >                 using Axiom?
> > > >                 > Would you use one of the data binding
> > > libraries such
> > > >                 as JiBX?
> > > >                 > Would you maintain your wsdl/xsd 
> files by hand?
> > > >                 >
> > > >                 > Now for the long version:
> > > >                 >
> > > >                 > I'm new to Axis and web services, but 
> have been
> > > >                 programming
> > > >                 > Java for several years.
> > > >                 >
> > > >                 > I'm working on a simple web service that
> > > provides a
> > > >                 > single-sign-on for our organization's
> > > applications.
> > > >                 The first
> > > >                 > operation I'm working on is very 
> simple - it just
> > > >                 takes three
> > > >                 > strings (user name, password and
> > > application name) and
> > > >                 > returns a string containing a list of 
> permissions.
> > > >                 >
> > > >                 > It works fine, but I've implemented 
> it using the
> > > >                 easiest way
> > > >                 > possible. I just wrote a POJO class 
> with a method
> > > >                 >
> > > >                 > String authenticate( String, String, String )
> > > >                 >
> > > >                 > and ran Java2Wsdl using the basic
> > > defaults. I don't
> > > >                 > explicitly use any of the Axis apis.
> > > >                 >
> > > >                 > However, looking to the future, I can see
> > > where I'll
> > > >                 > eventually need to take more control, for
> > > example I might
> > > >                 > want to manipulate the SOAP headers and/or use
> > > >                 WS-Security,
> > > >                 > and I'll probably eventually want to pass
> > > around more
> > > >                 > complicated structures than strings.
> > > >                 >
> > > >                 > So I'm trying to determine the best 
> strategy. I'm
> > > >                 slightly
> > > >                 > bewildered with all of the choices:
> > > >                 >
> > > >                 > 1. Should I write the clients and 
> services from
> > > >                 scratch using
> > > >                 > the axiom libraries, or generate the stubs and
> > > >                 skeletons?
> > > >                 >
> > > >                 > 2. If I write them from scratch, and
> > > already have my own
> > > >                 > model classes (representing such 
> things as users),
> > > >                 should I
> > > >                 > use one of the data binding libraries
> > > such as XMLBeans or
> > > >                 > JiBX? If so, which one?
> > > >                 >
> > > >                 > 3. Should I be maintaining my wsdl file
> > > (and included
> > > >                 schema
> > > >                 > files) by hand (or using an appropriate
> > > editing tool) in
> > > >                 > order to maitain control over the various
> > > types, as
> > > >                 opposed
> > > >                 > to generating it using Java2Wsdl 
> every time the
> > > >                 interface changes?
> > > >                 >
> > > >                 > I can see that the Axis developers have
> > > tried hard to
> > > >                 provide
> > > >                 > a spectrum of methods and interfaces from the
> > > >                 easy/simple to
> > > >                 > the complex/powerful. But I'd be very
> > > interested to
> > > >                 know what
> > > >                 > methods a really experienced Axis 
> user would use.
> > > >                 >
> > > >                 > Many thanks,
> > > >                 > Michael Davis
> > > >                 >
> > > >                 >
> > > 
> ---------------------------------------------------------------------
> > > >                 > To unsubscribe, e-mail:
> > > >                 axis-user-unsubscribe@ws.apache.org
> > > >                 <ma...@ws.apache.org>
> > > >                 > For additional commands, e-mail:
> > > >                 axis-user-help@ws.apache.org
> > > >                 <ma...@ws.apache.org>
> > > >                 >
> > > >                 >
> > > >
> > > >
> > > 
> ---------------------------------------------------------------------
> > > >
> > > >                 To unsubscribe, e-mail:
> > > >                 axis-user-unsubscribe@ws.apache.org
> > > >                 <ma...@ws.apache.org>
> > > >                 For additional commands, e-mail:
> > > >                 axis-user-help@ws.apache.org
> > > >                 <ma...@ws.apache.org>
> > > >
> > > >
> > > >
> > >
> > >
> > > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> 
> -- 
> Davanum Srinivas :: http://davanum.wordpress.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Recommendations for a new project?

Posted by Davanum Srinivas <da...@gmail.com>.
"No No No" :) Please use contract-first.

thanks,
-- dims

On 5/28/07, Michael.Davis@servicecanada.gc.ca
<Mi...@servicecanada.gc.ca> wrote:
> To me, Contact-First makes perfect sense. I haven't heard the Axis experts say "No No No!" yet, so I figure I'll go with that.
>
> thanks
> md
>
> > -----Original Message-----
> > From: Luis Mariano Luporini [mailto:lluporini@gmail.com]
> > Sent: Monday, May 28, 2007 1:17 PM
> > To: axis-user@ws.apache.org
> > Subject: Re: Recommendations for a new project?
> >
> >
> > Michael:
> >
> >        I'm having this kind of questions as you stated in your mails.
> > And think, probably, the better one would be to go with a
> > 'Contract-First' approach to keep the environment controlled when one
> > needs to implement features/changes. This way your clients
> > will be happy
> > to get a consistent WSDL across releases.
> >
> >        But anyway I would like to hear your points on this.
> > Please, let
> > know if you come to some conclusions.
> >
> >        Thanks,
> >
> > Luis
> >
> >
> > Michael.Davis@servicecanada.gc.ca escribió:
> > > Ok, thanks again
> > >
> > >     -----Original Message-----
> > >     *From:* robert lazarski [mailto:robertlazarski@gmail.com]
> > >     *Sent:* Monday, May 28, 2007 12:36 PM
> > >     *To:* axis-user@ws.apache.org
> > >     *Subject:* Re: Recommendations for a new project?
> > >
> > >     JIBX has its own site and docs - I'd follow those to get on the
> > >     right track.
> > >
> > >     Robert
> > >
> > >     On 5/28/07, *Michael.Davis@servicecanada.gc.ca
> > >     <ma...@servicecanada.gc.ca>*
> > >     <Michael.Davis@servicecanada.gc.ca
> > >     <ma...@servicecanada.gc.ca>> wrote:
> > >
> > >         Thanks very much. I am using Hibernate and
> > fortunately I have
> > >         complete control over the schema, so I'll check out jibx.
> > >
> > >         So assuming I'm creating my own wsdl and will use
> > jibx, would
> > >         you generate code using wsdl2java or would you start from
> > >         scratch? I suspect that starting from scratch will allow for
> > >         cleaner and simpler code in the long run, because as the
> > >         number of operations grows then there will be more
> > >         opportunities for refactoring code rather than
> > having lots of
> > >         redundant generated code, am I right?
> > >
> > >         cheers
> > >         md
> > >
> > >             -----Original Message-----
> > >             *From:* robert lazarski [mailto:robertlazarski@gmail.com
> > >             <ma...@gmail.com>]
> > >             *Sent:* Monday, May 28, 2007 12:18 PM
> > >             *To:* axis-user@ws.apache.org
> > <ma...@ws.apache.org>
> > >             *Subject: *Re: Recommendations for a new project?
> > >
> > >             From what you say I'd go with ADB databinding, creating
> > >             and validating your WSDL via eclipse's WST. If you are
> > >             using hibernate / jdo and such, I'd consider
> > jibx. If you
> > >             have complex schemas out of your control -
> > which is often
> > >             the case for me - use xmlbeans. Either way,
> > starting with
> > >             the WSDL for a 'contract first' approach is often a good
> > >             choice.
> > >
> > >             If you've never done single sign on before I
> > recommend CAS:
> > >
> > >             http://www.ja-sig.org/products/cas/
> > >
> > >             See rampart for ws-security - available for
> > axis2 1.1.1 .
> > >             Search the archives for questions related to
> > soap headers
> > >             as the subject comes up frequently.
> > >
> > >             HTH,
> > >             Robert
> > >
> > >             On 5/28/07, *Michael.Davis@servicecanada.gc.ca
> > >
> > <ma...@servicecanada.gc.ca>*<Michael.Davis@serv
> > icecanada.gc.ca
> > >             <ma...@servicecanada.gc.ca>> wrote:
> > >
> > >                 I forgot to mention, in case it's
> > important. I'm using
> > >                 axis2 1.1.1, because due to circumstances beyond my
> > >                 control, I'm forced to use jdk 1.4.2 and WebSphere
> > >                 6.1, and I couldn't get axis2 1.2 to work with that
> > >                 combination.
> > >
> > >                 md
> > >
> > >                 > -----Original Message-----
> > >                 > From: Michael.Davis@servicecanada.gc.ca
> > >                 <ma...@servicecanada.gc.ca>
> > >                 > [mailto:Michael.Davis@servicecanada.gc.ca
> > >                 <ma...@servicecanada.gc.ca>]
> > >                 > Sent: Monday, May 28, 2007 11:44 AM
> > >                 > To: axis-user@ws.apache.org
> > >                 <ma...@ws.apache.org>
> > >                 > Subject: Recommendations for a new project?
> > >                 >
> > >                 >
> > >                 > Hi,
> > >                 >
> > >                 > I apologize in advance for a slightly rambling and
> > >                 unfocussed
> > >                 > request for advice. The short questions
> > are: if you are a
> > >                 > really experienced Axis user, and are starting a
> > >                 brand new
> > >                 > project, would you write everything from scratch
> > >                 using Axiom?
> > >                 > Would you use one of the data binding
> > libraries such
> > >                 as JiBX?
> > >                 > Would you maintain your wsdl/xsd files by hand?
> > >                 >
> > >                 > Now for the long version:
> > >                 >
> > >                 > I'm new to Axis and web services, but have been
> > >                 programming
> > >                 > Java for several years.
> > >                 >
> > >                 > I'm working on a simple web service that
> > provides a
> > >                 > single-sign-on for our organization's
> > applications.
> > >                 The first
> > >                 > operation I'm working on is very simple - it just
> > >                 takes three
> > >                 > strings (user name, password and
> > application name) and
> > >                 > returns a string containing a list of permissions.
> > >                 >
> > >                 > It works fine, but I've implemented it using the
> > >                 easiest way
> > >                 > possible. I just wrote a POJO class with a method
> > >                 >
> > >                 > String authenticate( String, String, String )
> > >                 >
> > >                 > and ran Java2Wsdl using the basic
> > defaults. I don't
> > >                 > explicitly use any of the Axis apis.
> > >                 >
> > >                 > However, looking to the future, I can see
> > where I'll
> > >                 > eventually need to take more control, for
> > example I might
> > >                 > want to manipulate the SOAP headers and/or use
> > >                 WS-Security,
> > >                 > and I'll probably eventually want to pass
> > around more
> > >                 > complicated structures than strings.
> > >                 >
> > >                 > So I'm trying to determine the best strategy. I'm
> > >                 slightly
> > >                 > bewildered with all of the choices:
> > >                 >
> > >                 > 1. Should I write the clients and services from
> > >                 scratch using
> > >                 > the axiom libraries, or generate the stubs and
> > >                 skeletons?
> > >                 >
> > >                 > 2. If I write them from scratch, and
> > already have my own
> > >                 > model classes (representing such things as users),
> > >                 should I
> > >                 > use one of the data binding libraries
> > such as XMLBeans or
> > >                 > JiBX? If so, which one?
> > >                 >
> > >                 > 3. Should I be maintaining my wsdl file
> > (and included
> > >                 schema
> > >                 > files) by hand (or using an appropriate
> > editing tool) in
> > >                 > order to maitain control over the various
> > types, as
> > >                 opposed
> > >                 > to generating it using Java2Wsdl every time the
> > >                 interface changes?
> > >                 >
> > >                 > I can see that the Axis developers have
> > tried hard to
> > >                 provide
> > >                 > a spectrum of methods and interfaces from the
> > >                 easy/simple to
> > >                 > the complex/powerful. But I'd be very
> > interested to
> > >                 know what
> > >                 > methods a really experienced Axis user would use.
> > >                 >
> > >                 > Many thanks,
> > >                 > Michael Davis
> > >                 >
> > >                 >
> > ---------------------------------------------------------------------
> > >                 > To unsubscribe, e-mail:
> > >                 axis-user-unsubscribe@ws.apache.org
> > >                 <ma...@ws.apache.org>
> > >                 > For additional commands, e-mail:
> > >                 axis-user-help@ws.apache.org
> > >                 <ma...@ws.apache.org>
> > >                 >
> > >                 >
> > >
> > >
> > ---------------------------------------------------------------------
> > >
> > >                 To unsubscribe, e-mail:
> > >                 axis-user-unsubscribe@ws.apache.org
> > >                 <ma...@ws.apache.org>
> > >                 For additional commands, e-mail:
> > >                 axis-user-help@ws.apache.org
> > >                 <ma...@ws.apache.org>
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Can't run axiom client - error in ServiceClient constructor

Posted by Mi...@servicecanada.gc.ca.
Thanks, that was it. I also had to add wsdl.jar and commons-codec.jar, but those were really easy to find because I was getting ClassNotFound errors rather than "No valid ObjectCreator found."

It works!

cheers
md

> -----Original Message-----
> From: Davanum Srinivas [mailto:davanum@gmail.com]
> Sent: Wednesday, May 30, 2007 4:14 PM
> To: axis-user@ws.apache.org
> Subject: Re: Can't run axiom client - error in ServiceClient 
> constructor
> 
> 
> Yes, woodstox jar. that's the stax implementation.
> 
> thanks,
> dims
> 
> On 5/30/07, Michael.Davis@servicecanada.gc.ca
> <Mi...@servicecanada.gc.ca> wrote:
> > Hi,
> >
> > I'm trying to call a web service using the axiom apis. When 
> I try to execute this line:
> >
> > ServiceClient sender = new ServiceClient();
> >
> > I get this error:
> > java.lang.IllegalStateException: No valid ObjectCreator found.
> >         at 
> org.apache.axiom.om.util.StAXUtils$Pool.<init>(StAXUtils.java:41)
> >         at 
> org.apache.axiom.om.util.StAXUtils.<clinit>(StAXUtils.java:62)
> >
> > I've listed the whole stack trace below. Could it be that 
> I'm missing a library?
> >
> > Here's the list of libraries I'm using:
> > axiom-api-1.2.4.jar
> > axiom-dom-1.2.4.jar
> > axiom-impl-1.2.4.jar
> > axis2-jibx-1.2.jar
> > axis2-kernel-1.2.jar
> > axis2-soapmonitor-1.2.jar
> > axis2-spring-1.2.jar
> > axis2-tools-1.2.jar
> > commons-httpclient-3.0.1.ja
> > commons-logging-1.1.jar
> > jibx-bind-1.1.4.jar
> > jibx-run-1.1.4.jar
> > log4j-1.2.12.jar
> > neethi-2.0.1.jar
> > servletapi-2.3.jar
> > stax-api-1.0.1.jar
> > stax-utils-20060915.jar
> > xml-apis-1.3.03.jar
> > XmlSchema-1.3.1.jar
> >
> > and here's the stack trace:
> >
> > Exception in thread "main" java.lang.ExceptionInInitializerError
> >         at 
> org.apache.axis2.deployment.DescriptionBuilder.buildOM(Descrip
> tionBuilder.java:86)
> >         at 
> org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(A
> xisConfigBuilder.java:58)
> >         at 
> org.apache.axis2.deployment.DeploymentEngine.populateAxisConfi
> guration(DeploymentEngine.java:690)
> >         at 
> org.apache.axis2.deployment.FileSystemConfigurator.getAxisConf
> iguration(FileSystemConfigurator.java:109)
> >         at 
> org.apache.axis2.context.ConfigurationContextFactory.createCon
> figurationContext(ConfigurationContextFactory.java:61)
> >         at 
> org.apache.axis2.context.ConfigurationContextFactory.createCon
> figurationContextFromFileSystem(ConfigurationContextFactory.java:180)
> >         at 
> org.apache.axis2.client.ServiceClient.initializeTransports(Ser
> viceClient.java:189)
> >         at 
> org.apache.axis2.client.ServiceClient.configureServiceClient(S
> erviceClient.java:118)
> >         at 
> org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:114)
> >         at 
> org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:207)
> >         at 
> ca.gc.publiservice.sso.client.SSOImpl.authenticate(SSOImpl.java:57)
> >         at 
> ca.gc.publiservice.sso.client.SSOImpl.main(SSOImpl.java:75)
> > Caused by: java.lang.IllegalStateException: No valid 
> ObjectCreator found.
> >         at 
> org.apache.axiom.om.util.StAXUtils$Pool.<init>(StAXUtils.java:41)
> >         at 
> org.apache.axiom.om.util.StAXUtils.<clinit>(StAXUtils.java:62)
> >         ... 12 more
> >
> > The code throwing the exception is here:
> >
> >        Pool(ObjectCreator[] creators) {
> >             ObjectCreator oc = null;
> >             for (int i = 0; i < creators.length; i++) {
> >                 try {
> >                     creators[i].newObject();
> >                     oc = creators[i];
> >                     break;
> >                 } catch (Throwable t) {
> >                     // Ignore me
> >                 }
> >             }
> >             if (oc == null) {
> >                 throw new IllegalStateException("No valid 
> ObjectCreator found.");
> >             }
> >             objectCreator = oc;
> >         }
> >
> > Thanks very much,
> >
> > Michael Davis
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> 
> -- 
> Davanum Srinivas :: http://davanum.wordpress.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Can't run axiom client - error in ServiceClient constructor

Posted by Davanum Srinivas <da...@gmail.com>.
Yes, woodstox jar. that's the stax implementation.

thanks,
dims

On 5/30/07, Michael.Davis@servicecanada.gc.ca
<Mi...@servicecanada.gc.ca> wrote:
> Hi,
>
> I'm trying to call a web service using the axiom apis. When I try to execute this line:
>
> ServiceClient sender = new ServiceClient();
>
> I get this error:
> java.lang.IllegalStateException: No valid ObjectCreator found.
>         at org.apache.axiom.om.util.StAXUtils$Pool.<init>(StAXUtils.java:41)
>         at org.apache.axiom.om.util.StAXUtils.<clinit>(StAXUtils.java:62)
>
> I've listed the whole stack trace below. Could it be that I'm missing a library?
>
> Here's the list of libraries I'm using:
> axiom-api-1.2.4.jar
> axiom-dom-1.2.4.jar
> axiom-impl-1.2.4.jar
> axis2-jibx-1.2.jar
> axis2-kernel-1.2.jar
> axis2-soapmonitor-1.2.jar
> axis2-spring-1.2.jar
> axis2-tools-1.2.jar
> commons-httpclient-3.0.1.ja
> commons-logging-1.1.jar
> jibx-bind-1.1.4.jar
> jibx-run-1.1.4.jar
> log4j-1.2.12.jar
> neethi-2.0.1.jar
> servletapi-2.3.jar
> stax-api-1.0.1.jar
> stax-utils-20060915.jar
> xml-apis-1.3.03.jar
> XmlSchema-1.3.1.jar
>
> and here's the stack trace:
>
> Exception in thread "main" java.lang.ExceptionInInitializerError
>         at org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:86)
>         at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:58)
>         at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:690)
>         at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:109)
>         at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:61)
>         at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:180)
>         at org.apache.axis2.client.ServiceClient.initializeTransports(ServiceClient.java:189)
>         at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:118)
>         at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:114)
>         at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:207)
>         at ca.gc.publiservice.sso.client.SSOImpl.authenticate(SSOImpl.java:57)
>         at ca.gc.publiservice.sso.client.SSOImpl.main(SSOImpl.java:75)
> Caused by: java.lang.IllegalStateException: No valid ObjectCreator found.
>         at org.apache.axiom.om.util.StAXUtils$Pool.<init>(StAXUtils.java:41)
>         at org.apache.axiom.om.util.StAXUtils.<clinit>(StAXUtils.java:62)
>         ... 12 more
>
> The code throwing the exception is here:
>
>        Pool(ObjectCreator[] creators) {
>             ObjectCreator oc = null;
>             for (int i = 0; i < creators.length; i++) {
>                 try {
>                     creators[i].newObject();
>                     oc = creators[i];
>                     break;
>                 } catch (Throwable t) {
>                     // Ignore me
>                 }
>             }
>             if (oc == null) {
>                 throw new IllegalStateException("No valid ObjectCreator found.");
>             }
>             objectCreator = oc;
>         }
>
> Thanks very much,
>
> Michael Davis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: OMElement wsdl mapping

Posted by Rich Adili <Ri...@xata.com>.
I think it's legit. "anyType" in this context means "arbitrary XML can
appear here".  It's not AXIOM-specific.

Rich

 

________________________________

From: LuCa [mailto:lucamara@ebicalho.com.br] 
Sent: Tuesday, May 29, 2007 2:31 PM
To: axis-user@ws.apache.org
Subject: OMElement wsdl mapping

 

Can anyone explain me, why when generating a wsdl from a java code
(java2wsdl), 
Axis map the object type OMElement to "anytype" at the wsdl?

Example:
        The method at the service java class source:

                 public abstract OMElement getModelSolved(OMElement
documentElement,String filename);
        
        The wsdl type generated:
         < xs:element name = "getModelSolved" >
                 < xs:complexType >
                          < xs:sequence >
                                   < xs:element name = "param0" nillable
= "true" type = "xs:anyType" />
                                   < xs:element name = "param1" nillable
= "true" type = "xs:string" />
                          </ xs:sequence >
                 </ xs:complexType >
         </ xs:element >

It does not look like "ideal" for the concept of webService:  
One, when making a client, may not use Axis, so, how would he knows that
"anytype"  is about an Axiom type???

Thanks in advance,
Luciana

--------------------------------------------------------------------- To
unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional
commands, e-mail: axis-user-help@ws.apache.org

RE: Recommendations for a new project?

Posted by Mi...@servicecanada.gc.ca.
Thanks very much. I also appreciated the links to the articles on your website.

cheers
Michael

> -----Original Message-----
> From: Dennis Sosnoski [mailto:dms@sosnoski.com]
> Sent: Tuesday, May 29, 2007 7:02 PM
> To: axis-user@ws.apache.org
> Subject: Re: Recommendations for a new project?
> 
> 
> No, Jibx2Wsdl works fine with 1.4.x code and JVMs. The 
> support for Java 
> 5 features is strictly optional, and just means that if you 
> *are* using 
> these features Jibx2Wsdl will make use of the added information.
> 
> -- 
> Dennis M. Sosnoski
> SOA and Web Services in Java
> Axis2 Training and Consulting
> http://www.sosnoski.com - http://www.sosnoski.co.nz
> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
> 
> 
> Michael.Davis@servicecanada.gc.ca wrote:
> > Thanks Dennis,
> >
> > That's very helpful. I looked up jibx2wsdl, and found that 
> it "has support for Java 5 enumerations and generic 
> collections". Does that mean that Java 5 is required? I have 
> to stick with Java 1.4.2 for now because working for the 
> Canadian government means working amongst glaciers and dinosaurs!
> >
> > cheers
> > md
> >
> >   
> >> -----Original Message-----
> >> From: Dennis Sosnoski [mailto:dms@sosnoski.com]
> >> Sent: Tuesday, May 29, 2007 3:16 PM
> >> To: axis-user@ws.apache.org
> >> Subject: Re: Recommendations for a new project?
> >>
> >>
> >> Hi Michael,
> >>
> >> There are no magic bullets when it comes to doing WSDL. 
> >> Contract-first 
> >> is great in theory, and is pretty much the only way to do 
> things in 
> >> cases where you're dealing with different groups in 
> >> developing services 
> >> to be used organization wide. However, the tools that are 
> >> available to 
> >> support editing WSDLs and schemas are really very 
> primitive, and you 
> >> need to have a good understanding of what you're doing in 
> >> order to make 
> >> effective use of these tools. For WSDL this isn't too bad, 
> >> but schema is 
> >> very complex and has a steep learning curve. So if you want to do 
> >> contract-first development correctly, expect to spend a 
> >> couple of weeks 
> >> on researching and learning the basics of schema beforehand.
> >>
> >> Think of it this way - would you sign a contract that was 
> >> written in a 
> >> language you couldn't read, under the legal system of a 
> country you 
> >> weren't familiar with? If the answer is "no", then you should 
> >> expect to 
> >> have to learn WSDL and schema regardless of whether you're using 
> >> "contract-first" or "code-first" service development.
> >>
> >> There's a lot of confusion over just what is meant by 
> code-first vs. 
> >> contract-first development. I saw a recent posting on this 
> list that 
> >> pointed at the Spring (mis)information on this topic, which 
> >> assumed that 
> >> code-first meant the WSDL and schema was effectively 
> always generated 
> >> on-the-fly from the current code, so that any time the code 
> >> changed the 
> >> WSDL and schema would also change. That's effectively what 
> >> was done by 
> >> the deprecated rpc/enc style of SOAP, and I agree completely 
> >> that this 
> >> is unworkable for any serious enterprise use.
> >>
> >> I'd define code-first differently, to say that it means you 
> >> start with 
> >> template code and use that to generate a WSDL and schema 
> definition, 
> >> which can then be used directly or modified as appropriate. 
> >> But whether 
> >> used directly or modified, what you end up with is a WSDL 
> and schema 
> >> that are "fixed" definitions for the service (meaning that 
> >> they are part 
> >> of the service contract, and changing these becomes a service 
> >> versioning 
> >> issue). Based on what I've seen this is actually the approach 
> >> used for 
> >> the majority of real-world web service development. The 
> >> Jibx2Wsdl tool 
> >> (http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/jibx2wsdl) is 
> >> designed around this principle, and if you're considering 
> >> using JiBX you 
> >> may want to look into using the tool since it handles JiBX binding 
> >> generation, as well as WSDL and schema generation, from 
> >> existing code. 
> >> The current version of the tool is an early release, and I 
> >> expect do an 
> >> update within the next week.
> >>
> >>   - Dennis
> >>
> >> -- 
> >> Dennis M. Sosnoski
> >> SOA and Web Services in Java
> >> Axis2 Training and Consulting
> >> http://www.sosnoski.com - http://www.sosnoski.co.nz
> >> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
> >>
> >>
> >>
> >> Michael.Davis@servicecanada.gc.ca wrote:
> >>     
> >>> To me, Contact-First makes perfect sense. I haven't heard 
> >>>       
> >> the Axis experts say "No No No!" yet, so I figure I'll go 
> with that.
> >>     
> >>> thanks
> >>> md
> >>>
> >>>   
> >>>       
> >>>> -----Original Message-----
> >>>> From: Luis Mariano Luporini [mailto:lluporini@gmail.com]
> >>>> Sent: Monday, May 28, 2007 1:17 PM
> >>>> To: axis-user@ws.apache.org
> >>>> Subject: Re: Recommendations for a new project?
> >>>>
> >>>>
> >>>> Michael:
> >>>>
> >>>>        I'm having this kind of questions as you stated in 
> >>>>         
> >> your mails.
> >>     
> >>>> And think, probably, the better one would be to go with a
> >>>> 'Contract-First' approach to keep the environment 
> >>>>         
> >> controlled when one
> >>     
> >>>> needs to implement features/changes. This way your clients 
> >>>> will be happy
> >>>> to get a consistent WSDL across releases.
> >>>>
> >>>>        But anyway I would like to hear your points on this. 
> >>>> Please, let
> >>>> know if you come to some conclusions.
> >>>>
> >>>>        Thanks,
> >>>>
> >>>> Luis
> >>>>
> >>>>
> >>>> Michael.Davis@servicecanada.gc.ca escribió:
> >>>>     
> >>>>         
> >>>>> Ok, thanks again
> >>>>>
> >>>>>     -----Original Message-----
> >>>>>     *From:* robert lazarski [mailto:robertlazarski@gmail.com]
> >>>>>     *Sent:* Monday, May 28, 2007 12:36 PM
> >>>>>     *To:* axis-user@ws.apache.org
> >>>>>     *Subject:* Re: Recommendations for a new project?
> >>>>>
> >>>>>     JIBX has its own site and docs - I'd follow those to 
> >>>>>           
> >> get on the
> >>     
> >>>>>     right track.
> >>>>>
> >>>>>     Robert
> >>>>>
> >>>>>     On 5/28/07, *Michael.Davis@servicecanada.gc.ca
> >>>>>     <ma...@servicecanada.gc.ca>*
> >>>>>     <Michael.Davis@servicecanada.gc.ca
> >>>>>     <ma...@servicecanada.gc.ca>> wrote:
> >>>>>
> >>>>>         Thanks very much. I am using Hibernate and 
> >>>>>       
> >>>>>           
> >>>> fortunately I have
> >>>>     
> >>>>         
> >>>>>         complete control over the schema, so I'll check 
> out jibx.
> >>>>>          
> >>>>>         So assuming I'm creating my own wsdl and will use 
> >>>>>       
> >>>>>           
> >>>> jibx, would
> >>>>     
> >>>>         
> >>>>>         you generate code using wsdl2java or would you 
> start from
> >>>>>         scratch? I suspect that starting from scratch 
> >>>>>           
> >> will allow for
> >>     
> >>>>>         cleaner and simpler code in the long run, because as the
> >>>>>         number of operations grows then there will be more
> >>>>>         opportunities for refactoring code rather than 
> >>>>>       
> >>>>>           
> >>>> having lots of
> >>>>     
> >>>>         
> >>>>>         redundant generated code, am I right?
> >>>>>          
> >>>>>         cheers
> >>>>>         md
> >>>>>
> >>>>>             -----Original Message-----
> >>>>>             *From:* robert lazarski 
> >>>>>           
> >> [mailto:robertlazarski@gmail.com
> >>     
> >>>>>             <ma...@gmail.com>]
> >>>>>             *Sent:* Monday, May 28, 2007 12:18 PM
> >>>>>             *To:* axis-user@ws.apache.org 
> >>>>>       
> >>>>>           
> >>>> <ma...@ws.apache.org>
> >>>>     
> >>>>         
> >>>>>             *Subject: *Re: Recommendations for a new project?
> >>>>>
> >>>>>             From what you say I'd go with ADB 
> >>>>>           
> >> databinding, creating
> >>     
> >>>>>             and validating your WSDL via eclipse's WST. 
> If you are
> >>>>>             using hibernate / jdo and such, I'd consider 
> >>>>>       
> >>>>>           
> >>>> jibx. If you
> >>>>     
> >>>>         
> >>>>>             have complex schemas out of your control - 
> >>>>>       
> >>>>>           
> >>>> which is often
> >>>>     
> >>>>         
> >>>>>             the case for me - use xmlbeans. Either way, 
> >>>>>       
> >>>>>           
> >>>> starting with
> >>>>     
> >>>>         
> >>>>>             the WSDL for a 'contract first' approach is 
> >>>>>           
> >> often a good
> >>     
> >>>>>             choice.
> >>>>>
> >>>>>             If you've never done single sign on before I 
> >>>>>       
> >>>>>           
> >>>> recommend CAS:
> >>>>     
> >>>>         
> >>>>>             http://www.ja-sig.org/products/cas/
> >>>>>
> >>>>>             See rampart for ws-security - available for 
> >>>>>       
> >>>>>           
> >>>> axis2 1.1.1 .
> >>>>     
> >>>>         
> >>>>>             Search the archives for questions related to 
> >>>>>       
> >>>>>           
> >>>> soap headers
> >>>>     
> >>>>         
> >>>>>             as the subject comes up frequently.
> >>>>>
> >>>>>             HTH,
> >>>>>             Robert
> >>>>>
> >>>>>             On 5/28/07, *Michael.Davis@servicecanada.gc.ca
> >>>>>             
> >>>>>       
> >>>>>           
> >>>> <ma...@servicecanada.gc.ca>*<Michael.Davis@serv
> >>>> icecanada.gc.ca
> >>>>     
> >>>>         
> >>>>>             <ma...@servicecanada.gc.ca>> wrote:
> >>>>>
> >>>>>                 I forgot to mention, in case it's 
> >>>>>       
> >>>>>           
> >>>> important. I'm using
> >>>>     
> >>>>         
> >>>>>                 axis2 1.1.1, because due to circumstances 
> >>>>>           
> >> beyond my
> >>     
> >>>>>                 control, I'm forced to use jdk 1.4.2 
> and WebSphere
> >>>>>                 6.1, and I couldn't get axis2 1.2 to work 
> >>>>>           
> >> with that
> >>     
> >>>>>                 combination.
> >>>>>
> >>>>>                 md
> >>>>>
> >>>>>                 > -----Original Message-----
> >>>>>                 > From: Michael.Davis@servicecanada.gc.ca
> >>>>>                 <ma...@servicecanada.gc.ca>
> >>>>>                 > [mailto:Michael.Davis@servicecanada.gc.ca
> >>>>>                 <ma...@servicecanada.gc.ca>]
> >>>>>                 > Sent: Monday, May 28, 2007 11:44 AM
> >>>>>                 > To: axis-user@ws.apache.org
> >>>>>                 <ma...@ws.apache.org>
> >>>>>                 > Subject: Recommendations for a new project?
> >>>>>                 >
> >>>>>                 >
> >>>>>                 > Hi,
> >>>>>                 >
> >>>>>                 > I apologize in advance for a slightly 
> >>>>>           
> >> rambling and
> >>     
> >>>>>                 unfocussed
> >>>>>                 > request for advice. The short questions 
> >>>>>       
> >>>>>           
> >>>> are: if you are a
> >>>>     
> >>>>         
> >>>>>                 > really experienced Axis user, and are 
> starting a
> >>>>>                 brand new
> >>>>>                 > project, would you write everything 
> from scratch
> >>>>>                 using Axiom?
> >>>>>                 > Would you use one of the data binding 
> >>>>>       
> >>>>>           
> >>>> libraries such
> >>>>     
> >>>>         
> >>>>>                 as JiBX?
> >>>>>                 > Would you maintain your wsdl/xsd 
> files by hand?
> >>>>>                 >
> >>>>>                 > Now for the long version:
> >>>>>                 >
> >>>>>                 > I'm new to Axis and web services, but 
> have been
> >>>>>                 programming
> >>>>>                 > Java for several years.
> >>>>>                 >
> >>>>>                 > I'm working on a simple web service that 
> >>>>>       
> >>>>>           
> >>>> provides a
> >>>>     
> >>>>         
> >>>>>                 > single-sign-on for our organization's 
> >>>>>       
> >>>>>           
> >>>> applications.
> >>>>     
> >>>>         
> >>>>>                 The first
> >>>>>                 > operation I'm working on is very simple 
> >>>>>           
> >> - it just
> >>     
> >>>>>                 takes three
> >>>>>                 > strings (user name, password and 
> >>>>>       
> >>>>>           
> >>>> application name) and
> >>>>     
> >>>>         
> >>>>>                 > returns a string containing a list of 
> >>>>>           
> >> permissions.
> >>     
> >>>>>                 >
> >>>>>                 > It works fine, but I've implemented 
> it using the
> >>>>>                 easiest way
> >>>>>                 > possible. I just wrote a POJO class 
> >>>>>           
> >> with a method
> >>     
> >>>>>                 >
> >>>>>                 > String authenticate( String, String, String )
> >>>>>                 >
> >>>>>                 > and ran Java2Wsdl using the basic 
> >>>>>       
> >>>>>           
> >>>> defaults. I don't
> >>>>     
> >>>>         
> >>>>>                 > explicitly use any of the Axis apis.
> >>>>>                 >
> >>>>>                 > However, looking to the future, I can see 
> >>>>>       
> >>>>>           
> >>>> where I'll
> >>>>     
> >>>>         
> >>>>>                 > eventually need to take more control, for 
> >>>>>       
> >>>>>           
> >>>> example I might
> >>>>     
> >>>>         
> >>>>>                 > want to manipulate the SOAP headers and/or use
> >>>>>                 WS-Security,
> >>>>>                 > and I'll probably eventually want to pass 
> >>>>>       
> >>>>>           
> >>>> around more
> >>>>     
> >>>>         
> >>>>>                 > complicated structures than strings.
> >>>>>                 >
> >>>>>                 > So I'm trying to determine the best 
> >>>>>           
> >> strategy. I'm
> >>     
> >>>>>                 slightly
> >>>>>                 > bewildered with all of the choices:
> >>>>>                 >
> >>>>>                 > 1. Should I write the clients and 
> services from
> >>>>>                 scratch using
> >>>>>                 > the axiom libraries, or generate the stubs and
> >>>>>                 skeletons?
> >>>>>                 >
> >>>>>                 > 2. If I write them from scratch, and 
> >>>>>       
> >>>>>           
> >>>> already have my own
> >>>>     
> >>>>         
> >>>>>                 > model classes (representing such things 
> >>>>>           
> >> as users),
> >>     
> >>>>>                 should I
> >>>>>                 > use one of the data binding libraries 
> >>>>>       
> >>>>>           
> >>>> such as XMLBeans or
> >>>>     
> >>>>         
> >>>>>                 > JiBX? If so, which one?
> >>>>>                 >
> >>>>>                 > 3. Should I be maintaining my wsdl file 
> >>>>>       
> >>>>>           
> >>>> (and included
> >>>>     
> >>>>         
> >>>>>                 schema
> >>>>>                 > files) by hand (or using an appropriate 
> >>>>>       
> >>>>>           
> >>>> editing tool) in
> >>>>     
> >>>>         
> >>>>>                 > order to maitain control over the various 
> >>>>>       
> >>>>>           
> >>>> types, as
> >>>>     
> >>>>         
> >>>>>                 opposed
> >>>>>                 > to generating it using Java2Wsdl 
> every time the
> >>>>>                 interface changes?
> >>>>>                 >
> >>>>>                 > I can see that the Axis developers have 
> >>>>>       
> >>>>>           
> >>>> tried hard to
> >>>>     
> >>>>         
> >>>>>                 provide
> >>>>>                 > a spectrum of methods and interfaces from the
> >>>>>                 easy/simple to
> >>>>>                 > the complex/powerful. But I'd be very 
> >>>>>       
> >>>>>           
> >>>> interested to
> >>>>     
> >>>>         
> >>>>>                 know what
> >>>>>                 > methods a really experienced Axis user 
> >>>>>           
> >> would use.
> >>     
> >>>>>                 >
> >>>>>                 > Many thanks,
> >>>>>                 > Michael Davis
> >>>>>                 >
> >>>>>                 > 
> >>>>>       
> >>>>>           
> >> 
> ---------------------------------------------------------------------
> >>     
> >>>>     
> >>>>         
> >>>>>                 > To unsubscribe, e-mail:
> >>>>>                 axis-user-unsubscribe@ws.apache.org
> >>>>>                 <ma...@ws.apache.org>
> >>>>>                 > For additional commands, e-mail:
> >>>>>                 axis-user-help@ws.apache.org
> >>>>>                 <ma...@ws.apache.org>
> >>>>>                 >
> >>>>>                 >
> >>>>>
> >>>>>                 
> >>>>>       
> >>>>>           
> >> 
> ---------------------------------------------------------------------
> >>     
> >>>>     
> >>>>         
> >>>>>                 To unsubscribe, e-mail:
> >>>>>                 axis-user-unsubscribe@ws.apache.org
> >>>>>                 <ma...@ws.apache.org>
> >>>>>                 For additional commands, e-mail:
> >>>>>                 axis-user-help@ws.apache.org
> >>>>>                 <ma...@ws.apache.org>
> >>>>>
> >>>>>
> >>>>>
> >>>>>       
> >>>>>           
> >> 
> ---------------------------------------------------------------------
> >>     
> >>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >>>> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>>>
> >>>>
> >>>>     
> >>>>         
> >>>       
> >> 
> ---------------------------------------------------------------------
> >>     
> >>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >>> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>>
> >>>   
> >>>       
> >> 
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> >>     
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Recommendations for a new project?

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
No, Jibx2Wsdl works fine with 1.4.x code and JVMs. The support for Java 
5 features is strictly optional, and just means that if you *are* using 
these features Jibx2Wsdl will make use of the added information.

-- 
Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117


Michael.Davis@servicecanada.gc.ca wrote:
> Thanks Dennis,
>
> That's very helpful. I looked up jibx2wsdl, and found that it "has support for Java 5 enumerations and generic collections". Does that mean that Java 5 is required? I have to stick with Java 1.4.2 for now because working for the Canadian government means working amongst glaciers and dinosaurs!
>
> cheers
> md
>
>   
>> -----Original Message-----
>> From: Dennis Sosnoski [mailto:dms@sosnoski.com]
>> Sent: Tuesday, May 29, 2007 3:16 PM
>> To: axis-user@ws.apache.org
>> Subject: Re: Recommendations for a new project?
>>
>>
>> Hi Michael,
>>
>> There are no magic bullets when it comes to doing WSDL. 
>> Contract-first 
>> is great in theory, and is pretty much the only way to do things in 
>> cases where you're dealing with different groups in 
>> developing services 
>> to be used organization wide. However, the tools that are 
>> available to 
>> support editing WSDLs and schemas are really very primitive, and you 
>> need to have a good understanding of what you're doing in 
>> order to make 
>> effective use of these tools. For WSDL this isn't too bad, 
>> but schema is 
>> very complex and has a steep learning curve. So if you want to do 
>> contract-first development correctly, expect to spend a 
>> couple of weeks 
>> on researching and learning the basics of schema beforehand.
>>
>> Think of it this way - would you sign a contract that was 
>> written in a 
>> language you couldn't read, under the legal system of a country you 
>> weren't familiar with? If the answer is "no", then you should 
>> expect to 
>> have to learn WSDL and schema regardless of whether you're using 
>> "contract-first" or "code-first" service development.
>>
>> There's a lot of confusion over just what is meant by code-first vs. 
>> contract-first development. I saw a recent posting on this list that 
>> pointed at the Spring (mis)information on this topic, which 
>> assumed that 
>> code-first meant the WSDL and schema was effectively always generated 
>> on-the-fly from the current code, so that any time the code 
>> changed the 
>> WSDL and schema would also change. That's effectively what 
>> was done by 
>> the deprecated rpc/enc style of SOAP, and I agree completely 
>> that this 
>> is unworkable for any serious enterprise use.
>>
>> I'd define code-first differently, to say that it means you 
>> start with 
>> template code and use that to generate a WSDL and schema definition, 
>> which can then be used directly or modified as appropriate. 
>> But whether 
>> used directly or modified, what you end up with is a WSDL and schema 
>> that are "fixed" definitions for the service (meaning that 
>> they are part 
>> of the service contract, and changing these becomes a service 
>> versioning 
>> issue). Based on what I've seen this is actually the approach 
>> used for 
>> the majority of real-world web service development. The 
>> Jibx2Wsdl tool 
>> (http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/jibx2wsdl) is 
>> designed around this principle, and if you're considering 
>> using JiBX you 
>> may want to look into using the tool since it handles JiBX binding 
>> generation, as well as WSDL and schema generation, from 
>> existing code. 
>> The current version of the tool is an early release, and I 
>> expect do an 
>> update within the next week.
>>
>>   - Dennis
>>
>> -- 
>> Dennis M. Sosnoski
>> SOA and Web Services in Java
>> Axis2 Training and Consulting
>> http://www.sosnoski.com - http://www.sosnoski.co.nz
>> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
>>
>>
>>
>> Michael.Davis@servicecanada.gc.ca wrote:
>>     
>>> To me, Contact-First makes perfect sense. I haven't heard 
>>>       
>> the Axis experts say "No No No!" yet, so I figure I'll go with that.
>>     
>>> thanks
>>> md
>>>
>>>   
>>>       
>>>> -----Original Message-----
>>>> From: Luis Mariano Luporini [mailto:lluporini@gmail.com]
>>>> Sent: Monday, May 28, 2007 1:17 PM
>>>> To: axis-user@ws.apache.org
>>>> Subject: Re: Recommendations for a new project?
>>>>
>>>>
>>>> Michael:
>>>>
>>>>        I'm having this kind of questions as you stated in 
>>>>         
>> your mails.
>>     
>>>> And think, probably, the better one would be to go with a
>>>> 'Contract-First' approach to keep the environment 
>>>>         
>> controlled when one
>>     
>>>> needs to implement features/changes. This way your clients 
>>>> will be happy
>>>> to get a consistent WSDL across releases.
>>>>
>>>>        But anyway I would like to hear your points on this. 
>>>> Please, let
>>>> know if you come to some conclusions.
>>>>
>>>>        Thanks,
>>>>
>>>> Luis
>>>>
>>>>
>>>> Michael.Davis@servicecanada.gc.ca escribió:
>>>>     
>>>>         
>>>>> Ok, thanks again
>>>>>
>>>>>     -----Original Message-----
>>>>>     *From:* robert lazarski [mailto:robertlazarski@gmail.com]
>>>>>     *Sent:* Monday, May 28, 2007 12:36 PM
>>>>>     *To:* axis-user@ws.apache.org
>>>>>     *Subject:* Re: Recommendations for a new project?
>>>>>
>>>>>     JIBX has its own site and docs - I'd follow those to 
>>>>>           
>> get on the
>>     
>>>>>     right track.
>>>>>
>>>>>     Robert
>>>>>
>>>>>     On 5/28/07, *Michael.Davis@servicecanada.gc.ca
>>>>>     <ma...@servicecanada.gc.ca>*
>>>>>     <Michael.Davis@servicecanada.gc.ca
>>>>>     <ma...@servicecanada.gc.ca>> wrote:
>>>>>
>>>>>         Thanks very much. I am using Hibernate and 
>>>>>       
>>>>>           
>>>> fortunately I have
>>>>     
>>>>         
>>>>>         complete control over the schema, so I'll check out jibx.
>>>>>          
>>>>>         So assuming I'm creating my own wsdl and will use 
>>>>>       
>>>>>           
>>>> jibx, would
>>>>     
>>>>         
>>>>>         you generate code using wsdl2java or would you start from
>>>>>         scratch? I suspect that starting from scratch 
>>>>>           
>> will allow for
>>     
>>>>>         cleaner and simpler code in the long run, because as the
>>>>>         number of operations grows then there will be more
>>>>>         opportunities for refactoring code rather than 
>>>>>       
>>>>>           
>>>> having lots of
>>>>     
>>>>         
>>>>>         redundant generated code, am I right?
>>>>>          
>>>>>         cheers
>>>>>         md
>>>>>
>>>>>             -----Original Message-----
>>>>>             *From:* robert lazarski 
>>>>>           
>> [mailto:robertlazarski@gmail.com
>>     
>>>>>             <ma...@gmail.com>]
>>>>>             *Sent:* Monday, May 28, 2007 12:18 PM
>>>>>             *To:* axis-user@ws.apache.org 
>>>>>       
>>>>>           
>>>> <ma...@ws.apache.org>
>>>>     
>>>>         
>>>>>             *Subject: *Re: Recommendations for a new project?
>>>>>
>>>>>             From what you say I'd go with ADB 
>>>>>           
>> databinding, creating
>>     
>>>>>             and validating your WSDL via eclipse's WST. If you are
>>>>>             using hibernate / jdo and such, I'd consider 
>>>>>       
>>>>>           
>>>> jibx. If you
>>>>     
>>>>         
>>>>>             have complex schemas out of your control - 
>>>>>       
>>>>>           
>>>> which is often
>>>>     
>>>>         
>>>>>             the case for me - use xmlbeans. Either way, 
>>>>>       
>>>>>           
>>>> starting with
>>>>     
>>>>         
>>>>>             the WSDL for a 'contract first' approach is 
>>>>>           
>> often a good
>>     
>>>>>             choice.
>>>>>
>>>>>             If you've never done single sign on before I 
>>>>>       
>>>>>           
>>>> recommend CAS:
>>>>     
>>>>         
>>>>>             http://www.ja-sig.org/products/cas/
>>>>>
>>>>>             See rampart for ws-security - available for 
>>>>>       
>>>>>           
>>>> axis2 1.1.1 .
>>>>     
>>>>         
>>>>>             Search the archives for questions related to 
>>>>>       
>>>>>           
>>>> soap headers
>>>>     
>>>>         
>>>>>             as the subject comes up frequently.
>>>>>
>>>>>             HTH,
>>>>>             Robert
>>>>>
>>>>>             On 5/28/07, *Michael.Davis@servicecanada.gc.ca
>>>>>             
>>>>>       
>>>>>           
>>>> <ma...@servicecanada.gc.ca>*<Michael.Davis@serv
>>>> icecanada.gc.ca
>>>>     
>>>>         
>>>>>             <ma...@servicecanada.gc.ca>> wrote:
>>>>>
>>>>>                 I forgot to mention, in case it's 
>>>>>       
>>>>>           
>>>> important. I'm using
>>>>     
>>>>         
>>>>>                 axis2 1.1.1, because due to circumstances 
>>>>>           
>> beyond my
>>     
>>>>>                 control, I'm forced to use jdk 1.4.2 and WebSphere
>>>>>                 6.1, and I couldn't get axis2 1.2 to work 
>>>>>           
>> with that
>>     
>>>>>                 combination.
>>>>>
>>>>>                 md
>>>>>
>>>>>                 > -----Original Message-----
>>>>>                 > From: Michael.Davis@servicecanada.gc.ca
>>>>>                 <ma...@servicecanada.gc.ca>
>>>>>                 > [mailto:Michael.Davis@servicecanada.gc.ca
>>>>>                 <ma...@servicecanada.gc.ca>]
>>>>>                 > Sent: Monday, May 28, 2007 11:44 AM
>>>>>                 > To: axis-user@ws.apache.org
>>>>>                 <ma...@ws.apache.org>
>>>>>                 > Subject: Recommendations for a new project?
>>>>>                 >
>>>>>                 >
>>>>>                 > Hi,
>>>>>                 >
>>>>>                 > I apologize in advance for a slightly 
>>>>>           
>> rambling and
>>     
>>>>>                 unfocussed
>>>>>                 > request for advice. The short questions 
>>>>>       
>>>>>           
>>>> are: if you are a
>>>>     
>>>>         
>>>>>                 > really experienced Axis user, and are starting a
>>>>>                 brand new
>>>>>                 > project, would you write everything from scratch
>>>>>                 using Axiom?
>>>>>                 > Would you use one of the data binding 
>>>>>       
>>>>>           
>>>> libraries such
>>>>     
>>>>         
>>>>>                 as JiBX?
>>>>>                 > Would you maintain your wsdl/xsd files by hand?
>>>>>                 >
>>>>>                 > Now for the long version:
>>>>>                 >
>>>>>                 > I'm new to Axis and web services, but have been
>>>>>                 programming
>>>>>                 > Java for several years.
>>>>>                 >
>>>>>                 > I'm working on a simple web service that 
>>>>>       
>>>>>           
>>>> provides a
>>>>     
>>>>         
>>>>>                 > single-sign-on for our organization's 
>>>>>       
>>>>>           
>>>> applications.
>>>>     
>>>>         
>>>>>                 The first
>>>>>                 > operation I'm working on is very simple 
>>>>>           
>> - it just
>>     
>>>>>                 takes three
>>>>>                 > strings (user name, password and 
>>>>>       
>>>>>           
>>>> application name) and
>>>>     
>>>>         
>>>>>                 > returns a string containing a list of 
>>>>>           
>> permissions.
>>     
>>>>>                 >
>>>>>                 > It works fine, but I've implemented it using the
>>>>>                 easiest way
>>>>>                 > possible. I just wrote a POJO class 
>>>>>           
>> with a method
>>     
>>>>>                 >
>>>>>                 > String authenticate( String, String, String )
>>>>>                 >
>>>>>                 > and ran Java2Wsdl using the basic 
>>>>>       
>>>>>           
>>>> defaults. I don't
>>>>     
>>>>         
>>>>>                 > explicitly use any of the Axis apis.
>>>>>                 >
>>>>>                 > However, looking to the future, I can see 
>>>>>       
>>>>>           
>>>> where I'll
>>>>     
>>>>         
>>>>>                 > eventually need to take more control, for 
>>>>>       
>>>>>           
>>>> example I might
>>>>     
>>>>         
>>>>>                 > want to manipulate the SOAP headers and/or use
>>>>>                 WS-Security,
>>>>>                 > and I'll probably eventually want to pass 
>>>>>       
>>>>>           
>>>> around more
>>>>     
>>>>         
>>>>>                 > complicated structures than strings.
>>>>>                 >
>>>>>                 > So I'm trying to determine the best 
>>>>>           
>> strategy. I'm
>>     
>>>>>                 slightly
>>>>>                 > bewildered with all of the choices:
>>>>>                 >
>>>>>                 > 1. Should I write the clients and services from
>>>>>                 scratch using
>>>>>                 > the axiom libraries, or generate the stubs and
>>>>>                 skeletons?
>>>>>                 >
>>>>>                 > 2. If I write them from scratch, and 
>>>>>       
>>>>>           
>>>> already have my own
>>>>     
>>>>         
>>>>>                 > model classes (representing such things 
>>>>>           
>> as users),
>>     
>>>>>                 should I
>>>>>                 > use one of the data binding libraries 
>>>>>       
>>>>>           
>>>> such as XMLBeans or
>>>>     
>>>>         
>>>>>                 > JiBX? If so, which one?
>>>>>                 >
>>>>>                 > 3. Should I be maintaining my wsdl file 
>>>>>       
>>>>>           
>>>> (and included
>>>>     
>>>>         
>>>>>                 schema
>>>>>                 > files) by hand (or using an appropriate 
>>>>>       
>>>>>           
>>>> editing tool) in
>>>>     
>>>>         
>>>>>                 > order to maitain control over the various 
>>>>>       
>>>>>           
>>>> types, as
>>>>     
>>>>         
>>>>>                 opposed
>>>>>                 > to generating it using Java2Wsdl every time the
>>>>>                 interface changes?
>>>>>                 >
>>>>>                 > I can see that the Axis developers have 
>>>>>       
>>>>>           
>>>> tried hard to
>>>>     
>>>>         
>>>>>                 provide
>>>>>                 > a spectrum of methods and interfaces from the
>>>>>                 easy/simple to
>>>>>                 > the complex/powerful. But I'd be very 
>>>>>       
>>>>>           
>>>> interested to
>>>>     
>>>>         
>>>>>                 know what
>>>>>                 > methods a really experienced Axis user 
>>>>>           
>> would use.
>>     
>>>>>                 >
>>>>>                 > Many thanks,
>>>>>                 > Michael Davis
>>>>>                 >
>>>>>                 > 
>>>>>       
>>>>>           
>> ---------------------------------------------------------------------
>>     
>>>>     
>>>>         
>>>>>                 > To unsubscribe, e-mail:
>>>>>                 axis-user-unsubscribe@ws.apache.org
>>>>>                 <ma...@ws.apache.org>
>>>>>                 > For additional commands, e-mail:
>>>>>                 axis-user-help@ws.apache.org
>>>>>                 <ma...@ws.apache.org>
>>>>>                 >
>>>>>                 >
>>>>>
>>>>>                 
>>>>>       
>>>>>           
>> ---------------------------------------------------------------------
>>     
>>>>     
>>>>         
>>>>>                 To unsubscribe, e-mail:
>>>>>                 axis-user-unsubscribe@ws.apache.org
>>>>>                 <ma...@ws.apache.org>
>>>>>                 For additional commands, e-mail:
>>>>>                 axis-user-help@ws.apache.org
>>>>>                 <ma...@ws.apache.org>
>>>>>
>>>>>
>>>>>
>>>>>       
>>>>>           
>> ---------------------------------------------------------------------
>>     
>>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>
>>>>
>>>>     
>>>>         
>>>       
>> ---------------------------------------------------------------------
>>     
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>   
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Recommendations for a new project?

Posted by Mi...@servicecanada.gc.ca.
Thanks Dennis,

That's very helpful. I looked up jibx2wsdl, and found that it "has support for Java 5 enumerations and generic collections". Does that mean that Java 5 is required? I have to stick with Java 1.4.2 for now because working for the Canadian government means working amongst glaciers and dinosaurs!

cheers
md

> -----Original Message-----
> From: Dennis Sosnoski [mailto:dms@sosnoski.com]
> Sent: Tuesday, May 29, 2007 3:16 PM
> To: axis-user@ws.apache.org
> Subject: Re: Recommendations for a new project?
> 
> 
> Hi Michael,
> 
> There are no magic bullets when it comes to doing WSDL. 
> Contract-first 
> is great in theory, and is pretty much the only way to do things in 
> cases where you're dealing with different groups in 
> developing services 
> to be used organization wide. However, the tools that are 
> available to 
> support editing WSDLs and schemas are really very primitive, and you 
> need to have a good understanding of what you're doing in 
> order to make 
> effective use of these tools. For WSDL this isn't too bad, 
> but schema is 
> very complex and has a steep learning curve. So if you want to do 
> contract-first development correctly, expect to spend a 
> couple of weeks 
> on researching and learning the basics of schema beforehand.
> 
> Think of it this way - would you sign a contract that was 
> written in a 
> language you couldn't read, under the legal system of a country you 
> weren't familiar with? If the answer is "no", then you should 
> expect to 
> have to learn WSDL and schema regardless of whether you're using 
> "contract-first" or "code-first" service development.
> 
> There's a lot of confusion over just what is meant by code-first vs. 
> contract-first development. I saw a recent posting on this list that 
> pointed at the Spring (mis)information on this topic, which 
> assumed that 
> code-first meant the WSDL and schema was effectively always generated 
> on-the-fly from the current code, so that any time the code 
> changed the 
> WSDL and schema would also change. That's effectively what 
> was done by 
> the deprecated rpc/enc style of SOAP, and I agree completely 
> that this 
> is unworkable for any serious enterprise use.
> 
> I'd define code-first differently, to say that it means you 
> start with 
> template code and use that to generate a WSDL and schema definition, 
> which can then be used directly or modified as appropriate. 
> But whether 
> used directly or modified, what you end up with is a WSDL and schema 
> that are "fixed" definitions for the service (meaning that 
> they are part 
> of the service contract, and changing these becomes a service 
> versioning 
> issue). Based on what I've seen this is actually the approach 
> used for 
> the majority of real-world web service development. The 
> Jibx2Wsdl tool 
> (http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/jibx2wsdl) is 
> designed around this principle, and if you're considering 
> using JiBX you 
> may want to look into using the tool since it handles JiBX binding 
> generation, as well as WSDL and schema generation, from 
> existing code. 
> The current version of the tool is an early release, and I 
> expect do an 
> update within the next week.
> 
>   - Dennis
> 
> -- 
> Dennis M. Sosnoski
> SOA and Web Services in Java
> Axis2 Training and Consulting
> http://www.sosnoski.com - http://www.sosnoski.co.nz
> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
> 
> 
> 
> Michael.Davis@servicecanada.gc.ca wrote:
> > To me, Contact-First makes perfect sense. I haven't heard 
> the Axis experts say "No No No!" yet, so I figure I'll go with that.
> >
> > thanks
> > md
> >
> >   
> >> -----Original Message-----
> >> From: Luis Mariano Luporini [mailto:lluporini@gmail.com]
> >> Sent: Monday, May 28, 2007 1:17 PM
> >> To: axis-user@ws.apache.org
> >> Subject: Re: Recommendations for a new project?
> >>
> >>
> >> Michael:
> >>
> >>        I'm having this kind of questions as you stated in 
> your mails.
> >> And think, probably, the better one would be to go with a
> >> 'Contract-First' approach to keep the environment 
> controlled when one
> >> needs to implement features/changes. This way your clients 
> >> will be happy
> >> to get a consistent WSDL across releases.
> >>
> >>        But anyway I would like to hear your points on this. 
> >> Please, let
> >> know if you come to some conclusions.
> >>
> >>        Thanks,
> >>
> >> Luis
> >>
> >>
> >> Michael.Davis@servicecanada.gc.ca escribió:
> >>     
> >>> Ok, thanks again
> >>>
> >>>     -----Original Message-----
> >>>     *From:* robert lazarski [mailto:robertlazarski@gmail.com]
> >>>     *Sent:* Monday, May 28, 2007 12:36 PM
> >>>     *To:* axis-user@ws.apache.org
> >>>     *Subject:* Re: Recommendations for a new project?
> >>>
> >>>     JIBX has its own site and docs - I'd follow those to 
> get on the
> >>>     right track.
> >>>
> >>>     Robert
> >>>
> >>>     On 5/28/07, *Michael.Davis@servicecanada.gc.ca
> >>>     <ma...@servicecanada.gc.ca>*
> >>>     <Michael.Davis@servicecanada.gc.ca
> >>>     <ma...@servicecanada.gc.ca>> wrote:
> >>>
> >>>         Thanks very much. I am using Hibernate and 
> >>>       
> >> fortunately I have
> >>     
> >>>         complete control over the schema, so I'll check out jibx.
> >>>          
> >>>         So assuming I'm creating my own wsdl and will use 
> >>>       
> >> jibx, would
> >>     
> >>>         you generate code using wsdl2java or would you start from
> >>>         scratch? I suspect that starting from scratch 
> will allow for
> >>>         cleaner and simpler code in the long run, because as the
> >>>         number of operations grows then there will be more
> >>>         opportunities for refactoring code rather than 
> >>>       
> >> having lots of
> >>     
> >>>         redundant generated code, am I right?
> >>>          
> >>>         cheers
> >>>         md
> >>>
> >>>             -----Original Message-----
> >>>             *From:* robert lazarski 
> [mailto:robertlazarski@gmail.com
> >>>             <ma...@gmail.com>]
> >>>             *Sent:* Monday, May 28, 2007 12:18 PM
> >>>             *To:* axis-user@ws.apache.org 
> >>>       
> >> <ma...@ws.apache.org>
> >>     
> >>>             *Subject: *Re: Recommendations for a new project?
> >>>
> >>>             From what you say I'd go with ADB 
> databinding, creating
> >>>             and validating your WSDL via eclipse's WST. If you are
> >>>             using hibernate / jdo and such, I'd consider 
> >>>       
> >> jibx. If you
> >>     
> >>>             have complex schemas out of your control - 
> >>>       
> >> which is often
> >>     
> >>>             the case for me - use xmlbeans. Either way, 
> >>>       
> >> starting with
> >>     
> >>>             the WSDL for a 'contract first' approach is 
> often a good
> >>>             choice.
> >>>
> >>>             If you've never done single sign on before I 
> >>>       
> >> recommend CAS:
> >>     
> >>>             http://www.ja-sig.org/products/cas/
> >>>
> >>>             See rampart for ws-security - available for 
> >>>       
> >> axis2 1.1.1 .
> >>     
> >>>             Search the archives for questions related to 
> >>>       
> >> soap headers
> >>     
> >>>             as the subject comes up frequently.
> >>>
> >>>             HTH,
> >>>             Robert
> >>>
> >>>             On 5/28/07, *Michael.Davis@servicecanada.gc.ca
> >>>             
> >>>       
> >> <ma...@servicecanada.gc.ca>*<Michael.Davis@serv
> >> icecanada.gc.ca
> >>     
> >>>             <ma...@servicecanada.gc.ca>> wrote:
> >>>
> >>>                 I forgot to mention, in case it's 
> >>>       
> >> important. I'm using
> >>     
> >>>                 axis2 1.1.1, because due to circumstances 
> beyond my
> >>>                 control, I'm forced to use jdk 1.4.2 and WebSphere
> >>>                 6.1, and I couldn't get axis2 1.2 to work 
> with that
> >>>                 combination.
> >>>
> >>>                 md
> >>>
> >>>                 > -----Original Message-----
> >>>                 > From: Michael.Davis@servicecanada.gc.ca
> >>>                 <ma...@servicecanada.gc.ca>
> >>>                 > [mailto:Michael.Davis@servicecanada.gc.ca
> >>>                 <ma...@servicecanada.gc.ca>]
> >>>                 > Sent: Monday, May 28, 2007 11:44 AM
> >>>                 > To: axis-user@ws.apache.org
> >>>                 <ma...@ws.apache.org>
> >>>                 > Subject: Recommendations for a new project?
> >>>                 >
> >>>                 >
> >>>                 > Hi,
> >>>                 >
> >>>                 > I apologize in advance for a slightly 
> rambling and
> >>>                 unfocussed
> >>>                 > request for advice. The short questions 
> >>>       
> >> are: if you are a
> >>     
> >>>                 > really experienced Axis user, and are starting a
> >>>                 brand new
> >>>                 > project, would you write everything from scratch
> >>>                 using Axiom?
> >>>                 > Would you use one of the data binding 
> >>>       
> >> libraries such
> >>     
> >>>                 as JiBX?
> >>>                 > Would you maintain your wsdl/xsd files by hand?
> >>>                 >
> >>>                 > Now for the long version:
> >>>                 >
> >>>                 > I'm new to Axis and web services, but have been
> >>>                 programming
> >>>                 > Java for several years.
> >>>                 >
> >>>                 > I'm working on a simple web service that 
> >>>       
> >> provides a
> >>     
> >>>                 > single-sign-on for our organization's 
> >>>       
> >> applications.
> >>     
> >>>                 The first
> >>>                 > operation I'm working on is very simple 
> - it just
> >>>                 takes three
> >>>                 > strings (user name, password and 
> >>>       
> >> application name) and
> >>     
> >>>                 > returns a string containing a list of 
> permissions.
> >>>                 >
> >>>                 > It works fine, but I've implemented it using the
> >>>                 easiest way
> >>>                 > possible. I just wrote a POJO class 
> with a method
> >>>                 >
> >>>                 > String authenticate( String, String, String )
> >>>                 >
> >>>                 > and ran Java2Wsdl using the basic 
> >>>       
> >> defaults. I don't
> >>     
> >>>                 > explicitly use any of the Axis apis.
> >>>                 >
> >>>                 > However, looking to the future, I can see 
> >>>       
> >> where I'll
> >>     
> >>>                 > eventually need to take more control, for 
> >>>       
> >> example I might
> >>     
> >>>                 > want to manipulate the SOAP headers and/or use
> >>>                 WS-Security,
> >>>                 > and I'll probably eventually want to pass 
> >>>       
> >> around more
> >>     
> >>>                 > complicated structures than strings.
> >>>                 >
> >>>                 > So I'm trying to determine the best 
> strategy. I'm
> >>>                 slightly
> >>>                 > bewildered with all of the choices:
> >>>                 >
> >>>                 > 1. Should I write the clients and services from
> >>>                 scratch using
> >>>                 > the axiom libraries, or generate the stubs and
> >>>                 skeletons?
> >>>                 >
> >>>                 > 2. If I write them from scratch, and 
> >>>       
> >> already have my own
> >>     
> >>>                 > model classes (representing such things 
> as users),
> >>>                 should I
> >>>                 > use one of the data binding libraries 
> >>>       
> >> such as XMLBeans or
> >>     
> >>>                 > JiBX? If so, which one?
> >>>                 >
> >>>                 > 3. Should I be maintaining my wsdl file 
> >>>       
> >> (and included
> >>     
> >>>                 schema
> >>>                 > files) by hand (or using an appropriate 
> >>>       
> >> editing tool) in
> >>     
> >>>                 > order to maitain control over the various 
> >>>       
> >> types, as
> >>     
> >>>                 opposed
> >>>                 > to generating it using Java2Wsdl every time the
> >>>                 interface changes?
> >>>                 >
> >>>                 > I can see that the Axis developers have 
> >>>       
> >> tried hard to
> >>     
> >>>                 provide
> >>>                 > a spectrum of methods and interfaces from the
> >>>                 easy/simple to
> >>>                 > the complex/powerful. But I'd be very 
> >>>       
> >> interested to
> >>     
> >>>                 know what
> >>>                 > methods a really experienced Axis user 
> would use.
> >>>                 >
> >>>                 > Many thanks,
> >>>                 > Michael Davis
> >>>                 >
> >>>                 > 
> >>>       
> >> 
> ---------------------------------------------------------------------
> >>     
> >>>                 > To unsubscribe, e-mail:
> >>>                 axis-user-unsubscribe@ws.apache.org
> >>>                 <ma...@ws.apache.org>
> >>>                 > For additional commands, e-mail:
> >>>                 axis-user-help@ws.apache.org
> >>>                 <ma...@ws.apache.org>
> >>>                 >
> >>>                 >
> >>>
> >>>                 
> >>>       
> >> 
> ---------------------------------------------------------------------
> >>     
> >>>                 To unsubscribe, e-mail:
> >>>                 axis-user-unsubscribe@ws.apache.org
> >>>                 <ma...@ws.apache.org>
> >>>                 For additional commands, e-mail:
> >>>                 axis-user-help@ws.apache.org
> >>>                 <ma...@ws.apache.org>
> >>>
> >>>
> >>>
> >>>       
> >> 
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> >>     
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Can't run axiom client - error in ServiceClient constructor

Posted by Mi...@servicecanada.gc.ca.
Hi,

I'm trying to call a web service using the axiom apis. When I try to execute this line:

ServiceClient sender = new ServiceClient();

I get this error:
java.lang.IllegalStateException: No valid ObjectCreator found.
        at org.apache.axiom.om.util.StAXUtils$Pool.<init>(StAXUtils.java:41)
        at org.apache.axiom.om.util.StAXUtils.<clinit>(StAXUtils.java:62)

I've listed the whole stack trace below. Could it be that I'm missing a library?

Here's the list of libraries I'm using:
axiom-api-1.2.4.jar
axiom-dom-1.2.4.jar
axiom-impl-1.2.4.jar
axis2-jibx-1.2.jar
axis2-kernel-1.2.jar
axis2-soapmonitor-1.2.jar
axis2-spring-1.2.jar
axis2-tools-1.2.jar
commons-httpclient-3.0.1.ja
commons-logging-1.1.jar
jibx-bind-1.1.4.jar
jibx-run-1.1.4.jar
log4j-1.2.12.jar
neethi-2.0.1.jar
servletapi-2.3.jar
stax-api-1.0.1.jar
stax-utils-20060915.jar
xml-apis-1.3.03.jar
XmlSchema-1.3.1.jar

and here's the stack trace:

Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:86)
        at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:58)
        at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:690)
        at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:109)
        at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:61)
        at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:180)
        at org.apache.axis2.client.ServiceClient.initializeTransports(ServiceClient.java:189)
        at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:118)
        at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:114)
        at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:207)
        at ca.gc.publiservice.sso.client.SSOImpl.authenticate(SSOImpl.java:57)
        at ca.gc.publiservice.sso.client.SSOImpl.main(SSOImpl.java:75)
Caused by: java.lang.IllegalStateException: No valid ObjectCreator found.
        at org.apache.axiom.om.util.StAXUtils$Pool.<init>(StAXUtils.java:41)
        at org.apache.axiom.om.util.StAXUtils.<clinit>(StAXUtils.java:62)
        ... 12 more

The code throwing the exception is here:

       Pool(ObjectCreator[] creators) {
            ObjectCreator oc = null;
            for (int i = 0; i < creators.length; i++) {
                try {
                    creators[i].newObject();
                    oc = creators[i];
                    break;
                } catch (Throwable t) {
                    // Ignore me
                }
            }
            if (oc == null) {
                throw new IllegalStateException("No valid ObjectCreator found.");
            }
            objectCreator = oc;
        }

Thanks very much,

Michael Davis

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Recommendations for a new project?

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Hi Michael,

There are no magic bullets when it comes to doing WSDL. Contract-first 
is great in theory, and is pretty much the only way to do things in 
cases where you're dealing with different groups in developing services 
to be used organization wide. However, the tools that are available to 
support editing WSDLs and schemas are really very primitive, and you 
need to have a good understanding of what you're doing in order to make 
effective use of these tools. For WSDL this isn't too bad, but schema is 
very complex and has a steep learning curve. So if you want to do 
contract-first development correctly, expect to spend a couple of weeks 
on researching and learning the basics of schema beforehand.

Think of it this way - would you sign a contract that was written in a 
language you couldn't read, under the legal system of a country you 
weren't familiar with? If the answer is "no", then you should expect to 
have to learn WSDL and schema regardless of whether you're using 
"contract-first" or "code-first" service development.

There's a lot of confusion over just what is meant by code-first vs. 
contract-first development. I saw a recent posting on this list that 
pointed at the Spring (mis)information on this topic, which assumed that 
code-first meant the WSDL and schema was effectively always generated 
on-the-fly from the current code, so that any time the code changed the 
WSDL and schema would also change. That's effectively what was done by 
the deprecated rpc/enc style of SOAP, and I agree completely that this 
is unworkable for any serious enterprise use.

I'd define code-first differently, to say that it means you start with 
template code and use that to generate a WSDL and schema definition, 
which can then be used directly or modified as appropriate. But whether 
used directly or modified, what you end up with is a WSDL and schema 
that are "fixed" definitions for the service (meaning that they are part 
of the service contract, and changing these becomes a service versioning 
issue). Based on what I've seen this is actually the approach used for 
the majority of real-world web service development. The Jibx2Wsdl tool 
(http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/jibx2wsdl) is 
designed around this principle, and if you're considering using JiBX you 
may want to look into using the tool since it handles JiBX binding 
generation, as well as WSDL and schema generation, from existing code. 
The current version of the tool is an early release, and I expect do an 
update within the next week.

  - Dennis

-- 
Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Michael.Davis@servicecanada.gc.ca wrote:
> To me, Contact-First makes perfect sense. I haven't heard the Axis experts say "No No No!" yet, so I figure I'll go with that.
>
> thanks
> md
>
>   
>> -----Original Message-----
>> From: Luis Mariano Luporini [mailto:lluporini@gmail.com]
>> Sent: Monday, May 28, 2007 1:17 PM
>> To: axis-user@ws.apache.org
>> Subject: Re: Recommendations for a new project?
>>
>>
>> Michael:
>>
>>        I'm having this kind of questions as you stated in your mails.
>> And think, probably, the better one would be to go with a
>> 'Contract-First' approach to keep the environment controlled when one
>> needs to implement features/changes. This way your clients 
>> will be happy
>> to get a consistent WSDL across releases.
>>
>>        But anyway I would like to hear your points on this. 
>> Please, let
>> know if you come to some conclusions.
>>
>>        Thanks,
>>
>> Luis
>>
>>
>> Michael.Davis@servicecanada.gc.ca escribió:
>>     
>>> Ok, thanks again
>>>
>>>     -----Original Message-----
>>>     *From:* robert lazarski [mailto:robertlazarski@gmail.com]
>>>     *Sent:* Monday, May 28, 2007 12:36 PM
>>>     *To:* axis-user@ws.apache.org
>>>     *Subject:* Re: Recommendations for a new project?
>>>
>>>     JIBX has its own site and docs - I'd follow those to get on the
>>>     right track.
>>>
>>>     Robert
>>>
>>>     On 5/28/07, *Michael.Davis@servicecanada.gc.ca
>>>     <ma...@servicecanada.gc.ca>*
>>>     <Michael.Davis@servicecanada.gc.ca
>>>     <ma...@servicecanada.gc.ca>> wrote:
>>>
>>>         Thanks very much. I am using Hibernate and 
>>>       
>> fortunately I have
>>     
>>>         complete control over the schema, so I'll check out jibx.
>>>          
>>>         So assuming I'm creating my own wsdl and will use 
>>>       
>> jibx, would
>>     
>>>         you generate code using wsdl2java or would you start from
>>>         scratch? I suspect that starting from scratch will allow for
>>>         cleaner and simpler code in the long run, because as the
>>>         number of operations grows then there will be more
>>>         opportunities for refactoring code rather than 
>>>       
>> having lots of
>>     
>>>         redundant generated code, am I right?
>>>          
>>>         cheers
>>>         md
>>>
>>>             -----Original Message-----
>>>             *From:* robert lazarski [mailto:robertlazarski@gmail.com
>>>             <ma...@gmail.com>]
>>>             *Sent:* Monday, May 28, 2007 12:18 PM
>>>             *To:* axis-user@ws.apache.org 
>>>       
>> <ma...@ws.apache.org>
>>     
>>>             *Subject: *Re: Recommendations for a new project?
>>>
>>>             From what you say I'd go with ADB databinding, creating
>>>             and validating your WSDL via eclipse's WST. If you are
>>>             using hibernate / jdo and such, I'd consider 
>>>       
>> jibx. If you
>>     
>>>             have complex schemas out of your control - 
>>>       
>> which is often
>>     
>>>             the case for me - use xmlbeans. Either way, 
>>>       
>> starting with
>>     
>>>             the WSDL for a 'contract first' approach is often a good
>>>             choice.
>>>
>>>             If you've never done single sign on before I 
>>>       
>> recommend CAS:
>>     
>>>             http://www.ja-sig.org/products/cas/
>>>
>>>             See rampart for ws-security - available for 
>>>       
>> axis2 1.1.1 .
>>     
>>>             Search the archives for questions related to 
>>>       
>> soap headers
>>     
>>>             as the subject comes up frequently.
>>>
>>>             HTH,
>>>             Robert
>>>
>>>             On 5/28/07, *Michael.Davis@servicecanada.gc.ca
>>>             
>>>       
>> <ma...@servicecanada.gc.ca>*<Michael.Davis@serv
>> icecanada.gc.ca
>>     
>>>             <ma...@servicecanada.gc.ca>> wrote:
>>>
>>>                 I forgot to mention, in case it's 
>>>       
>> important. I'm using
>>     
>>>                 axis2 1.1.1, because due to circumstances beyond my
>>>                 control, I'm forced to use jdk 1.4.2 and WebSphere
>>>                 6.1, and I couldn't get axis2 1.2 to work with that
>>>                 combination.
>>>
>>>                 md
>>>
>>>                 > -----Original Message-----
>>>                 > From: Michael.Davis@servicecanada.gc.ca
>>>                 <ma...@servicecanada.gc.ca>
>>>                 > [mailto:Michael.Davis@servicecanada.gc.ca
>>>                 <ma...@servicecanada.gc.ca>]
>>>                 > Sent: Monday, May 28, 2007 11:44 AM
>>>                 > To: axis-user@ws.apache.org
>>>                 <ma...@ws.apache.org>
>>>                 > Subject: Recommendations for a new project?
>>>                 >
>>>                 >
>>>                 > Hi,
>>>                 >
>>>                 > I apologize in advance for a slightly rambling and
>>>                 unfocussed
>>>                 > request for advice. The short questions 
>>>       
>> are: if you are a
>>     
>>>                 > really experienced Axis user, and are starting a
>>>                 brand new
>>>                 > project, would you write everything from scratch
>>>                 using Axiom?
>>>                 > Would you use one of the data binding 
>>>       
>> libraries such
>>     
>>>                 as JiBX?
>>>                 > Would you maintain your wsdl/xsd files by hand?
>>>                 >
>>>                 > Now for the long version:
>>>                 >
>>>                 > I'm new to Axis and web services, but have been
>>>                 programming
>>>                 > Java for several years.
>>>                 >
>>>                 > I'm working on a simple web service that 
>>>       
>> provides a
>>     
>>>                 > single-sign-on for our organization's 
>>>       
>> applications.
>>     
>>>                 The first
>>>                 > operation I'm working on is very simple - it just
>>>                 takes three
>>>                 > strings (user name, password and 
>>>       
>> application name) and
>>     
>>>                 > returns a string containing a list of permissions.
>>>                 >
>>>                 > It works fine, but I've implemented it using the
>>>                 easiest way
>>>                 > possible. I just wrote a POJO class with a method
>>>                 >
>>>                 > String authenticate( String, String, String )
>>>                 >
>>>                 > and ran Java2Wsdl using the basic 
>>>       
>> defaults. I don't
>>     
>>>                 > explicitly use any of the Axis apis.
>>>                 >
>>>                 > However, looking to the future, I can see 
>>>       
>> where I'll
>>     
>>>                 > eventually need to take more control, for 
>>>       
>> example I might
>>     
>>>                 > want to manipulate the SOAP headers and/or use
>>>                 WS-Security,
>>>                 > and I'll probably eventually want to pass 
>>>       
>> around more
>>     
>>>                 > complicated structures than strings.
>>>                 >
>>>                 > So I'm trying to determine the best strategy. I'm
>>>                 slightly
>>>                 > bewildered with all of the choices:
>>>                 >
>>>                 > 1. Should I write the clients and services from
>>>                 scratch using
>>>                 > the axiom libraries, or generate the stubs and
>>>                 skeletons?
>>>                 >
>>>                 > 2. If I write them from scratch, and 
>>>       
>> already have my own
>>     
>>>                 > model classes (representing such things as users),
>>>                 should I
>>>                 > use one of the data binding libraries 
>>>       
>> such as XMLBeans or
>>     
>>>                 > JiBX? If so, which one?
>>>                 >
>>>                 > 3. Should I be maintaining my wsdl file 
>>>       
>> (and included
>>     
>>>                 schema
>>>                 > files) by hand (or using an appropriate 
>>>       
>> editing tool) in
>>     
>>>                 > order to maitain control over the various 
>>>       
>> types, as
>>     
>>>                 opposed
>>>                 > to generating it using Java2Wsdl every time the
>>>                 interface changes?
>>>                 >
>>>                 > I can see that the Axis developers have 
>>>       
>> tried hard to
>>     
>>>                 provide
>>>                 > a spectrum of methods and interfaces from the
>>>                 easy/simple to
>>>                 > the complex/powerful. But I'd be very 
>>>       
>> interested to
>>     
>>>                 know what
>>>                 > methods a really experienced Axis user would use.
>>>                 >
>>>                 > Many thanks,
>>>                 > Michael Davis
>>>                 >
>>>                 > 
>>>       
>> ---------------------------------------------------------------------
>>     
>>>                 > To unsubscribe, e-mail:
>>>                 axis-user-unsubscribe@ws.apache.org
>>>                 <ma...@ws.apache.org>
>>>                 > For additional commands, e-mail:
>>>                 axis-user-help@ws.apache.org
>>>                 <ma...@ws.apache.org>
>>>                 >
>>>                 >
>>>
>>>                 
>>>       
>> ---------------------------------------------------------------------
>>     
>>>                 To unsubscribe, e-mail:
>>>                 axis-user-unsubscribe@ws.apache.org
>>>                 <ma...@ws.apache.org>
>>>                 For additional commands, e-mail:
>>>                 axis-user-help@ws.apache.org
>>>                 <ma...@ws.apache.org>
>>>
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Recommendations for a new project?

Posted by Luis Mariano Luporini <ll...@gmail.com>.
I didn't too.

It seems to me like the most natural approach to interop in the middle
of refactoring and adding new features.

Thanks to you.

Luis

Michael.Davis@servicecanada.gc.ca escribió:
> To me, Contact-First makes perfect sense. I haven't heard the Axis experts say "No No No!" yet, so I figure I'll go with that.
>
> thanks
> md
>
>   
>> -----Original Message-----
>> From: Luis Mariano Luporini [mailto:lluporini@gmail.com]
>> Sent: Monday, May 28, 2007 1:17 PM
>> To: axis-user@ws.apache.org
>> Subject: Re: Recommendations for a new project?
>>
>>
>> Michael:
>>
>>        I'm having this kind of questions as you stated in your mails.
>> And think, probably, the better one would be to go with a
>> 'Contract-First' approach to keep the environment controlled when one
>> needs to implement features/changes. This way your clients 
>> will be happy
>> to get a consistent WSDL across releases.
>>
>>        But anyway I would like to hear your points on this. 
>> Please, let
>> know if you come to some conclusions.
>>
>>        Thanks,
>>
>> Luis
>>
>>
>> Michael.Davis@servicecanada.gc.ca escribió:
>>     
>>> Ok, thanks again
>>>
>>>     -----Original Message-----
>>>     *From:* robert lazarski [mailto:robertlazarski@gmail.com]
>>>     *Sent:* Monday, May 28, 2007 12:36 PM
>>>     *To:* axis-user@ws.apache.org
>>>     *Subject:* Re: Recommendations for a new project?
>>>
>>>     JIBX has its own site and docs - I'd follow those to get on the
>>>     right track.
>>>
>>>     Robert
>>>
>>>     On 5/28/07, *Michael.Davis@servicecanada.gc.ca
>>>     <ma...@servicecanada.gc.ca>*
>>>     <Michael.Davis@servicecanada.gc.ca
>>>     <ma...@servicecanada.gc.ca>> wrote:
>>>
>>>         Thanks very much. I am using Hibernate and 
>>>       
>> fortunately I have
>>     
>>>         complete control over the schema, so I'll check out jibx.
>>>          
>>>         So assuming I'm creating my own wsdl and will use 
>>>       
>> jibx, would
>>     
>>>         you generate code using wsdl2java or would you start from
>>>         scratch? I suspect that starting from scratch will allow for
>>>         cleaner and simpler code in the long run, because as the
>>>         number of operations grows then there will be more
>>>         opportunities for refactoring code rather than 
>>>       
>> having lots of
>>     
>>>         redundant generated code, am I right?
>>>          
>>>         cheers
>>>         md
>>>
>>>             -----Original Message-----
>>>             *From:* robert lazarski [mailto:robertlazarski@gmail.com
>>>             <ma...@gmail.com>]
>>>             *Sent:* Monday, May 28, 2007 12:18 PM
>>>             *To:* axis-user@ws.apache.org 
>>>       
>> <ma...@ws.apache.org>
>>     
>>>             *Subject: *Re: Recommendations for a new project?
>>>
>>>             From what you say I'd go with ADB databinding, creating
>>>             and validating your WSDL via eclipse's WST. If you are
>>>             using hibernate / jdo and such, I'd consider 
>>>       
>> jibx. If you
>>     
>>>             have complex schemas out of your control - 
>>>       
>> which is often
>>     
>>>             the case for me - use xmlbeans. Either way, 
>>>       
>> starting with
>>     
>>>             the WSDL for a 'contract first' approach is often a good
>>>             choice.
>>>
>>>             If you've never done single sign on before I 
>>>       
>> recommend CAS:
>>     
>>>             http://www.ja-sig.org/products/cas/
>>>
>>>             See rampart for ws-security - available for 
>>>       
>> axis2 1.1.1 .
>>     
>>>             Search the archives for questions related to 
>>>       
>> soap headers
>>     
>>>             as the subject comes up frequently.
>>>
>>>             HTH,
>>>             Robert
>>>
>>>             On 5/28/07, *Michael.Davis@servicecanada.gc.ca
>>>             
>>>       
>> <ma...@servicecanada.gc.ca>*<Michael.Davis@serv
>> icecanada.gc.ca
>>     
>>>             <ma...@servicecanada.gc.ca>> wrote:
>>>
>>>                 I forgot to mention, in case it's 
>>>       
>> important. I'm using
>>     
>>>                 axis2 1.1.1, because due to circumstances beyond my
>>>                 control, I'm forced to use jdk 1.4.2 and WebSphere
>>>                 6.1, and I couldn't get axis2 1.2 to work with that
>>>                 combination.
>>>
>>>                 md
>>>
>>>                 > -----Original Message-----
>>>                 > From: Michael.Davis@servicecanada.gc.ca
>>>                 <ma...@servicecanada.gc.ca>
>>>                 > [mailto:Michael.Davis@servicecanada.gc.ca
>>>                 <ma...@servicecanada.gc.ca>]
>>>                 > Sent: Monday, May 28, 2007 11:44 AM
>>>                 > To: axis-user@ws.apache.org
>>>                 <ma...@ws.apache.org>
>>>                 > Subject: Recommendations for a new project?
>>>                 >
>>>                 >
>>>                 > Hi,
>>>                 >
>>>                 > I apologize in advance for a slightly rambling and
>>>                 unfocussed
>>>                 > request for advice. The short questions 
>>>       
>> are: if you are a
>>     
>>>                 > really experienced Axis user, and are starting a
>>>                 brand new
>>>                 > project, would you write everything from scratch
>>>                 using Axiom?
>>>                 > Would you use one of the data binding 
>>>       
>> libraries such
>>     
>>>                 as JiBX?
>>>                 > Would you maintain your wsdl/xsd files by hand?
>>>                 >
>>>                 > Now for the long version:
>>>                 >
>>>                 > I'm new to Axis and web services, but have been
>>>                 programming
>>>                 > Java for several years.
>>>                 >
>>>                 > I'm working on a simple web service that 
>>>       
>> provides a
>>     
>>>                 > single-sign-on for our organization's 
>>>       
>> applications.
>>     
>>>                 The first
>>>                 > operation I'm working on is very simple - it just
>>>                 takes three
>>>                 > strings (user name, password and 
>>>       
>> application name) and
>>     
>>>                 > returns a string containing a list of permissions.
>>>                 >
>>>                 > It works fine, but I've implemented it using the
>>>                 easiest way
>>>                 > possible. I just wrote a POJO class with a method
>>>                 >
>>>                 > String authenticate( String, String, String )
>>>                 >
>>>                 > and ran Java2Wsdl using the basic 
>>>       
>> defaults. I don't
>>     
>>>                 > explicitly use any of the Axis apis.
>>>                 >
>>>                 > However, looking to the future, I can see 
>>>       
>> where I'll
>>     
>>>                 > eventually need to take more control, for 
>>>       
>> example I might
>>     
>>>                 > want to manipulate the SOAP headers and/or use
>>>                 WS-Security,
>>>                 > and I'll probably eventually want to pass 
>>>       
>> around more
>>     
>>>                 > complicated structures than strings.
>>>                 >
>>>                 > So I'm trying to determine the best strategy. I'm
>>>                 slightly
>>>                 > bewildered with all of the choices:
>>>                 >
>>>                 > 1. Should I write the clients and services from
>>>                 scratch using
>>>                 > the axiom libraries, or generate the stubs and
>>>                 skeletons?
>>>                 >
>>>                 > 2. If I write them from scratch, and 
>>>       
>> already have my own
>>     
>>>                 > model classes (representing such things as users),
>>>                 should I
>>>                 > use one of the data binding libraries 
>>>       
>> such as XMLBeans or
>>     
>>>                 > JiBX? If so, which one?
>>>                 >
>>>                 > 3. Should I be maintaining my wsdl file 
>>>       
>> (and included
>>     
>>>                 schema
>>>                 > files) by hand (or using an appropriate 
>>>       
>> editing tool) in
>>     
>>>                 > order to maitain control over the various 
>>>       
>> types, as
>>     
>>>                 opposed
>>>                 > to generating it using Java2Wsdl every time the
>>>                 interface changes?
>>>                 >
>>>                 > I can see that the Axis developers have 
>>>       
>> tried hard to
>>     
>>>                 provide
>>>                 > a spectrum of methods and interfaces from the
>>>                 easy/simple to
>>>                 > the complex/powerful. But I'd be very 
>>>       
>> interested to
>>     
>>>                 know what
>>>                 > methods a really experienced Axis user would use.
>>>                 >
>>>                 > Many thanks,
>>>                 > Michael Davis
>>>                 >
>>>                 > 
>>>       
>> ---------------------------------------------------------------------
>>     
>>>                 > To unsubscribe, e-mail:
>>>                 axis-user-unsubscribe@ws.apache.org
>>>                 <ma...@ws.apache.org>
>>>                 > For additional commands, e-mail:
>>>                 axis-user-help@ws.apache.org
>>>                 <ma...@ws.apache.org>
>>>                 >
>>>                 >
>>>
>>>                 
>>>       
>> ---------------------------------------------------------------------
>>     
>>>                 To unsubscribe, e-mail:
>>>                 axis-user-unsubscribe@ws.apache.org
>>>                 <ma...@ws.apache.org>
>>>                 For additional commands, e-mail:
>>>                 axis-user-help@ws.apache.org
>>>                 <ma...@ws.apache.org>
>>>
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Recommendations for a new project?

Posted by Mi...@servicecanada.gc.ca.
To me, Contact-First makes perfect sense. I haven't heard the Axis experts say "No No No!" yet, so I figure I'll go with that.

thanks
md

> -----Original Message-----
> From: Luis Mariano Luporini [mailto:lluporini@gmail.com]
> Sent: Monday, May 28, 2007 1:17 PM
> To: axis-user@ws.apache.org
> Subject: Re: Recommendations for a new project?
> 
> 
> Michael:
> 
>        I'm having this kind of questions as you stated in your mails.
> And think, probably, the better one would be to go with a
> 'Contract-First' approach to keep the environment controlled when one
> needs to implement features/changes. This way your clients 
> will be happy
> to get a consistent WSDL across releases.
> 
>        But anyway I would like to hear your points on this. 
> Please, let
> know if you come to some conclusions.
> 
>        Thanks,
> 
> Luis
> 
> 
> Michael.Davis@servicecanada.gc.ca escribió:
> > Ok, thanks again
> >
> >     -----Original Message-----
> >     *From:* robert lazarski [mailto:robertlazarski@gmail.com]
> >     *Sent:* Monday, May 28, 2007 12:36 PM
> >     *To:* axis-user@ws.apache.org
> >     *Subject:* Re: Recommendations for a new project?
> >
> >     JIBX has its own site and docs - I'd follow those to get on the
> >     right track.
> >
> >     Robert
> >
> >     On 5/28/07, *Michael.Davis@servicecanada.gc.ca
> >     <ma...@servicecanada.gc.ca>*
> >     <Michael.Davis@servicecanada.gc.ca
> >     <ma...@servicecanada.gc.ca>> wrote:
> >
> >         Thanks very much. I am using Hibernate and 
> fortunately I have
> >         complete control over the schema, so I'll check out jibx.
> >          
> >         So assuming I'm creating my own wsdl and will use 
> jibx, would
> >         you generate code using wsdl2java or would you start from
> >         scratch? I suspect that starting from scratch will allow for
> >         cleaner and simpler code in the long run, because as the
> >         number of operations grows then there will be more
> >         opportunities for refactoring code rather than 
> having lots of
> >         redundant generated code, am I right?
> >          
> >         cheers
> >         md
> >
> >             -----Original Message-----
> >             *From:* robert lazarski [mailto:robertlazarski@gmail.com
> >             <ma...@gmail.com>]
> >             *Sent:* Monday, May 28, 2007 12:18 PM
> >             *To:* axis-user@ws.apache.org 
> <ma...@ws.apache.org>
> >             *Subject: *Re: Recommendations for a new project?
> >
> >             From what you say I'd go with ADB databinding, creating
> >             and validating your WSDL via eclipse's WST. If you are
> >             using hibernate / jdo and such, I'd consider 
> jibx. If you
> >             have complex schemas out of your control - 
> which is often
> >             the case for me - use xmlbeans. Either way, 
> starting with
> >             the WSDL for a 'contract first' approach is often a good
> >             choice.
> >
> >             If you've never done single sign on before I 
> recommend CAS:
> >
> >             http://www.ja-sig.org/products/cas/
> >
> >             See rampart for ws-security - available for 
> axis2 1.1.1 .
> >             Search the archives for questions related to 
> soap headers
> >             as the subject comes up frequently.
> >
> >             HTH,
> >             Robert
> >
> >             On 5/28/07, *Michael.Davis@servicecanada.gc.ca
> >             
> <ma...@servicecanada.gc.ca>*<Michael.Davis@serv
> icecanada.gc.ca
> >             <ma...@servicecanada.gc.ca>> wrote:
> >
> >                 I forgot to mention, in case it's 
> important. I'm using
> >                 axis2 1.1.1, because due to circumstances beyond my
> >                 control, I'm forced to use jdk 1.4.2 and WebSphere
> >                 6.1, and I couldn't get axis2 1.2 to work with that
> >                 combination.
> >
> >                 md
> >
> >                 > -----Original Message-----
> >                 > From: Michael.Davis@servicecanada.gc.ca
> >                 <ma...@servicecanada.gc.ca>
> >                 > [mailto:Michael.Davis@servicecanada.gc.ca
> >                 <ma...@servicecanada.gc.ca>]
> >                 > Sent: Monday, May 28, 2007 11:44 AM
> >                 > To: axis-user@ws.apache.org
> >                 <ma...@ws.apache.org>
> >                 > Subject: Recommendations for a new project?
> >                 >
> >                 >
> >                 > Hi,
> >                 >
> >                 > I apologize in advance for a slightly rambling and
> >                 unfocussed
> >                 > request for advice. The short questions 
> are: if you are a
> >                 > really experienced Axis user, and are starting a
> >                 brand new
> >                 > project, would you write everything from scratch
> >                 using Axiom?
> >                 > Would you use one of the data binding 
> libraries such
> >                 as JiBX?
> >                 > Would you maintain your wsdl/xsd files by hand?
> >                 >
> >                 > Now for the long version:
> >                 >
> >                 > I'm new to Axis and web services, but have been
> >                 programming
> >                 > Java for several years.
> >                 >
> >                 > I'm working on a simple web service that 
> provides a
> >                 > single-sign-on for our organization's 
> applications.
> >                 The first
> >                 > operation I'm working on is very simple - it just
> >                 takes three
> >                 > strings (user name, password and 
> application name) and
> >                 > returns a string containing a list of permissions.
> >                 >
> >                 > It works fine, but I've implemented it using the
> >                 easiest way
> >                 > possible. I just wrote a POJO class with a method
> >                 >
> >                 > String authenticate( String, String, String )
> >                 >
> >                 > and ran Java2Wsdl using the basic 
> defaults. I don't
> >                 > explicitly use any of the Axis apis.
> >                 >
> >                 > However, looking to the future, I can see 
> where I'll
> >                 > eventually need to take more control, for 
> example I might
> >                 > want to manipulate the SOAP headers and/or use
> >                 WS-Security,
> >                 > and I'll probably eventually want to pass 
> around more
> >                 > complicated structures than strings.
> >                 >
> >                 > So I'm trying to determine the best strategy. I'm
> >                 slightly
> >                 > bewildered with all of the choices:
> >                 >
> >                 > 1. Should I write the clients and services from
> >                 scratch using
> >                 > the axiom libraries, or generate the stubs and
> >                 skeletons?
> >                 >
> >                 > 2. If I write them from scratch, and 
> already have my own
> >                 > model classes (representing such things as users),
> >                 should I
> >                 > use one of the data binding libraries 
> such as XMLBeans or
> >                 > JiBX? If so, which one?
> >                 >
> >                 > 3. Should I be maintaining my wsdl file 
> (and included
> >                 schema
> >                 > files) by hand (or using an appropriate 
> editing tool) in
> >                 > order to maitain control over the various 
> types, as
> >                 opposed
> >                 > to generating it using Java2Wsdl every time the
> >                 interface changes?
> >                 >
> >                 > I can see that the Axis developers have 
> tried hard to
> >                 provide
> >                 > a spectrum of methods and interfaces from the
> >                 easy/simple to
> >                 > the complex/powerful. But I'd be very 
> interested to
> >                 know what
> >                 > methods a really experienced Axis user would use.
> >                 >
> >                 > Many thanks,
> >                 > Michael Davis
> >                 >
> >                 > 
> ---------------------------------------------------------------------
> >                 > To unsubscribe, e-mail:
> >                 axis-user-unsubscribe@ws.apache.org
> >                 <ma...@ws.apache.org>
> >                 > For additional commands, e-mail:
> >                 axis-user-help@ws.apache.org
> >                 <ma...@ws.apache.org>
> >                 >
> >                 >
> >
> >                 
> ---------------------------------------------------------------------
> >
> >                 To unsubscribe, e-mail:
> >                 axis-user-unsubscribe@ws.apache.org
> >                 <ma...@ws.apache.org>
> >                 For additional commands, e-mail:
> >                 axis-user-help@ws.apache.org
> >                 <ma...@ws.apache.org>
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Recommendations for a new project?

Posted by Luis Mariano Luporini <ll...@gmail.com>.
Michael:

       I'm having this kind of questions as you stated in your mails.
And think, probably, the better one would be to go with a
'Contract-First' approach to keep the environment controlled when one
needs to implement features/changes. This way your clients will be happy
to get a consistent WSDL across releases.

       But anyway I would like to hear your points on this. Please, let
know if you come to some conclusions.

       Thanks,

Luis


Michael.Davis@servicecanada.gc.ca escribió:
> Ok, thanks again
>
>     -----Original Message-----
>     *From:* robert lazarski [mailto:robertlazarski@gmail.com]
>     *Sent:* Monday, May 28, 2007 12:36 PM
>     *To:* axis-user@ws.apache.org
>     *Subject:* Re: Recommendations for a new project?
>
>     JIBX has its own site and docs - I'd follow those to get on the
>     right track.
>
>     Robert
>
>     On 5/28/07, *Michael.Davis@servicecanada.gc.ca
>     <ma...@servicecanada.gc.ca>*
>     <Michael.Davis@servicecanada.gc.ca
>     <ma...@servicecanada.gc.ca>> wrote:
>
>         Thanks very much. I am using Hibernate and fortunately I have
>         complete control over the schema, so I'll check out jibx.
>          
>         So assuming I'm creating my own wsdl and will use jibx, would
>         you generate code using wsdl2java or would you start from
>         scratch? I suspect that starting from scratch will allow for
>         cleaner and simpler code in the long run, because as the
>         number of operations grows then there will be more
>         opportunities for refactoring code rather than having lots of
>         redundant generated code, am I right?
>          
>         cheers
>         md
>
>             -----Original Message-----
>             *From:* robert lazarski [mailto:robertlazarski@gmail.com
>             <ma...@gmail.com>]
>             *Sent:* Monday, May 28, 2007 12:18 PM
>             *To:* axis-user@ws.apache.org <ma...@ws.apache.org>
>             *Subject: *Re: Recommendations for a new project?
>
>             From what you say I'd go with ADB databinding, creating
>             and validating your WSDL via eclipse's WST. If you are
>             using hibernate / jdo and such, I'd consider jibx. If you
>             have complex schemas out of your control - which is often
>             the case for me - use xmlbeans. Either way, starting with
>             the WSDL for a 'contract first' approach is often a good
>             choice.
>
>             If you've never done single sign on before I recommend CAS:
>
>             http://www.ja-sig.org/products/cas/
>
>             See rampart for ws-security - available for axis2 1.1.1 .
>             Search the archives for questions related to soap headers
>             as the subject comes up frequently.
>
>             HTH,
>             Robert
>
>             On 5/28/07, *Michael.Davis@servicecanada.gc.ca
>             <ma...@servicecanada.gc.ca>*<Michael.Davis@servicecanada.gc.ca
>             <ma...@servicecanada.gc.ca>> wrote:
>
>                 I forgot to mention, in case it's important. I'm using
>                 axis2 1.1.1, because due to circumstances beyond my
>                 control, I'm forced to use jdk 1.4.2 and WebSphere
>                 6.1, and I couldn't get axis2 1.2 to work with that
>                 combination.
>
>                 md
>
>                 > -----Original Message-----
>                 > From: Michael.Davis@servicecanada.gc.ca
>                 <ma...@servicecanada.gc.ca>
>                 > [mailto:Michael.Davis@servicecanada.gc.ca
>                 <ma...@servicecanada.gc.ca>]
>                 > Sent: Monday, May 28, 2007 11:44 AM
>                 > To: axis-user@ws.apache.org
>                 <ma...@ws.apache.org>
>                 > Subject: Recommendations for a new project?
>                 >
>                 >
>                 > Hi,
>                 >
>                 > I apologize in advance for a slightly rambling and
>                 unfocussed
>                 > request for advice. The short questions are: if you are a
>                 > really experienced Axis user, and are starting a
>                 brand new
>                 > project, would you write everything from scratch
>                 using Axiom?
>                 > Would you use one of the data binding libraries such
>                 as JiBX?
>                 > Would you maintain your wsdl/xsd files by hand?
>                 >
>                 > Now for the long version:
>                 >
>                 > I'm new to Axis and web services, but have been
>                 programming
>                 > Java for several years.
>                 >
>                 > I'm working on a simple web service that provides a
>                 > single-sign-on for our organization's applications.
>                 The first
>                 > operation I'm working on is very simple - it just
>                 takes three
>                 > strings (user name, password and application name) and
>                 > returns a string containing a list of permissions.
>                 >
>                 > It works fine, but I've implemented it using the
>                 easiest way
>                 > possible. I just wrote a POJO class with a method
>                 >
>                 > String authenticate( String, String, String )
>                 >
>                 > and ran Java2Wsdl using the basic defaults. I don't
>                 > explicitly use any of the Axis apis.
>                 >
>                 > However, looking to the future, I can see where I'll
>                 > eventually need to take more control, for example I might
>                 > want to manipulate the SOAP headers and/or use
>                 WS-Security,
>                 > and I'll probably eventually want to pass around more
>                 > complicated structures than strings.
>                 >
>                 > So I'm trying to determine the best strategy. I'm
>                 slightly
>                 > bewildered with all of the choices:
>                 >
>                 > 1. Should I write the clients and services from
>                 scratch using
>                 > the axiom libraries, or generate the stubs and
>                 skeletons?
>                 >
>                 > 2. If I write them from scratch, and already have my own
>                 > model classes (representing such things as users),
>                 should I
>                 > use one of the data binding libraries such as XMLBeans or
>                 > JiBX? If so, which one?
>                 >
>                 > 3. Should I be maintaining my wsdl file (and included
>                 schema
>                 > files) by hand (or using an appropriate editing tool) in
>                 > order to maitain control over the various types, as
>                 opposed
>                 > to generating it using Java2Wsdl every time the
>                 interface changes?
>                 >
>                 > I can see that the Axis developers have tried hard to
>                 provide
>                 > a spectrum of methods and interfaces from the
>                 easy/simple to
>                 > the complex/powerful. But I'd be very interested to
>                 know what
>                 > methods a really experienced Axis user would use.
>                 >
>                 > Many thanks,
>                 > Michael Davis
>                 >
>                 > ---------------------------------------------------------------------
>                 > To unsubscribe, e-mail:
>                 axis-user-unsubscribe@ws.apache.org
>                 <ma...@ws.apache.org>
>                 > For additional commands, e-mail:
>                 axis-user-help@ws.apache.org
>                 <ma...@ws.apache.org>
>                 >
>                 >
>
>                 ---------------------------------------------------------------------
>
>                 To unsubscribe, e-mail:
>                 axis-user-unsubscribe@ws.apache.org
>                 <ma...@ws.apache.org>
>                 For additional commands, e-mail:
>                 axis-user-help@ws.apache.org
>                 <ma...@ws.apache.org>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Recommendations for a new project?

Posted by Mi...@servicecanada.gc.ca.
Ok, thanks again

-----Original Message-----
From: robert lazarski [mailto:robertlazarski@gmail.com]
Sent: Monday, May 28, 2007 12:36 PM
To: axis-user@ws.apache.org
Subject: Re: Recommendations for a new project?


JIBX has its own site and docs - I'd follow those to get on the right track. 

Robert 


On 5/28/07, Michael.Davis@servicecanada.gc.ca < Michael.Davis@servicecanada.gc.ca> wrote: 

Thanks very much. I am using Hibernate and fortunately I have complete control over the schema, so I'll check out jibx.
 
So assuming I'm creating my own wsdl and will use jibx, would you generate code using wsdl2java or would you start from scratch? I suspect that starting from scratch will allow for cleaner and simpler code in the long run, because as the number of operations grows then there will be more opportunities for refactoring code rather than having lots of redundant generated code, am I right?
 
cheers
md

-----Original Message-----
From: robert lazarski [mailto: robertlazarski@gmail.com]
Sent: Monday, May 28, 2007 12:18 PM
To: axis-user@ws.apache.org

Subject: Re: Recommendations for a new project?


>From what you say I'd go with ADB databinding, creating and validating your WSDL via eclipse's WST. If you are using hibernate / jdo and such, I'd consider jibx. If you have complex schemas out of your control - which is often the case for me - use xmlbeans. Either way, starting with the WSDL for a 'contract first' approach is often a good choice. 

If you've never done single sign on before I recommend CAS: 

http://www.ja-sig.org/products/cas/

See rampart for ws-security - available for axis2 1.1.1 . Search the archives for questions related to soap headers as the subject comes up frequently. 

HTH,
Robert 


On 5/28/07, Michael.Davis@servicecanada.gc.ca  <ma...@servicecanada.gc.ca> < Michael.Davis@servicecanada.gc.ca> wrote: 

I forgot to mention, in case it's important. I'm using axis2 1.1.1, because due to circumstances beyond my control, I'm forced to use jdk 1.4.2 and WebSphere 6.1, and I couldn't get axis2 1.2 to work with that combination. 

md

> -----Original Message-----
> From: Michael.Davis@servicecanada.gc.ca  <ma...@servicecanada.gc.ca> 
> [mailto: Michael.Davis@servicecanada.gc.ca  <ma...@servicecanada.gc.ca> ]
> Sent: Monday, May 28, 2007 11:44 AM
> To: axis-user@ws.apache.org
> Subject: Recommendations for a new project?
>
>
> Hi,
>
> I apologize in advance for a slightly rambling and unfocussed
> request for advice. The short questions are: if you are a
> really experienced Axis user, and are starting a brand new
> project, would you write everything from scratch using Axiom? 
> Would you use one of the data binding libraries such as JiBX?
> Would you maintain your wsdl/xsd files by hand?
>
> Now for the long version:
>
> I'm new to Axis and web services, but have been programming 
> Java for several years.
>
> I'm working on a simple web service that provides a
> single-sign-on for our organization's applications. The first
> operation I'm working on is very simple - it just takes three 
> strings (user name, password and application name) and
> returns a string containing a list of permissions.
>
> It works fine, but I've implemented it using the easiest way
> possible. I just wrote a POJO class with a method 
>
> String authenticate( String, String, String )
>
> and ran Java2Wsdl using the basic defaults. I don't
> explicitly use any of the Axis apis.
>
> However, looking to the future, I can see where I'll 
> eventually need to take more control, for example I might
> want to manipulate the SOAP headers and/or use WS-Security,
> and I'll probably eventually want to pass around more
> complicated structures than strings. 
>
> So I'm trying to determine the best strategy. I'm slightly
> bewildered with all of the choices:
>
> 1. Should I write the clients and services from scratch using
> the axiom libraries, or generate the stubs and skeletons? 
>
> 2. If I write them from scratch, and already have my own
> model classes (representing such things as users), should I
> use one of the data binding libraries such as XMLBeans or
> JiBX? If so, which one? 
>
> 3. Should I be maintaining my wsdl file (and included schema
> files) by hand (or using an appropriate editing tool) in
> order to maitain control over the various types, as opposed
> to generating it using Java2Wsdl every time the interface changes? 
>
> I can see that the Axis developers have tried hard to provide
> a spectrum of methods and interfaces from the easy/simple to
> the complex/powerful. But I'd be very interested to know what 
> methods a really experienced Axis user would use.
>
> Many thanks,
> Michael Davis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

--------------------------------------------------------------------- 
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org






Re: Recommendations for a new project?

Posted by robert lazarski <ro...@gmail.com>.
JIBX has its own site and docs - I'd follow those to get on the right track.


Robert

On 5/28/07, Michael.Davis@servicecanada.gc.ca <
Michael.Davis@servicecanada.gc.ca> wrote:
>
>  Thanks very much. I am using Hibernate and fortunately I have complete
> control over the schema, so I'll check out jibx.
>
> So assuming I'm creating my own wsdl and will use jibx, would you generate
> code using wsdl2java or would you start from scratch? I suspect that
> starting from scratch will allow for cleaner and simpler code in the long
> run, because as the number of operations grows then there will be more
> opportunities for refactoring code rather than having lots of redundant
> generated code, am I right?
>
> cheers
> md
>
> -----Original Message-----
> *From:* robert lazarski [mailto:robertlazarski@gmail.com]
> *Sent:* Monday, May 28, 2007 12:18 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Recommendations for a new project?
>
> From what you say I'd go with ADB databinding, creating and validating
> your WSDL via eclipse's WST. If you are using hibernate / jdo and such, I'd
> consider jibx. If you have complex schemas out of your control - which is
> often the case for me - use xmlbeans. Either way, starting with the WSDL for
> a 'contract first' approach is often a good choice.
>
> If you've never done single sign on before I recommend CAS:
>
> http://www.ja-sig.org/products/cas/
>
> See rampart for ws-security - available for axis2 1.1.1 . Search the
> archives for questions related to soap headers as the subject comes up
> frequently.
>
> HTH,
> Robert
>
> On 5/28/07, Michael.Davis@servicecanada.gc.ca <
> Michael.Davis@servicecanada.gc.ca> wrote:
> >
> > I forgot to mention, in case it's important. I'm using axis2 1.1.1,
> > because due to circumstances beyond my control, I'm forced to use jdk
> > 1.4.2 and WebSphere 6.1, and I couldn't get axis2 1.2 to work with that
> > combination.
> >
> > md
> >
> > > -----Original Message-----
> > > From: Michael.Davis@servicecanada.gc.ca
> > > [mailto:Michael.Davis@servicecanada.gc.ca ]
> > > Sent: Monday, May 28, 2007 11:44 AM
> > > To: axis-user@ws.apache.org
> > > Subject: Recommendations for a new project?
> > >
> > >
> > > Hi,
> > >
> > > I apologize in advance for a slightly rambling and unfocussed
> > > request for advice. The short questions are: if you are a
> > > really experienced Axis user, and are starting a brand new
> > > project, would you write everything from scratch using Axiom?
> > > Would you use one of the data binding libraries such as JiBX?
> > > Would you maintain your wsdl/xsd files by hand?
> > >
> > > Now for the long version:
> > >
> > > I'm new to Axis and web services, but have been programming
> > > Java for several years.
> > >
> > > I'm working on a simple web service that provides a
> > > single-sign-on for our organization's applications. The first
> > > operation I'm working on is very simple - it just takes three
> > > strings (user name, password and application name) and
> > > returns a string containing a list of permissions.
> > >
> > > It works fine, but I've implemented it using the easiest way
> > > possible. I just wrote a POJO class with a method
> > >
> > > String authenticate( String, String, String )
> > >
> > > and ran Java2Wsdl using the basic defaults. I don't
> > > explicitly use any of the Axis apis.
> > >
> > > However, looking to the future, I can see where I'll
> > > eventually need to take more control, for example I might
> > > want to manipulate the SOAP headers and/or use WS-Security,
> > > and I'll probably eventually want to pass around more
> > > complicated structures than strings.
> > >
> > > So I'm trying to determine the best strategy. I'm slightly
> > > bewildered with all of the choices:
> > >
> > > 1. Should I write the clients and services from scratch using
> > > the axiom libraries, or generate the stubs and skeletons?
> > >
> > > 2. If I write them from scratch, and already have my own
> > > model classes (representing such things as users), should I
> > > use one of the data binding libraries such as XMLBeans or
> > > JiBX? If so, which one?
> > >
> > > 3. Should I be maintaining my wsdl file (and included schema
> > > files) by hand (or using an appropriate editing tool) in
> > > order to maitain control over the various types, as opposed
> > > to generating it using Java2Wsdl every time the interface changes?
> > >
> > > I can see that the Axis developers have tried hard to provide
> > > a spectrum of methods and interfaces from the easy/simple to
> > > the complex/powerful. But I'd be very interested to know what
> > > methods a really experienced Axis user would use.
> > >
> > > Many thanks,
> > > Michael Davis
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>

RE: Recommendations for a new project?

Posted by Mi...@servicecanada.gc.ca.
Thanks very much. I am using Hibernate and fortunately I have complete control over the schema, so I'll check out jibx.
 
So assuming I'm creating my own wsdl and will use jibx, would you generate code using wsdl2java or would you start from scratch? I suspect that starting from scratch will allow for cleaner and simpler code in the long run, because as the number of operations grows then there will be more opportunities for refactoring code rather than having lots of redundant generated code, am I right?
 
cheers
md

-----Original Message-----
From: robert lazarski [mailto:robertlazarski@gmail.com]
Sent: Monday, May 28, 2007 12:18 PM
To: axis-user@ws.apache.org
Subject: Re: Recommendations for a new project?


>From what you say I'd go with ADB databinding, creating and validating your WSDL via eclipse's WST. If you are using hibernate / jdo and such, I'd consider jibx. If you have complex schemas out of your control - which is often the case for me - use xmlbeans. Either way, starting with the WSDL for a 'contract first' approach is often a good choice. 

If you've never done single sign on before I recommend CAS: 

http://www.ja-sig.org/products/cas/

See rampart for ws-security - available for axis2 1.1.1 . Search the archives for questions related to soap headers as the subject comes up frequently. 

HTH,
Robert 


On 5/28/07, Michael.Davis@servicecanada.gc.ca < Michael.Davis@servicecanada.gc.ca> wrote: 

I forgot to mention, in case it's important. I'm using axis2 1.1.1, because due to circumstances beyond my control, I'm forced to use jdk 1.4.2 and WebSphere 6.1, and I couldn't get axis2 1.2 to work with that combination. 

md

> -----Original Message-----
> From: Michael.Davis@servicecanada.gc.ca
> [mailto: Michael.Davis@servicecanada.gc.ca  <ma...@servicecanada.gc.ca> ]
> Sent: Monday, May 28, 2007 11:44 AM
> To: axis-user@ws.apache.org
> Subject: Recommendations for a new project?
>
>
> Hi,
>
> I apologize in advance for a slightly rambling and unfocussed
> request for advice. The short questions are: if you are a
> really experienced Axis user, and are starting a brand new
> project, would you write everything from scratch using Axiom? 
> Would you use one of the data binding libraries such as JiBX?
> Would you maintain your wsdl/xsd files by hand?
>
> Now for the long version:
>
> I'm new to Axis and web services, but have been programming 
> Java for several years.
>
> I'm working on a simple web service that provides a
> single-sign-on for our organization's applications. The first
> operation I'm working on is very simple - it just takes three 
> strings (user name, password and application name) and
> returns a string containing a list of permissions.
>
> It works fine, but I've implemented it using the easiest way
> possible. I just wrote a POJO class with a method 
>
> String authenticate( String, String, String )
>
> and ran Java2Wsdl using the basic defaults. I don't
> explicitly use any of the Axis apis.
>
> However, looking to the future, I can see where I'll 
> eventually need to take more control, for example I might
> want to manipulate the SOAP headers and/or use WS-Security,
> and I'll probably eventually want to pass around more
> complicated structures than strings. 
>
> So I'm trying to determine the best strategy. I'm slightly
> bewildered with all of the choices:
>
> 1. Should I write the clients and services from scratch using
> the axiom libraries, or generate the stubs and skeletons? 
>
> 2. If I write them from scratch, and already have my own
> model classes (representing such things as users), should I
> use one of the data binding libraries such as XMLBeans or
> JiBX? If so, which one? 
>
> 3. Should I be maintaining my wsdl file (and included schema
> files) by hand (or using an appropriate editing tool) in
> order to maitain control over the various types, as opposed
> to generating it using Java2Wsdl every time the interface changes? 
>
> I can see that the Axis developers have tried hard to provide
> a spectrum of methods and interfaces from the easy/simple to
> the complex/powerful. But I'd be very interested to know what 
> methods a really experienced Axis user would use.
>
> Many thanks,
> Michael Davis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org





Re: Recommendations for a new project?

Posted by robert lazarski <ro...@gmail.com>.
>From what you say I'd go with ADB databinding, creating and validating your
WSDL via eclipse's WST. If you are using hibernate / jdo and such, I'd
consider jibx. If you have complex schemas out of your control - which is
often the case for me - use xmlbeans. Either way, starting with the WSDL for
a 'contract first' approach is often a good choice.

If you've never done single sign on before I recommend CAS:

http://www.ja-sig.org/products/cas/

See rampart for ws-security - available for axis2 1.1.1 . Search the
archives for questions related to soap headers as the subject comes up
frequently.

HTH,
Robert

On 5/28/07, Michael.Davis@servicecanada.gc.ca <
Michael.Davis@servicecanada.gc.ca> wrote:
>
> I forgot to mention, in case it's important. I'm using axis2 1.1.1,
> because due to circumstances beyond my control, I'm forced to use jdk
> 1.4.2 and WebSphere 6.1, and I couldn't get axis2 1.2 to work with that
> combination.
>
> md
>
> > -----Original Message-----
> > From: Michael.Davis@servicecanada.gc.ca
> > [mailto:Michael.Davis@servicecanada.gc.ca]
> > Sent: Monday, May 28, 2007 11:44 AM
> > To: axis-user@ws.apache.org
> > Subject: Recommendations for a new project?
> >
> >
> > Hi,
> >
> > I apologize in advance for a slightly rambling and unfocussed
> > request for advice. The short questions are: if you are a
> > really experienced Axis user, and are starting a brand new
> > project, would you write everything from scratch using Axiom?
> > Would you use one of the data binding libraries such as JiBX?
> > Would you maintain your wsdl/xsd files by hand?
> >
> > Now for the long version:
> >
> > I'm new to Axis and web services, but have been programming
> > Java for several years.
> >
> > I'm working on a simple web service that provides a
> > single-sign-on for our organization's applications. The first
> > operation I'm working on is very simple - it just takes three
> > strings (user name, password and application name) and
> > returns a string containing a list of permissions.
> >
> > It works fine, but I've implemented it using the easiest way
> > possible. I just wrote a POJO class with a method
> >
> > String authenticate( String, String, String )
> >
> > and ran Java2Wsdl using the basic defaults. I don't
> > explicitly use any of the Axis apis.
> >
> > However, looking to the future, I can see where I'll
> > eventually need to take more control, for example I might
> > want to manipulate the SOAP headers and/or use WS-Security,
> > and I'll probably eventually want to pass around more
> > complicated structures than strings.
> >
> > So I'm trying to determine the best strategy. I'm slightly
> > bewildered with all of the choices:
> >
> > 1. Should I write the clients and services from scratch using
> > the axiom libraries, or generate the stubs and skeletons?
> >
> > 2. If I write them from scratch, and already have my own
> > model classes (representing such things as users), should I
> > use one of the data binding libraries such as XMLBeans or
> > JiBX? If so, which one?
> >
> > 3. Should I be maintaining my wsdl file (and included schema
> > files) by hand (or using an appropriate editing tool) in
> > order to maitain control over the various types, as opposed
> > to generating it using Java2Wsdl every time the interface changes?
> >
> > I can see that the Axis developers have tried hard to provide
> > a spectrum of methods and interfaces from the easy/simple to
> > the complex/powerful. But I'd be very interested to know what
> > methods a really experienced Axis user would use.
> >
> > Many thanks,
> > Michael Davis
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

RE: Recommendations for a new project?

Posted by Mi...@servicecanada.gc.ca.
I forgot to mention, in case it's important. I'm using axis2 1.1.1, because due to circumstances beyond my control, I'm forced to use jdk 1.4.2 and WebSphere 6.1, and I couldn't get axis2 1.2 to work with that combination.

md

> -----Original Message-----
> From: Michael.Davis@servicecanada.gc.ca
> [mailto:Michael.Davis@servicecanada.gc.ca]
> Sent: Monday, May 28, 2007 11:44 AM
> To: axis-user@ws.apache.org
> Subject: Recommendations for a new project?
> 
> 
> Hi,
> 
> I apologize in advance for a slightly rambling and unfocussed 
> request for advice. The short questions are: if you are a 
> really experienced Axis user, and are starting a brand new 
> project, would you write everything from scratch using Axiom? 
> Would you use one of the data binding libraries such as JiBX? 
> Would you maintain your wsdl/xsd files by hand?
> 
> Now for the long version:
> 
> I'm new to Axis and web services, but have been programming 
> Java for several years.
> 
> I'm working on a simple web service that provides a 
> single-sign-on for our organization's applications. The first 
> operation I'm working on is very simple - it just takes three 
> strings (user name, password and application name) and 
> returns a string containing a list of permissions.
> 
> It works fine, but I've implemented it using the easiest way 
> possible. I just wrote a POJO class with a method
> 
> String authenticate( String, String, String )
> 
> and ran Java2Wsdl using the basic defaults. I don't 
> explicitly use any of the Axis apis.
> 
> However, looking to the future, I can see where I'll 
> eventually need to take more control, for example I might 
> want to manipulate the SOAP headers and/or use WS-Security, 
> and I'll probably eventually want to pass around more 
> complicated structures than strings.
> 
> So I'm trying to determine the best strategy. I'm slightly 
> bewildered with all of the choices:
> 
> 1. Should I write the clients and services from scratch using 
> the axiom libraries, or generate the stubs and skeletons?
> 
> 2. If I write them from scratch, and already have my own 
> model classes (representing such things as users), should I 
> use one of the data binding libraries such as XMLBeans or 
> JiBX? If so, which one?
> 
> 3. Should I be maintaining my wsdl file (and included schema 
> files) by hand (or using an appropriate editing tool) in 
> order to maitain control over the various types, as opposed 
> to generating it using Java2Wsdl every time the interface changes?
> 
> I can see that the Axis developers have tried hard to provide 
> a spectrum of methods and interfaces from the easy/simple to 
> the complex/powerful. But I'd be very interested to know what 
> methods a really experienced Axis user would use.
> 
> Many thanks,
> Michael Davis
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Recommendations for a new project?

Posted by Mi...@servicecanada.gc.ca.
Hi,

I apologize in advance for a slightly rambling and unfocussed request for advice. The short questions are: if you are a really experienced Axis user, and are starting a brand new project, would you write everything from scratch using Axiom? Would you use one of the data binding libraries such as JiBX? Would you maintain your wsdl/xsd files by hand?

Now for the long version:

I'm new to Axis and web services, but have been programming Java for several years.

I'm working on a simple web service that provides a single-sign-on for our organization's applications. The first operation I'm working on is very simple - it just takes three strings (user name, password and application name) and returns a string containing a list of permissions.

It works fine, but I've implemented it using the easiest way possible. I just wrote a POJO class with a method

String authenticate( String, String, String )

and ran Java2Wsdl using the basic defaults. I don't explicitly use any of the Axis apis.

However, looking to the future, I can see where I'll eventually need to take more control, for example I might want to manipulate the SOAP headers and/or use WS-Security, and I'll probably eventually want to pass around more complicated structures than strings.

So I'm trying to determine the best strategy. I'm slightly bewildered with all of the choices:

1. Should I write the clients and services from scratch using the axiom libraries, or generate the stubs and skeletons?

2. If I write them from scratch, and already have my own model classes (representing such things as users), should I use one of the data binding libraries such as XMLBeans or JiBX? If so, which one?

3. Should I be maintaining my wsdl file (and included schema files) by hand (or using an appropriate editing tool) in order to maitain control over the various types, as opposed to generating it using Java2Wsdl every time the interface changes?

I can see that the Axis developers have tried hard to provide a spectrum of methods and interfaces from the easy/simple to the complex/powerful. But I'd be very interested to know what methods a really experienced Axis user would use.

Many thanks,
Michael Davis

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org