Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: SOAP::WSDL Installation

by Khurrum (Novice)
on Nov 08, 2007 at 02:08 UTC ( [id://649618]=note: print w/replies, xml ) Need Help??


in reply to Re^3: SOAP::WSDL Installation
in thread SOAP::WSDL Installation

Thank you so much for your reply. I did add the repository and when i used the GUI for PPM i verified that the repository was added but when i search for the perl module it still shows version 0.55 for SOAP::Lite and for SOAP::WSDL it shows 1.23 i went further to check the website manually and verified that it does have the latest packages. I tried to manually install the packages but it gives the following errors:
C:\SoapTest>ppm install http://trouchelle.com/ppm/SOAP-Lite.ppd ppm install failed: Can't find any package that provide Crypt-SSLeay f +or SOAP-Li te
C:\SoapTest>ppm install http://trouchelle.com/ppm/SOAP-WSDL.ppd ppm install failed: No PPD found at http://trouchelle.com/ppm/SOAP-WSD +L.ppd
Secondly, using the older packages that i was able to get from before i am getting another error. Initially it complained about using the <import> tag for XML Schema definition, which was a problem i knew as SOAP::WSDL doesnt support XML Schema definition imports. I fixed that by inlining the schema and now when i run the script it gives the following error:
C:\SoapTest>perl perlMonk.pl Reference found where even-sized list expected at C:/Perl/site/lib/SOA +P/WSDL.pm line 235. SampleTest Error: The message with Action 'http://tempuri.org/#SampleT +est' canno t be processed at the receiver, due to a ContractFilter mismatch at th +e Endpoint Dispatcher. This may be because of either a contract mismatch (mismatc +hed Action s between sender and receiver) or a binding/security mismatch between +the sender and the receiver. Check that sender and receiver have the same contr +act and th e same binding (including security requirements, e.g. Message, Transpo +rt, None).
I am thinking maybe it has to do with my App.config file and the settings i use there. Would you be able to guide me on this? Lastly, can you suggest a tool that i can use to view the expected SOAP request that my WCF web service expects, the actual request sent from my perl script and the response sent from the web service. I have tried Microsoft's Service Trace Viewer but it doesnt provide all the info. Maybe a tool like NetMon would allow me to view the network traffic or something else that you can suggest.

Thanks

Replies are listed 'Best First'.
Re^5: SOAP::WSDL Installation
by erroneousBollock (Curate) on Nov 08, 2007 at 03:35 UTC
    I did add the repository and when i used the GUI for PPM i verified that the repository was added but when i search for the perl module it still shows version 0.55 for SOAP::Lite and for SOAP::WSDL it shows 1.23 i went further to check the website manually and verified that it does have the latest packages.
    It seems quite unlikely that PPM would pick up the latest version of SOAP::WSDL from trouchelle.com but not SOAP::Lite. Are you sure you weren't just looking at the installed version number of SOAP::Lite?

    I tried to manually install the packages but it gives the following errors:
    C:\SoapTest>ppm install http://trouchelle.com/ppm/SOAP-Lite.ppd ppm install failed: Can't find any package that provide Crypt-SSLeay f +or SOAP-Li te
    Firstly, it's not a good idea to fight the package management system ;) If you don't know why it won't let you install something, you're not equipped to forcefully install it.

    Looking at build status for 'C' packages on trouchelle.com, it's apparent that they don't have a building version of Crypt::SSLeay, which is a dependency of SOAP::Lite. ActiveState also don't seem to have it, so you'll need another repository:

      ppm rep add UofWinnipeg http://theoryx5.uwinnipeg.ca/ppms

    Once done, have the GUI install Crypt-SSLeay, and then try again to install SOAP-Lite through the GUI. Don't worry to much about mixing and matching packages from different repos... just make sure they're for Perl 5.8 (not 5.6).

    C:\SoapTest>ppm install http://trouchelle.com/ppm/SOAP-WSDL.ppd ppm install failed: No PPD found at http://trouchelle.com/ppm/SOAP-WSD +L.ppd
    I verified that trouchelle.com does host the SOAP-WSDL ppd file (and zip file) exactly where it advertises... that error message looks weird, perhaps related to connectivity? Definitely try again after you get the newer version of SOAP::Lite.

    Secondly, using the older packages that i was able to get from before i am getting another error. Initially it complained about using the <import> tag for XML Schema definition, which was a problem i knew as SOAP::WSDL doesnt support XML Schema definition imports. ... I am thinking maybe it has to do with my App.config file and the settings i use there. Would you be able to guide me on this?
    Ok, now we're entering territory I'm not totally read-up on ;) Are you definitely feeding SOAP::WSDL a file/url that contains only a valid WSDL description of your webservice? If so, I imagine the problem is that SOAP::WSDL can't handle some of the WCF-generated WSDL constructs. I've found a few links for you to read:

       1, 2,3,4,5

    A google search for '+WCF +WSDL' finds many more.

    (Update: I think that second link describes exactly what's going on and what you need to do to fix it.)

    Lastly, can you suggest a tool that i can use to A) view the expected SOAP request that my WCF web service expects, B) the actual request sent from my perl script and the C) response sent from the web service.
    For A), I've no idea. Usually, I find that manually reading the WSDL is enough to figure out what I'm doing wrong. It's mainly up to the remote webservice as to how strictly it complies with the WSDL specification it publishes.

    For B) & C), just turn on the 'trace' option in SOAP::Lite.

    Unfortunately, SOAP interoperability is known industry-wide to be a joke. Developers fight these battles all the time. Doing google search for 'SOAP interoperability' is enlightening.

    -David

      Problem with ppm install failed: No PPD found at http://trouchelle.com/ppm/SOAP-WSDL.ppd is fixed now. You can try ppm install once again. -- S.T.
      Thank you for your detailed response. I was able to get SOAP::Lite 0.69 installed properly whereas i am running SOAP::WSDL 1.23 because there wasnt any connectivity issue with trouchelle.com it still gives me the same error as before.

      I read through the resource links you provided and they were quite helpful and i was able to get my earlier error fixed so at least now i can call a simple method exposed through my service with only one string argument. This verifies that my WSDL is correctly generated.

      Now when i run the test script you gave me earlier where i try to pass a Tester object that doesnt seem to work properly. I get the following output:
      C:\SoapTest>perl perlMonk.pl 3519 Reference found where even-sized list expected at C:/Perl/site/lib/SOA +P/WSDL.pm line 235. $VAR1 = 'NULL test';
      Now here the script i use:
      use SOAP::WSDL; use Data::Dumper; use strict; my $proxy = "http://localhost:" . $ARGV[0] . "/"; my $soap = SOAP::WSDL->new(); $soap->wsdl('http://localhost:8000/'); $soap->proxy($proxy); #$soap->on_action(sub { return $_[0].$_[1]; }); $soap->wsdlinit +(caching => 1); my $som = $soap->SampleTest({ Name => 'Nathan', Age => 22}); if ($som->fault) { print "SampleTest Error: ".$som->faultstring."\n"; } else { print Dumper($som->paramsall); }
      My implemtation for the method is:
      public string SampleTest(Tester test) { if (test == null) { return String.Format("NULL test"); } else if (test.Age == 22) { return String.Format("SUCCESS test"); } else { return String.Format("FAILURE test"); } }
      And the Tester class implementation is:
      [DataContract] public class Tester { private string name; private int age; public Tester(string n, int a) { name = n; age = a; } [DataMember(IsRequired = true)] public string Name { get { return name; } set { name = value; } } [DataMember(IsRequired = true)] public int Age { get { return age; } set { age = value; } } }
      I can see two things going wrong either the SOAP::WSDL doesnt send the object properly or SOAP::WSDL cant handle some of the WCF generated WSDL contructs more specifically relating to the Tester class implementation because i was able to get SOAP::WSDL to work with the following simple web service method:
      public string HelloWorld(string name) { return String.Format("Hello {0}!!!", name); }
      I will continue playing around but do you have any suggestions?
        Could you post the generated WSDL file ?

        -David

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://649618]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-19 12:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found