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



Reply via email to