in reply to Re^2: SOAP::Lite, but not the problem?
in thread SOAP::Lite, but not the problem?

It took me a while to post this because I had to do so much reformatting of the messages you posted. I realise you can't control the output of the SOAP::Lite trace, nor the WSDL from the ASP.net server... but I do have two suggestions:

Notes

You didn't send identical messages, so I've corrected your debian request to have the same data (underneath TransactionProcess) as the redhat request. I also re-ordered the attributes of the soap-envelope node in the debian request so it would be easier to make a comparison.

Let's have a look at the two requests as per the trace you posted:

RedHat request

<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdlns="http://tempuri.org/wsdl/" xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extensio +n" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:typens="http://tempuri.org/type" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:namesp1="http://tempuri.org/message/"> <soap:Body> <namesp1:TransactionProcess> <inputTrans xsi:type="xsd:string"> <transaction> <merchant_id>XXXXXXXXXXXXX</merchant_id> <trnType>PA</trnType> <trnCardOwner>myname</trnCardOwner> <trnCardNumber>4030000010001234</trnCardNumber> <trnExpMonth>01</trnExpMonth> <trnExpYear>09</trnExpYear> <trnAmount>1.00</trnAmount> <trnCardCvd>123</trnCardCvd> <ordEmailAddress>sdfgf@glbcom.net</ordEmailAddress> <ordName>LFirstName LLastName</ordName> <ordPhoneNumber>6048745874</ordPhoneNumber> <ordAddress1>my addr</ordAddress1> <ordAddress2></ordAddress2> <ordCity>city</ordCity> <ordProvince>MB</ordProvince> <ordPostalCode>90210</ordPostalCode> <ordCountry>CA</ordCountry> <trnCurrency>USD</trnCurrency> </transaction> </inputTrans> </namesp1:TransactionProcess> </soap:Body> </soap:Envelope>

Debian request

<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdlns="http://tempuri.org/wsdl/" xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extensio +n" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:typens="http://tempuri.org/type" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:namesp1="http://tempuri.org/message/"> <soap:Body> <namesp1:TransactionProcess> <inputTrans xsi:type="xsd:string"> <transaction> <merchant_id>XXXXXXXXXXXXX</merchant_id> <trnType>PA</trnType> <trnCardOwner>myname</trnCardOwner> <trnCardNumber>4030000010001234</trnCardNumber> <trnExpMonth>01</trnExpMonth> <trnExpYear>09</trnExpYear> <trnAmount>1.00</trnAmount> <trnCardCvd>123</trnCardCvd> <ordEmailAddress>sdfgf@glbcom.net</ordEmailAddress> <ordName>LFirstName LLastName</ordName> <ordPhoneNumber>6048745874</ordPhoneNumber> <ordAddress1>my addr</ordAddress1> <ordAddress2></ordAddress2> <ordCity>city</ordCity> <ordProvince>MB</ordProvince> <ordPostalCode>90210</ordPostalCode> <ordCountry>CA</ordCountry> <trnCurrency>USD</trnCurrency> </transaction> </inputTrans> </namesp1:TransactionProcess> </soap:Body> </soap:Envelope>

Differences

I saved the two requests into separate files and ran diff over them:

bollock@localhost [~] diff -u redhat_request.xml debian_request.xml --- redhat_request.xml 2007-11-14 12:39:48.000000000 +1000 +++ debian_request.xml 2007-11-14 12:48:27.000000000 +1000 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" - xmlns:wsdlns="http://tempuri.org/wsdl/" - xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extensi +on" - soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" - xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" - xmlns:typens="http://tempuri.org/type" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdlns="http://tempuri.org/wsdl/" + xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extensi +on" + soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:typens="http://tempuri.org/type" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:namesp1="http://tempuri.org/message/"> <soap:Body> <namesp1:TransactionProcess>
The differing lines are:

- xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
So your two installations are sending differing 'soap' namespace values. Let's look at the SOAPFault you received back from the server for the debian request:

Soap Fault

<?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema" xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/so +ap/encoding/"> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:VersionMismatch</faultcode> <faultstring> VersionMismatch:The Soap processor found an invalid namespace +for the SOAP Envelope element. </faultstring> <detail> <mserror:errorInfo xmlns:mserror="http://schemas.microsoft.com +/soap-toolk it/faultdetail/error/"> <mserror:returnCode /> <mserror:serverErrorInfo> <mserror:description> VersionMismatch:The Soap processor found an invalid name +space for the SOAP Envelope element. HRESULT=0x800A1BBD - Server:An unanticipated error occur +red during the processing of this request. HRESULT=0x800A1BBD </mserror:description> <mserror:source>VersionMismatch</mserror:source> </mserror:serverErrorInfo> <mserror:callStack> <mserror:callElement> <mserror:component>VersionMismatch</mserror:component> <mserror:description> The Soap processor found an invalid namespace for the +SOAP Envelope element. </mserror:description> <mserror:returnCode /> </mserror:callElement> <mserror:callElement> <mserror:component>Server</mserror:component> <mserror:description> An unanticipated error occurred during the processing +of this request. </mserror:description> <mserror:returnCode /> </mserror:callElement> </mserror:callStack> </mserror:errorInfo> </detail> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
You can see that it's complaining about exactly the difference I noted above.

I've reformatted the opening section of the WSDL you posted:

Posted WSDL

<?xml version="1.0" encoding="utf-8"?> <definitions xmlns:wsdlns="http://tempuri.org/wsdl/" xmlns:typens="http://tempuri.org/type" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extensio +n" xmlns="http://schemas.xmlsoap.org/wsdl/" name="ProcessTransaction" targetNamespace="http://tempuri.org/wsdl/"> <types>
As you can clearly see, the WSDL contains exactly the same 'soap' namespace element as was sent by the 'debian' SOAP::WSDL request.

At first I thought that perhaps the web-service was serving different versions of the WSDL document, and you did mention some difference in message sizes; However, the size difference was because of the differing namespace in the request. To make sure I was always getting the same WSDL document, I downloaded it directly.

The service port node specifies https://www.beanstream.com/soap/ProcessTransaction.wsdl as the URL serving the WSDL document:

<service name="ProcessTransaction"> <port name="TransClassSoapPort" binding="wsdlns:TransClassSoapBind +ing"> <soap:address location="https://www.beanstream.com/soap/ProcessT +ransaction.wsdl" /> </port> </service>
Using firefox or wget, I can only get it to serve WSDL containing the "bad" namespace attribute.

Are you sure both installations have SOAP::Lite version 0.69, SOAP::WSDL v1.22+, and that they're both receiving the same WSDL?

If that's true and the RedHat installation sends a different request, then RedHat might have patched either SOAP::Lite or SOAP::WSDL for distribution (not unheard of). You can force the cpan shell to install over what you have to make sure they're the same.

Conclusions

The real problem as I see it, is that the web-service responds with valid WSDL, which the debian version uses in an entirely appropriate manner, and then the web-service responds that it doesn't like that namespace attribute. :-(

Have a look at the SOAP::Lite and SOAP::WSDL APIs to see if they allow you to manually override Envelope namespace attributes. If so, that should solve your problem. But really, based on my investigation, it's the server that is at fault.

-David

Replies are listed 'Best First'.
Re^4: SOAP::Lite, but not the problem?
by justshootme (Initiate) on Nov 15, 2007 at 06:36 UTC
    Monks help was top notch.. I went with stubmaker.pl, and edited the produced package after trying SOAP::WSDL, which generated the same errors. Changed the erroneous name space in the package, and the package worked first time. Documentation provided to the payment provider (beanstream). they, and I, are very grateful to the monks. Cheers Chris