How to create Java client to use WCC web services

I'm trying to create a Java client to use web services available with Web Center Content.
I generated stubs using "cxf-codegen-plugin" and I wrote following code (very trivial):
DocInfo docInfo = null;
*try {*
docInfo = new DocInfo(new URL("http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1"));
*} catch (MalformedURLException e) {*
e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
DocInfoSoap docInfoSoap = docInfo.getDocInfoSoap();
DocInfoByIDResult docInfoByIDResult =  docInfoSoap.docInfoByID(new Integer(2), null);
At the moment I'm obtaining following error:
Exception in thread "main" javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1. It failed with:
*     Invalid WSDL http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1, expected {http://schemas.xmlsoap.org/wsdl/}definitions found html at (lineLine number = 3*
Column number = 30
System Id = http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1
Public Id = null
Location Uri= http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1
CharacterOffset = 133
*     at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:151)*
*     at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:127)*
*     at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:254)*
*     at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:217)*
*     at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:165)*
*     at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:93)*
*     at javax.xml.ws.Service.<init>(Service.java:56)*
*     at com.stellent.docinfo.DocInfo.<init>(DocInfo.java:39)*
*     at eu.europa.efsa.virtual.library.services.client.TestDocInfo.main(TestDocInfo.java:23)*
*Caused by: javax.xml.stream.XMLStreamException: Invalid WSDL http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1, expected {http://schemas.xmlsoap.org/wsdl/}definitions found html at (lineLine number = 3*
Column number = 30
System Id = http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1
Public Id = null
Location Uri= http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1
CharacterOffset = 133
*     at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:120)*
*     ... 7 more*
Please, any comment will be appreciated.

Now I'm trying following code.
DocInfo docInfo = new DocInfo();
DocInfoSoap docInfoSoap = docInfo.getDocInfoSoap();
DocInfoByIDResult docInfoByIDResult =  docInfoSoap.docInfoByID(new Integer(2), null);
The error I obtain is:
Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 401: Unauthorized
     at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:196)
     at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:168)
     at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:83)
     at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:105)
     at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:587)
     at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546)
     at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531)
     at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428)
     at com.sun.xml.internal.ws.client.Stub.process(Stub.java:211)
     at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:124)
     at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98)
     at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
     at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
     at $Proxy28.docInfoByID(Unknown Source)
     at eu.europa.efsa.virtual.library.services.client.TestDocInfo.main(TestDocInfo.java:20)
Is there a way to pass right username and password?
How can I understand which the user actually used?

Similar Messages

  • How to create a crystal report using secured web service as a datasource?

    Hi All Expert,
    I having some challenges on how to create a report using secured web service as a datasource in crystal report designer (CR11 R3).
    Secured Web Service including the certificate trusting, token authentication, header and/or body encryption. All web services running on https protocal.
    Could you please suggest me on the solution?
    Thank you and Best Regards,
    Cherr

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • How to create a generic method which invokes Web Service

    Hi I have a question how to create Web Service client. In design mode I can't specify static url ?WSDL and process.
    I found briliant method in apache cxf library.
    for example
    JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
    Client clientA = dcf.createClient("http://soabpm-vm:8001/soa-infra/services/default/MailSender/mailsender_client_ep?WSDL");
    Object[] resultA;
    try{
    resultA = clientA.invoke(new QName("http://xmlns.oracle.com/SynchDSBpel20/MailSender/MailSender", "process"), "@", "body", "topic");
    }catch (Exception e){}
    In my case I should create a method with params (urls ?WSDL, URI, operetion name, param1, praram2, param3)
    Is there anything like CXF in ADF library's?

    This can be very easily done using a web service proxy (Select web services from the categories and web service proxy from the items).
    In the "Create Web Service Proxy" wizard, make sure you select JAX-WS client style. JDeveloper will use the JAX-WS web service API and JAXB (Java Architecture for XML Binding) to generate all required classes and methods required to call a web services, binding Java method signatures to WSDL messages and operations.
    Regards
    Antonis

  • Security exception while running the java client for a secured web service.

    hi,
    I created a proxy for a secured web service.
    When I run the client java program I am getting the following exception :
    java.io.IOException: could not load the default-keystore.jks file because The keystore file is tampered or password is incorrect.
    Its saying that password is invalid.
    Can you please help me on this thanks in advance.
    Regards,
    Chandra

    hi,
    I created a proxy for a secured web service.
    When I run the client java program I am getting the following exception :
    java.io.IOException: could not load the default-keystore.jks file because The keystore file is tampered or password is incorrect.
    Its saying that password is invalid.
    Can you please help me on this thanks in advance.
    Regards,
    Chandra

  • How to call Jive Search methods using REST Web Services from ADF

    Hi
    Can someone provide me an example to call JIVE Search using REST web services from Webcenter ADF.
    As we have the similar facility to call UCM Search from WebServices DataControl.
    Do we have anything similar like this for JIVE Search?
    JIVE 5.1 is deprecating SOAP style web services and so I am planning to use REST.
    Any suggestions on this is much appreciated.
    Many Thanks
    Khad

    so what exactly is the problem here?
    what is not working?

  • How to execute XML batch commands using SharePoint Web services or Client Object Model

    Hi,
    I have a requirement to execute some batch commands to update SharePoint View Style, how can i do it using SharePoint webservices or SharePoint Client Object model.
          I need to execute the following Batch command over a particular web.
    <Method ID="UpdateView">
      <SetVar Name="Cmd">UpdateView</SetVar>
      <SetList Scope="Request">{GUID of List}</SetList>
      <SetVar Name="View">{GUID of View}</SetVar>  
      <SetVar Name="ViewStyle">6</SetVar>
      <SetVar Name="RowLimit">100</SetVar>
      <SetVar Name="Paged">TRUE</SetVar>
    </Method>

    Hi
    I tried it already... But UpdateView Method in the Views.asmx and Lists.asmx, both are not supporting for updating the style of the view (like Boxed, Newsletter...).
    If you have any code sample which will do this job with any of the SharePoint web services, please share it..

  • How to create a process instance from PAPI Web Services

    Hi,
    I use Jdev 11g to create ADF(PAPI web service) to create new instances of BPM processes running in BPM Standalone (10g). However, I do not know how to write the code.
    Could any people paste the sample code for me?
    Thank you very much!
    papiWebServicePort.processCreateInstance(String, String, Holder<ArgumentBean>, Holder<instanceInfoBean>)

    import java.net.MalformedURLException;
    import java.rmi.RemoteException;
    import javax.xml.rpc.ServiceException;
    import com.bea.albpm.PapiWebService.OperationException;
    public class CreateInstances {
         public static void main(String[] args) throws MalformedURLException, ServiceException, OperationException, RemoteException {
              java.net.URL url = null;
              org.apache.axis.EngineConfiguration config = null;
              com.bea.albpm.PapiWebService.PapiWebServicePortBindingStub binding = null;
              com.bea.albpm.PapiWebService.InstanceInfoBean value = null;
              //String processId = "/Proceso1";
              //String processId = "/ActividadesExternas";
              String processId = "/PAPIWS";
              String argumentsSetName = "BeginIn";
              //Binding
              //url = new java.net.URL("http", "localhost", 8686, "/papiws/PapiWebServiceEndpoint");
              url = new java.net.URL("http", "localhost", 8585, "/papiws/PapiWebServiceEndpoint");
              config = new org.apache.axis.configuration.FileProvider("client_deploy.wsdd");
    binding = (com.bea.albpm.PapiWebService.PapiWebServicePortBindingStub) new com.bea.albpm.PapiWebService.PapiWebService_ServiceLocator(config).getPapiWebServicePort(url);
    binding.setTimeout(60000);
    //Arguments
    com.bea.albpm.PapiWebService.ArgumentsBeanArgumentsEntry argumentsBeanArgumentsEntry[] = new com.bea.albpm.PapiWebService.ArgumentsBeanArgumentsEntry[1];
    argumentsBeanArgumentsEntry[0] = new com.bea.albpm.PapiWebService.ArgumentsBeanArgumentsEntry();
    argumentsBeanArgumentsEntry[0].setKey("entradaArg");
    argumentsBeanArgumentsEntry[0].setValue("Instancia creada de forma externa mediante PAPI-WS 2.0");
    com.bea.albpm.PapiWebService.ArgumentsBean argumentsBean = new com.bea.albpm.PapiWebService.ArgumentsBean(argumentsBeanArgumentsEntry);
    com.bea.albpm.PapiWebService.holders.ArgumentsBeanHolder argumentsBeanHolder = new com.bea.albpm.PapiWebService.holders.ArgumentsBeanHolder(argumentsBean);
    //Create instance
    value = binding.processCreateInstance(processId, argumentsSetName, argumentsBeanHolder);
    System.out.println("Created instance -> InstanceInfo.id = " + value.getId());
         }

  • Help to create a component model using Calculator Web Service :(

    Hello All,
    Im working on EP6 SP9 and have a Calculator Web Service.
    I want to create a component which should contain following UI elements:
    1. <i>InputField</i> - to enter 1st number
    2. <i>InputField</i> - to enter 2nd number.
    3. <i>TextView</i> - To show the result
    The calculator web service consists of 4 basic methods like addition, subtraction, division & multiplication.
    I want to know whether how can I provide seperate buttons to each of the above mentioned functions 'coz when I add the web service while creating a component using SAP Web Dynpro (<i>using SAP NEtweaver Developer Studio 2.0.9</i>) - Model Creation step, I get an option to select only one method (and that is add).
    Its not working......
    I am following the steps as mentioned in help pages on Web Dynpro, section "Web Dynpro & Web Services" and example on WebServiceEmail.
    Please help.......
    I have to show this in a presentation on coming Friday.
    Awaiting Reply.
    Thanks and Warm Regards,
    Ritu R Hunjan
    <i></i>

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • How to create a 404 page with LabVIEW web services?

    Hi community,
    I guess the question says it all... I have my site up and running but I'd like to create a default 404 page just in case the user mistypes something. How can I do that?
    thank!
    Solved!
    Go to Solution.

    1984 wrote:
    My question is how can I configure LV to display a custom 404 message instead of just displaying the default?
    Thanks for asking if i have problems publishing a page after I wrote in my first comment that I have my site up and running.
    I believe he's telling you to use the same logic that was used to display the error, but instead of displaying an error, display your custom page.  I asked if you had trouble publishing the page because I thought that Shane's clarification post was pretty self-explanatory and that was the only thing I could think that you would be having issues with.  And I guess your site isn't truly up and running if you wanted to display a custom 404 page and was not able to do so.  I would say it was still under construction. 
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Get client ip address from Web Service hosted on OAS 10.1.2

    Hi,
    Can anyone advice how to get the client IP from a web service (java) hosted on Oracle Application Server 10.1.2.
    The below code works if the web service is hosted on Tomcat.
    MessageContext msgCtxt = MessageContext.getCurrentMessageContext();
    String IP = (String)msgCtxt.getProperty("REMOTE_ADDR");
    This code is causes built errors on the OAS 10.1.2 since it needs Axis and many other Jars. I tried to insert the jars needed but unfortunately when i was able to compile it returned a java.lang.NullPointerException.
    Is there a way to get the IP address of the client that calls this web service ?
    Or is there a way to read the SOAP request maybe i can retrieve the client IP from it.
    Thanks for your support,
    regards

    http://forums.sun.com/thread.jspa?threadID=5371892&messageID=10636223
    Thank you!

  • Useing SAP web services

    Hi
    how would it be possible to use SAP web services in .Net application?
    Thanks in advance
    Regards

    try thess links - they allhave useful information:
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2131 [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    Re: calling a sap webas 6.20 web service from .net
    Thanks

  • How to Create JAVA proxies in PI 7.1 using NWDS

    Hi PI SDNers,
    Please guide me on "how to create JAVA proxy in PI 7.1 using NWDS". I used to create java proxies from Integration build tools->generate Java Proxy in Pi 7.0/XI3.0; Please advise me.
    Thanks in Advance...
    Ravi Kanakam

    Check if these threads help you:
    Java Proxy with NWDS 7.1
    Re: Java Proxy & NWDS
    Regards,
    Abhishek.

  • How to create a packet by using java?

    Hi, i am currently working on a research and i have some problems here.
    1) how to create a packet by using java programming ?
    2) How can i set the packet's information (e.g: packet's length, size of its header, etc) by using java?
    I am currently in a midst of this now and i hope that someone is willing to correspond to my questions and help me out of it.
    Thank you!

    I wan to create a customize packet where the user can
    define the header size, the packet's length etc. in
    the program......Then you get to write it to the connection yourself. Look at the OutputStream classes to see how to write low level output to a connection.

  • How to create Proxy CLIENT USING .WSDL ?

    I apologize if i have posted this question in the wrong forum.My question is concerned with WSDL.
    Recently i came across a question in as :
    Write a command to Create proxy client by using .WSDL and set of XSD file.
    Can anyone provide me some pointers as to where i can find more information on this.
    Thank you for your consideration.

    sunjava84 wrote:
    I apologize if i have posted this question in the wrong forum.My question is concerned with WSDL.
    you did. Try http://www.rentacode.com next time.
    Can anyone provide me some pointers as to where i can find more information on this.
    The documentation of any web services client stack.

  • How to create a tree structure using list items(tlist)

    HI every one,
    As we know how to create a tree structure using Hierarchy item type.
    We have a requirement to create The same tree like structure using List Item(Tlist)
    I would be so appreciated If you send with an example
    Thanks
    RangaReddy

    Hi all
    Any one help me please
    Actually our client requirement is creation of tree structure using list item,similar to what we used in oracle Application(FNDSCSGN) form.We did the tree structure using hierarchy tree using Htree and Ftree.It working excelently.For client requirement, we want to use list item.How PJC(Pluggable Java Components) is useful for using list item(Tlist).I can't understand how it is useful.
    Do you have any example please help me.
    Thanks
    RangaReddy

Maybe you are looking for