[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 )



Ron.

I have an example of an RPG program that consumes this service I think. OMNITRACS/dequeue2 for performance monitoring.
Mine is a "Canadian Version" so it may differ slightly if you're in the USA...but I think it may help.
I want to strip some stuff out of it before posing on this open forum. I'll post the whole program for you.
I don't have time to do that right at the moment, but I can try and have it for you on Monday if that helps?

------------------------------------------------------------------------------------------------------
Paul Reid
Application Developer III
Erb Group of Companies | 290 Hamilton Road | New Hamburg, Ontario | N3A 1A2
Phone: 519.662.6133 ext. 2363
Web: http://www.erbgroup.com/

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, June 02, 2017 4:09 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,

This one looks right to me -- but, of course, I'm not familiar with this 
web service, and am just desk-checking it (it's easy to miss stuff when 
just desk-checking.)

Also, FWIW... the error "500" only means that there was an error. It 
does not tell you what the actual error was...  the web service is 
SUPPOSED to tell you what the error is by returning a SOAP message 
containing a "Fault" XML tag.

Unfortunately...  in your particular case, the Fault tags you've posted 
have not been helpful.  Here is the one you posted yesterday afternoon:

<soapenv:Fault>
   <faultcode>Server</faultcode>
   <faultstring>Internal Error</faultstring>
</soapenv:Fault>

As you can see...  it doesn't say anything except "internal error", 
which is basically worthless in trying to figure out what the problem 
is.  But MOST soap-based web services will give you useful information 
in the Fault tag...

What you really need is either a working example (maybe from SoapUI or 
similar) or someone who is familiar with this web service who can 
explain what it requires.

-SK


On 6/2/2017 2:55 PM, Ron Koontz wrote:
> I took an example plus what Omnitracs was telling me and thought it was to be coded this way.  Below is the original SOAP field that I put everything in ( then remembered the eval soap:c XXXX in debug you can do "duh me").  So how do I do the header and then the "body" of what I'm trying to get out or to work ?
> I am super confused now.
> Its what is in the SoapUI minus the top part of the XML to the Header.  I can get it to work just fine in SoapUI.
> I need to get the XML data so I can parse it.  That part I can figure out as we do this already with some simple stuff.
> Ideas ?
>
> SOAP =
>   '<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>'
>   +'<soapenv: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>xxxxx</wsse:Username> '
>   +'<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/'
>   +'/oasis-200401-wss-username-token-profile-1.0#Password'
>   +'Text">xxxxxx</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>'
> +'<wsu:Created>2016-04-22T22:05:05.142Z</wsu:Created>'
> +'</wsse:UsernameToken> '
> +'</wsse:Security> '
> +'</soapenv:Header> '
> +'<soapenv:Body> '
> +'<web:dequeue2> '
> +'<subscriberId>1</subscriberId> '
> +'<transactionIdIn>0</transactionIdIn> '
> +'</web:dequeue2> '
> +'</soapenv:Body> '
> +'</soapenv:Envelope> ';
>
> Thanks
> Ron Koontz
>
>
> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
> Sent: Friday, June 02, 2017 3:48 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,
>
> You've put an entire XML document into the HTTP headers...   and you've
> done so without putting the keyword or anything there... this code makes absolutely no sense.
>
> What specification are you going by?!
>
> -SK
>
>
>
> On 6/2/2017 2:05 PM, Ron Koontz wrote:
>> 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.
>>
>>
> --
> _______________________________________________
> 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.

-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi
-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi