[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Digest algorithm (was: Help)



hi Jose,

HTTPAPI knows how to implement the HTTP protocol.  It knows nothing 
about SOAP or WSS -- if you want to use HTTPAPI to call the web service, 
you are expected to code that part yourself.

HTTPAPI does have routines that do HTTP digest authentication.  I don't 
know if that's related to WSS authentication?  But if so, you could copy 
the HTTPAPI code into your own program, and modify it to suit your purposes.

With regard to the 500 error -- typically the web service would send you 
back an XML document containing the reason for the error.  Check the 
response to see what you're getting.

-SK



On 1/11/2012 9:33 AM, Jose Fondeur wrote:
>     Hi,
>     New to Web Services in need of help. I'm using HTTPAPI to create a
>     process in to consume Web Services.
>     Few highlights on the process:
>     a) Requires SSL validation (working fine)
>     b) Using http_url_post_xml
>     c) Below request works fine using SoapUi tool.
>     d) I get a 500 error, as you well know, a generic error that does not
>     says much.
>     Here is the issue as far I can understand it and more important,
>     explain or ask the correct question.
>     1)The SOAP request must contain some dynamic information derived from
>     the values included in the<Body>, using the total length of the
>     information, this function
>        (ds:DigestMethod Algorithm=) returns a pseudo key value
>     (<ds:DigestValue>) to properly work (please see RED below). As
>     mentioned, this is dynamic value and the key
>        value, it changes every time the request is sent (even when using
>     SoapUi)
>        Question: Is there a function in HTTPAPI that would execute
>     DigestMethod Algorithm and return key value?
>     2) In SoapUi there are some parameters or settings I needed to modify
>     for the request to work;
>         a) I need respecify the "Outgoing WSS"
>         b) Strip whitespaces (set to "true")
>     Here is the SOAP variable
>     Soap =
>     '<soapenv:Envelope xmlns:amer="http://www.xxxxxxxxxxx.com"; '+
>     'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>'+
>     '<soapenv:Header><wsse:Security '+
>     'xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/'+
>     'oasis-200401-wss-wssecurity-secext-1.0.xsd">'+
>     '<wsse:BinarySecurityToken '+
>     'EncodingType="http://docs.oasis-open.org/wss/2004/01/'+
>     'oasis-200401-wss-soap-message-security-1.0#Base64Binary" '+
>     'ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-'+
>     '200401-wss-x509-token-profile-1.0#X509v3" '+
>     'wsu:Id="CertId-EBB39D8FA1A2268132132623127725710" '+
>     'xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/'+
>     'oasis-200401-wss-wssecurity-utility-1.0.xsd">'+
>     'MIIDxzCCAq+gAwIBAgIETrmoejANBgkqhkiG9w0BAQUFADCBhzELMAkGA1UEB'+
>     'hMCVVMxEDAOBgNVBAgMB0FyaXpvbmExEDAOBgNVBAcMB1Bob2VuaXgxGTAXBg'+
>     'NVBAoMEEFtZXJpY2FuIEV4cHJlc3MxIzAhBgNVBAsMGk1lbWJlcnNoaXAgVHJ'+
>     'hdmVsIFNlcnZpY2VzMRQwEgYDVQQDDAtHbG9iYWxNYXhFMTAeFw0xMTExMDgy'+
>     'MjA4NThaFw0xNDExMDcyMjA4NThaMIGHMQswCQYDVQQGEwJVUzEQMA4GA1UEC'+
>     'AwHQXJpem9uYTEQMA4GA1UEBwwHUGhvZW5peDEZMBcGA1UECgwQQW1lcmljYW'+
>     '4gRXhwcmVzczEjMCEGA1UECwwaTWVtYmVyc2hpcCBUcmF2ZWwgU2VydmljZXM'+
>     'xFDASBgNVBAMMC0dsb2JhbE1heEUxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A'+
>     'MIIBCgKCAQEA5mdcg+iD8fnkoQlqfx7TncVV+zAZNtkwmTfEbJz2WeX9HxpA/'+
>     '5n76dHU/P+X8BJcHrswYum0CoMImgUgZMoidWYjv1IJMcf+2cDfumfZZkroqK'+
>     'epaJWOPV98Fm8oH+gL7MrEZz/w4Zk9bnaOu1U/RiixjP9zf13OZRyOl+HofXZ'+
>     'LE5wyatJhOtp5AqEqi8sGKLKjQVp4ZiNNDytv4Wj/Fl5UMbmDBONRTWNfm6fX'+
>     'r8A/o5Io8SQ70NdsHMtqwZM8zIgR3MXJtC4wU31jrNfAYOSsy+CYHyf64DyAO'+
>     'wpyhxMqqz8ZlV1Xcz1tiQMCMYWX8zMVqVzjkbncuxsYOpzXbQIDAQABozkwNz'+
>     'AoBgNVHSUEITAfBggrBgEFBQcDAQYIKwYBBQUHAwIGCWCGSAGG+EIEATALBgN'+
>     'VHQ8EBAMCBPAwDQYJKoZIhvcNAQEFBQADggEBAOFNQn/EADvzXbSFnzno/zT2'+
>     'pX05oD27ephtI2CwnkDC53WAu3FC3vHu4KjWylu7BvYAPeJwaZK2qzvEHx2AG'+
>     'Nq0rwEbu12Alu+8IGJ0+qqLqrH4JHetjv/J3RfkbwtCcxCMNVN1BGHS6GpQxe'+
>     'ToUJTcTj++lmGxp1xyN3U3DiEOytKZnPyPmc2fcj9MZ06jInE0MGajTsKcX90'+
>     'fDBBubm2u79LbBy45cD8Eh9nVL3GunEEoa/wCfITQaBVSDtzZN3x0A4Amo94w'+
>     'G4FS7ZOWRWJXkx4x8qL4c8+nxwoholEuzQZCr/fem2KzI/hl1XXHiJIhP20u1'+
>     'VQhgtgx3iwz8zg=</wsse:BinarySecurityToken>'+
>     '<ds:Signature Id="Signature-7" '+
>     'xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>                '+
>     '<ds:SignedInfo>                                               '+
>     '<ds:CanonicalizationMethod '+
>     'Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>         '+
>     '<ds:SignatureMethod '+
>     'Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>      '+
>     '<ds:Reference URI="#id-8">                                    '+
>     '<ds:Transforms>                                               '+
>     '<ds:Transform Algorithm='+
>     '"http://www.w3.org/2001/10/xml-exc-c14n#"/>                   '+
>     '</ds:Transforms>                                              '+
>     '<ds:DigestMethod '+
>     'Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>          '+
>     '<ds:DigestValue>NuGOmMaLjpJvLQgR8pILOcXYsBI=</ds:DigestValue>'+
>     '</ds:Reference>                                               '+
>     '</ds:SignedInfo>                                              '+
>     '<ds:SignatureValue>                                           '+
>     'Q55oV4O9v72ej1zAhEb3nWH6pmrOL3XgY2vZargw47oUCCqRdsm0tmz/wrn1Qc'+
>     'sUznZJvAhrDqG7jRfaFZFZt2/xFDJl4vneXBc91pcxbJ1HvKZHujQk81zzRI+v'+
>     '4rwnQNmKHrRn2VBgqomx9EG2hbbWHwQLgg1VZTcLt26dqCJGQN0v0CbaA15Zj5'+
>     'DY+FScrJTSxL81wJ7OitbepLJpDnep4PlB+dU8HsUch85TfQakTkpJJF8wpaZH'+
>     'GnPL7R58FUOB/cQkTzhUwoI440V2itwi95xh/D7uscto6Ii/6R5qaD+5o93A3Q'+
>     'npltMJCr8bCCykqU2fsvr4Y0mEb8/zQw==                           '+
>     '</ds:SignatureValue>                                          '+
>     '<ds:KeyInfo Id="KeyId-EBB39D8FA1A2268132132623127725711">     '+
>     '<wsse:SecurityTokenReference '+
>     'wsu:Id="STRId-EBB39D8FA1A2268132132623127725712" '+
>     'xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/'+
>     'oasis-200401-wss-wssecurity-utility-1.0.xsd">'+
>     '<wsse:Reference URI="#CertId-EBB39D8FA1A2268132132623127725710" '+
>     'ValueType="http://docs.oasis-open.org/wss/'+
>     '2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>'+
>     '</wsse:SecurityTokenReference>                                '+
>     '</ds:KeyInfo>                                                 '+
>     '</ds:Signature>'+
>     '</wsse:Security>'+
>     '</soapenv:Header>'+
>     '<soapenv:Body wsu:Id="id-8" '+
>     'xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/'+
>     'oasis-200401-wss-wssecurity-utility-1.0.xsd">'+
>     '<amer:ConsultarDocumento>'+
>     '<amer:RFCEmisor>?</amer:RFCEmisor>'+
>     '<amer:RFCReceptor>RAS910208GP3</amer:RFCReceptor>'+
>     '<amer:FolioReferencia>938477584</amer:FolioReferencia>'+
>     '<amer:TipoDocumento>Factura</amer:TipoDocumento>'+
>     '</amer:ConsultarDocumento></soapenv:Body></soapenv:Envelope>  ';
>     Question on http_url_post_xml, please explain parameter(s) in BLUE
>     below.
>     Rc = http_url_post_xml(
>           'https://WPDMW589.nac.ad.aexp.com/CFDWS/OnLiveIFService.svc'
>           :%Addr(Soap) + 2
>           :%Len(Soap)
>           :*Null
>           :%Paddr(Incoming)
>           :%Addr(String)
>           :Http_TimeOut
>           :Http_UserAgent
>           :'text/xml'
>
>     :'"https://WPDMW589.nac.ad.aexp.com/CFDWS/OnLiveIFService.wsdl";');
>
>     I hope my lack of experience doing this does not annoy any one, and my
>     apologies in advance if I did not ask the correct question or presented
>     my issue clearly.
>     Best Regards
>
>
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------