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

Re: [Ftpapi] Part 2: HTTP/1.1 415 Cannot process the message because the content



Hi Scott,

 

Thanks for getting back to me. I did some additional leg work and identified my problem. It was me, not anything to do with HTTPAPI. In short, I entered something in the SOAP request incorrectly. It was very subtle, but by comparing it to one of the calls that worked, I was able to spot it.

 

Sorry for the confusion.

 

 

 

Jeff

 

From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> On Behalf Of Scott Klement
Sent: Wednesday, January 8, 2020 11:34 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Ftpapi] Part 2: HTTP/1.1 415 Cannot process the message because the content

 

Hi Jeff,

You mention something about 2nd-level text, which I find somewhat confusing.  Are you saying that this message (which sure looks like an HTTP message) is in an IBM i message queue somewhere?

Unless you're putting it there, I'm not sure how that would happen?

Please create a trace file and send that to us so that we can understand what is going on.  To do that, add a line of code like this to your program (before using other functions in HTTPAPI):

http_debug(*on: '/tmp/mytracefile.txt');

When you use HTTPAPI, it will write diagnostic information to the IFS file specified in the second parameter.  Please send us that file.

-SK

 

On 1/7/2020 3:02 PM, Jeff Bianchi wrote:

Thanks for the suggestions for my initial request about SOAP calls from RPGLE. I made the changes and, with a couple other changes, was able to call the method and parse its returned XML into my nested data structures.

 

Now I’m on to the next method – and this one is giving me a bit of trouble. To use the 2nd method I basically cloned the 1st and made some changes. Now when I call http_string() it errors out with the following: “HTTP/1.1 415 Cannot process the message because the content type 'text/xml' was” – and that’s it! 2nd level help text tells me “No additional online help information is available.”

 

My Endpoint URL, Input SOAP message and SOAP action are correct (as far as I can tell from SoapUI). My soapResponse is blank because of the error.

 

Any ideas?

 

One thought – I can make consecutive calls to different SOAP apis, right? Is there anything I have to do to ‘close out’ the first call before I can issue a second call?

 

I’m putting these SOAP api calls into a *SRVPGM and in my *PGM my code basically looks like this:

 

unitNumber = ‘2900C’;

currentLocation = getCurrentLocation(unitNumber); // this call works just fine

currentMeter = getCurrentMeter(currentLocation: unitNumber); // this is the call that’s giving me an error on the http_string() call.

 

Any ideas would be appreciated.

 

Thanks!

 

 

 

Jeff Bianchi

 

Jeff.Bianchi@xxxxxxxx| P 253.804.1034

Oak Harbor Freight Lines, Inc.

"Bringing Peace of Mind Since 1916."

 



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