How to pass username/password through WebService proxy client to E-BS.

Hi
We are using ADF Webservice proxy client to integrate E-Business suite with ADF. It asks for username/password to access details from E-BS. In the generated webservice XSD file, a method is available with 2 parameters.
1) SOAP header( Contains Username, responsibility and 2 more fields)
2) Class object(Nested Object)
However i didn't find "*Password*" field anywhere in it. Then how can I pass "*Password*" along with username to invoke this method?
When i checked SOAP, the password is defined like this
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXX</wsse:Password>a
Thanks
Raja

hi Dario
Thank you for your post. It is really helpful. Now I got stuck with a doubt, in this piece of code
final Binding binding = ((BindingProvider) servicePort).getBinding();
List<Handler> handlerList = binding.getHandlerChain();
if (handlerList == null)
handlerList = new ArrayList<Handler>();
They didn't mention properly about "*servicePort*". What object is this?
I checked in Oracle document, even in that I was not clear with that piece of code.
public class HandlerWS{ 
@Resource WebServiceContext ctx;
@WebMethod()
public String getProperty(String propertyName) {  
return (String) ctx.getMessageContext().get(propertyName);
public class Main {
public static void main(String[] args) {
HandlerWS test;
try {
test = new HandlerWS(new URL(args[0] + "?WSDL"), new
QName("http://example.org", "HandlerWS") );
} catch (MalformedURLException murl) { throw new RuntimeException(murl); }
HandlerWSPortType port = test.*getHandlerWSPortTypePort*();
What is this HandlerWSPortType object???. Can you give me little more explanation about it?
Thanks

Similar Messages

  • How to pass username;password in to header Variable

    Hi All,
    I have to invoke client SOAP WSDL based web service, He has given the URL. I want to invoke it from bpel. It is sync based web service.
    Please have look at sample input data. in the header section there is element called Token.  what i need to do here I need to pass the user name and password those separated by ;
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xxxxxxx.com/2005/">
       <soapenv:Header>
          <ns:AuthorizationToken>
             <ns:Token>username;password</ns:Token>
          </ns:AuthorizationToken>
       </soapenv:Header>
       <soapenv:Body>
          <ns:WEBGet>
             <ns:key>pass the input value</ns:key>
          </ns:WEBGet>
       </soapenv:Body>
    </soapenv:Envelope>
    Please advise me how to pass these values when i am invoking it through BPEL.
    Thanks,

    Please help me out, It is little bit urgent.

  • How to pass username/password to BPEL web service from java proxy?

    Hi all,
    Environment : SOA Suite 11g
    I am using basic http authentication in my SOA services using "oracle/wss_http_token_client_policy" policy. Now i need to invoke these SOA web services from a java proxy.
    Please let me know how this can be done.
    Thanks in advance

    Have you tried the below posts ?
    BPEL to invoke Webservice secured with HTTP Basic authentication
    Invoke a BPEL process using HTTP Basic Authentication
    http://docs.oracle.com/cd/E21764_01/web.1111/e13713/owsm_appendix.htm#CHDBAHBI
    Thanks,
    Vijay

  • How to pass username and password with the portal url

    i want to access portal from my web site. i have created username and password fields in my web page. when submited , my portal page should open. so how to pass username and password with the portal url.

    This is not straightforward; but it is doable.
    First tell us about your portal version; portal 10.1.4 has a slightly different method of doing it and the pre-10g portals were completely different animals.
    And if you are in AS Rel 2, then the most important document for you would probably be the following:
    [Creating Deployment Specific Pages| http://download-west.oracle.com/docs/cd/B14099_19/idmanage.1012/b14078/custom.htm#i1015535]
    You might want to use it in conjunction with some metalink notes about your portal version and such a login page.
    hope that helps!
    AMN

  • Passing Username/Password from .xsql to Oracle

    Is there any other way to connect to the Oracle than hardcoding username, password, dburl and driver in the XSQLConfig.xml file?
    Can I use parameters in .xsql files?
    The idea is that every web user connects to DB like himself, so I am looking for a way to pass Username/Password from web application to the Oracle using xsql files on every connection.
    Thanks in advance.
    Oleg.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    Most web applications connect as a single backend database user to maximize the benefit of connection pooling.<HR></BLOCKQUOTE>
    While that may be true for publically accessible sites, I've found many, many internal web-apps need user authentication (login, whatever). In fact, the inability to do this easily has tipped some of our projects away from web-apps.
    null

  • How to pass username and password while invoking a web service through wsdl

    Hello All,
    i am calling a web service through wsdl, but it is giving error 401. i want to know how to pass userid and password when i am invoking webservice?
    i am using NetBeans 6.1.
    i did following thing:
    First i created one web application, then i right clicked on project new->web service client, and gave the url for my wsdl.
    after that i create one main class and try to call my required operation by that wsdl.
    Thanks in advance

    Thanks dumchikov, i tried the same thing what ever you told but there is no option for security.
    when i right clicked on web service reference its open 1 window which have 2 tab one is quality of service and second is wsdl customization, then i clicked on wsdl customization. which contain Global Customization, Port Types, Port Type Operations, Port Type Faults, Binding, Binding Operations, Services, Ports and External Binding Files. it don't have security option.

  • How to pass Username and password using Invoke to a webservice

    Hi Guys,
    Please tell me how can I pass Username and password using Invoke to a webservice, I am using SOA 11G.
    Thanks
    Yatan

    Hi Yatan
    I suppose you want to use basic HTTP authentication.
    Try to lookup in the SOA docs this property
    oracle/wss_http_token_client_policy
    http://download.oracle.com/docs/cd/E17904_01/web.1111/b32511/configuring.htm#WSSEC2261
    Regards
    Mihai

  • How to pass username and password from form to web service

    Hi All,
    We need to develop an offline interactive to form.
    When on desktop computer, the user has to click on button and it calls a web service (exposed via PI ) which updates the backend.
    But backend needs an authorised user for updation. We have a dummy user with authorisations.
    But how to pass the that username with its password to web service
    Please give your suggestions
    Regards,
    Aditya Deshpande

    i am closing this thread

  • Proxy auth - still getting 407 after passing username/password

    Hi,
    I am having trouble access url via our proxy. I have read/tried all the examples but still nothing. However java webstart can connect.
    1. proxy is Microsoft
    2. base64Encoder from com.orielly.server package
    here is the code:
    try {
    URL url = new URL("http", "someproxy", 80, "someurl");
    HttpURLConnection conn = (HttpURLConnection) url.openConnection();
    String proxyPassword = "DOMAIN\\username:password";
    String encoded = Base64Encoder.encode(proxyPassword.getBytes());
    conn.setRequestProperty("Proxy-Authorization","Basic "+encoded);
    conn.connect();
    System.out.print( conn.getResponseCode() );
    catch( Exception e ) {
    System.out.print( e ) ;
    when I run this I get 407 code.
    any help/pointers will be appreciated
    Thanks

    Check out this article
    http://www.javacoding.net/articles/technical/passproxy.html

  • How to supply username/password and hostname when calling a web service

    The Workshop Help contains a chapter named "To Use the Java Proxy in a Separate Java Application". It includes the following code:
    public class Main
    public static void main(String[] args)
    try
    HelloWorld_Impl proxy = new HelloWorld_Impl();
    HelloWorldSoap soapProxy = proxy.getHelloWorldSoap();
    System.out.println(soapProxy.Hello());
    catch (Exception e)
    e.printStackTrace();
    Questions:
    1. How is the username and password supplied in case the Hello World web service is secured?
    (I have not found any Javadoc for weblogic.webservice.core.rpc.ServiceImpl, but from the code assist I see a constructor taking two Strings....)
    2. Is there a way to supply a hostname, and port, in case the Hello World web service exists on more than one host?

    If I need to specify the wsdl url it fails as wsdl it self is protected. How do I pass in the userId/password while getting the wsdl.
    E.g:
    /*Line below fails as userId/password is not passed.*/
    HelloWorld_Impl proxy = new HelloWorld_Impl(wsdlLocation);
    HelloWorldSoap soapProxy = proxy.getHelloWorldSoap("username", "passwd");
    System.out.println(soapProxy.Hello());

  • Where is username/password in webservice call

    Hi,
    I'm have a webservice client based on a simple WLS sample client that makes a
    call of the form:
    <my service name>Port port = <my service name>_Impl().get<my service name>Port()
    The get<my service name>Port can optionally take "username" and "password" parameters
    to allow the client to invoke a secured web service. How are "username" and "password"
    passed? In the SOAP message itself, in HTTP...? I dumped the SOAP request using
    the verbose option and do not see the username or password.
    We want to be able to have .NET clients invoke these secured web services also
    and have not been able to figure out how a .NET client specifies username/password
    to invoke our web service. Has anyone done this?
    Thanks in advance.

    WLS use HTTP basic auth. The user name and passwd are in the HTTP
    header.
    I know that we test basic auth with .Net, but not sure how to set username
    and passwd in the .net client.
    http://manojc.com
    "Jack Ottofaro" <[email protected]> wrote in message
    news:3edfaa1c$[email protected]..
    >
    Hi,
    I'm have a webservice client based on a simple WLS sample client thatmakes a
    call of the form:
    <my service name>Port port = <my service name>_Impl().get<my servicename>Port()
    >
    The get<my service name>Port can optionally take "username" and "password"parameters
    to allow the client to invoke a secured web service. How are "username"and "password"
    passed? In the SOAP message itself, in HTTP...? I dumped the SOAP requestusing
    the verbose option and do not see the username or password.
    We want to be able to have .NET clients invoke these secured web servicesalso
    and have not been able to figure out how a .NET client specifiesusername/password
    to invoke our web service. Has anyone done this?
    Thanks in advance.

  • Firefox always asks for a username/password from a proxy for any website I try to visit. "No proxy" is selected.

    Firefox is installed on my work computer (v16 on windows XP). When I go to any unsecure website, I get a request for a username and password from a proxy. I don't have one, so I press "cancel." I get the following message (I put the asterisks in):
    "This Page Cannot Be Displayed
    Authentication is required to access the requested web site ( *******-webproxy ). A valid user ID and password must be entered when prompted.
    If you have questions, need assistance with your login information, or feel this is an error, please contact your corporate network administrator and provide the codes shown below.
    Notification codes: (1, WWW_AUTH_REQUIRED, *********-webproxy)"
    The website in the address bar is: http://*******-webproxy/B0000D0000N0001F0000S0002R0004/http://www.whatever.com/
    This started after it upgraded (to which version, I don't remember). I also had another version of firefox installed to my "Local Settings" directory since I can't (un)install programs on the computer. That one was working fine until I upgraded to v.15 or v.16 (or maybe 14... I don't remember), and then I started getting the warning screen for an untrusted connection whenever I went to a secure website (https), I had to confirm a security exception, etc. And even then some pages only appeared as text.
    I uninstalled that version, and then installed 17b4, and I'm back to the same problem as the original firefox: unsecure websites always seem to be redirecting through a proxy, and secure ones always tell me the connection is untrusted and I have to confirm an exception. I have "No proxy" selected in the network options. I tried v16 with the same results.
    I would love to be able to just go to a website and not have to confirm security exceptions or get web proxy errors.
    Internet Explorer works fine, btw.

    Not sure from your example but it appears that the address doesn't have a full domain, i.e., the part between http:// and the next / is not a valid internet domain name, e.g.,
    http://sometext-webproxy/
    In that case, it's probably something running on your computer, either as part of your security software, or as a Firefox add-on, or malware.
    A standard diagnostic to bypass interference by extensions (and some custom settings) is to try Firefox's Safe Mode.
    First, I recommend backing up your Firefox settings in case something goes wrong. See [[Backing up your information]]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, restart Firefox in Firefox's Safe Mode ([[Safe Mode]]) using
    Help > Restart with Add-ons Disabled
    In the dialog, click "Start in Safe Mode."
    If you can access sites normally, this points to one of your extensions or custom settings as the problem.
    To also disable plugins, you can try here:
    orange Firefox button ''or'' classic Tools menu > Add-ons > Plugins category
    Any change?

  • SAMLAssertionID error while invoking webservice through webservice proxy

    I have created a web service proxy client using service WSDL deployed to weblogic standalone server as per the Fusion Dev guide [http://fmwdocs.us.oracle.com/doclibs/fmw/E10285_01/appslib7/web.1111/b31974/web_services.htm#CJADCDBG]. When i try to invoke the web service through the proxy i am seeing this error
    Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Unable to add security token for identity, token uri =http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID
         at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:197)
         at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:122)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:125)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
         at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
         at $Proxy42.findTerritoriesInPartition(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
         at $Proxy43.findTerritoriesInPartition(Unknown Source)
         at oracle.apps.sales.territoryMgmt.territories.serviceProxy.findTerritories.TerritoryServiceSoapHttpPortClient.main(TerritoryServiceSoapHttpPortClient.java:56)
    Please suggest how i can get rid of this error.
    I looked at the wsdl, i see that wss_saml_or_username_token_service_policy is added.
    <wsp:Policy orawsp:provides="{http://docs.oasis-open.org/ns/opencsa/sca/200903}authentication, {http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication, {http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication.message" wsu:Id="wss_saml_or_username_token_service_policy">
    Code in my proxy client:
    public class TerritoryServiceSoapHttpPortClient
    @WebServiceRef
    private static TerritoryService_Service territoryService_Service;
    private static final AddressingVersion WS_ADDR_VER = AddressingVersion.W3C;
    public static void main(String [] args)
    territoryService_Service = new TerritoryService_Service();
    TerritoryService territoryService = territoryService_Service.getTerritoryServiceSoapHttpPort();
    // Get the request context to set the outgoing addressing properties
    WSBindingProvider wsbp = (WSBindingProvider)territoryService;
    WSEndpointReference replyTo =
    new WSEndpointReference("http://adc60059fems.us.oracle.com:6035/salesTerrMgmtTerritories/TerritoryService", WS_ADDR_VER);
    String uuid = "uuid:" + UUID.randomUUID();
    wsbp.setOutboundHeaders( new StringHeader(WS_ADDR_VER.messageIDTag, uuid), replyTo.createHeader(WS_ADDR_VER.replyToTag));
    // Add your code to call the desired methods.
    try{
    wsbp.getRequestContext().put(WSBindingProvider.USERNAME_PROPERTY, "SALES_ADMIN");
    wsbp.getRequestContext().put(WSBindingProvider.PASSWORD_PROPERTY, "Welcome1");
    FindTerritoriesInPartition terr = new FindTerritoriesInPartition();
    terr.setPartitionType("PRODUCTION");
    terr.setTerritoryService(territory);
    territoryService.findTerritoriesInPartition(terr);
    catch(ServiceException se){
    Thanks,
    Sekar

    Hi Subramanyam,
    There is a very simple way to invoke web service through code using ServiceFactory classes. See if you can access this link[http://fmwdocs.us.oracle.com/doclibs/fmw/E10285_01/appslib7/doc.1111/e10308/uc_adf_to_adf.htm#BDCEDDDC]. Looks like creating proxy through Jdev and writing client code using ServiceDelegateImpl is a very costly approach, it creates lot of files and it fails to invoke service when SAML is enabled in the server side.
    If you could not access this link, follow these steps
    1. In connections.xml
    <Reference name="{http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/}TerritoryService" className="oracle.jbo.client.svc.Service" xmlns="">
    <Factory className="oracle.jbo.client.svc.ServiceFactory"/>
    <RefAddresses>
    <StringRefAddr addrType="serviceInterfaceName">
    <Contents>oracle.apps.sales.territoryMgmt.territories.territoryService.TerritoryService</Contents>
    </StringRefAddr>
    <StringRefAddr addrType="serviceEndpointProvider">
    <Contents>ADFBC</Contents>
    </StringRefAddr>
    <StringRefAddr addrType="jndiName">
    <Contents>TerritoryServiceBean#oracle.apps.sales.territoryMgmt.territories.territoryService.TerritoryService</Contents>
    </StringRefAddr>
    <StringRefAddr addrType="serviceSchemaName">
    <Contents>TerritoryService.xsd</Contents>
    </StringRefAddr>
    <StringRefAddr addrType="serviceSchemaLocation">
    <Contents>oracle/apps/sales/territoryMgmt/territories/territoryService/</Contents>
    </StringRefAddr>
    <StringRefAddr addrType="jndiFactoryInitial">
    <Contents>weblogic.jndi.WLInitialContextFactory</Contents>
    </StringRefAddr>
    <StringRefAddr addrType="jndiProviderURL">
    <Contents>t3://adc60108fems.us.oracle.com:6046</Contents>
    </StringRefAddr>
    <StringRefAddr addrType="jndiSecurityPrincipal">
    <Contents>SALES_ADMIN</Contents>
    </StringRefAddr>
    <StringRefAddr addrType="jndiSecurityCredentials">
    <Contents>Welcome1</Contents>
    </StringRefAddr>
    </RefAddresses>
    </Reference>
    2. Create a java file with a main method, sample code to invoke service
    import commonj.sdo.helper.DataFactory;
    import oracle.jbo.client.svc.ServiceFactory;
    public static void territoryGet(){
    String TERRITORY_SERVICE_NAME = "{http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/}TerritoryService";
    TerritoryService terrService = (TerritoryService)ServiceFactory.getServiceProxy(TERRITORY_SERVICE_NAME);
    DataFactory dataFactory = ServiceFactory.getDataFactory(terrService);
    // Create Territory
    Territory territory = (Territory)dataFactory.create(Territory.class);
    territory.setTerritoryLevel(1L);
    territory.setStatusCode("FINALIZED");
    java.util.Date currentDate = new java.util.Date();
    Calendar cal = Calendar.getInstance();
    cal.setTime(currentDate);
    territory.setEffectiveEndDate(new java.sql.Date(cal.getTimeInMillis()));
    territory.setEffectiveStartDate(new java.sql.Date(cal.getTimeInMillis()));
    List<Territory> lst = terrService.findTerritoriesInPartition(territory, "PRODUCTION");
    System.out.println("Size: " + lst.size());
    I also had succeeded using ServiceDeleteImpl, but i prefer ServiceFactory which is very simple. I can also share how to achieve using the proxy which jdev generates.
    ~Sekar

  • ATG 10.1.2 . How to set BCC password through CIM?

    I'm new to 10.1.2 version, trying to installing and configure it properly to learn it. With CIM I configured and set Publishing, Production and Staging instances.
    I ran BCC after installation (http://localhost:8180/atg/bcc) and was prompted for password - admin/admin or merchandising/merchandising set by default in previous ATG versions didn't work in 10.1.
    I learned from ATGInstallGuide that there is no default passwords preset in 10.1.2 and I have to set them though CIM. (Or ACC)
    Here what is says:
    *"Through CIM. During the post-installation setup process, CIM prompts you to set the passwords for the*
    *default profiles that your environment requires "*
    I do remember I was once asked one for password for merchandising user only, and the password I set didn't allow me into BCC, so probably it was for something else.
    Please, advise how to set BCC passwords for default account (admin, merchandising and etc) in CIM? I don't see this option in CIM - I everything in CIM and didn't find it
    Just in case there is the list of options CIM provides me after running:
    [1] Database Configuration - Done
    [2] Server Instance Configuration - Done
    [3] Application Assembly & Deployment - Done
    [P] Product Selection - Done (Oracle ATG Commerce Reference Store &
    ATG-Endeca Integration & ATG Site Administration)
    [A] Select Application Server - Done (JBoss)
    *[C] Custom CIM Plugin Launcher
    I'm still not able to open BCC application
    Edited by: 994398 on Mar 17, 2013 5:36 PM
    Edited by: 994398 on Mar 17, 2013 5:37 PM

    CIM will ask for new passwords when you select Create Schema and Import data. If you have forgotten the pwd given by you, you can reset it.
    Check the below threads regarding similar issue.
    ATG 10.1.1 BCC -Default password for admin
    not able to login into ATG Dyn admin
    Cheers
    R

  • Passing username & password in HTTP Header

    Hi all,
    My 1st query.
    I want to access a url which asks for username & password.
    how can i put my username & password in the http header so that when i call that url it shouldn't ask for the username & password.can anyone plz show it as a piece of servlet code.
    Thanks,
    Neha

    I am uing the HttpUrlConnection and the way I set is using the "setRequestProperty()" method. The follwoing code snippet actually encodes the user + passwd and sets it in the HTTP header.
    if(this.user != null) {
    BASE64Encoder encoder = new BASE64Encoder();
    StringBuffer buf = new StringBuffer(user).append(":").append(this.passwd);
    String encoded = encoder.encode(buf.toString().getBytes());
    httpCon.setRequestProperty("Authorization", "Basic " + encoded);

Maybe you are looking for