[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ftpapi] Simple Soap Action . Used Example18 for a template (HTTP/1.1 500 Internal Server Error )
- From: Ron Koontz <rkoontz@xxxxxxxxx>
- To: FTPAPI/HTTPAPI mailing list <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: [Ftpapi] Simple Soap Action . Used Example18 for a template (HTTP/1.1 500 Internal Server Error )
- Date: Fri, 2 Jun 2017 19:05:03 +0000
When I ran it in debug ( Before the "add_soapaction" ) the field SOAP was not big enough for he entire string of characters. Its was leaving it out. Only went to 1024.
Attached is the program I'm using now.
I have tried so many things I confused myself I think. :)
Thanks
Ron Koontz
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, June 02, 2017 2:58 PM
To: FTPAPI/HTTPAPI mailing list
Subject: Re: [Ftpapi] Simple Soap Action . Used Example18 for a template (HTTP/1.1 500 Internal Server Error )
Ron,
HTTPAPI supports up to 16 kb for the soap action parameter. Are you saying that your soap action is larger than 16 kb?!
Or are you using an extremely old version of HTTPAPI? (The size was increased from 64 bytes to 16 kb in 2012.)
The callback method (your "add_soapaction" thing) will still work, too.
But, it's easier to make a mistake with that... I suspect that's what happened in your case. Maybe you didn't send the CRLF at the end of the header or something like that?
Its very hard for us to tell you what is wrong when you don't show us what you did.
-SK
On 6/2/2017 9:48 AM, Ron Koontz wrote:
>
> So after looking into this in debug I noticed my SOAP field is not big
> enough.. So I looked at Example 20 to send a “bigger” set of soap action.
>
> It uses the “Add_SoapAction” to add the header stuff then the rest.
>
> Its getting close, however I’m getting a “SetError() #43:
> CommSSL_Read: time-out! “
>
> So I’m not sure where to go from here. Any ideas?
>
> Thanks
>
> Ron Koontz
>
> *From:*ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] *On Behalf Of *Pargat
> Singh
> *Sent:* Thursday, June 01, 2017 3:28 PM
> *To:* FTPAPI/HTTPAPI mailing list
> *Subject:* Re: [Ftpapi] Simple Soap Action . Used Example18 for a
> template (HTTP/1.1 500 Internal Server Error )
>
> Just checking, are you able to connect to this URL from your IBMi or
> you need to use proxy?
>
> Thanks,
>
> Pargat
>
> On Thu, Jun 1, 2017 at 2:21 PM, Ron Koontz <rkoontz@xxxxxxxxx
> <mailto:rkoontz@xxxxxxxxx>> wrote:
>
> You are right. My bad. I actually sent the wrong stuff. The xxxx is
> my username and password.
> I just got the SOAPUI today so I'm playing with that as well.
>
> Here is the code and attached is the debug
>
> SOAP =
> '<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>'
> +'<SOAP:Envelope'
> +'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"'
> +'xmlns:web="http://websvcs.otswebws">'
> +'<SOAP:Header>'
> +'<wsse:Security soapenv:mustUnderstand="1"'
> +'<xmlns:wsse="http://docs.oasis-open.org/wss/'
> +'2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"'
> +'xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/'
> +'oasis-200401-wss-wssecurity-utility-1.0.xsd">'
> +'<wsse:UsernameToken wsu:Id="UsernameToken'
> +'-01B51377495EE27AFE14613627051441">'
> +'<wsse:Username>xxxxxx</wsse:Username>'
> +'<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/'
> +'/oasis-200401-wss-username-token-profile-1.0#Password'
> +'Text">xxxxxxx</wsse:Password>'
> +'wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01'
> +'/oasis-200401-wss-soap-message-security'
> +'-1.0#Base64Binary">nvLVj+qPJSJ2+eWuSvjtlg==</wsse:Nonce>'
>
> http_debug(*ON);
>
> rc = http_url_post_xml(
> 'https://services.omnitracs.com/otsWebWS/services/OTSWebSvcs'
> : %addr(SOAP) + 2
> : %len(SOAP)
> : *NULL
> : %paddr(Incoming)
> : %addr(rate)
> : HTTP_TIMEOUT
> : HTTP_USERAGENT
> : '/tmp/geoptest.xml'
> :'https://services.omnitracs.com/otsWebWS/services/OTSWebSvcs'
> <https://services.omnitracs.com/otsWebWS/services/OTSWebSvcs%27>);
>
> Thanks
> Ron Koontz
>
>
> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> <mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
> [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> <mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>] On Behalf Of Scott
> Klement
> Sent: Thursday, June 01, 2017 2:10 PM
> To: FTPAPI/HTTPAPI mailing list
>
> Subject: Re: [Ftpapi] Simple Soap Action . Used Example18 for a
> template (HTTP/1.1 500 Internal Server Error )
>
> Are you sure this is the correct SOAP message for this web service? It
> refers to WebserviceX.NET, which is highly suspicious...
>
> You should be running the WSDL file through a tool to see what the
> SOAP message should look like. Do NOT just copy another unrelated web
> service's SOAP message and assume it's correct.
>
> A good tool for this is SoapUI.
>
>
> On 6/1/2017 12:37 PM, Ron Koontz wrote:
> >
> > Here is my debug dump.
> >
> > Thanks
> >
> > Ron Koontz
> >
> > *From:*ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> <mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
> > [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> <mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>] *On Behalf Of *Pargat
> > Singh
> > *Sent:* Thursday, June 01, 2017 1:15 PM
> > *To:* FTPAPI/HTTPAPI mailing list
> > *Subject:* Re: [Ftpapi] Simple Soap Action . Used Example18 for a
> > template (HTTP/1.1 500 Internal Server Error )
> >
> > Ron,
> >
> > Can you advise how are you invoking WS request?
> >
> > Thanks
> >
> > Pargat
> >
> > On Jun 1, 2017 12:09 PM, "Ron Koontz" <rkoontz@xxxxxxxxx
> <mailto:rkoontz@xxxxxxxxx>
> > <mailto:rkoontz@xxxxxxxxx <mailto:rkoontz@xxxxxxxxx>>> wrote:
> >
> > Hello all,
> >
> > I’m getting a HTTP/1.1 500 Internal Server Error …
> >
> > I not sure 100% what is wrong. I’m new to sending the SOAP stuff
> > this way. Ideas?
> >
> > Protocol Used: TLS Version 1
> >
> > http_persist_post(): entered
> >
> > http_long_ParseURL(): entered
> >
> > do_post(): entered
> >
> > POST /qtracsWebWS/services/QTWebSvcs HTTP/1.1
> >
> > POST /qtracsWebWS/services/QTWebSvcs HTTP/1.1
> >
> > Host: www.cnrportal.com <http://www.cnrportal.com>
> <http://www.cnrportal.com>
> >
> > User-Agent: http-api/1.23
> >
> > Content-Type: /tmp/geoptest.xml
> >
> > SOAPAction: https://www.cnrportal.com/qtracsWebWS/services/QTWebSvcs
> >
> > Expect: 100-continue
> >
> > Content-Length: 604
> >
> > recvresp(): entered
> >
> > HTTP/1.1 100 Continue
> >
> > SetError() #13: HTTP/1.1 100 Continu
> >
> > senddoc(): entered
> >
> > <?xml version="1.0" encoding="iso-88………….much other stuff here
> >
> > recvresp(): entered
> >
> > HTTP/1.1 500 Internal Server Error
> >
> > Date: Thu, 01 Jun 2017 15:37:14 GMT
> >
> > Date: Thu, 01 Jun 2017 15:37:14 GMT
> >
> > X-Powered-By: Servlet/3.0
> >
> > Content-Length: 399
> >
> > Cneonction: close
> >
> > Content-Type: text/xml; charset=utf-8
> >
> > Content-Language: en-US
> >
> > SetError() #13: HTTP/1.1 500 Internal
> >
> > recvdoc parms: identity 399
> >
> > header_load_cookies() entered
> >
> > recvdoc(): entered
> >
> > SetError() #0:
> >
> > <soapenv:Envelope xmlns:soapenv="http…other stuff
> >
> > SetError() #13: HTTP/1.1 500 Internal
> >
> > http_close(): entered
> >
> > http_persist_open(): entered
> >
> > http_long_ParseURL(): entered
> >
> >
> >
> >
> > *Ron Koontz | IT Manager | Continental Express, Inc*
> >
> > *10450 State Rt 47 W Sidney, Ohio 45365*
> >
> > (: Direct: (937) 419.8118 <tel:%28937%29%20419-8118>*| *(: Tel (800)
> > 497.2100 x118 <tel:%28800%29%20497-2100>*|*Ê: Fax (937) 498.2155
> > <tel:%28937%29%20498-2155>**
> >
> > *:_rkoontz@xxxxxxxxx <mailto:rkoontz@xxxxxxxxx>
> <mailto:rkoontz@xxxxxxxxx <mailto:rkoontz@xxxxxxxxx>>_ Visit us on the
> web:
> > www.ceioh.com <http://www.ceioh.com> <http://www.ceioh.com/> FB
> > <https://www.facebook.com/pages/Continental-Express-Inc/394970290582
> > 85
> > 5>Twitter
> > <https://twitter.com/CEIOHIO>
> >
> > --------------------------------------------------------------------
> > --
> > --
> >
> >
> > The information contained in this e-mail is intended only for the
> > individual or entity to whom it is addressed. Its contents
> > (including any attachments) may contain confidential and/or
> > privileged information. If you are not an intended recipient you
> > shall not use, disclose, disseminate, copy or print its contents. If
> > you receive this e-mail in error, please notify the sender by reply
> > e-mail and delete and destroy the message. Continental Express, Inc.
> > and its subsidiaries and affiliates will not be held liable for the
> > unintended or unauthorized use of any information contained in this
> > email or as a result of any additions or deletions of information
> > originally contained in this email.
> >
> >
> > --
> > _______________________________________________
> > Ftpapi mailing list
> > Ftpapi@xxxxxxxxxxxxxxxxxxxxxx <mailto:Ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> <mailto:Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> <mailto:Ftpapi@xxxxxxxxxxxxxxxxxxxxxx>>
> > http://scottklement.com/mailman/listinfo/ftpapi
> >
> >
> > --------------------------------------------------------------------
> > --
> > --
> >
> > The information contained in this e-mail is intended only for the
> > individual or entity to whom it is addressed. Its contents
> > (including any attachments) may contain confidential and/or
> > privileged information. If you are not an intended recipient you
> > shall not use, disclose, disseminate, copy or print its contents. If
> > you receive this e-mail in error, please notify the sender by reply
> > e-mail and delete and destroy the message. Continental Express, Inc.
> > and its subsidiaries and affiliates will not be held liable for the
> > unintended or unauthorized use of any information contained in this
> > email or as a result of any additions or deletions of information
> > originally contained in this email.
> >
> >
>
> --
> _______________________________________________
> Ftpapi mailing list
> Ftpapi@xxxxxxxxxxxxxxxxxxxxxx <mailto:Ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> http://scottklement.com/mailman/listinfo/ftpapi
>
> ________________________________
>
>
> The information contained in this e-mail is intended only for the
> individual or entity to whom it is addressed. Its contents (including
> any attachments) may contain confidential and/or privileged
> information. If you are not an intended recipient you shall not use,
> disclose, disseminate, copy or print its contents. If you receive this
> e-mail in error, please notify the sender by reply e-mail and delete
> and destroy the message. Continental Express, Inc. and its
> subsidiaries and affiliates will not be held liable for the unintended
> or unauthorized use of any information contained in this email or as a
> result of any additions or deletions of information originally
> contained in this email.
>
>
> --
> _______________________________________________
> Ftpapi mailing list
> Ftpapi@xxxxxxxxxxxxxxxxxxxxxx <mailto:Ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> http://scottklement.com/mailman/listinfo/ftpapi
>
>
> ----------------------------------------------------------------------
> --
>
> The information contained in this e-mail is intended only for the
> individual or entity to whom it is addressed. Its contents (including
> any attachments) may contain confidential and/or privileged
> information. If you are not an intended recipient you shall not use,
> disclose, disseminate, copy or print its contents. If you receive this
> e-mail in error, please notify the sender by reply e-mail and delete
> and destroy the message. Continental Express, Inc. and its
> subsidiaries and affiliates will not be held liable for the unintended
> or unauthorized use of any information contained in this email or as a
> result of any additions or deletions of information originally
> contained in this email.
>
>
--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi
________________________________
The information contained in this e-mail is intended only for the individual or entity to whom it is addressed. Its contents (including any attachments) may contain confidential and/or privileged information. If you are not an intended recipient you shall not use, disclose, disseminate, copy or print its contents. If you receive this e-mail in error, please notify the sender by reply e-mail and delete and destroy the message. Continental Express, Inc. and its subsidiaries and affiliates will not be held liable for the unintended or unauthorized use of any information contained in this email or as a result of any additions or deletions of information originally contained in this email.
500 *
600 H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')
700
800
900 /copy httpapi_h
1000
1100 D Incoming PR
1200 D rate 8F 06/02/17
1300 D depth 10I 0 value
1400 D name 1024A varying const
1500 D path 24576A varying const
1600 D value 65535A varying const
1700 D attrs * dim(32767)
1800 D const options(*varsize)
1900
2000 D SOAP s 32767A varying 06/02/17
2100 D rc s 10I 0
2200 D rate s 8F
2300 D Result s 12P 2
2400 D Add_SOAPACTION PR 06/02/17
2500 D Header 1024A varying 06/02/17
2600 D UserData * value 06/02/17
2700 06/02/17
2800
2900 /free
3000
3500
3600 http_debug(*ON);
3700
4200 http_XmlStripCRLF(*ON);
4300
4400 SOAP =
4500 '<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>'
4600 +'<soapenv:Envelope ' 06/02/17
4700 +'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" ' 06/02/17
4800 +'xmlns:web="http://websvcs.otswebws"> ' 06/02/17
4900 +'<soapenv:Body> ' 06/02/17
5000 +'<web:dequeue2> ' 06/02/17
5100 +'<subscriberId>1</subscriberId> ' 06/02/17
5200 +'<transactionIdIn>0</transactionIdIn> ' 06/02/17
5300 +'</web:dequeue2> ' 06/02/17
5400 +'</soapenv:Body> ' 06/02/17
5500 +'</soapenv:Envelope> '; 06/02/17
5600
5700 06/02/17
5800 http_xproc( HTTP_POINT_ADDL_HEADER 06/02/17
5900 : %paddr(Add_SOAPACTION) ); 06/02/17
6000 06/02/17
6400 06/02/17
6500 rc = http_url_post_xml(
6600 'https://services.omnitracs.com/otsWebWS/services/OTSWebSvcs' 06/02/17
6700 : %addr(SOAP) + 2
6800 : %len(SOAP)
6900 : *NULL
7000 : %paddr(Incoming) 06/02/17
7100 : %addr(rate) 06/02/17
7200 : HTTP_TIMEOUT
7300 : HTTP_USERAGENT 06/02/17
7400 : 'text/xml'); 06/02/17
7900
8000 if (rc <> 1);
8100 http_crash();
8200 else;
8300 endif;
8400
8500 *inlr = *on;
8600
8700 /end-free
8800
8900 P Incoming B
9000 D Incoming PI
9100 D rate 8F
9200 D depth 10I 0 value
9300 D name 1024A varying const
9400 D path 24576A varying const
9500 D value 65535A varying const
9600 D attrs * dim(32767)
9700 D const options(*varsize)
9800
9900 D atof PR 8F extproc('atof')
10000 D string * value options(*string)
10100
10200 /free
10300
10600 /end-free
10700 P E
10800 P Add_SOAPACTION B 06/02/17
10900 D Add_SOAPACTION PI 06/02/17
11000 D Header 1024A varying 06/02/17
11100 D UserData * value 06/02/17
11200 /free 06/02/17
11300 Header = '<soapenv:Header>' 06/02/17
11400 +'<wsse:Security soapenv:mustUnderstand="1" ' 06/02/17
11500 +'xmlns:wsse="http://docs.oasis-open.org/wss/' 06/02/17
11600 +'2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" ' 06/02/17
11700 +'xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/' 06/02/17
11800 +'oasis-200401-wss-wssecurity-utility-1.0.xsd"> ' 06/02/17
11900 +'<wsse:UsernameToken wsu:Id="UsernameTOKEN' 06/02/17
12000 +'-01B51377495EE27AFE14613627051441"> ' 06/02/17
12100 +'<wsse:Username>XXXXX</wsse:Username> ' 06/02/17
12200 +'<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/' 06/02/17
12300 +'/oasis-200401-wss-username-token-profile-1.0#Password' 06/02/17
12400 +'Text">XXXXXXXXX</wsse:Password> ' 06/02/17
12500 +'<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01' 06/02/17
12600 +'/oasis-200401-wss-soap-message-security' 06/02/17
12700 +'-1.0#Base64Binary">nvLVj+qPJSJ2+eWuSvjtlg==</wsse:Nonce>' 06/02/17
12800 +'<wsu:Created>2016-04-22T22:05:05.142Z</wsu:Created>' 06/02/17
12900 +'</wsse:UsernameToken> ' 06/02/17
13000 +'</wsse:Security> ' 06/02/17
13100 +'</soapenv:Header> '; 06/02/17
13200 /end-free 06/02/17
13300 P E 06/02/17
--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi