Loading ...
Sorry, an error occurred while loading the content.

Perl Client sending objects to Java Server

Expand Messages
  • anders.johansson@aspiro.com
    I m trying to send Javabean-like objects as parameters in call method from a SOAP::LITE Perl Client to a Java Apache SOAP Server. Could someone please show me
    Message 1 of 1 , Nov 2, 2001
    • 0 Attachment
      I'm trying to send Javabean-like objects as parameters in call method
      from a SOAP::LITE Perl Client to a Java Apache SOAP Server. Could
      someone please show me how.

      Example:
      The Java bean:

      public class BeanObject{

      private String s1;
      private String s2;

      public void setS1(String s1){
      this.s1 = s1;
      }
      public String getS1(){
      return this.s1;
      }
      public void setS2(String s2){
      this.s2 = s2;
      }
      public String getS2(){
      return this.s2;
      }
      }

      Perl Client:

      use SOAP::Lite;

      $BeanObject = #Show me how to create this object...

      my $client = SOAP::Lite->uri('urn:SoapResponse');
      $client->proxy('http://localhost:8080/soap/servlet/rpcrouter');
      # What more do I need to provide with the call?
      my $response = $client->soapResponse($BeanObject);

      Java Server:

      public class SoapResponse {

      public SoapResponse() {
      }

      public String soapResponse(BeanObject beanObject){
      //Do stuff with beanObject
      return "OK";
      }
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.