none
InvalidOperationException in SAP adapter RRS feed

  • Question

  • Hello,

     

    I have a simple orchestration with a request-response port. On this port I receive a SAP RFC request and after some processing a response is sent back.

     

    The operation name on the port is the same as the RFC name in SAP. However, when sending the response I receive a System.InvalidOperationException which says that the WCF action is invalid.

     

    The generation wizard generated two 2 rootnodes for the RFC:

     

    Z_MY_TEST_RFC

    Z_MY_TEST_RFCResponse

     

    The response is mapped to the Z_MY_TEST_RFCResponse node.

     

    But when the message is sent the following warning occurs in the eventlog:

     

    The adapter "WCF-Custom" raised an error message. Details "System.InvalidOperationException: The action in the response message is: http://Microsoft.LobServices.Sap/2007/03/Rfc/Z_MY_TEST_RFCResponse. The expected action is: http://Microsoft.LobServices.Sap/2007/03/Rfc/Z_MY_TEST_RFC/response.

    at Microsoft.Adapters.SAP.SAPInboundCountractReply.AdapterReply(Message message, TimeSpan timeout)

    at Microsoft.Adapters.AdapterUtilities.AdapterInboundReply.Reply(Message message, TimeSpan timeout)

    at Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestContext.Reply(Message message, TimeSpan timeout)

    at Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestContext.Reply(Message message)

    at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.Reply(MessageRpc& rpc)".

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

     

     

    It looks like the adapter fails to set the correct WCF action. When I manually set the WCF action in a message assignment shape everything goes fine again.

     

    Code Snippet
    msg_Response(WCF.Action) = "http://Microsoft.LobServices.Sap/2007/03/Rfc/Z_MY_TEST_RFC/response";

     

     

    I guess I am missing something here. Why does the adapter fail to set the correct WCF action!?

    Wednesday, November 19, 2008 3:03 PM

Answers

  • The WCF-Custom adapter does not know what Response Action the sapBinding expects, and uses the logic of appending "Response" to the Request Action (note that the Action is not tied to the Node name in the XSD).

     

    The sapBinding on the other hand, expects the response action to be the Request Action + "/response".

     

    The way to do it is how you have done so - set the Action in a Message Assignment shape.

     

    Thursday, November 20, 2008 8:16 AM

All replies

  • The WCF-Custom adapter does not know what Response Action the sapBinding expects, and uses the logic of appending "Response" to the Request Action (note that the Action is not tied to the Node name in the XSD).

     

    The sapBinding on the other hand, expects the response action to be the Request Action + "/response".

     

    The way to do it is how you have done so - set the Action in a Message Assignment shape.

     

    Thursday, November 20, 2008 8:16 AM
  • Oke, thanks for your information!
    Thursday, November 20, 2008 9:54 AM