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

5312Re: [soaplite] axis client and Soap::Lite server example?

Expand Messages
  • Eric Bridger
    Mar 29, 2006
    • 0 Attachment
      I've had some succes with Pod::WSDL
      http://search.cpan.org/~tareka/Pod-WSDL-0.03/

      It is far from automatic and has some problems. No SoapAction attribute
      gets set, anyUri xsd type should be anyURI. But it will produce somethig
      that you can then take VI to.

      Richard N. Fogle said:
      > Ok, perhaps this was a bit of a tough one or something that could be
      > submitted to the Apache Axis list. One other quick question, I'm new to
      > WSDL and I can't use WSDL::Generator due to perl 5.8. Any tips? I
      > suppose I can open VI and start typing after finding an example on google,
      > but is there a more elegant way to get started?
      >
      > Regards,
      >
      > Rich
      > ----- Original Message -----
      > From: Richard N. Fogle
      > To: soaplite@yahoogroups.com
      > Sent: Sunday, March 26, 2006 9:45 AM
      > Subject: [soaplite] axis client and Soap::Lite server example?
      >
      >
      > Hello,
      >
      > I'm a bit new to Soap::Lite, and I've been busy writing web services so
      > we can fuse perl and Java together. However, I've run into a bit of a
      > snag and I can't find any examples anywhere to give to our Java devs
      > (who use Apache Axis). Given the followin----g successful client in
      > Perl for Package Foobar::widgetMaker (using Apache2::SOAP/mod_perl2):
      >
      > ---SNIP---
      > my $soap = SOAP::Lite
      > -> uri('Foobar/widgetMaker')
      > -> proxy('http://ws.mydomain.org/ws/soap');
      >
      > my $result = $soap->getWidgets(var1, var2, var3);
      > print $result->result();
      > ---SNIP---
      >
      > How does this translate into Java/Axis? I have the example but I keep
      > getting method denied. Anyone with any experience in this would be much
      > appreciated:
      >
      > 1 import org.apache.axis.client.Call;
      > 2 import org.apache.axis.client.Service;
      > 3 import javax.xml.namespace.QName;
      > 4
      > 5 public class TestClient {
      > 6 public static void main(String [] args) {
      > 7 try {
      > 8 String endpoint 9 http://ws.mydomain.org/ws/soap;
      > 10
      > 11 Service service = new Service();
      > 12 Call call = (Call) service.createCall();
      > 13
      > 14 call.setTargetEndpointAddress( new java.net.URL(endpoint) );
      > 15 call.setOperationName(new QName("Foobar/widgetMaker",
      > echoString"));
      > 16
      > 17 String ret = (String) call.invoke( new Object[] { "Hello!" } );
      > 18
      > 19 System.out.println("Sent 'Hello!', got '" + ret + "'");
      > 20 } catch (Exception e) {
      > 21 System.err.println(e.toString());
      > 22 }
      > 23 }
      > 24 }Regards,Rich
      >
      > ------------------------------------------------------------------------------
      > YAHOO! GROUPS LINKS
      >
      > a.. Visit your group "soaplite" on the web.
      >
      > b.. To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      > c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      > Service.
      >
      >
      > ------------------------------------------------------------------------------
      >
      >
    • Show all 5 messages in this topic