Martin Gainty wrote:
Hello Jeremy

here is one an example which identifies a POJO named sample.pojo.service.WeatherService. <parameter name="ServiceClass">sample.pojo.service.WeatherService</parameter>

I did set up the services.xml, and the web service is fine except that the parameters are not being passed properly.

I came up with this example to show what I'm doing; maybe someone can tell me where I went wrong. There is one service class (BasicExample) and one auxiliary class that essentially functions as a struct (or a ComplexType in SOAP).

//---------------BasicExample.java

package guy.jeremy.examples;

public class BasicExample
{
public Boolean doomedToFail(SomeType parameter)
   {
       if(parameter == null)
           return Boolean.FALSE;
return Boolean.TRUE;
   }
public BasicExample()
   {
}
}
//-------------------------------------

//-----------SomeType.java

package guy.jeremy.examples;

public class SomeType
{
   public Integer foo;
   public Integer bar;
   public Float baz;
}

//-----------------------------------


I send this SOAP message:

<soapenv:Envelope
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
  <soapenv:Body>
     <ns:doomedToFail
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
         xmlns:ns="http://examples.jeremy.guy/xsd";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
        <ns:param0>
           <ns:baz>52.2</ns:baz>
           <ns:bar>78</ns:bar>
           <ns:foo>95</ns:foo>
        </ns:param0>
     </ns:doomedToFail>
  </soapenv:Body>
</soapenv:Envelope>


and get back a "false", meaning the parameter was recieved as null even though 
it was clearly passed in.


What am I doing wrong here?


Thanks,
Jeremy






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to