Generic service() for request, specify POST for response?
I'm designing a servlet that can communicate with Macromedia's FLASH. This program does things a little strangely. It has a myXML.sendAndLoad() method which sends an xml object to a server, and expects one back (the objects are serialised as a single unwrapped text line). It claims to send using POST, but actually, when you look at the headers, is sends using GET, and then appends the data in a seperate transmission (in the body of the request) as POST would.
to get around this annoyence, I'm reading in the data like this
public void service(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
//Read the xml from the HTTP request into a String
BufferedReader reader = req.getReader();
String xmlString = reader.readLine();this works fine.
Just one thing - FLASH will expect the response to be POST. At the moment FLASH receives a response, but can't decipher it as (I assume) the service() method sends a response back in the same format that it received the request.
Q - how do I keep the service() bit for receiving th request, but specify a doPost() for the response?
thanks for any help
RT
That's what I'm doing. However, I should think (though I'm not sure) that when the service method is called, it fires a doGet (as the req Header is GET). Therefore (?) the response would also be a GET . OK, the output will be written to the body with this method, but I think FLASH needs a POST. Am not sure on the last one - but no one else seems to be either!
Similar Messages
-
F4 help not working in custom backend service for PD form
Dear All,
Iam working with the Create position HCM PD form and i have a requirement to add two fields, one for the company code and the other is for the cost center and then create the relationship betwee the position and the cost center when the form is submitted.
I have defined a generic service and created an enhancement implementation and linked this generic service to the imppementaion. I have written the logic for the F4 help for the fields in the method GET_HELP_VALUES, i have written the scripting for the drop down field in the form to trigger the F4 help in the form.
When the cost center is being passed to the screen, i would then read the value of the cost center in the form workflow and create the relationship between S and K in the workflow as i am unable to achiev this in the design time of the PD form.
But my current problem in that he values are not getting passed from the method to the field on the screen. I have worked on quite a few scenarios for F4 help and doing validations in the implementation in the PA form and i have seen this functionality working fine.
My problem here is that i am unable to understand why the F4 value help is not working in my form. The standard PD service SAP_PD is also being used in the form to have the dropdown values for the account assignment feature.
Could you please suggest me with some clues to fix my issue? i can share more details for further analysis.
Thanks.
Best regards,
SridharanHi Chris,
Thanks for your inputs. please see my reply to your questions
First....are you sure you have "marked" that field as possible for F4 help?
Reply: Yes
Second...are you populating the help values strictly from that method...ie. not also using do_operations method to do it. If you refer to the documenation, it points out that trying to use both can cause issues.
Reply: i am using only the GET_HELP_VALUES method and nothing written in do_operations.
Third...when you debug your method, do you "see" the help values actually populating and as you say "not coming back to the screen"? I would check this first to make sure that there are actually values being found (ie. the logic within your service is correct).
Reply: i have put the external break-point in this method and when the form in opened for processing by the HR admininstrator,the form openes up and the control is not being sent to the debugger. I have written the scripting in the exit event of the events and scripts as suggested in the SAP help document. SO when i click on the dropdown field in the form, the debugger starts and executes the method and the code executes, then no values are populated on the screen.
Fourth...are you using any generic services for populating help values as well. HCM P&F has a nasty habit of "if one GS fails, they all fail" so often, your service might work fine but an error in another makes yours appear to fail as well....hard to debug and find those kind.
Reply: Yes i am using the generic service mainly for the purpose of F4 help. I do not see any issue with other gneric services as i have implemented a few generic services for PA forms and they are working fine.
Fifth...oops...forgot the obvious one...make sure it isn't a security issue...ie. make sure you have access to read the cost centers you want.
Reply: I dont get any auth error in SU53 while i test the process in R3
Lastly, you said:
"When the cost center is being passed to the screen, i would then read the value of the cost center in the form workflow and create the relationship between S and K in the workflow as i am unable to achiev this in the design time of the PD form."
You actually should be able to do this using an Advanced/Enhanced Generic Service (if this is in fact the step at which you want a true update to occur). Just a thought.
Reply: Could you please give some more information about this, how can i achieve it in advanced generic service.
Appreciate more thougts from you Chris!
Thanks,
Sridharan -
Generic service to populate fields in HCM Processes and Forms
Dear Friends,
I am developing generic service to populate some fields in HCM Processes and Forms. Please let me know whether i need to develop a single service for each field in the form or is better to write one generic service for all the form fields.
Thanks in AdvanceHi Sapient,
By right, generic service means to be generic so that it can be re-used in any HCM forms thats needed the field/validation from the generic service.
Unfortunately in real situation, generic service are not reusable for some reasons:
- for the same field same field might have different validation in different form.
- there is dependency, example, to read special field
The key thing here is all about the design and planing before development. Whereby if you have all the info and requirement HCM form to be implemented(which you wont get it for most of the cases), and you have the overall view of all HCM to be implemented and you are able to plan ahead before coding, then you can design the generic service for each/related field.
If it is not the case, i would encourage to use 1 generic service for all the field in the HCM form. It would ease the team during support/maintenance phrase as well. For sample, please refer to HRMSSRCF_REQUISITION_ADVANCED for Create Requisition form.
This is my humble opinion based on my experience working on HCM forms. Please do comments and discuss.
regards,
Xiang Li -
Doubts with generic service in "HCM processes and forms"
Hello friends:
Im having troubles trying to figure out how to use generic services. I implemented a badi with generic services and this have the following methods:
IF_HRASR00GEN_SERVICE~GET_SPECIAL_FIELDS
IF_HRASR00GEN_SERVICE~GET_FIELD_INFO
IF_HRASR00GEN_SERVICE~GET_OPERATIONS
IF_HRASR00GEN_SERVICE~INITIALIZE
IF_HRASR00GEN_SERVICE~DO_OPERATIONS
IF_HRASR00GEN_SERVICE~GET_HELP_VALUES
I could initialize values of my form using only INITIALIZE method, and I could perform some validation using and then DO_OPERATIONS.
I cant understand what is the usage of methods like GET_FIELD_INFO and GET_OPERATIONS?? according to the badis help, get_field_info must be implemented, but i didnt do so and it worked anyway?
I will be grateful with all your help,
Best regards,GET_FIELD_INFO is for adding fields. Suppose you are using the generic service for IT0008 data. The IT0008 fields
which need to be used on the adobe form has to be added in this method. You need to add field name and data element
to the field_infos table. GET_OPERATIONS is used to define operations associated with the fields. Suppose you have a
scenario when user selects personnel area all personnel subareas associated with the selected value should come.
Then you need to group together personnel area and sub area together into an operation. Also even if a field is not aasociated
with any operation, to add a field to form scenario you need group them into operations in GET_OPERATIONS.
Check the class CL_IM_HRRCF_REQUI_REQUEST to determine how this can be used.
Thanks,
Aravind -
HCM Process and Forms Generic Service Error
I tried creating a generic service for HCM Process and Forms using enhancement spot HRASR00GENERIC_SERVICES. After I created a custom implementation I then added the filter value = ZH_FORM_HEADER (my generic service name/definition). When I try to go into the configuration and add the generic service and do the binding of the fields I get an error stating "Generic Service ZH_FORM_HEADER has more than one implementation." I have double checked and only one implementation is using that filter value and there are no implementations with a blank filter value that belong to this enhancement spot. Any suggestions on what could be wrong? I can create generic services and the implementations of the BADIs just fine in our sandbox just not in the development instance. Also, I have tried searching on OSS and SDN and couldn't find any messages associated with this problem.
Hi :
We are having a similar problem. Our generic service works OK in development system. But after we transport the service to Test system, the service haveing the error " Generic service XXXXXX has more than one implementation".
Have you solved your problem? Can you tell us the solution?
Best regards!
Wayne -
Request timed out while waiting for response!!
Hi All,
My scenario is PROXY to SOAP. I am getting below error while posting to WEBSERVICE.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- XML Validation Inbound Channel Response
-->
<ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">Failed to deliver inbound WS message, code=503 and reason=Request timed out while waiting for response. at com.sonicsw.net.http.ws.WSHttpProtocolHandler$HttpInBrokerHandler.invoke(WSHttpProtocolHandler.java:833) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) at com.sonicsw.net.http.ws.WSHttpProtocolHandler.sendToSOAPStack(WSHttpProtocolHandler.java:630) at com.sonicsw.net.http.ws.WSHttpProtocolHandler.dispatch(WSHttpProtocolHandler.java:537) at com.sonicsw.net.http.ws.WSHttpProtocolHandler.servicePost(WSHttpProtocolHandler.java:284) at com.sonicsw.net.http.ws.WSHttpProtocolHandler.service(WSHttpProtocolHandler.java:609) at com.sonicsw.net.http.HttpProtocolHandler.handle(HttpProtocolHandler.java:471) at progress.message.net.http.server.HttpConnectionHandler.handle(HttpConnectionHandler.java:170) at progress.message.net.https.server.SonicHttpsConnection.service(SonicHttpsConnection.java:156) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831) at progress.message.net.https.server.SonicHttpsServer.handleConnection(SonicHttpsServer.java:449) at progress.message.net.https.server.SonicHttpsServer.handle(SonicHttpsServer.java:364) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)</ns1:stackTrace>
Any Idea ? Do I need to change anything in my SOAP Channel or BAsis should change the Time Parameter?
Thanks,
Pushkar PatelHi,
>>>>>>>Request timed out while waiting for response.
See the below link, it might be helpful to you for timed out issue.
[Link1|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c059d583-a551-2c10-e095-eb5d95e03747?quicklink=index&overridelayout=true]
Regards,
Rajesh -
Designing services for xml over http client requests
Hi
I am new to WebServices and Weblogic Integration. I have been using it for only over a month. I have a very basic design issue.
We have to provide a service that
1. accepts xml over http requests
2. Returns a request ack
3. Process Form a response -This activity consumes time so it will be made asynchronous
4. Send the response as xml over http
5. Wait for response ack
6. Get another type of request from client, the processign of which depends on the result of the previous request .. and so on..
The problem here is that Webservices accepts only SOAP messages but our client will send raw xml messages. Also we need to remember the condition of the previous state.
I dont know if my assumption that SOAP is used is right.
Please tell me how to design a raw xml based system without using SOAP messages.
Thanks
nithyaI don't see nothing wrong with your code, there must be something else happening.
You sure you are not being some proxy server?? but even then you are making a post request so it shouldn't be happening.
MeTitus -
request to post Icloud not working locations. for 2 days almost from Ventura CA. I think they are not being truthful about the percentage of folks affected!
and what's with the minimalist response? We're working on it for 2 days? You can do beter than that for exsisting loyal customers can't you?I just spoke to a Support person with Apple. I got the same answer, "We Don't Know", "but they are working on it...Blah, Blah. I too live in Ventura, and have been without email since yesterday approx. 3:00 pm.
The guy said, it's the same if you brought your computer into the shop. We have to determine if it's hardware, or software, then fix the problem.
Well, What about a BACK UP SERVER? No real answer to that one. Just, "Thanks, for your Patience."
This really blows!!! -
Heterogeneous Services & Oracle Generic Connectivity for dbase DBF file
Dear All,
Can we use Heterogeneous Services & Oracle Generic Connectivity for creating dbase DBF file or Writing in dbase DBF file?
I have used it for Excel and Access for connectivity with Oracle 9i
but I dont have any idea about dbase DBF file?
Any help in this reagards will be highly appriciatalble.
Thanks
RanaI wouldn't think so these days ... however, you could try posting this in the heterogeneous services - which is somewhere on OTN.
If it we me, I'd convert the DBF into something easier to use with Oracle : like XML or CSV -
Raising custom error message in generic service initialize method of Pr&for
Dear all,
I am developing the HCM process form.
Is it possible to raise an error if any condition is not met in initialize method in generic service of HCM process & forms?
If possible could you please provide me the steps/process.
Thanks & Regards,
Krishna KChange for a BADI more suited (not in the update of after-save process) like ME_PROCESS_PO_CUST (Method PROCESS_ITEM, CHECK).
ME_PURCHDOC_POSTED is too late.
Regards -
RPC request to the Microsoft Exchange Information Store service for log truncation
Hello all
Running Exchange 2013 CU3 on Windows 2008R2 sp1 in a two node DAG. We are seeing the bellow warning when running a backup. How to resolve this?
RPC request to the Microsoft Exchange Information Store service for log truncation failed for database CoramB3\Servername. Error: Failed to notify source server 'servername.coram.com' about the local truncation point. Hresult: 0xc8000713. Error: Unable to find
the file. Also log files are not being flushed
Bulls on ParadeHello,
Please verify backup software.
Please use vssadmin list writers command to check the status of the VSS admin. If it is in a
failed state, please restart the Exchange replication service and then check the status again.
Please use Get-MailboxDatabaseCopyStatus cmdlet to view health and status information about mailbox database copies.
Please use Get-DatabaseAvailabilityGroupNetwork “DAG Name” | fl cmdlet to view configuration and state information for a DAG network.
Please use Get-DatabaseAvailabilityGroupNetwork DAG Name\MAPINetwork | fl cmdlet and Get-DatabaseAvailabilityGroupNetwork DAG Name\ReplicationNetwork | fl cmdlet to
check configuration information for MAPI network and Replication Network.
If the above configuration information is ok, please check if there are other related errors in application log.
Cara Chen
TechNet Community Support -
How to create a Generic Object Services for a standard tcode.
Hi,
We have a requirement where we are depreciating the assets (standard transaction ABAA) using a custom BDC program. We need to maintain a history (called audit trail) for the particular asset that has been depreciated using this program. For this audit train we have been asked to use "Generic Object Services" in transaction code ABAA.
Unfortunately, Generic object services are not available in this transaction code. Can you please suggest me how to create "Generic Object Services" for a particular standard transaction code. Also, we have show the details of custom workflow that follows the approval process in order to depreciate the asset. how to show this workflow details using Generic Services. This is a very critical issue, any help will be very help ful.
Please let me know should you require more information on this topic.
Thanks,
AshishInstead of copyg the std fm to z, do the following,
1. Go to se37 open FM VIEW_KURGV in display mode.
2. Click on the spiral icon on the top.
3. Then in menu go edit->enhancment options -> show implicit enhancement
4. """""""""""""""""""""" kind of lines will appear in the cde, just rt click on the line at the place u want to insert the code and select
enhancement implementation create.
5. Give apropriate name for thi , it will inset a n place to write your code.
This is an std sap methodology and is supported in upgradde also. -
Generic Object Services for a standard transaction code
Hi,
We have a requirement where we are depreciating the assets (standard transaction ABAA) using a custom BDC program. We need to maintain a history (called audit trail) for the particular asset that has been depreciated using this program. For this audit trail we have been asked to use "Generic Object Services" in transaction code ABAA.
Unfortunately, Generic object services are not available in this transaction code. Can you please suggest me how to create "Generic Object Services" for a particular standard transaction code. Also, we have show the details of custom workflow that handles the approval process in order to depreciate the asset. How to show this workflow details using Generic Object Services. This is a very critical issue, any help will be very help ful.
Please let me know should you require more information on this topic.
Thanks,
AshishHello Ashish,
i dont think activating of GOS will solve ur probs..... GOS wont create a WF item ...... try to get some kind of GOS before u do anything in SAP systems.
u can do like this ......
1 create custom screen where u can enter asset details and store in custom tables....and generate one custom doc.number to track.
2. trigger WF when user submits it for approvals.
3.Upon final approvals.--->run BDC to do postings......
4.Give a Option to attach documents to the parking documents. ( that GOS ).
regards
Prabhu -
Generic Object Services for Custom Object Type
I would like some advice please. I am not an ABAP Developer but I would like to enable the generic object services for transaction PP01 for a custom object type.
I have searched for information, which suggests that the object needs to be published using the function module SWU_OBJECT_PUBLISH so that it is available in the Business Object Repository. If this is correct, please could someone tell me (in simple terms) how I can do this (with the assistance of an ABAP developer)?
My colleague did some debugging which seemed to suggest that in order for the generic object services to be available, the field OBJTYP needs to be populated in table T778O. Is this correct? If so, how should this be done?
Your advice would be greatly appreciated.
Regards
CorinneHi,
i'm also looking for the solution you have asked for.
if you know how to do it please reply me with the solution.
Thanks,
suresh -
Generic Host Services for Win32
Hi! I had everything up and running perfectly with my k8n neo platinum and then I installed my Homeportal 1000 DSL modem/router and I have been getting this Generic Host Services for Win32 has encountered an error and must close thing ever since...Does anyone have any ideas???
Thanks!maybe firewire port enabled has same problems as old nf2 chipset.
Maybe you are looking for
-
Mail not responding under one user. Need to Force Quit to get out of it. My mail works when I log on as a user. Downloaded the latest Mountain Lion updates and reinstalled Mountain Lion as per Apple Phone Support instructions TIA
-
Hey my iphone 4 just suddenly turned off and wont turn on
I have an iphone 4 and it suddenly turned off & wont turn back on , the problem is that my Sleep/mode button does not work. i cant restore it so what can i do
-
My What'sApp on BB Q10 is showing duplicate contacts and some of the contacts name are different from my own Q10 Contact Book which is syncronized to my Outlook Connector Is anyone else having the same problem?
-
Hi! How do I make compilation albums (e.g. Trojan-boxes) with different artists on each track to show up togeather as one album i my music library? And how do I make several albums by the same artist to show cronologically instead of aphabetically?
-
How to read/write xbox 360 hard drive (fat32) on mac
I can see it in disk utility but no where else and says its not suported on this computer when pluging in. Theres gotta be some programe or something to be able to do this.