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

RE: FW: HTTPAPI



Thanks for the quick response
The servlet supports both Get and Post

We were able to get this to work running a get request
http://192.168.1.53:8000/linomax/servlets/runProjectCommand?projectLocation=
Test_101.xml&priority=5&mode=interactive

We then get back the following

jobNumber=1165441430565
message=Project 'Test_101.xml' finished with no errors


With the post even though we see this going out, when we check the info from
the servlet side, it shows nothing

Url encoding is correct
The response of "Project file is required"
Means that it is not seeing the 




-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Thursday, December 07, 2006 12:21 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: FW: HTTPAPI


Hi Ron,

> Hello I am trying the examples and trying to get to our servlet When I 
> do this I get the following response back Project file is required

This message is coming from the Servlet, not HTTPAPI!   I'm not familiar 
with your servlet, what does "Project file is required" mean?  Is there a
parameter that you're supposed to pass that contains the name of a project
file?


> When I check the parameters received at the servlet I get none

How does the servlet expect to receive it's parameters?  Using GET?  POST? 
How does it expect them to be encoded?  URL encoding? Base64? XML? MIME?


> I am using the code like EXAMPLE5
> I am using the encoder and the following
>
> eval      rc=http_url_post_raw(
>                'http://localhost:8000/linomax'
>             +  '/servlets/runProjectCommand'
>           :myPointer
>           :dataSize
>           :30
>           :%paddr('INCOMING')
>           )

I don't see anything wrong with that, as long as the servlet expects the
parameters to be sent in this manner.

> SetError() #13: HTTP/1.1 100 Continue
> senddoc(): entered
> projectLocation=Test_101.xml&priority=5&mode=interactive

The above data is what you're sending to the servlet in POST fashion. Note
that it's 3 parameters that are URL encoded.  If the servlet doesn't expect
the data to be sent via the POST method, or doesn't expect them to be URL
encoded, or expects them to have different names or capitalized differently,
then you need to change your code accordingly.

But, clearly, HTTPAPI is sending them the way you told it to. :)

Here's the data you're getting back from the servlet:

> jobNumber=-1
> message=Project file is required

It's just data sent by the server.  HTTPAPI does nothing but relay it back
to your program.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
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
-----------------------------------------------------------------------