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

Re: Headers/Reply



   Hello Mauricio,
   Your XML data is being created incorrectly.  Your <urn:get_client tag
   is not properly formed.
   You have this in your RPG code:
          +'      <urn:get_client
   '
          +'        <client_id xsi:type="xsd:int">'+ClientID+'</client_id>
   '
          +'     </urn:get_client>
   '
   It should be this:
          +'
   <urn:get_client>'
          +'        <client_id xsi:type="xsd:int">'+ClientID+'</client_id>
   '
          +'     </urn:get_client>
   '
   Notice the closing > character in the get_client tag...
   You sent an additional e-mail saying that it was because the XML
   processing instructions had iso-8859-1 instead of utf-8.   I can't see
   why that would make any difference?    The above XML tag is clearly
   wrong, and could not possibly work.  So, if you're right and the server
   really does need UTF-8, then you should make both changes.
   -SK

   On 4/26/2013 1:26 PM, Mauricio Diaz-Lapham wrote:

Scott,

Sorry about that, I must have had a RPG2 moment.

I have attached both log files from the IFS folders not copied and paste.

The vendor is telling me that the cant convert Nils to string error is a header
error. But he is not sure.

I don't know if the following attachment will help but I thought I pass it along
.

I have attached the email from the vendor depicting a successful call using .NET
 and the failed call using HTTPAPI.

Thanks for your help.

Mauricio




-----Original Message-----
From: [1]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [[2]mailto:ftpapi-bounces@lists.s
cottklement.com] On Behalf Of [3]ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
Sent: Friday, April 26, 2013 12:00 PM
To: [4]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Ftpapi Digest, Vol 78, Issue 42

Send Ftpapi mailing list submissions to
        [5]ftpapi@xxxxxxxxxxxxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        [6]http://scottklement.com/mailman/listinfo/ftpapi
or, via email, send a message with subject or body 'help' to
        [7]ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx

You can reach the person managing the list at
        [8]ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific than "Re: Co
ntents of Ftpapi digest..."


Today's Topics:

   1. Re: Headers (Scott Klement)


----------------------------------------------------------------------

Message: 1
Date: Fri, 26 Apr 2013 10:14:44 -0500
From: Scott Klement [9]<sk@xxxxxxxxxxxxxxxx>
To: HTTPAPI and FTPAPI Projects [10]<ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Headers
Message-ID: [11]<517A99E4.9020908@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"

Not sure what an "RX web service tool" is...  Probably something similar
to SoapUI?   SoapUI is a great tool for web services, by the way, and
it's available for free.

The error message that you have been sent is (from the log file):
"TypeError: can't convert NilClass into String".   That sure doesn't
sound like it's related to the HTTP headers to me?!?!

To me, it sounds like your XML document is wrong.

I can't look at your XML data, since your log file appears to be completely scre
wed up.  What did you do? copy and paste it screen-by-screen into another file?!
  Why would you do that?  The data is already in an ASCII file, why not just sen
d that to us instead of copy/pasting (which is a lot of work, and is very error-
prone) into a separate file?  Just send us the original!

But, even if I could look at your XML, I couldn't help much because I don't know
 what the web service is expecting.  Show me the XML that your "RX web service t
ool" is sending, too.  Or send us the WSDL.


On 4/26/2013 9:30 AM, Mauricio Diaz-Lapham wrote:

    Hi Scott,


    I obtained a free trial of RX web service tool. And the web service I
    am trying to consume works on that tool, but not on the HTTPAPI.

    So what I thought was, if I can find the difference between the two and
    incorporated it in the HTTPAPI, I might be able to get the HTTPAPI to
    work.


    In the RX log it shows what it passed to the server that created the
    service and the response. Here below is the log of the post.

    It has some additional headers. Now that you explained what they mean,
    I believe they should not make any difference but I thought I would try
    to add it to the HTPPAPI.


    POST /client_smart/api HTTP/1.1

    User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

    Host: 172.16.255.7:5001

    Accept: */*

    Connection: Keep-Alive

    Content-Type: text/xml; charset=utf-8
              This is from the RX tool.

    SOAPAction: "/client_smart/api/get_client"

    Content-Length: 398


    HTTP/1.1 200 OK

    Connection: close

    Date: Fri, 26 Apr 2013 13:15:39 GMT


    I talked to the vendor that created the service and they were able to
    capture what we send to them. The first log shows how a successful call
    looks like and the second is the one is the one I sent using HTPPAPI
    and it failed. I am also including the log from the HTPPAPI and my
    code. I think its something on their server, but what is a mystery is
    why some tools work and others don't.

    Thanks for your help.


    Here the TCP Stream on a successful call. It sends a POST request.

    [12]cid:image002.jpg@01CE41B3.22275EC0


    Here's the TCP Stream on Mauricio's  failing call. Note no POST
    request.

    [13]cid:image006.jpg@01CE41B3.22275EC0



----------------------------------------------------------------------
- This is the FTPAPI mailing list.  To unsubscribe, please go to:
[14]http://www.scottklement.com/mailman/listinfo/ftpapi
----------------------------------------------------------------------
-

-------------- next part --------------
   Not sure what an "RX web service tool" is...  Probably something
   similar to SoapUI?   SoapUI is a great tool for web services, by the
   way, and it's available for free.
   The error message that you have been sent is (from the log file):
   "TypeError: can't convert NilClass into String".   That sure doesn't
   sound like it's related to the HTTP headers to me?!?!
   To me, it sounds like your XML document is wrong.
   I can't look at your XML data, since your log file appears to be
   completely screwed up.  What did you do? copy and paste it
   screen-by-screen into another file?!  Why would you do that?  The data
   is already in an ASCII file, why not just send that to us instead of
   copy/pasting (which is a lot of work, and is very error-prone) into a
   separate file?  Just send us the original!
   But, even if I could look at your XML, I couldn't help much because I
   don't know what the web service is expecting.  Show me the XML that
   your "RX web service tool" is sending, too.  Or send us the WSDL.

   On 4/26/2013 9:30 AM, Mauricio Diaz-Lapham wrote:

   Hi Scott,


   I obtained a free trial of RX web service tool. And the web service I
   am trying to consume works on that tool, but not on the HTTPAPI.

   So what I thought was, if I can find the difference between the two and
   incorporated it in the HTTPAPI, I might be able to get the HTTPAPI to
   work.


   In the RX log it shows what it passed to the server that created the
   service and the response. Here below is the log of the post.

   It has some additional headers. Now that you explained what they mean,
   I believe they should not make any difference but I thought I would try
   to add it to the HTPPAPI.


   POST /client_smart/api HTTP/1.1

   User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

   Host: 172.16.255.7:5001

   Accept: */*

   Connection: Keep-Alive

   Content-Type: text/xml; charset=utf-8
             This is from the RX tool.

   SOAPAction: "/client_smart/api/get_client"

   Content-Length: 398


   HTTP/1.1 200 OK

   Connection: close

   Date: Fri, 26 Apr 2013 13:15:39 GMT


   I talked to the vendor that created the service and they were able to
   capture what we send to them. The first log shows how a successful call
   looks like and the second is the one is the one I sent using HTPPAPI
   and it failed. I am also including the log from the HTPPAPI and my
   code. I think its something on their server, but what is a mystery is
   why some tools work and others don't.

   Thanks for your help.


   Here the TCP Stream on a successful call. It sends a POST request.

   [1][15]cid:image002.jpg@01CE41B3.22275EC0


   Here's the TCP Stream on Mauricio's  failing call. Note no POST
   request.

   [2][16]cid:image006.jpg@01CE41B3.22275EC0


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
[3][17]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

References

   1. [18]cid:image002.jpg@01CE41B3.22275EC0
   2. [19]cid:image006.jpg@01CE41B3.22275EC0
   3. [20]http://www.scottklement.com/mailman/listinfo/ftpapi

------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list digest.  To unsubscribe, go to:
[21]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------


End of Ftpapi Digest, Vol 78, Issue 42
**************************************

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
[22]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

References

   1. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   2. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   3. mailto:ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
   4. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   5. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   6. http://scottklement.com/mailman/listinfo/ftpapi
   7. mailto:ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
   8. mailto:ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx
   9. mailto:sk@xxxxxxxxxxxxxxxx
  10. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  11. mailto:517A99E4.9020908@xxxxxxxxxxxxxxxx
  12. cid:image002.jpg@01CE41B3.22275EC0
  13. cid:image006.jpg@01CE41B3.22275EC0
  14. http://www.scottklement.com/mailman/listinfo/ftpapi
  15. cid:image002.jpg@01CE41B3.22275EC0
  16. cid:image006.jpg@01CE41B3.22275EC0
  17. http://www.scottklement.com/mailman/listinfo/ftpapi
  18. cid:image002.jpg@01CE41B3.22275EC0
  19. cid:image006.jpg@01CE41B3.22275EC0
  20. http://www.scottklement.com/mailman/listinfo/ftpapi
  21. http://www.scottklement.com/mailman/listinfo/ftpapi
  22. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------