Automatic authentication with a webservice in SAP

hi all
I have a flex application which uses SOAP webservices from SAP to retrieve data.
Everytime one of the SOAP webservices is called the user have to enter a name plus password
I would like to make this automaticly. So that the user haven't got to fill this in. But Flex already filled it automaticcally.
But how do this work? How can you set this in Flex?
kind regards
Anton Pierhagen

hi Sathyamoorthi. That is correct. But i'd like to suppress this one time login for the user.
My wish is that during the calling of the webservice in SAP, a system user is automatically login in the background just like the retrieving of the data.
So the user who uses the flex application has no idea that a webservice in SAP is used for the retrieving of the data.
Do you have any idea how to solve this?
Kind regards,
Anton Pierhagen

Similar Messages

  • Integrate a BPM with a Webservice of SAP XI.

    Hi experts,
    We want to integrate a BPM with a Websevice published in SAP XI.
    The BPM sends messages synchronous (abstract interface) to a Business Service that receives a message synchronous (inbound interface).
    For the integration of these services is necessary to set up a Receiver Agreement with a Communication Channel of type SOAP Receiver.
    My questions are:
    Why should the communication takes place between SAP XI I have to set up a channel SOAP?
    Is there any way to send messages from a BPM to a service SAP XI (Webservice / Interface) in an efficient manner?
    Thanks,
    Jose.

    To deploy the wsdl file in XI,
    You can connect to XI server by using the End Point URL as
    The SOAP Sender uses the XI Server URL as below
    http://<server>:<port>/XISOAPAdapter/MessageServlet?channel=<party>:<service>:<channel>
    Service & channel indicates the Sender SOAP adapter in XI to be used..and will direct to integration server.
    Refer
    call Webservice with XI SOAP Adapter
    How To Set Up a Web-Service-Related Scenario with SAP XI
    https://websmp207.sap-ag.de/~form/sapnet?SHORTKEY=01100035870000582377&
    Invoke Webservices using SAPXI
    SOAP Sender Steps
    SOAP Sender Steps
    Edited by: parvathy sriraman on Sep 19, 2008 9:42 AM

  • How to use Webservices in SAP 7.0 SP 17

    Hi,
    I am having issues calling the webservices in SAP 7.0 SP 17.
    I am following the below mentioned tutorial to call a webservice from a portal project (PAR).
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b449e790-0201-0010-1188-ff17840712d3
    I have been successful to a point where my websevice needs authentication. I am not sure how to do this.
    Here is the code of doContent()
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
             try
                  logger.infoT("Inside doConent()...");
                   UserProfile up = pushUserProfileAttributes();
                   logger.infoT("After pushUserProfileAttributes()...");
                   ILDAPOperationsService port=(ILDAPOperationsService) PortalRuntime.getRuntimeResources ().getService (ILDAPOperationsService.KEY);
                   logger.infoT("After port()...");
                   RegisterUserResponse res = port.CreateExternalUserProfile(up);               
                   logger.infoT("After res ..user created." + res.getEmailAddress());
             } catch (UserRegistationFailed e){logger.errorT("Error in calling webservice...."+ e.getLocalizedMessage());}
                  catch (Exception e1){logger.errorT("Error in calling webservice...."+ e1.getLocalizedMessage());
    Its failing at RegisterUserResponse res = port.CreateExternalUserProfile(up);     
    and the error I am getting is
    Error : Error in calling webservice....com.sap.engine.services.webservices.jaxm.soap.accessor.NestedSOAPException: Problem in server response: [Unauthorized].
    Any help with this will be highly appreciated.
    Also , if any documentation could be shared.
    Looking forward to hear something soon on this.
    Thanks,
    Shiv

    Hi Sumit,
    you may move your question to the ABAP for SAP HANA community (http://scn.sap.com/community/abap/hana).
    Are you asking about the SAP_BASIS version, or which version do you refer to?
    Best,
      Jasmin

  • HTTP Basic Auth and Username Authentication with Symmetric Key

    Hi,
    I have a webservice happily running on tomcat 5.5 using "Username Authentication with Symmetric Key" I have certificates setup and everything works fine. I can even connect a .net client and use the service.
    Now I have an additional requirement of authorization per operation basis so I'm planning on using the roles. My current setup uses tomcat-users.xml to configure users but I seem unable to identify the role of the user from within my code as wsContext.isUserInRole("briefing") always returns false even when it clearly isn't. Where wsContext = @Resource private WebServiceContext wsContext.
    So I figure perhaps I need to add HTTP Basic Auth to tomcat for it to gather this information so I added security-constraints to the web.xml and this seems to do the trick: at least it does for my .net client.
    If I do:
      Service service = new Service();
      Port client = service.getPort();
      BindingProvider bp = (BindingProvider)client;
      bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "myusername");
      bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "mypassword");Then it all works fine. However, I'd like a little less transparency: I don't want to have to do this every time I make a call.
    My question(s) is:
    1) Am I going about this the right way (perhaps I am somehow getting the incorrect reference to the WebServiceContext)
    2) If I am going about this the right way I imagine the whole BindingProvider code needs to be added to as a policy configuration but I'm really not sure where to start especially as I'm using wsimport to generate everything: I'm not even sure where to configure this so it will not get overwritter.
    Thanks for any help.

    Doh! Ok So I've added a SOAP Handler to automatically add the username and password for the HTTP Basic Auth.
    All in all does this setup sound right?

  • Issue with parallel operation of SAP NW SSO 2.0 and SNC Client Encryption (Logon Groups)

    Hi!
    One of our customers is using the SNC Client Encryption solution to ensure encryption using SNC (based on Kerberos Technology) for their SAP GUI Dialog connections. They have lots of SAP backends DEV, QAS, PRD all with the SNC Client Encryption SNC Lib installed. The profile parameter snc/identity/as contains the following value: p:CN=SAP/<ServiceAccount>@<DOMAIN>.
    Example: p:CN=SAP/[email protected]
    The customer is using one AD Service Account "SNCServiceUser" with one registered SPN "SAP/SNCServiceUser" for all systems (yes, this is not recommended... but the case).
    Important: All users use group entries in the SAP Logon (saplogin.ini). Means, for SAP logon the SNC name can not be manually configured on the SAP Front End. With group logons, the application server's SNC name is dynamically requested by the message server each time a SAP GUI connection is started. The SNC Name is greyed out in this case as dynamically obtained from the applications servers profile parameter snc/identity/as.
    Now our customer implements SAP NetWeaver Single Sign-On 2.0 within his landscape. Based on the Secure Login Server 2.0 (SP3) he likes to use X.509 based authentication to his AS ABAP backends using SAP GUI SNC while others still use SNC Client Encryption.
    Replacing the SNC Library on the AS ABAP
    The Secure Login Library 2.0 (SP3) has been installed on one of the ABAP systems and the SNC Client Encryption SNC Library (which is based on SSO 1.0) is no longer used, thus we changed the parameter snc/gssapi_lib to point to the new SNC library. We removed the old PSE.ZIP containing the keytab and created the new SAPSNCSKERB.PSE incl. the keytab and proper credentials. To ensure parallel operation, we kept the snc/identity/as value as is =  p:CN=SAP/[email protected].
    After restarting the system with initialized Secure Login Library 2.0, still the SNC client encryption works fine for existing users.
    The problem
    We created on the Secure Login Server an SNC certificate for the AS ABAP which has the following X.509 Distinguised Name Fomat: CN=SAP/[email protected] This is to avoid having to change the snc/identity/as to an "real" X.509 DN which would lead to non-working SNC Client Encryption for all the other users using SAP GUI and logon groups.
    As soon as we install the PSE via STRUST on the system the SNC Client Encryption solution stops working with error „Server refuses kerberos key exchange“.
    As part of an pilot implementation we have installed Secure Login Client 2.0 (SP3) on some test PCs. The test PC with SLC is able to perform Single Sign-On with SNC based on X.509 (incl. Encryption) to the ABAP system.
    Seems the SAP System now only tries to do X.509 based authentication thus key exchange fails. The problem is, we cannot change the snc/identity/as value because of the logon groups. If we were able to do so, we would in any case set the server identity to X.509 DN and in addition create the SAPSNCSKERB.PSE incl. keytab. This should work, as confirmed by SAP see this post.  
    Any ideas how to solve this and have both solutions in parallel?
    Appreciate any help.
    Regards,
    Carsten

    Hi all,
    we was able to fix the issue. It was an issue with the customers cluster configuration and the  $SECUDIR variable. This tricky issue leads to non working or sporadic working SNC Client Encryption...
    This was how the configuration looks before:
    Environment variable $SECUDIR is defined:
    "/ABCDEF<SID>/usr/sap/<SID>/DVEBMGSxx/sec“
    sapgenpse seclogin -l -v
    running seclogin with USER="<SID>adm"
    Credentials for username '<SID>adm':
    0 (LPS:OFF):
             (LPS:OFF): /ABCDEF<SID>/usr/sap/<SID>/DVEBMGSxx/sec/SAPSNCSKERB.pse
    1 (LPS:OFF):
             (LPS:OFF): /usr/sap/<SID>/DVEBMGSxx/sec/SAPSNCS.pse
    After changing the $SECUDIR to "/usr/sap/<SID>/DVEBMGSxx/sec“ and re-creating the credentials, it worked like a charm.
    As a result of this we can confirm, this configuration and SNC Client Encryption works with CommonCryptoLib in parallel to the SSO configuration.
    And Valerie was right with 2. SLC starting from V. 1.0 SP2 PL3 was able to convert the CN= part of the SNC Name into an SPN, was my mistake. In addition SNC Client Encryption starting from Version 1 SP1 PL1 does this also.. just to make this clear
    Thread closed hope this helps someone
    Carsten

  • Need Inputs - Creation of webservice in SAP R3 through PI

    Hi Experts,
    Need inputs that my client wants me to  create an webservice in SAP/R3 through PI and they (client) will call it by  their 3rd party software.
    Webservice contain fields like :- Comany_Code, Location_Code,Item _code etc.
    SAP -
    > PI ---> 3rd party
    Is this possible through PI ? Please comment !
    Thanks.

    Hi,
    If you have such kinda requirement , then it is easy to create WSDL(webservice) on PI System..
    Create a normal Xi Interface with normal Steps .....
    Your Sender DataType will be acc to Your requirement as clients want...
    go to tools - Define webservice ... ( will Use Outound Service Interface and namespace)
    read the template and Put values in there . This will genrate a WSDL for you , 
    You Can give this Genertaed , WSDL File to Client to consume in their application and Pass data to it ..
    Hope it helps ..
    Regards
    Prabhat Sharma.

  • Automatic replication of vendor masters from SAP R/3 to EBP

    Hi
    For this issue I found the below program and steps to do the automatic replication of vendor master from SAP R/3 to EBP
    PROGRAM BBP_VENDOR_SYNC
    The program BBP_VENDOR_SYNC automatically synchronizes the backend vendors with the SRM system.
    To run the program BBP_VENDOR_SYNC, you first have to make the following settings:
    Path in the Implementation Guide (IMG):
    Supplier Relationship Management --> SRM Server  -->Technical Basic Settings -->Settings for Vendor Synchronization --> Make Global Settings
    Supplier Relationship Management --> SRM Server  -->Technical Basic Settings -->Settings for Vendor Synchronization --> Define Settings for Each Backend System
    Then you have to make the following settings in transaction SA38:
    · Enter program BBP_VENDOR_SYNC.
    · Click on the pushbutton Background.
    · Enter the report name BBP_VENDOR_SYNC.
    · Either define a new variant or use an existing variant ( The new Variant as Test Vendor)
    · Click on the pushbutton Schedule.
    · Enter the job.
    · Define the start date.
    · Either schedule once or schedule periodically. Then you have to define the period interval.
    I followed  the above mention steps and I am able to setup the Schedule on timely basis and the job was completed successfully, but the vendors are not replicated successfully .
    I am receiving the below error in transaction code SLG1.
    1.The Specified Node does not Exist in the Org. Plan(Message no. BBP_VENR006).
    2.No Vendor Replicated from Backend MD1CLNT(Message no. BBP_VENR017).
    Please check and advice.
    Thanks & Regards
    Sada

    Hi Sadasivam,
    Make Global Settings
    Use
    In Customizing for vendor synchronization, you define between which mySAP or ERP backend systems and the EBP System you wish to automatically synchronize the vendor master data. This setting is necessary in order to start a job-based execution of the synchronization, so that the vendor master data that is newly created or changed in the backend is updated regularly in the EBP System.
    Requirements
    You wish to use the automatic vendor synchronization functionality.
    In the Implementation Guide (IMG) activity Define RFC Destinations, you have defined the RFC destinations for your systems.
    Under Define Backend Systems, you have defined the backend systems for your systems.
    Activities
    Customizing for Vendor Synchronization consists of two parts. In the first part you make those settings that are valid for all backend systems. In the activity Make Settings for Each Backend System you can define or display detail data for the individual backend systems.
    Make Global Settings
    By setting the indicator Create New Vendors Also, you can determine that those vendors newly created in the backend systems are also newly created during the synchronization. If this indicator is not set, the only data updated is that of the vendors in the Enterprise Buyer System whose data was changed in the backend systems.
    Note:
    If you have not yet made an entry here, an empty screen appears when you start the activity. To make the settings, choose New entries or press F5.
    Further Settings:
    Carry Out Address Check for Duplicates :
    Organizational Unit in EBP for the Vendor
    Enter the eight-digit number, for example, 50001234.
    Vendor Number Assignment Type
    In the dropdown box, choose the method with which the number is to be allocated when a new vendor is created, for example, internal number allocation.
    Hope this makes you more clear. My mail i.d is [email protected]
    Rgds,
    Teja

  • Update manager in IdM automatically when the manager changes in SAP HR

    Hi Experts
    I have been given a requirement where the manager of a user in IdM should be updated automatically when the manager changes in SAP HR.
    The HR extraction job is currently in place and runs every 30mins.
    Please could you give me some ideas on how to implement this.
    IDM 7.2 SP 6
    Thanks
    Ran

    Hi Deepak
    I have been discussing this a bit more in detail with the client. So, the issue is as follows
    When a new/replacement manager is hired
    When people are moved from one org unit to another
    The scheduled extraction job (RPLDAP_EXTRACT_IDM with a variant with the delta tick on) does not update the new manager info in IDM for the relevant users who report to that manager. The client has to run the program (RPLDAP_EXTRACT_IDM with a variant with the delta tick off) manually each time for the affected users which updates the manager info successfully in idm.
    I investigated the query LDAP_IDM_QUERY from user group /SAPQUERY/L1 and want to know if the below should be ticked as well. Your thoughts please?
    Please advise.
    Thanks
    Ranjit

  • 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

  • How to apply Authentication for a webservice getting SOAPFaultException :(

    Hi ,
    I am working with weblogic 10.1.3 and running build.xml in eclipse for EE
    I would like to know the steps to include security parameters to authenticate with weblogic server and call webservice
    I have written a build.xml that takes input as wsdl , When I run the build.xml it generates
    all the necessary stubs and interfaces
    I have written a main program that imports generated classes and invoke the webservice method
    below are buidl.xml and two classes( main program and one java class) which I used to invoke webservice
    Build.xml
    =====
    <project name="webservices-simple_client" default="all">
    <!-- set global properties for this -->
    <property name="wls.hostname" value="localhost" />
    <property name="wls.port" value="8002" />
    <property name="example-output" value="output" />
    <property name="clientclass-dir" value="${example-output}/srcclasses" />
    <property name="clientclassfiles-dir" value="${example-output}/classfiles" />
    <path id="client.class.path">
    <pathelement path="${clientclass-dir}" />
    <pathelement path="${java.class.path}" />
    </path>
    <taskdef name="clientgen" classname="weblogic.wsee.tools.anttasks.ClientGenTask" />
    <target name="clean">
    <delete dir="${clientclass-dir}" />
    <delete dir="../src/com/bea/wlcp/wlng/ws/presence" />
    <delete dir="../src/org/csapi/schema/paralyx/common/v2_1" />
    <delete dir="../src/org/csapi/schema/paralyx/presence/consumer/v2_3/local" />
    <delete dir="../src/org/csapi/schema/parlayx/presence/v2_3" />
    <echo message="Cleaning Completed" />
    </target>
    <target name="build-client">
    <clientgen wsdl="http://${wls.hostname}:${wls.port}/parlayx21/presence/PresenceConsumer?WSDL" destdir="${clientclass-dir}" generatepolicymethods="true" packageName="com.bea.wlcp.wlng.ws.presence" />
    <javac srcdir="${clientclass-dir}" destdir="${clientclassfiles-dir}" includes="*/.java" />
    <copy overwrite="true" todir="../src">
    <fileset dir="${clientclass-dir}" />
    </copy>
    <copy overwrite="true" todir="../src">
    <fileset dir="${clientclassfiles-dir}" />
    </copy>
    <delete dir="${clientclass-dir}" />
    <delete dir="${clientclassfiles-dir}" />
    <echo message="Building Completed" />
    </target>
    <target name="all" depends="clean,build-client" />
    </project>
    ======================================================
    import java.net.URI;
    import javax.xml.rpc.Stub;
    import javax.xml.ws.BindingProvider;
    import java.net.Proxy;
    import java.net.InetSocketAddress;
    import java.util.ArrayList;
    import java.util.List;
    import weblogic.webservice.wsdl.WsdlPort;
    import weblogic.wsee.connection.transport.http.HttpTransportInfo;
    import weblogic.wsee.jaxrpc.ServiceImpl;
    import org.csapi.schema.parlayx.common.v2_1.PolicyException;
    import org.csapi.schema.parlayx.common.v2_1.SimpleReference;
    import org.csapi.schema.parlayx.presence.consumer.v2_3.local.SubscribePresence;
    import org.csapi.schema.parlayx.presence.consumer.v2_3.local.SubscribePresenceResponse;
    import com.bea.wlcp.wlng.et.core.module.session_manager.GTUsernameTokenPolicy;
    import com.bea.wlcp.wlng.et.core.module.session_manager.SessionManagerService_Impl;
    import com.bea.wlcp.wlng.ws.presence.PresenceConsumer;
    import com.bea.wlcp.wlng.ws.presence.PresenceConsumerService_Impl;
    import com.bea.wlcp.wlng.ws.sessionmanager.SessionManager;
    import com.bea.wlcp.wlng.ws.sessionmanager.SessionManagerService;
    import weblogic.wsee.security.unt.ClientUNTCredentialProvider;
    import weblogic.xml.crypto.wss.WSSecurityContext;
    import weblogic.xml.crypto.wss.provider.CredentialProvider;
    @SuppressWarnings("deprecation")
    public class Main {
    @SuppressWarnings("unchecked")
    public static void main(String[] args) throws javax.xml.rpc.ServiceException,PolicyException{
    try{
    /*PresenceConsumerService_Impl pcs_impl = new PresenceConsumerService_Impl("http://localhost:8002/parlayx21/presence/PresenceConsumer?WSDL");
    PresenceConsumer pc = (PresenceConsumer) pcs_impl.getPresenceConsumer();
    UserCredentialsvalidation gt = new UserCredentialsvalidation("sdpai","sdp");*/
    SimpleReference rf = new SimpleReference();
    rf.setCorrelator("correlatorid");
    rf.setEndpoint(URI.create("http://localhost:8002/PresenceConsumerService/services/PresenceConsumer"));
    rf.setInterfaceName("PresenceConsumer");
    SubscribePresence sb = new SubscribePresence();
    sb.setApplication("sdp");
    sb.setPresentity(URI.create("tel:1234"));
    sb.setReference(rf);
    System.out.println(" Before calling subscribe presence ==" );
    //SubscribePresenceResponse spr = pc.subscribePresence(sb);
    System.out.println(" Hi There here 2226678565");
    System.out.println(" Hi There here 333");
    //raja
    String strUrl = "http://localhost:8002/parlayx21/presence/PresenceConsumer?WSDL";
    Stub objStub = (Stub) new PresenceConsumerService_Impl().getPresenceConsumer();
    objStub._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,"sdpai");
    objStub._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,"sdp");
    objStub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,strUrl);
    PresenceConsumer port = (PresenceConsumer) objStub;
    String returnVal = "";
    System.out.println(" Hi There here 77");
    SubscribePresenceResponse spr = port.subscribePresence(sb);
    System.out.println(spr);
    //ended here
    catch(Exception e)
    e.printStackTrace();
    =======================================
    UserCredentialsvalidation.java
    import com.bea.wlcp.wlng.et.core.module.session_manager.SessionManagerService_Impl;
    import com.bea.wlcp.wlng.schema.ews.common.ServiceException;
    import com.bea.wlcp.wlng.ws.sessionmanager.SessionManager;
    import com.bea.wlcp.wlng.ws.sessionmanager.SessionManagerService;
    import weblogic.wsee.security.unt.ClientUNTCredentialProvider;
    import javax.xml.rpc.Stub;
    import java.util.ArrayList;
    import java.util.List;
    public class UserCredentialsvalidation implements PolicyBase {
    private String username;
    private String password;
    public UserCredentialsvalidation(String username, String password) {
    this.username = username;
    this.password = password;
    String sessionManagerURL="http://localhost:8002/session_manager/SessionManager";
    SessionManagerService accessservice = null;
    try {
    accessservice = (SessionManagerService) new SessionManagerService_Impl(sessionManagerURL+"?WSDL");
    SessionManager port = accessservice.getSessionManager();
    System.out.println(" port >>>>>");
    System.out.println(" port >>>>>" +port);
    UserCredentialsvalidation pbase = new UserCredentialsvalidation();
    pbase.prepareStub((Stub)port,username,password);
    } catch (Exception e) {
    System.out.println(" helo helo");
    // TODO Auto-generated catch block
    e.printStackTrace();
    public UserCredentialsvalidation() {
    // TODO Auto-generated constructor stub
    public void prepareStub(Stub stub,String username,String password) throws Exception {
    List<ClientUNTCredentialProvider> credProviders = new ArrayList<ClientUNTCredentialProvider>();
    System.out.println(" username >>> " + username.getBytes());
    System.out.println(" password >>> " + password.getBytes());
    credProviders.add(new ClientUNTCredentialProvider(username.getBytes(),
    password.getBytes()));
    System.out.println("setting standard wssec");
    stub._setProperty("weblogic.wsee.security.wss.CredentialProviderList",
    credProviders);
    System.out.println("Getting property from stub== " + stub._getProperty("weblogic.wsee.security.wss.CredentialProviderList"));
    @Override
    public void prepareStub(Stub port) throws Exception {
    // TODO Auto-generated method stub
    =========================================
    When I run the main program I am getting below exception
    Before calling subscribe presence ==
    Hi There here 2226678565
    Hi There here 333
    Hi There here 77
    java.rmi.RemoteException: SOAPFaultException - FaultCode {http://schemas.xmlsoap.org/soap/envelope/}Server FaultString Unable to add security token for identity FaultActor nullNo Detail; nested exception is:
    weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Unable to add security token for identity
    at com.bea.wlcp.wlng.ws.presence.PresenceConsumer_Stub.subscribePresence(PresenceConsumer_Stub.java:37)
    at Main.main(Main.java:62)
    Caused by: weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Unable to add security token for identity
    at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:355)
    at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.java:115)
    at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:100)
    at weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.java:88)
    at weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:309)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:269)
    at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:213)
    at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:150)
    at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
    at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:337)
    at com.bea.wlcp.wlng.ws.presence.PresenceConsumer_Stub.subscribePresence(PresenceConsumer_Stub.java:32)
    ... 1 more
    Caused by: weblogic.xml.crypto.wss.WSSecurityException: Unable to add security token for identity
    at weblogic.wsee.security.wss.SecurityPolicyDriver.processIdentity(SecurityPolicyDriver.java:175)
    at weblogic.wsee.security.wss.SecurityPolicyDriver.processOutbound(SecurityPolicyDriver.java:73)
    at weblogic.wsee.security.WssClientHandler.processOutbound(WssClientHandler.java:71)
    at weblogic.wsee.security.WssClientHandler.processRequest(WssClientHandler.java:55)
    at weblogic.wsee.security.WssHandler.handleRequest(WssHandler.java:74)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:107)
    at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:132)
    ... 4 more
    ==========================================================
    I am working for 3 days to solve this issue, but helpless
    Please tell me I am going in right way , I read many forums and implemented different ways , but getting same problem, that too before calling webservice method .
    Do i need to do anything more apart from adding username and password parameters
    Please tell me the exact steps how to perform authentication with webservices
    Your answer will help me a lot .
    Thanks in Advance
    Regards
    Rajasekhar

    Please find the modified file Main.java
    import java.net.URI;
    import javax.xml.rpc.Stub;
    import javax.xml.ws.BindingProvider;
    import java.net.Proxy;
    import java.net.InetSocketAddress;
    import java.util.ArrayList;
    import java.util.List;
    import weblogic.webservice.wsdl.WsdlPort;
    import weblogic.wsee.connection.transport.http.HttpTransportInfo;
    import weblogic.wsee.jaxrpc.ServiceImpl;
    import org.csapi.schema.parlayx.common.v2_1.PolicyException;
    import org.csapi.schema.parlayx.common.v2_1.SimpleReference;
    import org.csapi.schema.parlayx.presence.consumer.v2_3.local.SubscribePresence;
    import org.csapi.schema.parlayx.presence.consumer.v2_3.local.SubscribePresenceResponse;
    import com.bea.wlcp.wlng.et.core.module.session_manager.GTUsernameTokenPolicy;
    import com.bea.wlcp.wlng.et.core.module.session_manager.SessionManagerService_Impl;
    import com.bea.wlcp.wlng.ws.presence.PresenceConsumer;
    import com.bea.wlcp.wlng.ws.presence.PresenceConsumerService_Impl;
    import com.bea.wlcp.wlng.ws.sessionmanager.SessionManager;
    import com.bea.wlcp.wlng.ws.sessionmanager.SessionManagerService;
    import weblogic.wsee.security.unt.ClientUNTCredentialProvider;
    import weblogic.xml.crypto.wss.WSSecurityContext;
    import weblogic.xml.crypto.wss.provider.CredentialProvider;
    @SuppressWarnings("deprecation")
    public class Main {
         @SuppressWarnings("unchecked")
         public static void main(String[] args) throws javax.xml.rpc.ServiceException,PolicyException{
         try{
         /*PresenceConsumerService_Impl pcs_impl = new PresenceConsumerService_Impl("http://localhost:8002/parlayx21/presence/PresenceConsumer?WSDL");
         //PresenceConsumer pc = (PresenceConsumer) pcs_impl.getPresenceConsumer();*/
         UserCredentialsvalidation gt = new UserCredentialsvalidation("sdpai","sdp");
         SimpleReference rf = new SimpleReference();
         rf.setCorrelator("correlatorid");
         rf.setEndpoint(URI.create("http://localhost:8002/PresenceConsumerService/services/PresenceConsumer"));
         rf.setInterfaceName("PresenceConsumer");
         SubscribePresence sb = new SubscribePresence();
         sb.setApplication("sdp");
         sb.setPresentity(URI.create("tel:1234"));
         sb.setReference(rf);
         System.out.println(" Before calling subscribe presence ==" );
         //SubscribePresenceResponse spr = pc.subscribePresence(sb);
         System.out.println(" Hi There here 2226678565");
         System.out.println(" Hi There here 333");
         //raja
         String strUrl = "http://localhost:8002/parlayx21/presence/PresenceConsumer?WSDL";
         Stub objStub = (Stub) new PresenceConsumerService_Impl().getPresenceConsumer();
         objStub._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,"sdpai");
         objStub._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,"sdp");
         objStub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,strUrl);
         PresenceConsumer port = (PresenceConsumer) objStub;
         String returnVal = "";
         System.out.println(" Hi There here 77");
         SubscribePresenceResponse spr = port.subscribePresence(sb);
         System.out.println(spr);
         //ended here
              catch(Exception e)
                   e.printStackTrace();
    ==============================
    When I run the main program getting below exception
    port >>>>>
    port >>>>>com.bea.wlcp.wlng.ws.sessionmanager.SessionManager_Stub@19c0bd6
    username >>> [B@1cd280b
    password >>> [B@29ac
    setting standard wssec
    Getting property from stub== [[ClientUNTCredentialProvider: username=sdpai password=is set]]
    Before calling subscribe presence ==
    Hi There here 2226678565
    Hi There here 333
    Hi There here 77
    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [Unable to add security token for identity] FaultActor [null]No Detail; nested exception is:
         weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Unable to add security token for identity
         at com.bea.wlcp.wlng.ws.presence.PresenceConsumer_Stub.subscribePresence(PresenceConsumer_Stub.java:37)
         at Main.main(Main.java:62)
    Caused by: weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Unable to add security token for identity
         at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:355)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.java:115)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:100)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.java:88)
         at weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:309)
         at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:269)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:213)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:150)
         at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
         at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:337)
         at com.bea.wlcp.wlng.ws.presence.PresenceConsumer_Stub.subscribePresence(PresenceConsumer_Stub.java:32)
         ... 1 more
    Caused by: weblogic.xml.crypto.wss.WSSecurityException: Unable to add security token for identity
         at weblogic.wsee.security.wss.SecurityPolicyDriver.processIdentity(SecurityPolicyDriver.java:175)
         at weblogic.wsee.security.wss.SecurityPolicyDriver.processOutbound(SecurityPolicyDriver.java:73)
         at weblogic.wsee.security.WssClientHandler.processOutbound(WssClientHandler.java:71)
         at weblogic.wsee.security.WssClientHandler.processRequest(WssClientHandler.java:55)
         at weblogic.wsee.security.WssHandler.handleRequest(WssHandler.java:74)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:107)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:132)
         ... 4 more

  • Integrated Windows Authentication with a WebSphere Cliente

    Hi all,
    I need to write a web service client that connects to a .NET Web Service that is configured to use Integrated Windows Authentication (NTLM).
    I'm using the IBM WebSphere Runtime environment for the client and using the web service client wizard in the RSD 6.0.1.
    When I try to call a method in the .NET web service, I get the error shown below. If I configure the .NET web service to permit Anonymous Access, my client works fine.
    Does anybody know if the WebSphere web services engine supports Integrated Windows Authentication? If so, how can I configure my cliente to pass my credentials? Do people use this type of authentication if the web service will be called by non Windows clientes or is it better to use Basic Authentication with HTTPS or digital certificates?
    I've read that Apache Axis can be configured to use integrated windows authentication (http://people.etango.com/~markm/archives/2005/11/21/using_apache_axis_with_integrated_windows_security.html) by using a different HTTP transport class (CommonsHTTPSender).
    Thanks in advance!
    Craig
    [14/06/06 10:06:56:805 GMT-03:00] 00000031 enterprise I WSWS3243I: Info: Mapping Exception to WebServicesFault.
    [14/06/06 10:06:56:821 GMT-03:00] 00000031 enterprise I TRAS0014I: The following exception was logged WebServicesFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
    faultString: java.lang.StringIndexOutOfBoundsException
    faultActor: null
    faultDetail:
    java.lang.StringIndexOutOfBoundsException
         at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:179)
         at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:490)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:218)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:218)
         at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:274)
         at com.ibm.ws.webservices.engine.client.Connection.invokeEngine

    Here's a project ( [http://spnego.sourceforge.net/protected_soap_service.html|http://spnego.sourceforge.net/protected_soap_service.html] ) that shows how to write a soap client that can connect to a soap web service with integrated windows authentication turned on.

  • 802.1x Automatic authentication

    Hi,
    I am using a cisco 3560 switch and IAS for authentication. Everything works fine i can be assigned a VLAN etc however how can i get the client's machines to automatically authenticate after logging in to their machines?
    A problem exists.. at boot time the switchport is unauthenticated and therefore down. Therefore trying to login to the Microsoft 2003 servers domain is impossible because the link is down.
    My question is this: How can the user be automatically authenticated and join the domain without having to type in their credentials again with the baloon method after logging in?
    Thanks in advance.

    This may help:
    <http://www.microsoft.com/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/Default.asp?url=/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/8021x_client_configure.asp>
    You need machine-auth --> which is "Authenticate as computer when computer information is available".
    Hope this helps.

  • Authentication with credentials from another domain?

    I've got an Apex app that I've built for a volunteer organization, and they have a non-Apex app built by another volunteer -- they are hosted on two different servers, two different domains.
    Any hints/tips/ideas ideas on how to (securely) pass credentials from the non-Apex app to the Apex app so Apex is 'automatically authenticated'. I can easily pass the credentials in the URL (yuck) and add a before header process to manipulate the passed credentials and initiate the login process, or customize the authentication -- but I'm having a brain-freeze on how to do it securely.
    Any suggestions?

    thanks for the replies
    scott -- name added to profile
    the same user base uses both apps, so the same username (account name) will be registered in both apps-- the username is first assigned in the non-apex app, then manually added to the apex app
    if the linking app needs to know the apex password, it will be up to the user to keep the passwords sync'd -- each app (apex and non-apex) has its own credentials store (nothing in common other than the internet)
    yes, 'something' during the non-apex app's authentication needs to notify the apex app -- but that authentication is happening on noaccesstotheapexoracleserver.com, so it will need to pass some credentials in order to reliably inform the apex app that it has authenticated the user, or to insert a row in the database that apex is using -- and the only way it can get to that oracle database is through apex -- so it must pass credentials to apex in order to store credentials in the oracle database. or send them through a public page, which would then require some sort of hand-shaking between the apps
    so, that's why i'm thinking of a home-grown 'trusted host' type of solution... something like:
    <ol>
    <li>Non-apex sends session request to apex, passing username and unique session request id
    <li>Apex records request id, generates a unique response id, and sends both back to the non-apex app (using a predefined URL, not based on anything from the request -- i.e., it already knows who it should send the response to and can't be tricked to send a response to a spoofing app)
    <li>Non-apex app verifies the response against its request record, than sends request id and response id back to Apex app
    <li>Apes verifies the request/response pair, and authenticates the user based on the username (account name) passed with the original request.
    </ol>
    but, before i build this, i'm just wondering if there's something already out there -- and if i do take this approach, where are the holes that i might not be seeing

  • Calling webservice in SAP XI from Servlet

    I have requirment of Calling webservice in SAP XI from Servlet.
    COuld you provide information of caling simple webservice from servlet

    Hello Venkat,
    Getting Started with Web Services
    Web Services Infrastructure
    Getting Started with Web Services [original link is broken]
    Thanks,
    Satya

  • Basic authentication of a WebService -- Possible?

    Hi All,
    I have a web service that's defined like this:
    <mx:Webservice wsdl="
    http://username:password@intranet/webservices/myservice.asmx?WSDL"
    />
    username and password are replace with the username and
    password used by IIS's basic authentication subsystem to restrict
    access to the web service.
    This seems to work just fine in Opera and Firefox, but in IE,
    it just hands. No fault or anything, it just hangs there, waiting
    for the WSDL to load.
    I've only tested in IE6, I'm not sure if it does the same in
    IE7.
    Is this a bug in Flex/Flash, a bug in IE, or something else
    entirely? Is there a different way to do basic authentication with
    web services?
    -Josh

    I'd use an HTTP sniffer to see if you can glean any more info
    about what exactly is going over the wire and what might be
    different in the MSIE case.

Maybe you are looking for

  • How do I display a movie on a 4:3 projector without cropping?

    I just got iMovie for iPad and am pleased, except that when I went to show my first video to a class of students the left and right sides were cropped.  Completely cropped.  On this video the "Titles" displayed are crucial, however, these are cropped

  • How I fixed the iTunes "freezing when synching" problem

    My version of iTunes (the latest version) would freeze whenever I tried to synch. I ran a virus check (found 3 viruses and cleaned them), then I restored my iPod in iTunes, which erases all the music off the iPod. Then I synched the iPod and the prob

  • Navigating Out Of Movie Clips

    Hi, i have a presentation set up whereby I have 2 scenes, Intro Movie and Introduction. I have a Movie Clip in Introduction with a number of navigation buttons in it for within this movieclip, but i need one button to replay the Intro Movie in the ot

  • Where to locate  XL reporter.msi file

    Hey all, whenever i click on XL reporter from tool it ask  to locate XL reporter.msi file but i am unable to find one, it occur on WIN 7 prof. 32 bit OS but runs perfectly on WIN XP. is there any prerequisite for XL repoter on WIN 7 32 bit OS

  • My macbook occasionally just stops charging

    i think its the top of the cable that connects to the computer, its  moving and the green/orange charging light occasionaly turns off. and it stops charging, i just recwntly ran out of warranty on this computer, is there a way to get it replaced stil