cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Basis Authentication in Sender SOAP Adapter

Former Member
0 Kudos

We implemented one Sender SOAP Adapter and we had to implement the modified WEB.XML method to remove the security specification. We have now asked the developer to correct this situation so we can remove this modification. The Interface developer would like to use Basic Authentication. If you have an automated interface sending in a SOAP Message, how do you do Basic Authentication?

I've tried using:

http://host:port/XISOAPAdapter/MessageServlet?channel=:<Service>:<Channel>&sap-user=xiappluser&sap-p...;

When I do this, I still get the Authentication Pop-Up Window.

How does the Sending Interface either supply the ID and Password on the incoming SOAP Message or respond to the Authentication Pop-Up?

Thanks,

Anne

Accepted Solutions (0)

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos

confirm the user.

is it XI (xiappluser) or PI (piappluser) u r using?

also check the pwd.

Open the whole link in IE and confirm if it goes thru without asking for authentication.

Former Member
0 Kudos

I am using xiappluser. I know the password is right. When I then use the same userid and password in the Authentication Pop-UP, I get:

Message Servlet is in Status OK

Status information:

Servlet com.sap.aii.af.mp.soap.web.MessageServlet (Version $Id: //tc/aii/30_REL/src/_adapters/_soap/java/com/sap/aii/af/mp/soap/web/MessageServlet.java#13 $) bound to /MessageServlet

Classname ModuleProcessor: null

Lookupname for localModuleProcessorLookupName: localejbs/ModuleProcessorBean

Lookupname for remoteModuleProcessorLookupName: null

ModuleProcessorClass not instantiated

ModuleProcessorLocal is Instance of com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0

ModuleProcessorRemote not instantiated

I'm not sure what you mean by opening the whole link in IE and insure it goes all the way through without authentication. When I use the ABAP or J2EE port as the port number, I get the Authentication Pop-Up in both cases.

Thanks,

Anne

bhavesh_kantilal
Active Contributor
0 Kudos

Try using the blog by stefan grube "How to use the Inbound SOAP channel of the integration engine " .

Appending of the user name and password to the URL works only with the URL discussed in this blog [ URL with ABAP Port and no sender SOAP adapter needed. ]

Regards

Bhavesh

Shabarish_Nair
Active Contributor
0 Kudos

as mentioned in the above post by bhavesh, try posting it to the Int. engine directly - /people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine

Former Member
0 Kudos

By Defualt the web service exposed by you will use Basic Authentication mode only.

But the way you do Basic Authentication in the web client is platfrom dependent.

This is not the way to do Basic authentication

http://host:port/XISOAPAdapter/MessageServlet?channel=:<Service>:<Channel>&sap-user=xiappluser&sap-p...;

I am providing you a code snippet on how to Basic Authentication in Java when making the Web Service Call.

If the client is on some other platform just look for the corresponding api.

Please award points if you find this answer useful.

Code Snippet

URL url = new URL(URL);

URLConnection connection = url.openConnection();

if( connection instanceof HttpURLConnection )

((HttpURLConnection)connection).setRequestMethod("POST");

//connection.setRequestProperty("Content-Length",Integer.toString(content.length()) );

connection.setRequestProperty("Content-Type","text/xml");

connection.setDoOutput(true);

String password = User + ":" + Password ;

//Where con is a URLConnection

connection.setRequestProperty ("Authorization", "Basic " + encode(User + ":"+ Password));

connection.connect();

Encode Method

public static String encode (String source) {

BASE64Encoder enc = new sun.misc.BASE64Encoder();

return(enc.encode(source.getBytes()));

}