jeudi 9 avril 2015

Perl WSDL11 Can't Make it to Work on WSDL with XML import


Vote count:

0




I am a newbie to Perl programming.


In order to learn accessing a soap service, I tried to create a soap client that can connect to "http://ift.tt/1DOs0xa" in which I was successful to use the web service.


Now, I migrated my code to connect to my company's soap service but I encountered a problem.


"The error says that their were no port_type and no operation as well."


See code snippet below.



#!/usr/bin/perl

use 5.018;
use strict;
use warnings;

use Data::Dumper qw{Dumper};
use XML::Compile::SOAP11;
use XML::Compile::SOAP12;
use XML::Compile::WSDL11;

my $WsdlUrl;
my $WsdlXml;
my $SoapSrvc;
my (%SoapOps);

$WsdlUrl = "http://maxcavmes04/CamstarExternal/camstar.svc";
$WsdlXml = XML::LibXML->new->parse_file($WsdlUrl);
$SoapSrvc = XML::Compile::WSDL11->new($WsdlXml);

print Dumper(\$SoapSrvc);

foreach my $SoapOp ($SoapSrvc->operations())
{
# XML::Compile::SOAP 2.x
if ($XML::Compile::SOAP::VERSION > 1.99)
{
$SoapOps{$SoapOp->name}
= $SoapSrvc->compileClient(operation => $SoapOp->name,
port => SOAP_PORT_TYPE);
}
else # XML::Compile::SOAP 0.7x
{
$SoapOps{$SoapOp->{operation}}
= $SoapSrvc->compileClient(operation => $SoapOp->{operation},
port => SOAP_PORT_TYPE);
}
}

print "\n\n";
exit(0);


Investigating it further why it won't work, I use a 3rd party software called .NET WebService Studio. I realize from the returned of the WebService Studio that my company's Soap service uses two WSDL file through WSDL:Import.


I would like to ask from this community of how I can modify my program in order to have access to company's soap service using WSDL11.


I have also attached the dumped data of the soap service connection as reference through "print Dumper(\$SoapSrvc)" statement.


Link: Dumped_SoapSrvc Data



asked 50 secs ago







Perl WSDL11 Can't Make it to Work on WSDL with XML import

Aucun commentaire:

Enregistrer un commentaire