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

What exactly shows as 'not defined'? rpm doesn't ever say that to the best of my knowledge.
'i SOAP::Lite' on CPAN gave me undefined as currently installed
On the RedHat box, what does this print?: perl -MSOAP::Lite -e 'print "$SOAP::Lite::VERSION\n"'
0.69
Could you post your WSDL
WSDL below - note not mine- Beanstream's -


<?xml version='1.0' encoding='UTF-8' ?> <definitions name ='ProcessTransaction' targetNamespace = 'http://tempuri.org/wsdl/' 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-extension' xmlns='http://schemas.xmlsoap.org/wsdl/'> <types> <schema targetNamespace='http://tempuri.org/type' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' elementFormDefault='qualified'> </schema> </types> <message name='TransClass.TransactionProcess'> <part name='inputTrans' type='xsd:string'/> </message> <message name='TransClass.TransactionProcessResponse'> <part name='Result' type='xsd:string'/> </message> <message name='TransClass.TransactionProcessAuth'> <part name='inputTrans' type='xsd:string'/> </message> <message name='TransClass.TransactionProcessAuthResponse'> <part name='Result' type='xsd:string'/> </message> <portType name='TransClassSoapPort'> <operation name='TransactionProcess' parameterOrder='inputTrans'> <input message='wsdlns:TransClass.TransactionProcess' /> <output message='wsdlns:TransClass.TransactionProcessResponse' /> </operation> <operation name='TransactionProcessAuth' parameterOrder='inputTrans'> <input message='wsdlns:TransClass.TransactionProcessAuth' /> <output message='wsdlns:TransClass.TransactionProcessAuthResponse' /> </operation> </portType> <binding name='TransClassSoapBinding' type='wsdlns:TransClassSoapPort' > <stk:binding preferredEncoding='UTF-8'/> <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http' /> <operation name='TransactionProcess' > <soap:operation soapAction='http://tempuri.org/action/TransClass.TransactionProcess' /> <input> <soap:body use='encoded' namespace='http://tempuri.org/message/' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' /> </input> <output> <soap:body use='encoded' namespace='http://tempuri.org/message/' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' /> </output> </operation> <operation name='TransactionProcessAuth' > <soap:operation soapAction='http://tempuri.org/action/TransClass.TransactionProcessAuth' /> <input> <soap:body use='encoded' namespace='http://tempuri.org/message/' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' /> </input> <output> <soap:body use='encoded' namespace='http://tempuri.org/message/' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' /> </output> </operation> </binding> <service name='ProcessTransaction' > <port name='TransClassSoapPort' binding='wsdlns:TransClassSoapBinding' > <soap:address location='https://www.beanstream.com/soap/ProcessTransaction.wsdl' /> </port> </service> </definitions>

*******end Wsdl

Redhat Trace******************************

SOAP::Transport::HTTP::Client::send_receive: POST https://www.beanstream.com/soap/ProcessTransaction.wsdl HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 1528 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://tempuri.org/action/TransClass.TransactionProcess"

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://sch emas.xmlsoap.org/soap/envelope/" xmlns:wsdlns="http://tempuri.org/wsdl/" xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsd l-extension" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodi ng/" xmlns:typens="http://tempuri.org/type" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:namesp1="http://tempuri.org/messag e/">
<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>

SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK Connection: close Date: Fri, 09 Nov 2007 22:04:48 GMT Server: Microsoft-IIS/5.0 Content-Length: 789 Content-Type: text/xml; charset="UTF-8" Expires: -1; Client-Date: Fri, 09 Nov 2007 22:04:48 GMT Client-Peer: 139.142.123.254:443 Client-Response-Num: 1 Client-SSL-Cert-Issuer: /C=US/O=Equifax/OU=Equifax Secure Certificate Authority Client-SSL-Cert-Subject: /C=CA/ST=BC/L=Victoria/O=Beanstream/OU=Beanstream Internet Commerce Inc/CN=www.beanstream.com Client-SSL-Cipher: RC4-MD5 Client-SSL-Warning: Peer certificate not verified X-Powered-By: ASP.NET <?xml version="1.0" encoding="UTF-8" standalone="no"?><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="h ttp://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP SDK4:TransactionProcessResponse xmlns:SOAPSDK4="http://tempuri.org/message/"><Result><response><trnId>10000896</tr nId><trnApproved>1</trnApproved><messageId>1</messageId><messageText>Approved</messageText> ;<trnAuthCode>TEST</trnAuthCode></response></Result></SOAPSDK4:TransactionProcessResponse></SOAP-ENV:Body></SOA P-ENV:Envelope> r = <response><trnId>10000896</trnId><trnApproved>1</trnApproved><messageId>1</messageId><messageText>Approved</messageText><trnA uthCode>TEST</trnAuthCode></response>

END RED HAT TRACE ****************************

DEBIAN Trace ***********************************

SOAP::Transport::HTTP::Client::send_receive: POST https://www.beanstream.com/soap/ProcessTransaction.wsdl HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 1530 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://tempuri.org/action/TransClass.TransactionProcess"

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:namesp1="http://tempuri.org/message/" xmlns:stk="http://schemas.micros oft.com/soap-toolkit/wsdl-extension" xmlns:typens="http://tempuri.org/type" soap:encodingStyle="http://schemas.xmlsoap.org/soap/e ncoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc= "http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdlns="http://tempuri.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body><namesp1:TransactionProcess><inputTrans xsi:type="xsd:string"> <transaction> <merchant_id>XXXXXXXXXXXX</merchant_id> <trnType>PA</trnType> <trnCardOwner>mynam</trnCardOwner> <trnCardNumber>5100000010001004</trnCardNumber> <trnExpMonth>01</trnExpMonth> <trnExpYear>10</trnExpYear> <trnAmount>1.00</trnAmount> <trnCardCvd>123</trnCardCvd> <ordEmailAddress>ghguiq@glbcom.net</ordEmailAddress> <ordName>LFirstName LLastName</ordName> <ordPhoneNumber>8745874521</ordPhoneNumber> <ordAddress1>715 etr</ordAddress1> <ordAddress2>street</ordAddress2> <ordCity>city</ordCity> <ordProvince>AR</ordProvince> <ordPostalCode>90210</ordPostalCode> <ordCountry>US</ordCountry> <trnCurrency>USD</trnCurrency> </transaction> </inputTrans></namesp1:TransactionProcess></soap:Body></soap:Envelope>

SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error Connection: close Date: Tue, 13 Nov 2007 17:22:37 GMT Server: Microsoft-IIS/5.0 Content-Length: 1681 Content-Type: text/xml; charset="UTF-8" Expires: -1; Client-Date: Tue, 13 Nov 2007 17:22:37 GMT Client-Peer: 139.142.123.250:443 Client-Response-Num: 1 Client-SSL-Cert-Issuer: /C=US/O=Equifax/OU=Equifax Secure Certificate Authority Client-SSL-Cert-Subject: /C=CA/ST=BC/L=Victoria/O=Beanstream/OU=Beanstream Internet Commerce Inc/CN=www.beanstream.com Client-SSL-Cipher: RC4-MD5 Client-SSL-Warning: Peer certificate not verified X-Powered-By: ASP.NET <?xml version="1.0" encoding="UTF-8" standalone="no"?><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="h ttp://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP -ENV:Fault><faultcode>SOAP-ENV:VersionMismatch</faultcode><faultstring>VersionMismatch:The Soap processor found an invalid namesp ace for the SOAP Envelope element.</faultstring><detail><mserror:errorInfo xmlns:mserror="http://schemas.microsoft.com/soap-toolk it/faultdetail/error/"><mserror:returnCode></mserror:returnCode><mserror:serverErrorInfo><mserror:description>VersionMismatch:The Soap processor found an invalid namespace for the SOAP Envelope element. HRESULT=0x800A1BBD - Server:An unanticipated error occu rred during the processing of this request. HRESULT=0x800A1BBD</mserror:description><mserror:source>VersionMismatch</mserror:sour ce></mserror:serverErrorInfo><mserror:callStack><mserror:callElement><mserror:component>VersionMismatch</mserror:component><mserr or:description>The Soap processor found an invalid namespace for the SOAP Envelope element.</mserror:description><mserror:returnC ode></mserror:returnCode></mserror:callElement><mserror:callElement><mserror:component>Server</mserror:component><mserror:descrip tion>An unanticipated error occurred during the processing of this request.</mserror:description><mserror:returnCode></mserror:re turnCode></mserror:callElement></mserror:callStack></mserror:errorInfo></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envel ope>

****************END DEBIAN TRACE *************

I've no idea why you'd use ancient nasty cruft like that in development...
It works, and Debian currently doesn't currently? ;-) just kidding..


the one thing I see is that RH reads it as 1528, and deb as 1530, and the order of the header fields are slightly different
many many thanks for any help..
Chris

Replies are listed 'Best First'.
Re^3: SOAP::Lite, but not the problem?
by erroneousBollock (Curate) on Nov 14, 2007 at 03:55 UTC
    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:
    • Use xmltidy from the XML::Tidy distribution to clean up XML before posting.
    • Read Writeup Formatting Tips... especially concerning the use of <code> and <readmore> tags.

    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

    Debian request

    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

    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

    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

      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