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

Re: Consuming DHL Webservices



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]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]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]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:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------