How to use Basis Authentication in Sender SOAP Adapter

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-password=<Password>&sap-language=EN&sap-client=<Client>
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

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-password=<Password>&sap-language=EN&sap-client=<Client>
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()));

Similar Messages

  • Any one knows how to use Axis Framework in the SOAP Adapter Modules

    How to use Axis Framework in the SOAP Adapter?
    How to add custom handler modules?
    http://help.sap.com/saphelp_nw04/helpdata/en/45/a4f8bbdfdc0d36e10000000a114a6b/frameset.htm
    I went through the above link on help.sap.com. But still could not create a working example.
    I have created a wc on some 3ed party app server using apaches axis. I am trying to call that web service from XI using SOAP receiver? I need to add some security related headers to the soap message, SO I am trying to use a handler.  I want to know how to configure this handler in SOAP axis adapter module.
    Thank you
    Moni

    Ravi ,
    I am trying exactly the same. Hers is the scenario.
    ABAP Proxy --> PI (7.0) SP 12 ---> WebService.
    Since This is service is secured, means it is using OASIS web servie securyty user name token,
    I am trying to use AXIS adapter. and I want to configure HandlerBean in which I want to use apache wss4j api to add the userNameToken. I am looking for some documentation on this.
    I need to add SOAP action element too as I can not configure this one on the communication channel.
    Thanks for any inputs in this regard.
    Moni

  • Remove authentication in sender soap adapter pi 7.1

    Hello
    Did anyone manged to remove authentication in PI 7.1 sender soap adapter?
    I have updated file web.xml in the file com.sap.aii.adapter.soap.war
    and now I want to deploy it,but I dont have any sda in the folder
    thx
    Shai

    hi Shai,
    just something to try in case:
    you don't need any java parameters of SOAP sender
    you can try approach from Stefan:
    /people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine
    and then:
    1. in SICF copy the engine service to a new one
    2. put the credentials for this new service inside SICF
    then you will have sender SOAP adapter without a password right?
    I didn't try it but I guess it would work without
    crashing the whole original SOAP sender adapter by
    making changes into web.xml
    Regards,
    Michal Krawczyk

  • Enabling HTTPS with Client Authentication for Sender SOAP Adapter on PI7.1

    Hello All,
    We are currently building up a HTTPS message exchange with an external client.
    Our PI 7.1 recieved over HTTPS messages on an already configured Sender SOAP Adapter.
    The HTTPS (SSL) connectivity works fine and was completely configured on the ABAP Stack at Trust Manager (TC=STRUSTSSO2)
    Login to Message Servlet "com.sap.aii.adapter.soap.web.MessageServlet is required and works fine with user ID and password.
    Now we have to configure the addtional Client Authentication.
    At SOAP Adapter (Sender Communication Channel) under "HTTP Security Level"you are able to configure "HTTPS with Client Authentication".
    But what are the next steps to get this scenario successfully in place?
    Many thanks in advance!
    Jochen

    Hi Colleagues,
    following Steps still have to be done:
    - Mapping public key to technical user at Java Stack
      As preparation you have to activate value "ume.logon.allow.cert" with true under "com.sap.security.core.ume.service" under Config Tool. At NWA under Identity Management at for repecively technical user the public key certificate
    - Be sure CA root certivicate at Database under STRUSTSSO2
    - Import intermediate Certificate under Certificate List at Trast Manager for the Respecive Server Note
    - use Login Module "client_cert" which you have to configure under NWA\Configuration Management\Authentication for Components "sap.com/com.sap.aii.adapter.soap.app*XISOAPAdapter".
    Many thanks to all for support!
    Regards,
    Jochen

  • Regarding authentication in sender soap adapter

    how to do basic authentication in case of sender side soap adapter

    Hi
    To do the Basic Authentication in the sender soap adapter u have to provide the user name and the password of ur XI server.
    Thanks
    Rinku

  • Certificate based authentication with sender SOAP adapter. Please help!

    Hi Experts,
       I have a scenario where first a .Net application makes a webservice call to XI via SOAP Adapter. Then the input from the .Net application is sent to the R/3 system via RFC adapter.
    .Net --->SOAP -
    >XI -
    >RFC -
    R/3 System
    Now as per client requirement I have to implement certificate based authentication in the sender side for the webservice call. In this case the .Net application is the "client" and XI is the "server". In other words the client has to be authenticated by XI server. In order to accomplish this I have setup the security level in the SOAP sender channel as "HTTPS  with client authentication". Additionally I have assigned a .Net userid in the sender agreement under "Assigned users" tab.
    I have also installed the SSL certificate in the client side. Then generated the public key and loaded it into the XI server's keystore.
    When I test the webservice via SOAPUI tool I am always getting the "401 Unauthorized" error. However if I give the userid/password for XI login in the properties option in the SOAPUI tool then it works fine. But my understanding is that in certificate based authentication, the authentication should happen based on the certificate and hence there is no need for the user to enter userid/password. Is my understanding correct? How to exactly test  certificate based authentication?
    Am I missing any steps for certificate based authentication?
    Please help
    Thanks
    Gopal
    Edited by: gopalkrishna baliga on Feb 5, 2008 10:51 AM

    Hi!
    Although soapUI is a very goot SOAP testing tool, you can't test certificate based authentication with it. There is no way (since I know) how to import certificat into soapUI.
    So, try to find other tool, which can use certificates or tey it directly with the sender system.
    Peter

  • Authentication in Sender SOAP Adapter

    Hi experts,
    We have a scenario were EP sends SOAP Message to XI. We have created the WSDL from XI and it has been consumed by EP. When EP tries to send the SOAP Request to XI we get UnAuthorized Exception.
    Below is the Exception
    #1.5#001372E937FC00670000012000000D8C0004298100849F8B#1171533943519#com.sap.portal.portal#sap.com/irj#com.sap.portal.portal#CLASP#6953####18f1d310bcdc11db9500001372e937fc#SAPEngine_Application_Thread[impl:3]_29##0#0#Warning#1#/System/Server#Java###Call failed
    [EXCEPTION]
    #1#com.sap.engine.services.webservices.jaxm.soap.accessor.NestedSOAPException: Problem in server response: [Unauthorized].
         at com.sap.engine.services.webservices.jaxm.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:207)
         at com.sap.engine.services.webservices.jaxm.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:163)
         at com.sap.engine.services.webservices.jaxm.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:325)
         at com.sapportals.portal.prt.service.soap.SOAPService.call(SOAPService.java:152)
         at com.sapportals.portal.prt.service.soap.PRTSOAPCall.invokeMethod(PRTSOAPCall.java:209)
         at service.XIUserCreateCall.IOS_UserCreate(XIUserCreateCall.java:168)
         at service.XIUserComp.doContent(XIUserComp.java:46)
    I tried to send the basic authentication details in my URL. But it didn't work.
    Pl. help me resolve this.

    HI,
    for XI EP
    Please see the below links so that you can have clear Idea..
    /people/saravanakumar.kuppusamy2/blog/2005/02/07/interfacing-to-xi-from-webdynpro
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/integrating%20web%20dynpro%20and%20sap%20xi%20using%20jaxb%20part%20ii.article
    Consuming XI Web Services using Web Dynpro – Part II-/people/riyaz.sayyad/blog/2006/05/08/consuming-xi-web-services-using-web-dynpro-150-part-ii
    Consuming XI Web Services using Web Dynpro – Part I -/people/riyaz.sayyad/blog/2006/05/07/consuming-xi-web-services-using-web-dynpro-150-part-i
    /people/sap.user72/blog/2005/09/15/creating-a-web-service-and-consuming-it-in-web-dynpro
    /people/sap.user72/blog/2005/09/15/connecting-to-xi-server-from-web-dynpro
    Regards
    Chilla..

  • How to use Stored Procedures in Sender JDBC Adapter.

    Hi Experts,
        we are having a lot of legacy application which are on .Net. basicaly using MS SQL & stuff. As a Integration scenario we have to triggered some events from JDBC to XI. How can i do this. Secondly there are multiple tables from which i will be selecting a record & sending it to XI for further processing the Receiver Side we are having SAP system.
        How can i use a Stored procedure in XI Sender Adapter ?
        Can anybody tell me step by step how to get the XSD of Stored procudere & used in XI. ?
         I am new to XI. I have not yet configured any sceneario.
         Can anybody guide me step by step how to do this.
         I am only intersted in Sender Side configuration.
    Regards,
    Umesh

    Hey,
    check this in the JDBC Sender Adapter Configuration
    Query SQL Statement -> Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
    The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    JDBC adapter
    /people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
    <b>Cheers,
    *RAJ*
    *REWARD POINTS IF FOUND USEFULL*</b>

  • How to build in user authorisation in sender soap adapter

    HI ,
    how can i built the user authorisation in sender soap adapter. either in a url or somewhere on the server .
    if anyone has an idea do let me knwo
    Thanks
    Nikhil

    Nikhil,
    <b>sender soap adapter</b> is used for ex in the case, u need some data from the DB say of a vendor. U give the name of the vendor in the site, suppose u get the contact address of the vendor from the DB.
    Sender soap adapter sends the soap request from the client to XI and from XI the request is passed to DB.
    With XI, WSDL file is generated and SOAP request is generated for the WSDL file. When the WSDL is deployed on the client application, the authorization is handled.
    For receiver SOAP adapter, it is the otherway round u r getting the data from the DB first and so the authorizations are held in XI.
    -Naveen.

  • How to use java mail to send email to hotmail box

    how to use java mail to send email to hotmail box??
    i can send emails to other box(my company's email account) but for hotmail, the program didnt print any err or exception the recepient cant receive the mail.
    thanks

    you ust to download activation.jar and mail.jar and add them to your build path.
    i have used the googlemail smtp server to send mail the code is following:
    public void SendMail()
    Properties props = new Properties();
    props.put("mail.smtp.user", username);
    props.put("mail.smtp.host", host);
    props.put("mail.smtp.port", port);
    props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.socketFactory.port", port);
    try{
         Authenticator auth = new SMTPAuthenticator(username,password);
    Session session = Session.getInstance(props, auth);
    MimeMessage msg = new MimeMessage(session);
    msg.setText(text);
    msg.setSubject(subject);
    msg.setFrom(new InternetAddress(senderEmail));
    msg.addRecipient(Message.RecipientType.TO, new InternetAddress(receiver));
    Transport.send(msg);
    }catch(Exception ex) {
         System.out.println("Error Sending:");
    System.out.println(ex.getMessage().toString());
    and this the SMTPAuthenticator Class which you will need too.
    class SMTPAuthenticator extends javax.mail.Authenticator {
         private String fUser;
         private String fPassword;
         public SMTPAuthenticator(String user, String password) {
         fUser = user;
         fPassword = password;
         public PasswordAuthentication getPasswordAuthentication() {
         return new PasswordAuthentication(fUser, fPassword);
         }

  • How to use an authenticated user for a proxy call

    Dear all,
    I am currently working on a JEE application where the user needs to authenticate (for this I have configured the web.xml).
    Now inside this application I need to do a proxy call to a PI webservice.
    I would like to use the user credentials of the already logged in user in order to call the proxy.
    What I don't want to do is to use a service user for the proxy call.
    The code I am trying to call looks something like this:
         private IntegratedConfigurationIn getPort() throws Exception{
              IntegratedConfigurationIn port = null;
              try {
                   IntegratedConfigurationInService service = null;
                   service = new IntegratedConfigurationInService();
                   port = (IntegratedConfigurationIn) service.getIntegratedConfigurationIn_Port();
                  BindingProvider bp = (BindingProvider)port;
                  bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, user);
                  bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);
                  if (url.length() != 0)
                       bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);
              catch (Exception ex){
                   ex.printStackTrace();
              return port;
    The examples I found to retrieve the userdata pointed to codes similar to this one:
    public HttpServletRequest getHttpRequest() throws Exception {
              // Get runtime context
              Properties props = new Properties();
              props.put("domain", "true");
              Context initialContext = new InitialContext(props);
              ApplicationWebServiceContext wsContext = (ApplicationWebServiceContext) initialContext
                        .lookup(" /wsContext/ApplicationWebServiceContext");
              HttpServletRequest req = wsContext.getHttpServletRequest();
              return req;
    com.sap.security.api.IUser sapUser = com.sap.security.api.UMFactory.getAuthenticator().getLoggedInUser(getHttpRequest(), null);
              IUser ep5User = com.sapportals.wcm.util.usermanagement.WPUMFactory.getUserFactory().getEP5User(sapUser);
    Now I don't know how to bring it togehter and how to use an authenticated user for the BindingProvider.
    I would appreciate any hints or ideas.

    Peter,
    from the first screenshot, what I understood is that, you are calling an inbound PI web service that is intended to create an integrated configuration object (this is used for whole lot of other reason completely) but not actually calling a development web service.
    For this, you would have to generate your client classes from the WSDL provided by the PI developer for that particular service. Once you get those client classes generated, you could used the method provided in the other screenshot to extract the user and password and call the intended web service.
    Vijay Konam

  • How  Sender SOAP Adapter will retriew the data  to process further

    How  Sender SOAP Adapter will  receive the data  to send the integration server to process further

    Hi,
    1. All details are always taken from the Sender Agreement.
    For the Sender File adapter and the Sender SOAP adapter , the details that include are , Sender Service, Sender Interface Name and namespace and these are the details that make up the SOAP header when the message hits the integration Engine.
    Once the corresponding Adapter for the message is identified, ie. the Sender SOAP adapter , the message for the SOAP header is then taken from the Sender Agreement of that adapter. This is the exact reason why one Sender Adapter can be involved in one and only one Sender Agreement.
    Regards
    Bhavesh

  • IOException: invalid content type for SOAP: TEXT/ using Sender SOAP adapter

    Hi all,
    When I am using Sender SOAP adapter, i am getting (MessagingException: Could not parse XMBMessage. Reason: java.io.IOException: invalid content type for SOAP: TEXT/HTML using connection SOAP_http://sap.com/xi/XI/System) exception.
    From my RWB I can see:
    2009-05-25 16:18:39 Information The message was successfully retrieved from the call queue.
    2009-05-25 16:18:39 Information The message status was set to DLNG.
    2009-05-25 16:18:39 Error Failed to parse the XI system response.
    2009-05-25 16:18:39 Error The message was successfully transmitted to endpoint com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIMessage creation failed (inbound). Reason: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not parse XMBMessage. Reason: java.io.IOException: invalid content type for SOAP: TEXT/HTML using connection SOAP_http://sap.com/xi/XI/System.
    2009-05-25 16:18:39 Error The message status was set to FAIL.
    2009-05-25 16:18:39 Error Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIMessage creation failed (inbound). Reason: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not parse XMBMessage. Reason: java.io.IOException: invalid content type for SOAP: TEXT/HTML
    Please help if possible! Thanks!
    Mayank

    Hi,
    Check in SLD your integration engine business system have the following
    pipeline url : http://server:httpport/sap/xi/engine?type=entry
    check Http port also
    After that go to TCODE - SXMB_ADM - integrationn engine configuration and check if your server is configured as HUB with the same url or not.
    Thanks
    Kasturika Phukan

  • How to use base band wave,subcarrier wave and carrier wave to creat the FM wave? When I use the MT Modulate FM VI in USRP,I don't konw how to use it.

    How to use base band wave,subcarrier wave and carrier wave to  creat  the FM wave? When I use the MT Modulate FM VI in USRP,I don't konw how to
    use it.

    https://decibel.ni.com/content/docs/DOC-24206
    Let us know if that example doesn't help you
    Anthony F.
    Product Marketing Engineer
    National Instruments

  • How to catch the sender SOAP adapter http response?

    Hi eXperts,
    I've a sender soap adapter opened to customer as webservice. When customers call this webservice, data is coming into XI and works fine. But the customer is complaining that the expected HTTP 200 response is not sent back to the calling SOAP client.
    So my question is: Is there a way to catch the http 200 response from sender adapter, or at least get to know if the sender adapter has sent the response?
    Thanks in advance.
    Regards
    Luis

    Hi,
    If I understood it correcly... Sender is a Async SOAP call and the sender system is expcting a status back of HTTP 200. Are you sure you had set the quality of effort to Exactly Once? If not please try setting it.
    You can also go to Adapter monitoring or Communication channel monitoring in the Runtime workbench and see if the Sender SOAP adapter is fine.
    http://help.sap.com/saphelp_nw04/helpdata/en/5e/164442c1a1c353e10000000a1550b0/content.htm
    Thanks,
    Prakash

Maybe you are looking for

  • N85 is slow - tried various kinds of resets

    My N85 is ridiciously slow, I've tried *#7370# and *#7780#. Doesn't solve my problem. Apparently there is a third way to reset the phone, holding down *, 3 and the green button while booting up - but my phone prompts for the pin-code, and I can't bot

  • Can I collect the pulse data using Field Point?

    I have a water flow meter, which outputs pulses. I use a counter to connect it and read the data. Now, I want to read and save the data in the computer using LabView and Field Point. I think this can be done if I can collect the number of pulse. I am

  • Is it possible to add the assets to a tab and have a homepage?

    Hi, i'd like to add assets homepage (as i have contacts and accounts), i see in the application customizatio i can define assets homepage layout, but in the role configuration i cannot add asset as a tab, is that possible? why do i define a homepage

  • Trigger Key clearform

    Hi everybody, I have a form created with Forms 6i where I have a field called user_id, but the user doesn't have to insert a user_id because I bring that value automatically with a consecutive number. I added a bottom to this form where the user clic

  • SAXParser Exception while viewing the desktop in weblogic portal

    Hi All, I have deployed my portal application on weblogic platform 8.1 SP3. i have created a portal and desktop levaraging the .portal file from my portal application, view desktop throws a SAXParserException as follows. org.xml.sax.SAXParseException