How Can I call a UCM service from SOAP request

Hi,
I have created one custom service and I would like to call that service from 3rd Party system via SOAP call. The 3rd Party system does not have the capability to call through RIDC.
Now I have exposed my service and tried to call but authentication exception was coming status code 401.
So I created one sample ADF application and tried to call the DocInfo service for testing (I thought let's try DocInfo then I will check my custom service). I downloaded the DocInfo service from UCM and  uploaded the WSDL into the project and got the client DocInfoSoapClient.java file.
public class DocInfoSoapClient
  @WebServiceRef
  private static DocInfo docInfo;
  public static void main(String [] args)
    docInfo = new DocInfo();
    DocInfoSoap docInfoSoap = docInfo.getDocInfoSoap();
    DocInfoByNameResult res = docInfoSoap.docInfoByName("TEST_001603", null);
    System.out.println(res.getContentInfo());
    // Add your code to call the desired methods.
The error is coming like:
Exception in thread "main" com.sun.xml.ws.client.ClientTransportAccessException: The server sent HTTP status code 401: Unauthorized: http://xxxxxxxx:16200/_dav/cs/idcplg
  at com.sun.xml.ws.transport.http.client.HttpTransportPipe.getClientTransportException(HttpTransportPipe.java:340)
I tried a lot but same error. There should be some process by which I can send the userid and password but failed. Even I tried to send the properties as key value pair in IdcPropertyList but I know that is wrong.
I checked the Issue: https://community.oracle.com/thread/2424460
But there was no answer.
Can anyone help on it?
Regards,
Santanu

Hi Santanu,
You need to write SoapHandler in order to pass username and pwd. You will need 2 classes namely HeaderHandlerResolver & SoapHandler. This is how i do in in my JAX-WS clients. I generate stubs and then attach handler to webserviceinterface
PFA HeaderHandlerResolver.java and SoapHandler.java you would attach soap handler something like this in your code i have never done this via ADF so not sure.
HeaderHandlerResolver soapHandlerResolver = new HeaderHandlerResolver();
docInfo.setHandlerResolver(soapHandlerResolver);
In SoapHandler class you will mention username and pwd like this
soapMessageContext.put(BindingProvider.USERNAME_PROPERTY,"username");
soapMessageContext.put(BindingProvider.PASSWORD_PROPERTY,"pwd");
Regards,
Amol Gavali

Similar Messages

  • How can I call external web service from BPEL

    1. I have "EmpService" webservice (simple webservice to get emp salary, not in BPEL domain) running in Oracle AS host1. If I want to call this web service from BPEL in another host2. How can I do this?
    2. Is it a must to deploy this EmpService to Oracle BPEL domain in order to call it? If so, how can I deploy it. As many BPEL example tutorial demonstrate the "obant" command to deploy the BPEL process, but not show how to deploy a external web service not in BPEL project. Please help. ...

    Create a partner link in BPEL and point it to the WSDL deployed on external server.
    this thread will also help
    Axis generated WS to Bpel WS

  • How can we call a WEB SERVICE from an Oracle DB?

    <h2>
    What the methods available to call a WEB SERVICE from the DB. I.e. through a DB Stored Procedure?
    I was given this article by a colleague, but since it’s a 2005 one, I feel it could be outdated?
    http://www.oracle.com/technology/pub/articles/mensah_dws.html
    Also, is it possible to write ONE “Common” DB stored procedure to call ANY WEB SERVICE?
    </h2>

    <h2> No Girish, what I meant is, since it is 2005 article, the method it describes to call a WS is out of date.
    Because I am quite sure in 2009, 4 years later Oracle must have added built-in packages and other methods to simplify it???
    Also, I would be very grateful if you advice on the other issue: Is there a way to create a single DB stored procedure to call ANY WS?? i.e. a common routine to call any web service?
    </h2>

  • How can I call a plsql function from an attribute?

    I have an attribute defined in an element. I want execute a PLSQL function from the attribute, and display the returne value with an HTML template.
    I've defined the attribute's type like PLSQL, and I've put the called of the function in the value of the attribute, but it doesn't work. The only value I obtain is an URL (I think that is the URL of the function or someting like this).
    How can I call to my function from the attribute and display the returnes value in the page?
    Thanks.

    Thanks, but it doesn't work. I have an attribute called ID_BOL and I want to associate a sequence to that attribute. I've created a function, with the sequence. This function return de value of the sequence. I want taht the attribute takes the value of the sequenece dinamically.
    I've tried it, creating the type attribute like PLSQL, and calling the function from the attribute, but it doesn't work.
    How can I return the sequence value to my attribute?
    Thanks.

  • Can any one tell me how can i call a shell script from pl/sql

    i like to call shell script from pl/sql procedure.
    can any one suggest how can i do this

    Have you not mastered in asking the same kind of question ?
    First do write a script...
    no one will spoon feed you.
    How can i call a shell script from procedure
    How to call Shell Script from pl/sql block
    -Sk

  • How can i call a shell script from procedure

    I have a shell script.now i am i a situation to call that shell script from one of my procedures and need to get a value from that script.
    can u suggest me that how can a call the shell script from pl/sql?

    Is the same question you asked here
    How to call Shell Script from pl/sql block
    -SK

  • How can i call mouse click event from keypress event???

    How can i call mouse click event from keypress event???
    I want same GUI changes to be occured at key press.....i.e . button going down & comming up.....
    for calculator

    Put all the code that happens on those events into a method. Then call that method from both events.

  • How can i call Apple in usa from Egypt to buy an iPhone from Apple store please who khnow the contacting number answer me :)

    how can i call Apple in usa from Egypt to buy an iPhone from Apple store please who khnow the contacting number answer me

    http://www.apple.com/eg/buy/
    There are three companies linked to towards the bottom right to purchase an iPhone from. Above those three is Arab Business Machine. Choose one, or check each one out.

  • How can i call forpro prg file from java

    Hai friends,
    I have a doubt,clear it.
    how can i call forpro prg file from java file
    by,
    N.Vijay

    Thanks to your reply,
    I have some print statements in my foxpro program file.
    Then i like to invoke that foxpro file from my java file
    This want i want..,
    by,
    N.Vijay

  • How can i call a DLL file from labview?

    Iam using a sensoray 2601 module.It is given as DLL file(S2600.DLL).How can i call this function from LabVIEW?
    Please Mark the solution as accepted if your problem is solved and donate kudoes

    As far as I can tell problems might occur with the call library function node if the the DLL from visual basic is actually an ActiveX dll if that is the case it seems calling the dll by using the Invoke node is the way to go.
    Have a look at this 
    /sletten

  • How can I call a web service using JAVAscript in LCD

    hi guys,
         I know it can call a WSDL in LCD, but I have not any WSDL web service , and I have a REST web service ,how can I call this REST web service in LCD? I checked some documents and found nothing...if it's possible that it can call a REST web service using JAVAScript code, I mean I can program some code to call this web service ?
    thanks,
    Jesse

    Hi Jesse,
    You can do GET, PUT and POST using FormCalc, so you should be able to access a REST web service. 
    There is a example of accessing a RSS feed in this thread, http://forums.adobe.com/message/5695433#5695433
    Regards
    Bruce

  • ESW: How can I use an enterprise service from ES Workplace?

    Hi All,
    i would have to use the enterprise service "SupplierERPCreateRequest_In" I found in the SAP ES Workplace. But how can I now use the service? I don´t find the Service in SOAMANAGER.
    The corresponding package is installed and in SE80 in Enterprise Service Browser I see the "Service" or Proxy. But in the Enterprise Service Browser appears "Local Objects only (No Connection to ESR)"! Must be activated here anything?
    Has anyone any idea what the problem might be or how should I proceed?
    Regards,
    Bastian

    Hi Gourav,
    thanks for your answer.
    I have looked at the blog, but it´s about XI. From step 2 in the blog, the description is no longer true in my system. The system that I use and where I need the service is SAP ERP ECC 6.0 EHP4, so the latest release.
    Do you have another idea?
    Thanks and Regards,
    Bastian

  • How can I call a java object from Web dynpro ABAP application?

    I made Web dynpro ABAP application and posted it to SAP EP.
    For certain business purpose, we need to call external 3rd party java object using 3rd party's java api in Web dynpro application.
    Is there anybody who experienced this kind of java interface issue?
    I know Web dynpro Java environment can fully support this kind of requirement. but regarding Web dynpro ABAP, I couldn't find any clue for this.
    Any comment or suggestion would be greatly appreciated.
    Thanks,
    Raymond, ABAP Consultant

    if you have jco configured, then you can make calls to java api from ABAP .
    check out this weblog.
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    Raja

  • WLI: Can't call synchronous web services from async business process?

    I have three web services, X, Y, and Z, that I want to call from a business process B. X is asynchronous, Y and Z are synchronous. Therefore, B must be asynchronous. B is called from another business process, A, that must be synchronous. So, I have A call B synchronously using the SyncAsync pattern described in "Best Practices for Oracle WebLogic Integration Application Life Cycle". This worked fine in earlier development when I was only calling X from B. However, when I try to add synchronous calls to Y or Z and run A, I get the following error message from B:
    com.bea.control.classic.ServiceControlException: Attempting to perform the client
    callback 'doY' while servicing a blocking request from the same client.  This can
    result in a deadlock condition.  An @jws:message-buffer tag should be placed on
    the synchronous operation or on this callback.This is obviously an old error message, since it recommends an annotation in the old style. Anyway, what can I do? Shouldn't it be possible to invoke web services synchronously from process B? If so, then how? I don't know what synchronous operation it's talking about -- is it A's call to B? As for the callback, I don't see a separate callback. Annotating the SBControl's method with weblogic.jws.MessageBuffer did no good, and I can't use com.bea.control.annotations.MessageBuffer because the method doesn't return void. Can I make this work without rewriting B, and if so, how? It'd be nice if I could call X, and then call Y and Z while waiting for X's callback.
    Alternatively, I could rewrite my processes so that A calls a new process C synchronously, which in turn calls B (which calls X), Y, and Z. That should work, right? Thanks for any help y'all can give me.

    Greetings everyone,
    We have found a solution to this problem, and it is very much like one offered by Trinidad, except there was some confusion in my understanding.
    http://sql-patch/B1WS/webreferences/LoginService.wsdl
    Indeed, the url http://localhost/Service.asmx appears in the WSDL files, as well as the web.config.
    I changed it to http://sql-patch/B1WS/webreferences/LoginService.wsdl in the WSDL files only.  This did not work.
    We then found it in the web.config file also, and changed it to http://sql-patch/B1WS/webreferences/LoginService.wsdl also.
    The reason I was using this URL is because the files exist there.  Looking at IIS, there is no Service.asmx anywhere in the B1WS path, and this confused me.
    This got us one step further, but now a new error was showing itself -- 405 Method Not Allowed.
    It turns out that the URL we needed to change it to is this:
    http://sql-patch/B1WS/Service.asmx
    That is, we replace localhost with the name of the machine, and NOTHING else.
    This seems to have solved it for us, and is hopefully useful for you.
    Thanks all,
    Mike

  • How can I call a java class from within my program?

    I was wondering if there's a platform independent way to call a java class from my program.

    Here's my scenario. I'm working on a platform independent, feature rich, object-oriented command prompt program. The way I'm designing it is that users can drop classes they write into my bin directory and gain access to the class through my program. For example, they drop a class named Network.class in the bin directory. They would type Network network at my command prompt and gain access to all the methods available in that class. They can then type system.echo network.ipaddress() at my prompt and get the system's ip address. I have it designed that there's a server running in the background and the clients connect to my port. Once connected the end-user can enter their user name and password and gain access to the system. When they type a command they actually call another java program which connects to my server using a seperate thread. They can then communicate back and forth. I have it set that everything has a process id and it's used to keep track of who called what program. Once the program is done it disconnects and closes. Rather than getting into the nitty gritty (I didn't want to get into heavy detail, I know how everything will work) I'm really interested in finding out how I can call a java program from my program. I don't want it to be part of the app in any way.

Maybe you are looking for