HTTP.RESPONSE in synch BPM

Hello,
I want to receive a XML message from a HTTP sender synchron into a BPM.
In the BPM I have to to several steps, one is a mapping step and another is an asynchronus SEND of an IDOC to an R/3.
I have setup this BPM and everything works ok.
The BPM sends a HTTP-200OK back and a response message.
But in some cases the mapping step throws an exception. e.g. a mandatory field is missing.
In this case the HTTP-500 ERROR code is sent back, but with the response message
"Internal Server Error
<SAP:Error><SAP:Category>XIServer</SAP:Category><SAP:Code>INTERNAL.PL_TIMEOUT</SAP:Code><SAP:Stack>Pipeline timeout condition satisfied</SAP:Stack></SAP:Error>"
If I handle the exception in an exception branch everything work ok again, but then the HTTP-200OK is sent back.
Now my question:
How can I send back an HTTP-500 ERROR code from this synchronous BPM with my own response message.
I have tried with CONTROL STEP-CANCEL PROCESS, but I also get the same missleading error message back for the TIMEOUT. Also in this case the process is canceled after 60seconds with this timeout error.
Is is possible to send an HTTP-500 ERROR status and to cancel the process immediatly?
If yes, how can I set a specific RESPONSE message?
best regards
Werner Magerl

Hello Udo, hello Werner,
for the moment i am not sure but i think if i want to use a mapping i need a xsd that i have imported to my scenario, haven't i? (defined in MessageType?)
and other question: if i have a javamapping infront of the  real mapping and this mapping throws an exception: can i catch this javamapping-exception and put this into the second transformation?
thanks a lot
Alex Schramm
Message was edited by: Alexander Schramm (18:36, 31.03.2006)

Similar Messages

  • HTTP Response

    We are sending PO Request (IDOC) to XI to Supplier. This is an Asynchronous Scenario.
    IDoc(ASynch) -
    > XI -
    > HTTP Adapter (Async)
    Once the IDOC has been sent to the supplier using the HTTP Adapter, I need to get the HTTP Response (Like 200 Successful 403 Authentication issue etc). How to do capture the HTTP Response into XI. Whether it is Possible to do that?
    Thanks.

    Hi Mohini,
    If you just need to capture the HTTP response, it looks like you can do this using the debugging method that Wojciech suggested.
    If you need to make logical decisions based on the HTTP response (in a BPM) then it's not straightforward. You can't actually get the HTTP response code and then make decisions based on it. The best you can do is to check to see if the call was successful which means you got an HTTP response of 200. If it wasn't successful you can retry.
    This is a basic thing that developers need when integrating HTTP. It's also very easy to do in other integration tools, webMethods, etc. Hopefully XI will add this functionality in the future.
    Thanks,
    J Wolff

  • Can we capture HTTP response for async message without BPM?

    We are in the process of migrating an XI 2.0 scenario to XI 3.0.
    The scenario is as follows in XI 2.0 - SAP sends an IDoc to XI which is mapped to an HTTP request and sent to an endpoint.  The HTTP response is captured and shown in SXMB_MONI.
    When we migrate this scenario to XI 3.0, we do not see the HTTP response in MONI.  It looks like since the incoming message (IDoc) is triggering an asynchronous message flow, the HTTP receiver is ignoring the HTTP response payload if it sees a 200 OK status code.  Ideally, we would like for the HTTP response to be captured in MONI just as in XI 2.0.
    Is there a way to capture the HTTP response without using a BPM to make the HTTP synchronous call?  It appears that there is nothing in the HTTP receiver communication channel that we can change (to change it from asynchronous to synchronous).
    Thanks for your help,
    Jay Malla
    SAP XI Consultant
    Licensed To Code

    It looks like the problem I am having might be due to a bug in SP15.  It looks like i should see the HTTP response in MONI by default.  Some other people had this problem with SP 15.  Here is the posting:
    Re: SXMB_MONI does not show payload after upgrade to SP15
    Regards,
    Jay

  • Processing sync http response code XI

    We are receiving a synchronous HTTP response code from the 3rd party using HTTP adapter. The requirement is based on the response code (either 200 or 4xx or 5xx), email or some action needs to be generated, so that the user knows what happened to the Outbound message processing.
    I am not very sure how to trap and process further this HTTP response code. Please note that this is a syn scenario and has been achieved without using BPM.
    Any suggestion is highly appreciated.
    Thank you.
    Anuradha.

    Hello Stephan.
    I have the impression, that the mentioned response code is not the HTTP code, but part of the HTTP message payload. Is this correct?
    -->> The response code is part of the synch response message that we are getting from the 3rd party
    When you send a message with HTTP adapter to external system, any other HTTP code than 2xx will make the XI message fail.
    If I am not correct, could you provide the HTTP stream of the response message here? This will help to understand the issue.
    This is the attached payload: (response sync message)
      <?xml version="1.0" encoding="UTF-8" ?>
      <!DOCTYPE cXML (View Source for full doctype...)>
    - <cXML timestamp="2011-06-2916:08:49-0400" payloadID="50000011930000000220110629200753" version="1.2.011">
    - <Response>
      <Status code="200" text="OK" />
      </Response>
      </cXML>
    Thanks.
    Anuradha.

  • Received HTTP response code 500 : Internal Server Error using connection Fi

    Hi everybody,
    I have configured a file-webservice-file without BPM scenario...as explained by Bhavesh in the following thread:
    File - RFC - File without a BPM - Possible from SP 19.
    I have used a soap adapter (for webservice) instead of rfc .My input file sends the date as request message and gets the sales order details from the webservice and then creates a file at my sender side.
    I monitored the channels in the Runtime work bench and the error is in the sender ftp channel.The other 2 channel status is "not used" in RWB.
    1 sender ftp channel
    1 receiver soap channel
    1 receiver ftp channel.
    2009-12-16 15:02:00 Information Send binary file "b.xml" from ftp server "10.58.201.122:/", size 194 bytes with QoS EO
    2009-12-16 15:02:00 Information MP: entering1
    2009-12-16 15:02:00 Information MP: processing local module localejbs/AF_Modules/RequestResponseBean
    2009-12-16 15:02:00 Information RRB: entering RequestResponseBean
    2009-12-16 15:02:00 Information RRB: suspending the transaction
    2009-12-16 15:02:00 Information RRB: passing through ...
    2009-12-16 15:02:00 Information RRB: leaving RequestResponseBean
    2009-12-16 15:02:00 Information MP: processing local module localejbs/CallSapAdapter
    2009-12-16 15:02:00 Information The application tries to send an XI message synchronously using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:02:00 Information Trying to put the message into the call queue.
    2009-12-16 15:02:00 Information Message successfully put into the queue.
    2009-12-16 15:02:00 Information The message was successfully retrieved from the call queue.
    2009-12-16 15:02:00 Information The message status was set to DLNG.
    2009-12-16 15:02:02 Error The message was successfully transmitted to endpoint com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 500 : Internal Server Error using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:02:02 Error The message status was set to FAIL.
    Please help.
    thanks a lot
    Ramya

    Hi Suraj,
    You are right.The webservice is not invoked.I see the same error in the sender channel and the receiver soap channel status is "never used".
    2009-12-16 15:52:25 Information Send binary file  "b.xml" from ftp server "10.58.201.122:/", size 194 bytes with QoS BE
    2009-12-16 15:52:25 Information MP: entering1
    2009-12-16 15:52:25 Information MP: processing local module localejbs/CallSapAdapter
    2009-12-16 15:52:25 Information The application tries to send an XI message synchronously using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:52:25 Information Trying to put the message into the call queue.
    2009-12-16 15:52:25 Information Message successfully put into the queue.
    2009-12-16 15:52:25 Information The message was successfully retrieved from the call queue.
    2009-12-16 15:52:25 Information The message status was set to DLNG.
    2009-12-16 15:52:27 Error The message was successfully transmitted to endpoint com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 500 : Internal Server Error using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:52:27 Error The message status was set to FAIL.
    what can I do about this?
    thanks,
    Ramya

  • IDOC - XI - HTTP/MAIL (How to get the http response and send an email?)

    Hi David!
    If you are able to send any Http message in reference to message from XI (eg. with Idoc number or msg-id) there is no problem to process it in your scenario (even if comunication is asynchronous).
    Regards,
    Radek

    You need a 2:1 mapping. source interfaces are Idoc and Http response, target interface is the mail.
    As you can do his only for abstract interfaces, you have to create an abstract message interface based on the IDoc structure.
    For the http call you need abstract async message interfaces representing request and response which you can use for the mapping and for the container variables inside the BPM.
    Regards
    Stefan

  • Receive HTTP response

    Hi,
    My scenario is idoc->XI-HTTP , im trying to send xml document to HTTP server. currently i'm able to send the document however i'm not able to see to response payload for the request i send. Should i go for BPM? does HTTP adapter always treat request as Asynchronous in XI. I always see the following message in trace. I dont see payload for resposne, even if there is a failure i see only the below message in trace. any help will be greatly appreciated.
    <Trace level="2" type="T">HTTP-Response :</Trace>
      <Trace level="1" type="T">Apple</Trace>
      <Trace level="2" type="T">Code : 200</Trace>
      <Trace level="2" type="T">Reason: Apple</Trace>
    Trace level="3" type="T">Async processing: skip mapping of response</Trace>
    Thanks!
    Ganesh.

    Ganesh, the default behaviour of Idoc adapter is async and therefore the communication would remain EO. For a sync scenario, you must use BPM with the following steps:
    1. Receive
    2. Transform (optional)
    3. Send sync (http)
    4. Transform (optional)
    5. Send async (idoc)
    does HTTP adapter always treat request as Asynchronous in XI.
    The type of communication depends upon sender. Http adapter can be used in both async and sync cases.
    @VJ, Abhishek, Alka - receiver does not determine the QOS of message. It is sender who determines the QOS. So there shouldn't be any such setting in http channel.
    Regards,
    Prateek

  • Capturing HTTP Response  Async RFC - XI - HTTP

    Hello All,
    Can somebody please explain how to capture the HTTP response. My scenario is
    Async RFC --> XI --> HTTP. Its an external HTTP url and the HTTP response is in XML format.
    Do I have to use a BPM for this? Without using BPM I'm able to see the HTTP return codes in MONI...but unable to see the HTTP response.
    Thanks
    Karthik

    Thanks Aamir for the quick reply. We dont have to send back the response to the calling posting RFC. This is just to get a confirmation back saying message was processed. Writing the response to a file would be a good idea. So in that case how would the BPM look like? This would be a Async-Sync bridge case right?
    Barring error handling for now..will the basic BPM be something like
    Reciever  --> MessageTransformation (This interface mapping would be from ZRFC_Abstract_Async_MI to HTTPPostMessage_MI ) --> Sync Send step --> Stop.
    Thanks
    Karthik

  • Synchronous HTTP Response

    Hello,
    In our process we receive a cXML document via http which creates a SO in our R/3 system. According to the cXML specification we need to send a response xml back to the trade partner. This response needs to specify if the xml was well received or not and must be sent back in the http response of the original http request.
    How can we put this into XI? When I compare to the RNIF/CIDX adapter, there this response is sent out via the adapter. Can we enhance the http adapter in some way for this behaviour.
    Other possibility is to use BPM, but this looks heavy for this simple process.
    Greetings,
    Bart

    Hi Bart,
      As I understand this, if you use reciever RFC then you can think of a Synchronous call and the sucessfull creation of SO can be known by the return of the BAPI, which can be passed across to the http adapter.
      This shows that your cXML was not only valid but also contains proper data to create SO.
      In case of Idoc, & if you want to send an immediate response, then you should go for BPM.
    In the BPM, there should be an Interface (or some mechanism) to validate your cXML & send back a response to the sender system.
      If you dont want to use a BPM, allow the Idoc to be processed. after a while "trigger" a seperate flow which goes from SAP->XI->(original Sender) with the reponse message (about validity, creation of SO acknowledgement etc)
    Also, the http call ends, if ANY (only ONE) response is sent back. check this link
    Receiver HTTP Adaper Response Message problem
    check this lin
    Hope this Helps
    Regards
    Vishnu

  • Scheduled report failures - Unexpected error getting the HTTP response

    Getting this error when scheduled report executes:
    Unexpected error getting the HTTP response stream while generating report: http://cdmdb1c.nam.nsroot.net:4889/em/console/reports/render

    Hi..
    Thanks for the comment.
    Below is how my web.xml entry looks like.
    The requirement is to send a 404 error response and that will be handled by a servlet which inturn writes the output to the response object.
         <servlet>
              <servlet-name>ErrorPageServlet</servlet-name>
              <servlet-class>com.test.ErrorPageServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>ErrorPageServlet</servlet-name>
              <url-pattern>/error</url-pattern>
         </servlet-mapping>
         <error-page>
              <error-code>404</error-code>
              <location>/error</location>
         </error-page>>>
    the first option to turn off the "show friendly html error pages" works fine.
    It would be better if I can get a different solution

  • Deploying simple HTML page to WLS 10.3.6 fails with HTTP response code: 502

    - I created a simple HTML page and want to test deployment to WLS 10.3.6 on Linux. I created WAR file and when using JDev 11.1.1.4.0 to deploy to WebLogic Server, it fails to deploy. Full errors/messages are:
    [04:40:56 PM] ---- Deployment started. ----
    [04:40:56 PM] Target platform is (Weblogic 10.3).
    [04:40:59 PM] Retrieving existing application information
    [04:40:59 PM] Running dependency analysis...
    [04:40:59 PM] Building...
    [04:40:59 PM] Deploying profile...
    [04:40:59 PM] Wrote Web Application Module to C:\JDeveloper\mywork\Simpe_HTML\Project1\deploy\SimpleHTML.war
    [04:41:01 PM] Deploying Application...
    [04:41:01 PM] Weblogic Server Exception: weblogic.deploy.api.internal.utils.DeployerHelperException: The source 'C:\DOCUME~1\NGOLDR~1.LAT\LOCALS~1\Temp\SimpleHTML.war' for the application 'SimpleHTML' could not be loaded to the server 'http://dupe:7031/bea_wls_deployment_internal/DeploymentService'.
    Server returned HTTP response code: 502 for URL: http://dupe:7031/bea_wls_deployment_internal/DeploymentService
    [04:41:01 PM] See server logs or server console for more details.
    [04:41:01 PM] weblogic.deploy.api.spi.exceptions.ServerConnectionException: [J2EE Deployment SPI:260041]Unable to upload 'C:\JDeveloper\mywork\Simpe_HTML\Project1\deploy\SimpleHTML.war' to 't3://dupe:7031'
    [04:41:01 PM] #### Deployment incomplete. ####
    [04:41:01 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
    - The Application Server connection is accessible within JDev. 'dupe' is my server name and it's running RH 5.4
    - Any help or suggestions appreciated, although I've already asked Mr. Google without success.
    Thanks in advance,
    Neville

    HTTP response code 502 means temporarily overloaded.
    I would say that we have to check the deployment error on the weblogic server logs located at <Domain_Home>\servers\dupe\logs\dupe.log
    Check for any errors like OutOfMemory etc OR any deployment failures.
    If possible, try accessing the console at http://dupe:7031/console
    Check if you are able to successfully deploy your application using the console.
    From the error it looks like the "dupe" server might not be healthy. So, the log file would really help here to get clues into the root cause.
    Arun

  • Windows Azure Pack - Server returned HTTP response code: 500 error while accessing the public tenant API

    Hi,
    We are facing the following error while trying to access the given Windows Azure Pack Public tenant API to query the virtual machines list along with network adaper details - 
    java.io.IOException: Server returned HTTP response code: 500 for URL: https://<hostname>:30006/<subscription-id>/services/systemcenter/vmm/VirtualMachines?$expand=VirtualNetworkAdapters&$top=10000&$skip=0
    The response is proper when we access the following URL - 
    https://<hostname>:30006/<subscription-id>/services/systemcenter/vmm/VirtualMachines
    Only on adding the $expand=VirtualNetworkAdapters, url parameter we are getting the above error.
    Where can we check for the error logs on the Azure Pack server ? We checked for the logs using Windows Event Viewer but did not find any for the public tenant API.
    What should be the cause for such an error and how can we fix this to get the proper data?
    Thanks in advance.

    Yes, we tried this, $top=10&$skip=0 works for the following url
    https://<hostname>:30006/<subscription-id>/services/systemcenter/vmm/VirtualMachines?$top=10&$skip=0
    It is only when we add $expand=VirtualNetworkAdapters,
    the server returns the mentioned error response - 
    URL for which the server returns the 500 error -
    https://<hostname>:30006/<subscription-id>/services/systemcenter/vmm/VirtualMachines?$expand=VirtualNetworkAdapters&$top=10&$skip=0
    Can
    you point to the error logs for Windows Azure Pack and SPF ?

  • Unable to deserialize HTTP response content - SharePoint Designer Call Web Service Workflow Activity

    I am creating a workflow using SharePoint Designer 2013 and I'm using the call HTTP web service action.
    The web service call works (it is for a text messaging service, and I get the text message to my phone) however the workflow stops at this point with internal status "suspended" and gives the error message below when clicking on the "i"
    icon.
    I have tried setting the Accept and Content-Type request headers to "application/json; odata=verbose" (minus the quote marks) as other posts suggested but this doesn't make a difference (e.g. here: https://social.msdn.microsoft.com/Forums/windowsapps/en-US/f0b18411-87d1-466b-aab0-1a0093605ed4/workflow-cannot-read-json-after-latest-sp15-patches?forum=sharepointdevelopment).
    I tried adding in the Content-Length header too but that made no difference.
    I tested calling another web service (https://sharepointurl/_api/contextinfo) and this works fine.
    Is there any way to get the workflow to accept this XML as the response? I don't actually really need anything out of the response content, but I do need the workflow to carry on after this step and carry out other activities after this call.
    Error message:
    Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.IO.InvalidDataException:
    Unable to deserialize HTTP response content. Expected ContentType : 'application/json', 'text/plain' or 'text/html', Received ContentType : 'text/xml'. Content (truncated) : '<?xml version="1.0" ?><outbound-message-delivery messageId="35d60bd2-a829-4382-8189-7a74de2d1cca"
    isError="false"><recipient msisdn="6427xxxxxxx" isError="false"></recipient></outbound-message-delivery>'. ResponseStatusCode : 'OK' Request Uri : 'https://www.txtserviceurl.co.nz/api/3/sms/out?to=6427xxxxxxx&body=test+from+workflow'
    at Microsoft.Activities.Messaging.SendHttpRequest.OnReceiveResponse(NativeActivityContext context, Bookmark bookmark, Object value) at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value)
    at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager) Exception from activity SendHttpRequest HttpPost Switch<String> Sequence Microsoft.SharePoint.WorkflowServices.Activities.CallHTTPWebService
    Stage 1 Sequence Flowchart Sequence Testing 

    Hi,
    Thank you for your post.
    I'm trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact 
    [email protected]
    Lisa Chen
    TechNet Community Support

  • HTTP response does not contain a valid XML root tag

    I am running into an error in my trace portion of my XML when executing my application. The error is  "HTTP response does not contain a valid XML root tag". The HTTP request is successful with message 200 so it seems to be accepted by the Integration Engine. I looked for other posts on this error and only found one and it didn't show the resolution. Any help would be appreciated.

    Hello
    Check these notes (do you use a split mapping?):
    1) 1515230     XI mapping: "Root tag missing" in split mapping
    2)  1640553     XI mapping: Split mapping: error Missing_Interface
    Regards
    Mark

  • 2013 Exchange, Can't connect to Exchange Management Shell. It cannot determine the content type of the HTTP response from the destination computer.

    The following error occurs.
             Welcome to the Exchange Management Shell!
    Full list of cmdlets: Get-Command
    Only Exchange cmdlets: Get-ExCommand
    Cmdlets that match a specific string: Help *<string>*
    Get general help: Help
    Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
    Show quick reference guide: QuickRef
    Exchange team blog: Get-ExBlog
    Show full output for a command: <command> | Format-List
    Tip of the day #0:
    Did you know that the Identity parameter is a "positional parameter"? That means you can use:
     Get-Mailbox "user" instead of: Get-Mailbox -Identity "user"
    It's a neat usability shortcut!
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Exception calling "GetComputerSite" with "0" argument(s): "The Specified directory object cannot be found."
    At C:\Program Files\Microsoft\Exchange Server\V15\bin\ConnectFunctions.ps1:164 char:2
    +     $localSite=[System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetC ...
    +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ActiveDirectoryObjectNotFoundException
    Failed to connect to an Exchange server in the current site.
    Enter the server FQDN where you want to connect.: mail1.dorothy.local
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Randy Cheek

    Good Morning,
    Log into the server with an account that has appropriate Exchange rights, not a local account.  
    Note: By default - Domain Admins don't have Exchange rights.
    Dame Luthas, ITILv3, MCSE Messaging 2013, MCSA, MCITP
    My Technical Blog: http://thelifestrategist.wordpress.com
    Discipline is the Difference between Goals and Accomplishments
    If this post is useful, please hit the green arrow on the left & if this is the answer hit "mark as answer"

Maybe you are looking for