Anne,
I tried with:
call.setSOAPActionURI("http://foobar:8003/EchoYa#echoYa");
It still does not work, the error msg remains similar. Is that because I did not have
a WSDL for the WS server?
Thanks,
Donald
--- Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
> SOAP::Lite is rejecting your request because you have not specified the
> correct SOAPAction value. SOAPAction is supposed to be a URI. Look at the
> WSDL document to determine the correct value for SOAPAction value. It's
> specified in the <soap:operation> element in the <binding>.
>
> Then change line 15 so that you specify the correct value. Perhaps something
> like:
>
> 15. call.setSOAPActionURI("http://foobar:8003/EchoYa#echoYa");
>
> Regards,
> Anne
>
> -----Original Message-----
> From: Xi.Yue Chen.Wu [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 12, 2004 9:31 AM
> To: [EMAIL PROTECTED]
> Subject: A question about an Axis client talk to a Perl/SOAP::Lite WS
> server. Help please!
>
> Hi, All.
>
> I wrote a simple WS server in Perl(SOAP::Lite 0.55),
> which serves its purpose(echoing whatever string it
> receives) fine if the client is also in
> Perl/SOAP::Lite or Apache-Soap-2.3.1. However, if the
> client is written
> in Axis1.1, the client can not get the service.
>
> Here is the detail:
>
> The WS server is deployed in the static mode, like
> this:
>
> --------------------8<-----------------------
> #! /usr/local/bin/perl -w
> use SOAP::Transport::HTTP;
> use lib ("/nas/aidddev/test/testSoap/");
> use EchoYa qw(echoYa);
>
> $SIG{PIPE} = $SIG{INT} = 'IGNORE';
>
> $daemon = SOAP::Transport::HTTP::Daemon
> -> new (LocalPort => 8003)
> -> dispatch_to('EchoYa');
> $daemon->handle;
> --------------------8<-----------------------
>
> The EchoYa.pm is like this:
> --------------------8<-----------------------
> package EchoYa;
>
> require Exporter;
> @ISA = qw(Exporter);
> @EXPORT = qw( echoYa );
>
> sub echoYa {
> print "enter echoYa\n";
> my $self = shift;
> my $ya = shift;
> return "I got $ya!";
> }
> 1;
> --------------------8<-----------------------
>
> The client is:
> --------------------8<-----------------------
> 1. package samples.userguide.example1;
>
> 2. import org.apache.axis.client.Call;
> 3. import org.apache.axis.client.Service;
> 4. import javax.xml.namespace.QName;
>
> 5. public class TestClient {
> 6. public static void main(String [] args) {
> 7. String ret = "1";
> 8. try {
> 9. String endpoint =
> "http://foobar:8003/EchoYa";
>
> 10. Service service = new Service();
> 11. Call call = (Call)
> service.createCall();
>
> 12. call.setTargetEndpointAddress( new
> java.net.URL(endpoint) );
> 13. call.setOperationName("echoYa");
> 14. call.setUseSOAPAction(true);
> 15. call.setSOAPActionURI("echoYa");
>
> 16. ret = (String) call.invoke( new Object[]
> { "aMsssg" } );
>
> 17. System.out.println("Sent aMsssg , got
> '" + ret + "'");
> 18. } catch (Exception e) {
> 19. System.err.println(e.toString());
> 20. }
> 21. }
> 22. }
> --------------------8<-----------------------
> The error message I got is:
> SOAPAction shall match 'uri#method' if present (got
> 'echoYa', expected '#echoYa'
>
> Then, I altered the code of the client a little bit by
> commenting out line 14 and 15. (which means, not
> calling the setSOAPActionURI() method).
> --------------------8<-----------------------
> 1. package samples.userguide.example1;
>
> 2. import org.apache.axis.client.Call;
> 3. import org.apache.axis.client.Service;
> 4. import javax.xml.namespace.QName;
>
> 5. public class TestClient {
> 6. public static void main(String [] args) {
> 7. String ret = "1";
> 8. try {
> 9. String endpoint =
> "http://foobar:8003/EchoYa";
>
> 10. Service service = new Service();
> 11. Call call = (Call)
> service.createCall();
>
> 12. call.setTargetEndpointAddress( new
> java.net.URL(endpoint) );
> 13. call.setOperationName("echoYa");
> 14. //call.setUseSOAPAction(true);
> 15. //call.setSOAPActionURI("echoYa");
>
> 16. ret = (String) call.invoke( new Object[]
> { "aMsssg" } );
>
> 17. System.out.println("Sent aMsssg , got
> '" + ret + "'");
> 18. } catch (Exception e) {
> 19. System.err.println(e.toString());
> 20. }
> 21. }
> 22. }
> --------------------8<-----------------------
> Then I got complain like this:
>
> Denied access to method (echoYa) in class (main) at
> /host/dev/lib/site_perl/5.6.1/SOAP/Lite.pm line 2130.
>
> Did anyone have a similiar difficulty before.
> I bet I must have missed something. Can anyone help?
>
> Thanks in advance,
>
> Donald
>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail
>
>
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail