pls see my comment below;

Thanks,
Deepal
................................................................
~Future is Open~

----- Original Message ----- From: "Peter Ludwig" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, January 25, 2006 12:53 PM
Subject: Re: [Axis2] Rolling my own services.xml - how to define the in and out message so it appears in the WSDL.



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>



you do not need to add any operations in services.xml unless you are going to ovride that


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?


if u can pls send the stack trace , I can not understad how the service was broken due to this changes , it can not be

and you DO NOT need to define paramters in operation if the method take some paramters , RPCMessageReciver will handle that for u


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!


well , there is but I am not 100% sure about its accuracy , so If u have any quection pls ask and I will try to update the documents as soon as I can



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 +++



Reply via email to