cancel
Showing results for 
Search instead for 
Did you mean: 

<faultstring>SOAPAction</faultstring> --- Error in Axis Adapter

Former Member
0 Kudos

Hi All,

I am doing an sender https scenario. My end customer uses ariba to send messages to XI. They dont want to use username and pwd to send the document. So we have eliminated the soap adapter (because it asks for username and pwd to send the request). Now we are using axis adapter (where we have removed the user and pwd paramters in axis adapter itself). So it dont ask for username and pwd anymore for any of the axis comm. channel.

Now the issue is when we send a https request to my url(I have created wsdl using xI and took the url from it) using SOAP UI I am able to get it into xi. But when they use ariba or Fiddler (we can download free for testing) they are getting an error message like:

<soapenv:Body>

<soapenv:Fault>

<faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode>

<faultstring>SOAPAction</faultstring>

<detail>

<ns2:stackTrace xmlns:ns2="http://xml.apache.org/axis/">SOAPAction

at com.sap.aii.adapter.axis.web.ServletReceiverCore.getSoapAction(ServletReceiverCore.java:665)

at com.sap.aii.adapter.axis.web.ServletReceiverCore.doPost(ServletReceiverCore.java:273)

at com.sap.aii.adapter.axis.web.MessageServlet.doPost(MessageServlet.java:392)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

When I researched this it seems xi is expecting a soap action. But they dont have an option to add the soap action on their side. Now I am struck what to do.

When I googled for this error, it seems it is not error with xi, it is with the apache axis itself. It seems like by default apache axis expects a soapaction and if we dont want to send then we need to give soapaction as "" (which is null). I dont know where to give this. I assume that we need to change the jar file somewhere on axis adapter. No idea where it is and what to do with this approach.

Also I have seen stefans weblog:

/people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine

With this first I need to create an https abap port. Then I can use soap adapter directly by sending username and pwd directly to the url. But the catch here is also to send soapaction which in our case is not possible.

Can anyone of you please help me out.

Regards,

---Satish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Satish,

The soap action header is required for HTTP (albeit it can be empty).

Any standard SOAP client should be able to set a value (otherwise, how can it generate a request message from an arbitrary WSDL, which typically specifies some concrete soapaction value).

The axis runtime checks the presence of the soapaction header. The value may be left empty,but the header must be present.

Best regards, Yza

Former Member
0 Kudos

Hi Yza,

But how come when I test with SOAP UI Pro dont have any issues.

Assuming the soap ui pro client is populating and my other client fiddler/ariba is not populating due to some firewall issues is there a way where we can populate in the sender axis adapter itself.

Also I have seen the same issue in abap when it is trying to consume the webservice directly without xi. The scenario you can see in thomas blog here:

/people/thomas.jung3/blog/2005/06/05/web-services-the-case-of-the-missing-soap-action-header

He manually kept the action. Is there a way where we can send this from axis adapter to the message so that I wont run into this issues.

Regards,

Satish

former_member184154
Active Contributor
0 Kudos

Satish,

What PI release are you running? If you're on 7.1 there's a far easier solution...

Let me know.

I've recently gone through the programming of my own Axis handler, so I may help you out.

Alex

Former Member
0 Kudos

Hi Alex,

We are currently on PI7.0 SP15.

Regards,

Satish

Former Member
0 Kudos

Hi Satish,

You can see what your client soap tool is transmitting using the TCPGateway tool attached in Note 856597.

I am sure that SOAP UI is transmitting the soapaction header.

If your firewall is stripping the soapaction header, that means your firewall is basically blocking any soap calls. Why do you think this is the case? The soapaction header was intended to be used for determining the target service within the soap runtime, along with the other information available in the request message such as the request URL, the soap body, some special soap header (e.g., ws-addressing based service look up is used). A typical soap runtime uses a hierarchy of service lookup mechanism and it does not make sense for a firewall to just look at the soapaction header. Besides, if your firewall suspected your ariba message, it would have simply rejected the request and not let the message enter with its soapaction header stripped.

Does Your ariba call come from outside the wall? if you suspect this to be the case, which I highly doubt, you can install the ariba client locally and let it call the adapter directly. But remember to capture the wire transcription so that you can verify if the soapaction is present or not.

As I mentioned earlier, the message will get rejected right at the entrance to the axis runtime and not at the integration engine.

So writing your own axis handler will not help at all. The message won't even reach your handler.

Your only option is ask ariba how you can generate the soapaction header. If there is no option but they still claim that it is a soap client, you should ask them to fix it.

Regards, Yza

Former Member
0 Kudos

Hi Yza,

I checked with end customer and now they are telling that they are not going to send soap envelope in the document. The messages will not be wrapped in a soap envelope which would be a xml documnet posted over https. So the body of the request includes only the xml document.

So my challenge now would be to create the soap envelope and process it. I created an xsl mapping for this soap envelope and am trying to call in soap sender axis communication channel as first paramter with MessageTransformBean. But I dont think this is picking up.

So if I create the envelope then I should be able to read it in xi. By any chance do you know how to add this. Can you give me your m ail id so that I can show you some scre en shots.

Regards,

---Satish

former_member184154
Active Contributor
0 Kudos

Satish,

I think the easiest solution is to

1. configure https on the ABAP stack: in trx STRUST you can use the same SSL certificate used to setup SSL in the KeyStorage service of V.A. so that calling the ABAP http or the J2EE http will be copletely transaprent to your SSL client (i.e. ARIBA)

2. use HTTP plain adapter ( <host>:<abap_https_port>/sap/xi/adapter_plain )

- you get rid of the SOAP envelope and SOAP action issue, as the XML payload posted by Ariba will be immediately treated as a PI message payload

- here also you can use the same two parameters as per Stefan's blog (&sap-user=<username>&sap-password=<password>) and thus get rid of the authentication issue.

Stuff sent to the plain_adapter is handled by the CL_HTTP_PLAIN_INBOUND class (use trx SE24 to take a look) and method IF_HTTP_EXTENSION~HANDLE_REQUEST: there are a number of parameters that can be supplied by the client calling it (i.e. Ariba). See below an excerpt.


* call-syntax:  XI 3
* http://hostname:port/path
*                      ?namespace=???
*                      &interface=???
*                      &service=???
*                      &party=???
*                      &agency=???
*                      &scheme=???
*                      [&qos= EO|BE|EOIO]
*                      [&msgguid=???]
*                      [&queueid=???]
*                      [&trace=[1|2|3]]

I am strongly convinced that this is the far easiest solution. Programming Axis handlers can be tricky though fascinating (I've written a nice one I'll probably blog about as soon as I get a chance.) But I will nevertheless try to simulate your Axis issue when I get access to a machine like your own.

Cheers,

Alex

Former Member
0 Kudos

Hi Satish,

In this case, you can either use the http adapter like Alex suggests or use the normal soap adaper in the no-soap mode.

If you are using the no-soap mode, you can activate the "use no soap envelope" option in the soap channel configuration and add query parameter nosoap in your request.

That means, suppose your original soap adapter URL is

http://host:port/XISOAPAdapter/MessageServlet?senderParty=....&interface=myRest

then just use

http://host:port/XISOAPAdapter/MessageServlet?senderParty=....&interface=myRest&nosoap

Regards, Yza

Former Member
0 Kudos

Hi Yza,

But here I may unable to send the username and pwd within the url until unless I removed at the adapter level itself. Any workarounds for passing username and pwd?

Regards,

---Satish

Former Member
0 Kudos

Hi Satish,

I am sorry. You are right. I missed your original requirement.

The axis 1.4's library only partially supports this kind of plain XML content usage. People are using it at the receiver side to post a GET request and read the plain XML response back into the message (so called REST with GET). But there is no out of the box mechanism you can use for plain XML request to plain XML response model (so called REST with POST) at the sender side.

I am just curious what kind of customer you have. They can't generate a valid soap message and they can't or won't pass the user credential in the message. If they can use SSL with client certificate, they can use the mentioned approach without passing the user/password credential in the message. But I am afraid that they can't use SSL either.

In this case, someone needs to write a program to interface the two worlds: you, they, or PI-dev.

Maybe you can discuss with your customer again.

Best regards, Yza

Former Member
0 Kudos

> Satish,

> What PI release are you running? If you're on 7.1 there's a far easier solution...

>

> Let me know.

>

> I've recently gone through the programming of my own Axis handler, so I may help you out.

>

> Alex

I am running PI 7.1, could you please tell me that solution you mentioned?

Thanks!

Nicolá

Answers (1)

Answers (1)

sunil_singh13
Active Contributor
0 Kudos

Satish,

you can set value for SOAP ACTION in the module configuration by setting the handler parameter defaultSOAPAction for the XI30OutboundHandler handler in the request chain.

Thanks,

Sunil

Former Member
0 Kudos

Hi Sunil,

But this is for the messages going out of XI. Here my issue is the other way round. I tried the same paramater with XI30InboundHandler also, but no luck.

Regards,

---Satish

sunil_singh13
Active Contributor
0 Kudos

Satish,

Can you try with Adapter module and setting/ creating the value for SOAP Action there ?

Thanks,

Sunil