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

Re: Consuming DHL Webservices



Hi Scott,

Regarding "<de:DeveloperAuthentification>" section : I have found othing about it in DHL's documentation and the different sample requests that I have got from DHL didn't mention this section. That's why I have omitted it.
I thought this will make no problem as the request worked fine using SoapUI.

However I have sent an e-mail to DHL technical support about his.

In the meantime I have also run the request replacing SOAPaction: http:/test-intraship.dhl.com/ws/1_0/de/ISService/createShipmentDD by urn:createShipmentDD Same result ... (the only thing that has changed in the debug file : Content-Length: 1833 instead of Content-Length: 1830.

In the debug file, I have found no error : If I am right, in the following sequence, everything seems to be ok, or does the line
SetError() £0:
<ns4:GetVersionResponse xmlns:ns4="http://de.ws.intraship";><Version xmlns="http://dhl.de/webservice/cisbase";><majorRelease>1</majorRelease><minorRelease>0</minorRelease><build>14</build></Version></ns4:GetVersionResponse>

mean that something is wrong ?

Thanks,

Pascal

Le 08/06/2012 16:27, Scott Klement a écrit :
Hi Pascal,

In your HTTPAPI debug file, I see this:

SOAPAction:
http:/test-intraship.dhl.com/ws/1_0/de/ISService/createShipmentDD

That doesn't match the SoapUI SoapAction, which is set to
"urn:createShipmentDD".  Please try changing your HTTPAPI SoapAction to
"urn:createShipmentDD".   Your said in an earlier e-mail that you had
done this already -- but, the HTTPAPI log file still shows an http:  URI
for the SoapAction  (and an invalid one at that!).

Also, the SOAP message generated from the WSDL  contains these eleements
for "Authentification"

<de:DeveloperAuthentification>
<DEVID>?</DEVID>
<APPID>?</APPID>
<CERTID>?</CERTID>
</de:DeveloperAuthentification>
<cis:Authentification>
<cis:user>?</cis:user>
<cis:signature>?</cis:signature>
<!--Optional:-->
<cis:accountNumber>?</cis:accountNumber>
<cis:type>0</cis:type>
</cis:Authentification>

However, the one in your code looks like this:

<cis:Authentification>
<cis:user>Sterling</cis:user>
<cis:signature>Online24</cis:signature>
<cis:type>0</cis:type>
</cis:Authentification>

You seem to be missing the entire<de:DeveloperAuthentificaton>  element
and all of it's contents.

I didn't look over the entire transaction, I stopped after I noticed the
Authentification doesn't match.  I'm hoping this is enough information
to point you in the right direction?


On 6/8/2012 2:36 AM, Pascal Kirscher wrote:
     Hi Scott,
     Many thanks for your quick answer  (and for the great tools you
     provide).
     The SoapAction that I have tried  (urn:createShipmentDD) is the one
     that is displayed in the SoapUI request  :
     POST [1]http://test-intraship.dhl.com/ws/1_0/de/ISService HTTP/1.1
     Accept-Encoding: gzip,deflate
     Content-Type: text/xml;charset=UTF-8
     SOAPAction: "urn:createShipmentDD"
     I have tried in different ways :
'urn:createShipmentDD',   '[2]http://test-intraship.dhl.com/ws/1_0/de/ISService/
createShipmentDD' ,  'createShipmentDD'

     To make things easier, I send :
     - DHL's wdsl
     - a createshipmentDD request that works with SoapUI  and the response
     - the httpapi_debug.txt file that results when I run my program
     Again, thanks a lot for your help.
     Pascal
     Le 08/06/2012 00:18, Scott Klement a écrit :

Hi Pascal,

Surely if SoapUI is working, you can look at the SoapAction that it is
using, and send the same thing via HTTPAPI?

Make sure you're also updating the URI in addition to the SoapAction.
I'm not familiar with DHL's web service, but most sites that I use
specify both a different URI and a different SoapAction in order to
access a different operation.

If that doesn't work, please provide the WSDL file you're working with
(I don't use DHL, so I don't have access to it, myself) and an
httpapi_debug.txt file so I can compare them and look for something that
doesn't match.

Thanks!




On 6/7/2012 4:32 AM, Pascal Kirscher wrote:

      Hello,
      I am new to webservices.  I need to use DHL webservices, in order to
      create shipments, get labels, etc...
      So, first I have tried some simple webservices, like [1]stockquote,
      [2]currency convertor (with IBM's wdsl2rpg and with Scott's HTTPAPI),
      and this worked fine with both the tools.
      With DHL WebService, I first tried the GetVersion opération, and this
      also was successful.
      But, I am now blocked with the other operation  (createShipmentDD,
      getLabelDD) :  I have checked my requests using SoapUI, and this works
      fine, but not when I try to consume the webservice using HTTPAPI in a
      RPG program
      I guess that the problem comes from the parameters when I call the
      http_url_post_xml function, and especially the last one, the
      SOAPaction.
      Based on the values that I retrieve from SoapUI, hereafter, the
      beginning of the request :
      POST [3][3]http://test-intraship.dhl.com/ws/1_0/de/ISService HTTP/1.1
      Accept-Encoding: gzip,deflate
      Content-Type: text/xml;charset=UTF-8
      SOAPAction: "urn:createShipmentDD"
      I have tried to call it this way :
      rc = http_url_post_xml(
      '[4][4]http://test-intraship.dhl.com/ws/1_0/de/ISService'
           : %addr(SOAP) + 2
           : %len(SOAP)
           : *NULL
           : %paddr(Incoming)
           : %addr(value)
           : HTTP_TIMEOUT
           : HTTP_USERAGENT
           : 'application/xml'
           : 'urn:createShipmentDD');

      I have tried different values ('urn:createShipmentDD',
      '[5][5]http://test-intraship.dhl.com/ws/1_0/de/ISService/createShipmentDD'
      )
      but each time, I get the result of the GetVersion operation (which must
      be the default action I suppose)
      I would be very grateful if someone could help me ...
      Pascal



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

References

     1. http://test-intraship.dhl.com/ws/1_0/de/ISService
     2. http://test-intraship.dhl.com/ws/1_0/de/ISService/createShipmentDD
     3. http://test-intraship.dhl.com/ws/1_0/de/ISService
     4. http://test-intraship.dhl.com/ws/1_0/de/ISService
     5. http://test-intraship.dhl.com/ws/1_0/de/ISService/createShipmentDD
     6. 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
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
begin:vcard
fn:Pascal Kirscher
n:Kirscher;Pascal
org:SES-Sterling SA
adr;quoted-printable:;;1 bis, rue de D=C3=A9l=C3=A9mont;Saint-Louis;;68300;France
email;internet:pkirscher@xxxxxxxxxxxxxxxx
title:DSI
tel;work:03 89 70 20 36
tel;fax:03 89 70 20 37
url:www.ses-sterling.com
version:2.1
end:vcard

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