cancel
Showing results for 
Search instead for 
Did you mean: 

.Net Connector Proxy not passing response when using Soap

Former Member
0 Kudos

I am writing an external application that will place a message into the inbox of a SAP user. To do this have generated a proxy class for function SX_OBJECT_RECEIVE. The generated code looks like:

object[]results = null;

results = this.SAPInvoke("Sx_Object_Receive",new object[] {

Document_Data,

Receive_Info,

System_Data,

Contents_Bin,

Contents_Txt,

Object_Header,

Object_Para,

Object_Parb,

Packing_List,

Receivers });

Contents_Bin = (SXLISTI1Table) results[0];

Contents_Txt = (SOLISTI1Table) results[1];

Object_Header = (SOLISTI1Table) results[2];

Object_Para = (SOPARAI1Table) results[3];

Object_Parb = (SOPARBI1Table) results[4];

Packing_List = (SXPCKLSTI1Table) results[5];

Receivers = (SXEXTRECI1Table) results[6];

This code works fine when using RFC. However, when I change the used Destination to use a Soap connection the returned 'results' array is filled with NULL values.

The function is handled properly by the SAP server (message is received in inbox). Moreover, using a sniffer, I can see that the reponse envelope is returned by the SAP server and that it contains the expected response (for each recipient a result code is set to indicate whether the message was delivered or not).

So for some reason, the generated proxy is not able not pass the received data to the return value. However, it does not throw an exception, it just returns an array of nulls.

The Soap Request looks like:

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>

<SX_OBJECT_RECEIVE xmlns="urn:sap-com:document:sap:rfc:functions">

<DOCUMENT_DATA xmlns=""> ... properties here... </DOCUMENT_DATA>

<RECEIVE_INFO xmlns=""> ... properties here... </RECEIVE_INFO>

<SYSTEM_DATA xmlns=""> ... properties here... </SYSTEM_DATA>

<CONTENTS_BIN xmlns=""> ... items here... </CONTENTS_BIN>

<CONTENTS_TXT xmlns="" />

<OBJECT_HEADER xmlns="" />

<OBJECT_PARA xmlns="" />

<OBJECT_PARB xmlns="" />

<PACKING_LIST xmlns=""> ... properties here... </PACKING_LIST>

<RECEIVERS xmlns="">... items here ...</RECEIVERS>

</SX_OBJECT_RECEIVE>

</soap:Body>

</soap:Envelope>

The returned soap response looks like:

<?xml version="1.0" encoding="UTF-8" ?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP-ENV:Body>

<SX_OBJECT_RECEIVE.Response xmlns="urn:sap-com:document:sap:rfc:functions">

<CONTENTS_BIN>... items here...</CONTENTS_BIN>

<CONTENTS_TXT />

<OBJECT_HEADER />

<OBJECT_PARA>... items here...</OBJECT_PARA>

<OBJECT_PARB>... items here...</OBJECT_PARB>

<PACKING_LIST>... items here...</PACKING_LIST>

<RECEIVERS>.. items here...</RECEIVERS>

</SX_OBJECT_RECEIVE.Response>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

One thing I noticed is the xmlns="" attributes in the Soap-request. They do not occur in the response. Should they be there? If so, then how can I influence this?

Or is there some other setting I missed that influences how the proxy reads the received results?

I have extensively searched the internet and this forum for an answer on this issue but could not find anything related? Hope someone can help me cause I'm really stuck here.

Note:

- Using .Net Connector 2.01

- Talking to a SAP 6.20 server

- Proxy class was generated using VS 2003

- Proxy class was then imported into VS 2005 project

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Sachin,

The data is going to SAP and SAP is returning the response data:

- I send the data (message) from my C# application to SAP using SOAP. This is done using a proxy class/function generated by the SAP .Net Connector

- I can see the filled soap-envelope go over the network

- The data is arriving on the SAP server and is successfully put in the user's mailbox.

- I can see the returned soap-response envelope go over the network. It is correctly filled.

- The generated proxy class/function does not return the received data to the caller of the proxy function. As a result I do not know in my application whether the message was indeed delivered to all recipients.

When using RFC the response from SAP is passed by the proxy. This should also work when using SOAP. However, for some reason it does not...

Anko

Former Member
0 Kudos

hi Anko.

Did you check LOGS in SAP. check if it is going to SAP for DATA or not.

SACHIN

Former Member
0 Kudos

I did some more experiments on this problem. When using Visual Studio 2003 I also get the results as already described: the soap response contains the expected data but is not passed on by the generated proxy code.

I really do not know where to look for a solution anymore. All suggestions are appreciated!