[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
WSDL2RPG and cookies
   Hi,
                   I`m trying to use WSDL2RPG to generate programs to
   connect to webservices.  I generated one to logon to a webservice and
   I got a response from the webservice that the logon was accepted.  Now
   I generated another program to import an item from the itemmaster.
   And I always get the same error, Authentication failed.  After I
   contacted the programmer from the webservice he found out that the
   program that sends the item needs logon cookies.  So after some
   reading I found out that I have to specifi http_use_cookies(*ON).  I
   put it in my program (tried in the program that does the login and the
   program which sends the item from itemmaster) but I get the same
   error.  The procedure is as follows:
   1)      Run a program which calls the service program to logon to the
   webservice
   2)      Then the same program calls the service program to send the
   item from the itemmaster.
   Here is the debuglist if someone could point me in the right
   direction.
   HTTPAPI Ver 1.24beta11 released
   2010-09-09
   OS/400 Ver
   V5R3M0
   New iconv() objects set, PostRem=1208. PostLoc=0. ProtRem=819.
   ProtLoc=0
   http_persist_open():
   entered
   http_long_ParseURL(): entered
   DNS resolver retrans:
   2
   DNS resolver retry  :
   2
   DNS resolver options: x'00000136'
   DNS default domain:
   hf.local
   DNS server found:
   172.22.2.49
   DNS server found: 172.22.2.49
   http_persist_post():
   entered
   http_long_ParseURL():
   entered
   do_oper(POST): entered
   POST /ss/editor/soap/productsxt.asmx
   HTTP/1.1
   Host:
   www.ss.is
   User-Agent: http-api/1.24
   Content-Length: 1126
   Content-Type: text/xml
   SOAPAction: http://tempuri.org/Import_products
   sendraw(): entered
   Here comes the XML
   recvresp(): entered
   HTTP/1.1 500 Internal Server Error
   Cache-Control: private
   Content-Length: 1516
   Content-Type: text/xml; charset=utf-8
   Server: Microsoft-IIS/7.0
   X-AspNet-Version: 2.0.50727
   X-Powered-By: ASP.NET
   Date: Thu, 08 Sep 2011 13:44:00 GMT
   SetError() #13: HTTP/1.1 500 Internal Server Error
   recvresp(): end with 500
   recvdoc parms: identity 1516
   header_load_cookies() entered
   recvdoc(): entered
   SetError() #0:
   <?xml version="1.0" encoding="utf-8"?>
   <soap:Envelope
   xmlns:soap="[1]http://schemas.xmlsoap.org/soap/envelope/"
   xmlns:xsi="[2]http://www.w3.org/2001/XMLSchema-instance"
   xmlns:xsd="[3]http://www.w3.org/2001/XMLSchema"
   xmlns:wsa="[4]http://schemas.xmlsoap.org/ws/2004/03/addressing"
   xmlns:wsse="[5]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss
   -wssecurity-secext-1.0.xsd"
   xmlns:wsu="[6]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
   wssecurity-utility-1.0.xsd">
   <soap:Header>
   <wsa:Action>[7]http://schemas.xmlsoap.org/ws/2004/03/addressing/fault<
   /wsa:Action>
   <wsa:MessageID>uuid:01acaec7-f450-4a21-a4bc-541e71bba080</wsa:MessageI
   D>
   <wsa:RelatesTo>uuid:37d24b53-06c8-4041-8eef-39b295b4c2ea</wsa:RelatesT
   o>
   <wsa:To>[8]http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anony
   mous</wsa:To>
   <wsse:Security>
   <wsu:Timestamp
   wsu:Id="Timestamp-2c8e7dc0-4b76-44cc-b2fd-b828144b97e5">
   <wsu:Created>2011-08-31T14:04:16Z</wsu:Created>
   <wsu:Expires>2011-08-31T14:09:16Z</wsu:Expires>
   </wsu:Timestamp>
   </wsse:Security>
   </soap:Header>
   <soap:Body>
   <soap:Fault>
   <faultcode>soap:Server</faultcode>
   <faultstring>System.Web.Services.Protocols.SoapException: Server was
   unable to process request. --->
   ecWeb.Application.Core.Exceptions.ecException: Authentication failed.
      at
   ecWeb.Application.ecApp.checkWebSession()
      at
   ecWeb.Web.SOAP.ProductsXT.checkAuthentication()
      at ecWeb.Web.SOAP.ProductsXT.Import_products(String
   products_xml)
      --- End of inner exception stack trace ---</faultstring><detail
   /></soap:Fault></soap:Body></soap:Envelope>
   WSDL2RPG Ver 1.13 released
   2011-01-21
   Warning: Received unexpected Soap header:
   <Action>
   Warning: Received unexpected Soap header:
   http://schemas.xmlsoap.org/ws/2004/03/addressing/fault
   Warning: Received unexpected Soap header:
   </Action>
   Warning: Received unexpected Soap header:
   <MessageID>
   Warning: Received unexpected Soap header:
   <MessageID>
   Warning: Received unexpected Soap header:
   uuid:9b48f8f5-733e-4cea-a71c-704f2440646a
   Warning: Received unexpected Soap header:
   </MessageID>
   Warning: Received unexpected Soap header:
   <RelatesTo>
   Warning: Received unexpected Soap header:
   uuid:e022913d-1ba0-47ec-9484-ce3b8787e94a
   Warning: Received unexpected Soap header: </RelatesTo>
   Warning: Received unexpected Soap header:
   <To>
   Warning: Received unexpected Soap header:
   http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
   Warning: Received unexpected Soap header:
   </To>
   Warning: Received unexpected Soap header:
   <Security>
   Warning: Received unexpected Soap header:
   <Timestamp>
   Warning: Received unexpected Soap header:
   <Created>
   Warning: Received unexpected Soap header:
   2011-09-08T13:44:00Z
   Warning: Received unexpected Soap header:
   </Created>
   Warning: Received unexpected Soap header:
   <Expires>
   Warning: Received unexpected Soap header:
   2011-09-08T13:49:00Z
   Warning: Received unexpected Soap header:
   </Expires>
   Warning: Received unexpected Soap header:
   Warning: Received unexpected Soap header:
   </Timestamp>
   Warning: Received unexpected Soap header:
   Warning: Received unexpected Soap header: </Security>
   SetError() #13: HTTP/1.1 500 Internal Server Error
   http_close(): entered
    
   Kindest regards,
   Kjartan
References
   1. http://schemas.xmlsoap.org/soap/envelope/
   2. http://www.w3.org/2001/XMLSchema-instance
   3. http://www.w3.org/2001/XMLSchema
   4. http://schemas.xmlsoap.org/ws/2004/03/addressing
   5. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
   6. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
   7. http://schemas.xmlsoap.org/ws/2004/03/addressing/fault
   8. http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------