Hello all,
Please forgive my ignorance of PERL. I am a .Net developer trying to create some PERL sample code for connecting to a .Net Web service (we have developed) using SOAP::Lite.
I have everything working with a regular http request. However when I change the proxy address to SSL by changing the http to https i get a "segmentation fault." If I change it back, it works again. When set for SSL, it doesn't appear to be hitting the Web server. There are no entries in the Web server logs.
Below is my code. As I am not a PERL developer, any and all suggestions would be greatly appreciated. Thank you in advance.
Here is the output with the error:
ZIPFOURce Web Service PERL Example *************************
INPUT ADDRESS:
BCC Software, Inc
75 josons dr
14623
SOAP::Transport::HTTP::Client::send_receive: POST HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 973
Content-Type: text/xml; charset=utf-8
SOAPAction:
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi=" xmlns:soapenc=" xmlns:xsd=" soap:encodingStyle=" xmlns:soap=" xmlns=" xsi:type="xsd:string">TestLicense</LicenseKey><UserDefinedId xsi:type="xsd:string">udf</UserDefinedId><Firm xsi:type="xsd:string">BCC Software, Inc</Firm><Address1 xsi:type="xsd:string" /><Address2 xsi:type="xsd:string">75 josons dr</Address2><Address3 xsi:type="xsd:string" /><SecondaryAddressInfo xsi:type="xsd:string" /><Urbanization xsi:type="xsd:string" /><City xsi:type="xsd:string" /><State xsi:type="xsd:string" /><Zipcode xsi:type="xsd:int">14623</Zipcode><ResellerCustId xsi:type="xsd:string" /></EncodeAddress></soap:Body></soap:Envelope>
Segmentation fault
Pat B
Please forgive my ignorance of PERL. I am a .Net developer trying to create some PERL sample code for connecting to a .Net Web service (we have developed) using SOAP::Lite.
I have everything working with a regular http request. However when I change the proxy address to SSL by changing the http to https i get a "segmentation fault." If I change it back, it works again. When set for SSL, it doesn't appear to be hitting the Web server. There are no entries in the Web server logs.
Below is my code. As I am not a PERL developer, any and all suggestions would be greatly appreciated. Thank you in advance.
Code:
#!/usr/bin/perl
use SOAP::Lite +trace => debug;
print "\n\nZIPFOURce Web Service PERL Example *************************\n\n";
print "INPUT ADDRESS:\nBCC Software, Inc\n75 josons dr\n14623\n\n";
my $methodsURI = '[URL unfurl="true"]http://ws.bccsoftware.com/ZIPFOURce';[/URL]
my $methodProxy = '[URL unfurl="true"]https://testingserver/WebServices/ZIPFOURceWebService/ZIPFOURceWS.asmx';[/URL]
my $methodAction = $methodsURI . "/EncodeAddress";
my $service = SOAP::Lite
-> uri( $methodsURI )
-> proxy( $methodProxy )
-> on_action(sub{$methodAction; });
my $serviceMethod = SOAP::Data
-> name('EncodeAddress')
-> attr( {xmlns => $methodsURI } );
my $result = $service -> call(
$serviceMethod =>
SOAP::Data -> name(LicenseKey => 'TestLicense')
, SOAP::Data -> name(UserDefinedId => 'udf')
, SOAP::Data -> name(Firm => 'BCC Software, Inc')
, SOAP::Data -> name(Address1 => '')
, SOAP::Data -> name(Address2 => '75 josons dr')
, SOAP::Data -> name(Address3 => '')
, SOAP::Data -> name(SecondaryAddressInfo => '')
, SOAP::Data -> name(Urbanization => '')
, SOAP::Data -> name(City => '')
, SOAP::Data -> name(State => '')
, SOAP::Data -> name(Zipcode => '14623')
, SOAP::Data -> name(ResellerCustId => '')
);
#my $result = $soap -> call($method => $query);
print "SAMPLING OF RESULTS \n";
print "Firm: " . $result -> valueof('//Firm') . "\n";
print "Address2: " . $result -> valueof('//Address2') . "\n";
print "Address1: " . $result -> valueof('//Address1') . "\n";
print "City: " . $result -> valueof('//City') . "\n";
print "State: " . $result -> valueof('//State') . "\n";
print "ZIP Code " . $result -> valueof('//Zipcode') . "\n";
print "County " . $result -> valueof('//County') . "\n";
print "Record Type " . $result -> valueof('//RecordType') . "\n";
Here is the output with the error:
ZIPFOURce Web Service PERL Example *************************
INPUT ADDRESS:
BCC Software, Inc
75 josons dr
14623
SOAP::Transport::HTTP::Client::send_receive: POST HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 973
Content-Type: text/xml; charset=utf-8
SOAPAction:
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi=" xmlns:soapenc=" xmlns:xsd=" soap:encodingStyle=" xmlns:soap=" xmlns=" xsi:type="xsd:string">TestLicense</LicenseKey><UserDefinedId xsi:type="xsd:string">udf</UserDefinedId><Firm xsi:type="xsd:string">BCC Software, Inc</Firm><Address1 xsi:type="xsd:string" /><Address2 xsi:type="xsd:string">75 josons dr</Address2><Address3 xsi:type="xsd:string" /><SecondaryAddressInfo xsi:type="xsd:string" /><Urbanization xsi:type="xsd:string" /><City xsi:type="xsd:string" /><State xsi:type="xsd:string" /><Zipcode xsi:type="xsd:int">14623</Zipcode><ResellerCustId xsi:type="xsd:string" /></EncodeAddress></soap:Body></soap:Envelope>
Segmentation fault
Pat B