I agree. I didn't find good samples too. All samples in the userguide use the
OMElements things.
Could someone give me a services.xml what a class like this must look like in
services.xml
public class Example {
public CustomBean getCustomBean(String name) {
...
}
public CustomBean getCustomBean(String name, String whatever) {
...
}
public CustomBean[] getAllBeans(String whatever) {
...
}
}
btw. must CustomBean implemente Serializable? And more than one service defined
in services.xml must be grouped with <serviceGroup>?
[email protected] schrieb am 25.01.06 07:54:34:
>
>
> Slowly the mysery services.xml becomes clearer. I succeeded using the
> RPCMessageReceiver ;-).
>
> I tested the operation:
>
> public MyBean getBean() {..}
>
> with the coresponding entry in the services.xml:
>
> <service name="Complex">
> <description>Complex example</description>
> <messageReceivers>
> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
> </messageReceivers>
> <parameter name="ServiceClass" locked="false">
> Complex
> </parameter>
> <operation name="getBean"/>
> </service>
>
> so far it worked. But now I added a parameter to the method. Something like
> that:
>
> public MyBean getBean(String name);
>
> and the service was broken. do i always have to define parameters if the
> operation takes parameters? whats the syntax for <parameter>? could u
> explain the example u gave below?
>
> Is there a documentation for services.xml somewhere? I like the axis2
> architecture but without knowing about the services.xml it's kind of hard to
> use!
>
> greetings
> peter
>
> > --- Ursprüngliche Nachricht ---
> > Von: "Deepal Jayasinghe" <[EMAIL PROTECTED]>
> > An: <[email protected]>
> > Betreff: Re: [Axis2] Rolling my own services.xml - how to define the in
> > and out message so it appears in the WSDL.
> > Datum: Wed, 25 Jan 2006 09:35:46 +0600
> >
> > Hi Anders;
> >
> > RawXMLINOutMessageReceiver can handle only OMElement case , that is if the
> > method take OMElment as input and give OMElement as output , if you want
> > to
> > work with other types , use RPCMessageReciver as message receiver and that
> > guy can handle those cases , so if your java impl class is like below
> >
> > class MyService {
> > public boolean getResult(String userName , String password){
> > //do smt
> > return true;
> > }
> > }
> >
> > then your sevrices.xml will look like below;
> >
> > <service name="ResultInfo">
> > <description>
> > Desc.....
> > </description>
> > <messageReceivers>
> > <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
> >
> > class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
> > </messageReceivers>
> > <parameter name="ServiceClass"
> > locked="false">com.acme.ResultInfo</parameter>
> > <operation name="getResults">
> > <message label="in">
> > <parameter name="username" locked="false">username</parameter>
> > <parameter name="password" locked="false">password</parameter>
> > <parameter name="resultId" locked="false">foo</parameter>
> > </message>
> > <message label="out">
> > <parameter name="result" locked="false">username</parameter>
> > </message>
> > </operation>
> > </service>
> >
> >
> > Thanks,
> > Deepal
> > ................................................................
> > ~Future is Open~
> >
> > ----- Original Message -----
> > From: "Anders Syvertsen" <[EMAIL PROTECTED]>
> > To: <[email protected]>
> > Sent: Tuesday, January 24, 2006 11:43 PM
> > Subject: [Axis2] Rolling my own services.xml - how to define the in and
> > out
> > message so it appears in the WSDL.
> >
> >
> > > Hi, i've download the Axis2 0.94 dist and trying to set up a webservice.
> > > I have successfully created my own .aar and deployed it, it was the
> > > simplest type with a few lines in services.xml..
> > >
> > > Now i wonder, can i have a service class (the java impl),
> > > // "Physical" method signature
> > > public OMElement getResults(OMElement) {
> > > .......
> > > }
> > > ..that "maps" to, in the WSDL, a method signature,
> > > // "Logical" method signature
> > > public String getResults(String username, String password, int
> > resultId)
> > > {
> > > ..........
> > > }
> > >
> > > Been trying to do some with services.xml for this like (with no
> > success),
> > > <service name="ResultInfo">
> > > <description>
> > > Desc.....
> > > </description>
> > > <parameter name="ServiceClass"
> > > locked="false">com.acme.ResultInfo</parameter>
> > > <operation name="getResults">
> > > <messageReceiver
> > > class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
> > > <message label="in">
> > > <parameter name="username" locked="false">username</parameter>
> > > <parameter name="password" locked="false">password</parameter>
> > > <parameter name="resultId" locked="false">foo</parameter>
> > > </message>
> > > <message label="out">
> > > <parameter name="result" locked="false">username</parameter>
> > > </message>
> > > </operation>
> > > </service>
> > >
> > > I dont know if what im asking is possible or not, but the idea is, as
> > > mentioned, to produce
> > > a WSDL that has the method signature i've tried to form in services.xml
> > > that should reflect the
> > > "Logical" method signature, and route to the "Physical" method
> > signature..
> > >
> > > Also, i've been trying to find the XSD for the services.xml with no
> > luck.
> > >
> > > Regards, Anders
> > >
> >
> >
>
> --
> 10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
> +++ GMX - die erste Adresse für Mail, Message, More +++
__________________________________________________________________________
Erweitern Sie FreeMail zu einem noch leistungsstarkeren E-Mail-Postfach!
Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131