Query on invoking remote java webservices from a Perl Client
From: Asha (s_aasha_at_yahoo.com)
Date: 06/18/04
- Previous message: Gunnar Hjalmarsson: "Re: sorting text"
- Next in thread: Vetle Roeim: "Re: Query on invoking remote java webservices from a Perl Client"
- Reply: Vetle Roeim: "Re: Query on invoking remote java webservices from a Perl Client"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Jun 2004 04:54:26 -0700
Hi all,
We are working on a Perl client, which should be able to invoke a
method exposed by remote Java webservice (Eg. JMXConnector) deployed
in the Weblogic server.
We have deployed Mbeans (Management Beans) in the Weblogic application
server. These Mbeans are essentially the Java webservices and these
are exposed to any client (In our case - Perl) using MX4J/Soap
Adaptor. This Adaptor uses Apache axis as its SOAP engine. The way of
communication between a Client and the MX4J/Soap Adaptor is through
SOAP/HTTP. I.e. The client's request will be in the form of SOAP
request and the server's response will be in the form of SOAP response
and these SOAP requests/responses will be transmitted over HTTP as
they are remotely located.
Our objective is to invoke a method of these Mbeans (exposed as
webservices) from a Perl Client. We are using a library called
SOAP::Lite for Perl, which uses 2 valuable methods 1) uri() 2) proxy()
to achieve our objective.
Uri ('uri') - Defines the URI (Universal Resource Identifier) of the
target method to be called, and returns the same object. This is
essentially the method's namespace.
Proxy ('url') - Defines the URL (Universal Resource Locator) of the
SOAP server, and returns the same object.
We are trying to invoke the method 'isRegistered ()' exposed by
JMXConnector Webservice.
We gave the URL "http://localhost:7001/axis/services/jmxconnector"
for the Proxy() method and we are able to connect to the WebLogic
server. We confirmed it from the Log. But, we are unable to invoke the
method isRegistered () from the JMXConnector Webservice. This might be
because of the wrong Parameter we have passed for URI (). We searched
in the net & saw some Perl client examples. In all these, they have
passed the namespace taken from the WSDL file as the parameter for
the URI () . We followed the same and we used the namespace
'http://mx4j.sourceforge.net/remote/soap/1.0' taken from the
JMXConnector's WSDL file. But, it didn't help us.
We are getting an error 'Could not find mandatory header connectionId'
in the Soap Response message.
The code Snippet is given below:
```````````````````````````````
use SOAP::Lite +trace; #Uses the SOAP::Lite library
use strict;
my $soap = new SOAP::Lite ();
my $service = $soap ->
uri('http://mx4j.sourceforge.net/remote/soap/1.0')
->
proxy('http://localhost:7001/axis/services/jmxconnector');
my $som = $service -> isRegistered();
my $result = $som-> result();
print "Is Registered? : $result";
References:
~~~~~~~~~~
1. http://www.geocities.com/herong_yang/perl/soap_lite.html
2. http://www.xav.com/perl/site/lib/SOAP/Lite.html
3. http://secu.zzu.edu.cn/book/Perl/Perl%20Bookshelf%20%5B3rd%20Ed%5D/perlnut/ch14_02.htm
Any help on this would be greatly appreciated.
with regards,
Asha
- Previous message: Gunnar Hjalmarsson: "Re: sorting text"
- Next in thread: Vetle Roeim: "Re: Query on invoking remote java webservices from a Perl Client"
- Reply: Vetle Roeim: "Re: Query on invoking remote java webservices from a Perl Client"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|