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

Similar Messages

  • How can i discover a method in a web service as scom object

    i have created a wcf service and i have different methods in that web service, i need to discover every method  using scom management pack and show that the data returned by those methods as scom data ,health state ,performance view etc.
    how can i get started with that.
    i have  powershell script to  get that data but how do i add them as classes and objects in the scom
    Thanks & Regards, Suresh Gaddam

    Hi,
    First of all you should think about which classes you need. If you are new to Management Pack Development you should enjoy the MP Development Video Series on Channel 9
    http://channel9.msdn.com/Series/System-Center-2012-R2-Operations-Manager-Management-Packs
    If you already have a script to get the information you need and have already designed you classes you can create a Powershell.Discovery.Script to discover the data to SCOM. Have a look on Modul 11 in the Video Series.
    Cheers,
    Christoph
    Blog: http://blog.cmaresch.at/  Twitter:
      LinkedIn:
      XING:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • 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?

  • How to create a generic method?

    Hi,
      I am using a std task TS01200205 to create instance for a BOR object. There are 2 key fields. I want to pass these 2 to the ObjectKey field.
    As for as I know, we have to concatenate these two Keyfields and assign it to 'Object Key' parameter.
      How can I concatenate the 2 strings in my Workflow? Is there any std way of doing it?
    Also what is a generic method? How to create it? Can I make use of generic method to achieve this?
    Thanks,
    Sivagami

    If you want to use it in different workflows the best solution is probably to define an interface and define and implement the method there (a nice thing about BOR interfaces is that you can provide an implementation and not just the definition).
    All you then need to do is let your object type(s) implement that interface, which only requires adding the interface since the implementation has been done already.
    However, I am not saying this is a good way of approaching things, I'm just telling you how you can implement what you suggest.

  • 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 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());
         }

  • 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.

  • [ALBPM-5.7] - How to use the result of a invoked web service?

    Using PBL I wrote the following piece of code:
    ........some rows........
    request as Ex1_WebServices.Ph.GetSuperiorRequest2
    response as Ex1_WebServices.Ph.GetSuperiorResponse2
    lm as MyPrj.LineManager
    request.alias = "danieas"
    getSuperior PeopleHierarchyNavigatorService
    using getSuperiorRequest = request
    returning response = superiorResponse
    if response is not null then
    lm.firstname = String(response.people.person.firstname)
    lm.lastname = String(response.people.person.lastname)
    else
    logMessage "response is null" using severity = DEBUG
    end
    the service is correctly called and the right answer is received:
    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header />
    <SOAP-ENV:Body>
    <tns:people xmlns:tns="http://ws1.example.com">
    <tns:person>
    <tns:deptNumber>1111111111111</tns:deptNumber>
    <tns:unit>16</tns:unit>
    <tns:team>49</tns:team>
    <tns:email>[email protected]</tns:email>
    <tns:firstname>Franz</tns:firstname>
    <tns:lastname>PAGNOTTA</tns:lastname>
    </tns:person>
    </tns:people>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    anyway
    lm.firstname = String(response.people.person.firstname)
    fails reporting the following stacktrace:
    Null reference found in 'response.people'. The expected type was 'ROQ_WebServices.Ph.ListOfPeople'.
    fuego.compiler.NullReferenceException: Null reference found in 'response.people'. The expected type was 'ROQ_WebServices.Ph.ListOfPeople'.
         at fuego.compiler.MemberReference.run(MemberReference.java:553)
         at fuego.compiler.Node.value(Node.java:2279)
    Anybody can help?

    A partial solution
    The real answer is:
    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header />
    <SOAP-ENV:Body>
    <ns1:people xmlns:ns1="http://ws1.example.com">
    <ns1:person>
    <ns1:deptNumber>1111111111111</ns1:deptNumber>
    <ns1:unit>16</ns1:unit>
    <ns1:team>49</ns1:team>
    <ns1:email>[email protected]</ns1:email>
    <ns1:firstname>Franz</ns1:firstname>
    <ns1:lastname>PAGNOTTA</ns1:lastname>
    </ns1:person>
    </ns1:people>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    instead of
    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header />
    <SOAP-ENV:Body>
    <tns:people xmlns:tns="http://ws1.example.com">
    <tns:person>
    <tns:deptNumber>1111111111111</tns:deptNumber>
    <tns:unit>16</tns:unit>
    <tns:team>49</tns:team>
    <tns:email>[email protected]</tns:email>
    <tns:firstname>Franz</tns:firstname>
    <tns:lastname>PAGNOTTA</tns:lastname>
    </tns:person>
    </tns:people>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    that is there is ns1 instead of tns as name prefix (I see it by the debugger).
    To get out a string, for example the lastname, an Xpath expression can be used:
    "/ns1:people/ns1:person/ns1:lastname"
    that put into BPL becomes:
    selectString(response, xpath : "/ns1:people/ns1:person/ns1:lastname")
    but to write this code I can only figure out that BPM substituted tns with ns1 in other words noone garantee that the prefix will be always ns1.
    Is there a way to get it out by a program?

  • 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 access Portal Logged in user in Web Service application

    Hi Experts,
    I have created one Deployable Proxy and based on that i have created Web Based (WAR) project. to consume the proxy i have created Servlet based java file which invokes Web services. Based on this WAR project i created EAR application which deploys on J2EE server.
    I am facing issue while accessing Portal Logged in user in my Servlet Class in WAR project so can  you please provide inputs for how we can access Portal Logged in user in our Servlet class? also how we can access LDAP detailes of portal Logged inuser ?
    I tried to fetch the Logged in user from servlet request but i can't access it giving me null value. Following is the method details that i am using in my servlet.
    protected void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException                
    IUser user = UMFactory.getAuthenticator().getLoggedInUser();
    String strName = user.getFirstName();
             If I checked in LDAP values First name for logged in user is present but in my code its giving Null value.
    Can you please provide your inputs on above issue.
    Regards,
    Rahul

    have you found a solution this problem yet?

  • How can I invoke web service in BPM Object's method?

    In ALBPM 5.7,AJaX can code by Call BPM Object's method.So I want to invoke web service via AJaX by BPM method.
    My sample code is:
    1: HelloWorldWebService ws = HelloWorldWebService();
    2: String param = "John";
    3: String retresult = "";
    4: ws.sayHello(name : parame; out result : retresult);
    and,I have import HelloWorldWebService by wsdl into catalog.
    In fact,at line 1 there is a error(fuego.connector.ConnectorRuntimeException: session is not started). Web service's instance is not created.
    Anybody can help me? thanks.

    Hi,
    I tried calling a simple webservice deployed in weblogic 8.1(see code) and it was working fine for me.
    Code for WS
    package service;
    import com.bea.control.JwsContext;
    import com.bea.jws.Protocol;
    import org.xmlsoap.schemas.soap.envelope.HeaderDocument;
    import com.bea.xml.XmlException;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    public class CheckCredit implements com.bea.jws.WebService
    * @common:context
    JwsContext context;
    static final long serialVersionUID = 1L;
    * @common:operation
    * @jws:protocol form-get="false" form-post="false"
    public boolean getCreditRating(String cardNumber)
    System.out.println("Card number is: " + cardNumber );
    boolean result = ((int)(Math.random() *100)) % 2 == 0?true:false;
    return result;
    Code from ALBPM Object method
    creditRatingResult as Bool
    getCreditRating CheckCreditService
    using cardNumber = "1234-5567-4667-4566"
    returning creditRatingResult = creditRatingResult
    logMessage "Result is: " + creditRatingResult
    What I suggest for you problem is:
    1. Check the server on which you have deployed the WS. Does it require any sort of authentication prior to connecting to the WS
    2. It seems you are using Java style in ALBPM. Try switching to PBL. I don't know how it makes a difference, but sometimes it helps
    Thanks and Regards
    Vivek Nandey
    BEA Certified Developer for Integration Solutions
    [email protected]

  • How to create the SWF file which was included surrogate pairs.

    I would like to make sure how to create the SWF file which are included surrogate pairs.
    The error of outside the scope of unicode occurred when I compiled(mxmlc) the as file which was set surrogate pairs to 'Unicoderange'.
    Ex, I set the '  '(UTF-16 is '20B9F') to 'Unicoderange'.
    However, I cannot add the surrogate pairs.
    The error of outside the scope of Unicode occurred when I compiled the AS file.
    The reason of error was that the Unicode(UTF-16) of surrogate pairs is invalid.
    Then, I read the following pages.
    These pages are written that unicode-range supported surrogate pairs.
    http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_07.html
    http://www.w3.org/TR/1998/REC-CSS2-19980512/fonts.html#descdef-unicode -range
    So please let me know how to create the SWF file which are included surrogate pairs.
    Environment
    - Flex3.5a
    - TTC: meiryo(ver6.02), msgothic(ver2.50), mspgothic(ver2.50)
    Thanks,
    Takeshi Ishihara.

    I've been able to create project jar files in Eclipse by selecting Export from the File menu, then choose Java - Jar file - and provide the required information, name, destination folder etc. But when I do this, I do not export other jars on the build path this way nor do I expect to do this. I am only concerned with creating a jar file of my own work. A jar file does not "contain" other jar files. If the jar file contains the main method, and requires other jars for it's execution, then you may wish to include a reference to required jars on the class path entry of the Manifest file of the jar file you create. I'm not sure how to create a Manifest file in eclipse though..

  • How to create a user  y which will have the same content of existing user x

    how to create a user y which will have the same content of existing user x ,
    like all the tables,procedures,functions and packages

    You can do the following.
    1. Use CREATE USER to create the new account/schema
    2. Use exp to export old schema
    3 Use imp with fromuser=<old user> and touser=<newuser>

  • How to create the generic extractors in sap R/3?,pabitra

    Hi,
         How to create the generic extractors in sap R/3?
    Though it comes under cross application and the types of generic extractors are functional module ,db view,infoset query etc.Do u think the g.e can be built of one of the is types.plz tell correctly
    Advance thanks
    regards
    pabitra

    Hi,
    this is for DB view ,
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
    this is for infoset query,
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/cb43b2455611d189710000e8322d00/frameset.htm
    Good day,
    regards
    Arun

  • How to create a Z* table which can maintain through SM30?

    How to create a Z* table which can maintain through SM30? Thanks!

    This question had been asked millions of times...you just need to search the forums...
    Quick hint...goto SE11...the utilities menu and then Table Maintenance Generator.
    Greetings,
    Blag.

Maybe you are looking for