cancel
Showing results for 
Search instead for 
Did you mean: 

Setting interface name dynamically from client for SOAP Adapter...

Former Member
0 Kudos

Hi,

does anyone have experience in setting the sender interface name in the HTTP-SOAP request dynamically? I have followed the instructions in "How To Use the XI 3.0 SOAP Adapter" on page 17 (see also SAP Note 856597) which say:

"If you select Use Encoded Headers and Use Query String,

[...]The sender SOAP adapter creates the XI message header according to the

information provided in the query string. [...] In the sender SOAP adapter, you can use only some of the parameters, but the first

parameter must always be the version. For example, you send from the Web service client to the following URL: http://<host>:<j2ee-port>/XISOAPAdapter/MessageServlet?channel=<party>:<service>:<channel>&version=3...

%2F%2Fsap.com%2Ftest%5ETest

This will overwrite the default interface and namespace of the sender channel."

This is exactly what I need! However, what I actually get as a response following this description is a SOAP:Fault with a java.lang.StringIndexOutOfBoundsException: String index out of range: -1.

Has anyone got this to work properly?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Colin,

By seeing your exception we can say that it is the problem with the String . the meaning of this eceptions is you are trying to read the string which is empty. So provide some deafult settings like if it is empty provide some default value then your problem will be solved.

Best Regards,

Vijay

Answers (9)

Answers (9)

Former Member
0 Kudos

Hi Colin,

I have managed to post a SOAP message via SOAPUI 1.7.6 to SAP PI 7.0. All I have done is the following:

First set flags for 'Use Encoded Headers' and 'Use Query String' on the sender SOAP adapter. Second use a non encoded endpoint URL in the SOAPUI tool, like http://<host>:<port>/XISOAPAdapter/MessageServlet?channel=:TEST_ENTWICKLUNG:TEST_SOAP_SND&version=3....

Best regards

Frank

Former Member
0 Kudos

I have managed to assign the interfaces dynamically through the URL for the SOAP Sender Adapter. Great! Thank you all again for your helpful input on this!

Nevertheless, I am still not able to do the call via the SOAPUI client but only through IBM Message Broker Toolkit.

==> Thus, if anyone has managed to do this via SOAPUI (I am using version 1.7.1) I would still appreciate an answer on how it can be done... <==

Kind regards,

Colin.

Former Member
0 Kudos

Okay. So it definitely is a client thing. Thank you all for your highly appreciated help!

henrique_pinto
Active Contributor
0 Kudos

Since the problem is not within XI, shouldnt this thread be closed?

Regards,

Henrique.

Former Member
0 Kudos

Colin,

most of the escape chars dont work in SOAP UI tools we need to manually change these chars. good to know it worked.

Regards

Sreeram.G.Reddy

Former Member
0 Kudos

Hi Henrique,

yes. That is correct! With IBM Message Broker Toolkit it works. So are you saying, it is not possible with SOAPUI?

Kind regards,

Colin.

henrique_pinto
Active Contributor
0 Kudos

I'm not sure, but probably there are some incompatibilities.

Some problems have also been related regarding XMLSpy Soap test tool and XI (in the sense XMLSpy doesn't change "& + amp;" for & in the query string).

oxygen was said to work OK with XI.

Regards,

Henrique.

Former Member
0 Kudos

No.

I still cannot pass the Interface name dynamically from SOAPUI. However, I now know that it seems to be a problem of SOAPUI. SOAPUI has been recommended by bpx.sap.com in "Posting Messages into XI", p.13 (see https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0026bfd5-e1d9-2910-9698-f26ad503....

Any ideas? Anyone had the same issue?

Former Member
0 Kudos

Good point...

Seems like SOAPUI-Tool is making the trouble. If I add "amp;" after each "&" in the URL (called "endpoint" in SOAPUI), I am getting the message into the SXMB_MONI (which was not even the case before because of the java OutOfBounds-Exception). However, the message is now always transferred to the default interface (specified in SOAP-Sender Adapter) and not to the one specified in the URL (as wanted).

I also tried with MB-Toolkit and from there it works fine.

henrique_pinto
Active Contributor
0 Kudos

The problem was resolved?

Henrique.

henrique_pinto
Active Contributor
0 Kudos

I mean, the problem is not in XI, is it?

If I understood correctly, you were able to trigger the dynamic interface through another client tool.

Regards,

Henrique.

turmoll
Active Contributor
0 Kudos

Hi,

I think that it's a problem of some test tools and encoding and decoding URLs from XML (WSDL in particular) file to URLs that are supposed to be send to HTTP server.

It is the case that ampersand is a special character both

- in URL it separates the query string parameters

- in XML (WSDL) it is used as a starting character for XML 'character entites'

In XMLSpy ver. 2005 rel. 3 I was able to create and send SOAP request but I was not able to save modified WSDL.

Regards,

Jakub

Former Member
0 Kudos

currently SOAPUI 1.7.1

Former Member
0 Kudos

Cloin,

can you check in SXMB_MONI whether the interface name is correcrtly dispalyed .

Thanks

sreeram.g.reddy

Former Member
0 Kudos

Thank you for your input. I am using the following format for the call (with "x" standing for one letter each):

http://xix.xxx.xx.xxx:5xx00/XISOAPAdapter/MessageServlet?channel=:xx_xxx_xxx_xxxx:xx_xxx_x_SOAP_S&ve...

Anything wrong with that? With unchecked "Use Encoded Headers" and "Use Query String" it works fine (default interface) but as soon as I set these flags I get the SOAP-Fault response.

We are on XI 3.0 SPS18.

turmoll
Active Contributor
0 Kudos

Hi,

This URL looks fine. Which test tool do you use?

Jakub

turmoll
Active Contributor
0 Kudos

Hi,

Make sure that you have replaced in "interface namespace" and "interface name" all occurrences of the following characters respectively:

^ %5E

: %3A

/ %2F

Regards,

Jakub