Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Unable to POST when using TeamRawService

I have created a service which extends TeamRawService.
The implementation has 2 functions: perform_POST and perform_GET

However, the POST function never gets invoked. Even if I submit using a POST method from my browser, the request is redirected to the get method.

For reference here is the request header from the browser:


http://localhost:9080/jazz/service/com.ibm.research.sedna2.blueprintprojectdata.common.IAttachmentRestService

POST /jazz/service/com.ibm.research.sedna2.blueprintprojectdata.common.IAttachmentRestService HTTP/1.1
Host: localhost:9080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------146043902153
Content-Length: 14390
-----------------------------146043902153
Content-Disposition: form-data; name="uploadFileInput"; filename="Abc.xml"
Content-Type: text/xml
......


Post method type seems to work fine when I am using ITeamModelledRestService.

Would really appreciate help in this issue.
Thanks
- Vibha

0 votes



4 answers

Permanent link
Is it possible for you to post the class or at least a skeleton of it to
the forum? Are you sure that the perform_POST method was properly
overriden? Putting a @Overrides annotation will generate a warning if it
isn't.

vssinha wrote:
I have created a service which extends TeamRawService.
The implementation has 2 functions: perform_POST and perform_GET

However, the POST function never gets invoked. Even if I submit using
a POST method from my browser, the request is redirected to the get
method.

For reference here is the request header from the browser:


http://localhost:9080/jazz/service/com.ibm.research.sedna2.blueprintprojectdata.common.IAttachmentRestService

POST
/jazz/service/com.ibm.research.sedna2.blueprintprojectdata.common.IAttachmentRestService
HTTP/1.1
Host: localhost:9080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Content-Type: multipart/form-data;
boundary=---------------------------146043902153
Content-Length: 14390
-----------------------------146043902153
Content-Disposition: form-data; name="uploadFileInput";
filename="Abc.xml"
Content-Type: text/xml
.....


Post method type seems to work fine when I am using
ITeamModelledRestService.

Would really appreciate help in this issue.
Thanks
- Vibha

0 votes


Permanent link
Hello Lavin,

Here are the snippets of the code


public class AttachmentRestService extends TeamRawService implements IAttachmentRestService {

public void perform_POST(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException {
System.out.println("In post !!!!");
....
}

public void perform_GET(String uri, HttpServletRequest request, HttpServletResponse response)
throws IOException {
.....
}

}

0 votes


Permanent link
I wrote the same type of service less than a week ago, and the incoming
requests were properly dispatched to the perform_POST method. Would it
be possible to open a bug and include a small plugin example for the
problem? Perhaps there is something else about your plugin setup that
is causing the problem.

If you open a bug, can you subscribe me so I can look into it?

vssinha wrote:
Hello Lavin,

Here are the snippets of the code


public class AttachmentRestService extends TeamRawService implements
IAttachmentRestService {

public void perform_POST(String uri, HttpServletRequest request,
HttpServletResponse response) throws IOException {
System.out.println("In post !!!!");
...
}

public void perform_GET(String uri, HttpServletRequest request,
HttpServletResponse response)
throws IOException {
....
}

}

0 votes


Permanent link
Hello Lavin,

I have opened a bug on this - 59261 and have posted my code there.

However, I was not able to assign it to you as did not have the requisite permissions.

Thanks
- Vibha

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,927

Question asked: Jul 24 '08, 1:37 a.m.

Question was seen: 5,818 times

Last updated: Jul 24 '08, 1:37 a.m.

Confirmation Cancel Confirm