Re: Consuming web services document style
Re: Consuming web services document style
- Subject: Re: Consuming web services document style
- From: "Oliver Egger" <email@hidden>
- Date: Tue, 18 Dec 2007 14:59:48 +0100
Hi Fredrik
Actually i'm making the inverse stuff. Providing a webservice via
axis/webobjects for clients
and not calling a webservice from within webobjects.
The difference between doc/lit/wrapped and doc/lit is that the
function name is within input/output element
(see discussion for example here.
http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html)
I have no experience with using WOWebServiceClient classes, why do not
use axis directly? It is already
included in WebObjects and if you have access to the WSDL files you
can gemerate all the stubs to call the function
via wsdl2java.
in my ant task i make the following (assuming that all axis jars are
in lib and ${ws.name) is set
to the webservice name:
<target name="axis.clientbuild" description="build axis services">
<path id="axis.classpath">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
<taskdef resource="axis-tasks.properties" classpathref="axis.classpath" />
<axis-wsdl2java output="Sources" verbose="true"
url="${ws.name}.wsdl" testcase="true">
<mapping namespace="http://xxx.xx.xx/${ws.name}/"
package="xx.xxx.xx.${ws.name}" />
</axis-wsdl2java>
</target>
and then you have even a junit testcase which invokes the service.
if you go the axis way i would suggest that you read the axis tutorial
at http://ws.apache.org/axis/java/user-guide.html. axis tcpmon just as
a standalone tool is very helpful for debugging whats going on the
soap wire ... if you use the service
like this i don't think you need to make any changes except you run
java5 which might fail with older axis versions.
cheers oliver
On Dec 18, 2007 2:27 PM, Fredrik Lindgren <email@hidden> wrote:
> Hi Oliver
>
> As far as I can tell the service uses doc/lit. If it is wrapped I am
> not sure.
>
> I thought I could get hold of the MessageContext to set up the
> parameters and to parse out the answer, however it seems that I can
> not get hold of the MessageContext using the apple recommended way:
>
> MessageContext message_context = MessageContext.getCurrentContext();
>
> It always returns null!
>
> It sounds as you do not at all use the WOWebServiceClient classes.
> But you are using axis, am I right?
>
> What classes did you have to patch?
>
> Regards,
> /Fredrik
>
> 17 dec 2007 kl. 22:53 skrev Oliver Egger:
>
>
> > Hi Fredrik
> >
> > What kind of document style webservice do you want to use? We use
> > doc/lit/wrapped
> > style so that both java and .net client can talk to our server
> > application and it works very
> > well for us. For design reason we went with a "WSDL First" approach.
> > Describe the
> > interface in WSDL an then generate with the supplied Axis tool the
> > server skeleton (beans), so we
> > didn't want to expose any webobjects java classes and/or types and
> > programmed the bridge between
> > the webobjects classes and the beans. We had to "patch" two 2
> > webobjects classes because axis 1.x was not working with
> > java5/Webobjects 5.3 and a deployment directly with doc/lit/wrapped
> > was not possible with 5.3 (maybe with 5.4 possible now?)
> >
> > Maybe webservices are slow and cumbersome, but if you have once a
> > working setup you can generate
> > services faster then webpages ...
> >
> > Cheers,
> > Oliver
> >
> >
> >
> > On Dec 17, 2007 8:38 PM, Fredrik Lindgren <email@hidden> wrote:
> >>
> >>
> >> 17 dec 2007 kl. 20:24 skrev Georg Tuparev:
> >>
> >>
> >> On Dec 17, 2007, at 8:09 PM, Fredrik Lindgren wrote:
> >>
> >> Hello List!
> >>
> >> I have searched the web and read through all mails in this list
> >> regarding
> >> consuming a webservice with document style. The Apple
> >> documentation really
> >> does not help at all.
> >>
> >> All mails regarding this subject seems to go unanswered!
> >>
> >> I hope someone out there has some info on how to use a document
> >> style web
> >> service?
> >>
> >> The ultimate would be a guide with examples!
> >>
> >> I have done web services RPC style both client and server without
> >> problems.
> >> So I have some experience, however i am totally stuck on how to
> >> interpret
> >> and create the document, and how to handle the result.
> >>
> >> Any suggestions? Any pointers?
> >>
> >> What do you want to achieve? Often there are easier ways. I do now
> >> recommend
> >> WebServices if there is a way around them. They are complex,
> >> messy, slow,
> >> and have huge overhead. We use them in our banking software, but only
> >> because we had too.
> >>
> >> cheers
> >>
> >> gt
> >> I am sorry to say that I have a client that uses a document style
> >> webservice
> >> so that is why i am bound to using that...
> >>
> >> /Fredrik
> >> _______________________________________________
> >> Do not post admin requests to the list. They will be ignored.
> >> Webobjects-dev mailing list (email@hidden)
> >> Help/Unsubscribe/Update your Subscription:
> >> 40gmail.com
> >>
> >> This email sent to email@hidden
> >>
> >
>
>
--
oliver egger
bertastrasse 4, 8003 zürich
http://www.egger-loser.ch
mobile +41765795005
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden