Thanks for the code!

While adapting it to my purposes, I get an error that I can't figure out. The big difference between the two is that my WSDL is actually 3 WSDL files. The constructor only lets you pass in one. I assume that SOAP::WSDL or XPath is following the import statements. Other than that, I can't tell what's wrong. It seems like it can't find the message="tns:getQuoteRequest1" in the RateCalculations.wsdl file. Below is the output from the my script, my WSDL files and my code. Unfortunately, this is an internal app, so you won't be able to hit the actual service.

I know this is a lot to look at. Thanks in advance for the help!

Doug

====

create SOAP::WSDL object
Created object, call proxy
proxy complete, call wsdlinit
current Portname is RateCalculationsPort
Updated portname is RateCalculations
call getQuote
Error processing WSDL: cannot find input message for method 'getQuote' (/definitions/[EMAIL PROTECTED]'RateCalculations']/[EMAIL PROTECTED]'getQuote']/input/@messa
ge) at C:/Perl/site/lib/SOAP/WSDL.pm line 146.

====


==== RateCalculationsService.wsdl ====

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="RateCalculationsService"
targetNamespace="http://action.rates.pmic.com.wsdl/RateCalculationsService/";
   xmlns="http://schemas.xmlsoap.org/wsdl/";
xmlns:binding="http://action.rates.pmic.com.wsdl/RateCalculationsBinding/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tns="http://action.rates.pmic.com.wsdl/RateCalculationsService/";> <import location="RateCalculationsBinding.wsdl" namespace="http://action.rates.pmic.com.wsdl/RateCalculationsBinding/"/>
   <service name="RateCalculationsService">
<port binding="binding:RateCalculationsBinding" name="RateCalculationsPort"> <soap:address location="http://was-test51b.pmic.com/rateServWeb/servlet/rpcrouter"/>
       </port>
   </service>
</definitions>

==== RateCalculationsService.wsdl ====

==== RateCalculationsBinding.wsdl ====

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="RateCalculationsBinding"
targetNamespace="http://action.rates.pmic.com.wsdl/RateCalculationsBinding/";
   xmlns="http://schemas.xmlsoap.org/wsdl/";
   xmlns:interface="http://action.rates.pmic.com.wsdl/RateCalculations/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tns="http://action.rates.pmic.com.wsdl/RateCalculationsBinding/";> <import location="RateCalculations.wsdl" namespace="http://action.rates.pmic.com.wsdl/RateCalculations/"/> <binding name="RateCalculationsBinding" type="interface:RateCalculations"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
       <operation name="getQuote">
           <soap:operation soapAction="" style="rpc"/>
           <input name="getQuoteRequest1">
               <soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://tempuri.org/com.pmic.rates.action.RateCalculations";
                   parts="xmlStr" use="encoded"/>
           </input>
           <output name="getQuoteResponse1">
               <soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://tempuri.org/com.pmic.rates.action.RateCalculations"; use="encoded"/>
           </output>
       </operation>
   </binding>
</definitions>

==== RateCalculationsBinding.wsdl ====

==== RateCalculations.wsdl ====

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="RateCalculations"
   targetNamespace="http://action.rates.pmic.com.wsdl/RateCalculations/";
   xmlns="http://schemas.xmlsoap.org/wsdl/";
xmlns:tns="http://action.rates.pmic.com.wsdl/RateCalculations/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
   <message name="getQuoteRequest1">
       <part name="xmlStr" type="xsd:string"/>
   </message>
   <message name="getQuoteResponse1">
       <part name="result" type="xsd:string"/>
   </message>
   <portType name="RateCalculations">
       <operation name="getQuote" parameterOrder="xmlStr">
           <input name="getQuoteRequest1" message="tns:getQuoteRequest1"/>
<output name="getQuoteResponse1" message="tns:getQuoteResponse1"/>
       </operation>
   </portType>
</definitions>

==== RateCalculations.wsdl ====

==== My Perl Code ====

#!/usr/bin/perl -w

use strict;
use warnings;

use SOAP::WSDL;
import SOAP::Lite +trace => 'debug';

use Data::Dumper;

print STDERR "create SOAP::WSDL object\n";

my $soap = SOAP::WSDL->new(wsdl => 'http://cms-test.pmic.com/startquote/form/RateCalculationsService.wsdl');

print STDERR "Created object, call proxy\n";

$soap->proxy('http://was-test51b.pmic.com/rateServWeb/servlet/rpcrouter');

print STDERR "proxy complete, call wsdlinit\n";

$soap->wsdlinit();

print STDERR "current Portname is " . $soap->_wsdl_portname() . "\n";

$soap->_wsdl_portname('RateCalculations');

print STDERR "Updated portname is " . $soap->_wsdl_portname() . "\n";

print STDERR "call getQuote \n";

my $som;
eval {
$som = $soap->call('getQuote',xmlStr=> 'test');
};

die $@ if $@;

if ($som->fault()) {
 printf STDERR $som->fault()->faultstring();
}

print STDERR "after call getQuote is\n";

print STDERR Dumper($som->method());

# give a raw view
print Dumper($som->result());

# WARNING - this dump is huge and opaque - uncomment with care...
#print STDERR Dumper($som);

exit(0);

==== My Perl Code ====

[EMAIL PROTECTED] wrote:
I connect to an ISP for domain registration, my code is perl, theirs is
Java, and a part of the proof-of-concept code I did looks like this.

#!/usr/bin/perl -w

use strict;
use warnings;

use SOAP::WSDL;
import SOAP::Lite +trace => 'debug';

use Data::Dumper;

print STDERR "create SOAP::WSDL object\n";

my $soap = SOAP::WSDL->new(wsdl =>
'http://bders.bottledomains.net.au/BDERS-OTE.wsdl');

print STDERR "Created object, call proxy\n";

$soap->proxy('http://bders.bottledomains.net.au/cgi-bin/WebObjects/BDERS
-OTE.woa/ws/BDERS');

print STDERR "proxy complete, call wsdlinit\n";

$soap->wsdlinit();

print STDERR "current Portname is " . $soap->_wsdl_portname() . "\n";

# the service list BDERS as the portType, but an XPath query for
[EMAIL PROTECTED]'BDERS'] will fail.
# fix this by manually setting the service to whats in the actually
there - note, when they fix this,
# our client could well break right here.
$soap->_wsdl_portname('BDResellerWebServices');

print STDERR "Updated portname is " . $soap->_wsdl_portname() . "\n";

print STDERR "call checkDomain \n";

my $som;
eval {
 $som = $soap->call('checkDomain',
                    resellerId       => 'X', # redacted
                    resellerUsername => 'X', # redacted
                    resellerPassword => 'X',  # redacted
                    domainName       => 'nobodyhasthis.com.au');
};

die $@ if $@;

if ($som->fault()) {
  printf STDERR $som->fault()->faultstring();
}

print STDERR "after call checkDomain BDERS is\n";

print STDERR Dumper($som->method());

# give a raw view
print STDERR Dumper($som->result());

# WARNING - this dump is huge and opaque - uncomment with care...
#print STDERR Dumper($som);

exit(0);
OK so its really simplistic, but I just wanted to prove my code and
their service worked. And it does.

L
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, 25 May 2007 6:50 AM
To: mason-users@lists.sourceforge.net
Subject: [Mason] Perl, SOAP and Java

Hello!

I've been tasked with displaying a quote for users on our website. I've been trying to make a Perl SOAP::Lite client for our Java service, but its not working. Most of the time, it executes and returns nothing. I'm trying the ->service option now, but it just makes the page hang forever.

Does anyone have experience with executing methods in a Java service from Perl? I'd like a small example to base my code off of.

Thanks!

--
Doug Dawson
Web Developer
Physicians Mutual Insurance Company
(402) 930-2432

On the morrow will this application work, as others have worked before?
Quoth the server, '404.'


____________________________________________________________
This message and any attachments are confidential, may contain privileged information, and are intended solely for the recipient named above. If you are not the intended recipient, or a person responsible for delivery to the named recipient, you are notified that any review, distribution, dissemination or copying is prohibited. If you have received this message in error, you should notify the sender by return email and delete the message from your computer system.


--------------------------------------------------------------
-----------
This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

**********************************************************************
IMPORTANT
The contents of this e-mail and its attachments are confidential and intended
solely for the use of the individual or entity to whom they are addressed.  If
you received this e-mail in error, please notify the HPA Postmaster, [EMAIL 
PROTECTED],
then delete  the e-mail.
This footnote also confirms that this e-mail message has been swept for the
presence of computer viruses by Ironport. Before opening or using any
attachments, check them for viruses and defects.
Our liability is limited to resupplying any affected attachments.
HPA collects personal information to provide and market our services. For more
information about use, disclosure and access see our Privacy Policy at
www.hpa.com.au
**********************************************************************

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users



--
Doug Dawson
Web Developer
Physicians Mutual Insurance Company
(402) 930-2432

Programmer - an organism that turns Mountain Dew into software.



____________________________________________________________
This message and any attachments are confidential, may contain privileged
information, and are intended solely for the recipient named above.
If you are not the intended recipient, or a person responsible for
delivery to the named recipient, you are notified that any review,
distribution, dissemination or copying is prohibited.  If you have
received this message in error, you should notify the sender by return
email and delete the message from your computer system.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to