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]

Similar Messages

  • How to access/invoke Web Service from BPM Process

    The following steps required to attach and invoke web service method from process:
    1) Add a module in the catalog for ex WebServiceMO
    2) Add WebService Catalog component demoWebService in WebServiceMO
    3) Put ur WSDL address in WSDL address field like "http://localhost:8080/test/test?wsdl"
    4) Click next to introspect the web service it will import required files and setting from the url to your project
    5) Now for invoking webservice just call the method for ex.
    @return as String[]
    getTestStringList(TestInterfaceService, out @return : @return)
    logMessage "web service calll result >>"+length(@return)+">>>"+@return[0]
    Here @ return is the return from webservice call.
    this way u can access web service from BPM process.
    Edited by: Anurag Yadav on Jul 17, 2009 2:19 PM

    I have a web service which does not return any value but when I introspect the web service, I have an out parameter to it.. Not sure why?
    For e.g.
    TestServiceListener.addTestNotes(TestNotes : testNotes, out TestNoteResponse : testNoteResponse);
    So here I see an out parameter, but my web-service has no out parameter...
    Any idea why is this happening?

  • How Can I install Web Service on Oracle 11g r1?

    How Can I install Web Service on Oracle 11g r1?

    Hi,
    Is necesary install XDB?
    Because i have executed;
    select * from dba_registry
    where COMP_ID = 'XDB'
    Oracle XML Database
    Regards

  • Process Web Services and BPM Objects

    Hi,
    I try to expose a web service for a specific process (not PAPI-WS) for process creation. Works well but only if I use only simple types like String, etc. as input arguments. But when I try to use an BPM object, I get an error like 'Undefined variable 'arg1''.
    So, is it not possible to use such a process web service using BPM objects as arguments?
    Regards
    Matthias

    Yes it's true but Netbeans uses one of the existing SOAP implementations to do it. I'm almost sure that it uses one of the most popular implementations JAX-WS RI or Axis by default.
    Regards,
    Sławomir Wojtasiak

  • Invoke Web service - WSDL error "Object of type 'System.Int32' cannot be converted to type 'System.UInt64'."

    Hello,
    I'm having a problem when I try to load the WSDL file for the "Invoke Web Service" activity.
    I'm trying to create a connection between Orchestrator 2012 R2 and Cisco Unified CM through a Web Services. When I click the WSDL file and I click the "Format Hint" button appears the following error "Object of type 'System.Int32' can not be
    converted to type 'System.UInt64'."
    The WSDL file that Cisco Unified CM I exported another work tools, tested and working well. In Orchestrator just gives the error.
    Can anyone help with this?
    Thank you
    Rui

    Hi,
    You're going to have to use Get-AzureVM to get your specific VM object and then pipe it into Add-AzureDataDisk. See the examples here:
    http://msdn.microsoft.com/en-us/library/windowsazure/dn495298.aspx
    Don't retire TechNet! -
    (Don't give up yet - 12,575+ strong and growing)

  • How can I synchronize directory service and bpm engine?

    hi,all
    I'm using bpm WL 10.3.1 with papi.
    Now I want to assign role to participant in process.
    I use DirHumanParticipant.setRolesAssignment() and DirHumanParticipant.update() to assign role dynamically.
    But it does not work.
    Actually, when I log in to the webconsole. The role has assigned to the participant.
    but when I log in to the workspace. I cannot find expect task in my work items.
    In the history view I can find it.
    Then I remove the role that i assigned previous and assign again in the webconsole.
    After that I log in to the workspace, now i can get the expect task in my work items.
    I think it need to synchronize between directory service and bpm engine. but I don't how to do it?
    Is there any way to do it with some api?
    thanks
    regards
    kenshin

    Hi!
    Here is how it works:
    1. The engine polls the directory periodically and checks if some changes were made to the participant role assignments.
    The poller frequency is configured on the Process Administrator.
    2. When a change is detected, the engine updates the information on the engine partcipant cache.
    However, if the participant is logged it, the update operation is postponed until the participant logs off.
    3. After checking the directory, the engine directory poller sends a notification to all the PAPI clients (including the Workspace)
    and the workspace side poller updates the participant assignment you see in the workspace.
    The notification mechanism is using the JMS Topic on the JEE version of the BPM.
    - First of all verify you are logged out when you add/remove the role.
    After that, wait 1 minute or the time specified in the Process Admin as the directory poller frequency.
    - Verify the JMS Topic is defined correctly. Check the engine log for any JMS Topic related error.
    Hope it helps.

  • How can I use web service call for edit a report with SSRS in Java Struts2 web application

    Hello im new in SSRS technologie and I would like make web service call at my SSRS server. Is sombody can help me ?
    - What API should I import in my project ? I use Maven can I found this API on Maven repository ?
    - I would like have an sample of code which initialize the ReportingService, do the call and process result.
    We use the SQL Server ReportingService 2008 R2 and currently we made HTTP call like this : http://<ssr_server>/ReportServer/Pages/ReportViewer.aspx?%2fSSRS_OMB%2fMyReport&rs:Command=Render&MyParam=<value>
    Regards

    Hi ombinte,
    SQL Server Reporting Services provides access to the full functionality of the report server through the Report Server Web service. Because the Report Server Web service is an XML Web service which uses Simple Object Access Protocol (SOAP) over Hypertext Transfer
    Protocol (HTTP), any SOAP-aware application or development tool can communicate with the SSRS web service.
    There are three primary ways to develop Reporting Services applications based on the Web service, please see:
    Develop applications using Microsoft Visual Studio and the Microsoft .NET Framework SDK.
    Develop applications using the rs utility (RS.exe), the Reporting Services script environment.
    Develop applications using any SOAP-enabled set of development tools.
    For more information about Report Server Web Service, you can refer to the following document:
    http://technet.microsoft.com/en-us/library/ms152787.aspx
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Web Services with complext objects as method parameters

    Can anyone point me to an example of web services that accept complex objects as parameters, using annotations?
    Appreciate it.

    - For NetBeans related questions, nbusers mailing list is more suited. It is often visited by NetBeans experts.
    http://www.netbeans.org/community/lists/top.html
    ...[email protected]
    The NetBeans users mailing list. General discussion of NetBeans use, this is the place to ask for help and to help others.... (There is a 'Subscribe' button next to the above that you can use to subscribe to the list).
    Can you try posting this question on nbusers list?
    - SJSE 8.1 is based on an older version of NB (NB5.0).
    You should definitely continue with NetBeans, since all development is now being done in NetBeans; all the major JSE modules have been moved to opensource at netbeans.org and are all being developed there. There are as yet no future plans to work on further releases for JSE.
    Please check out http://www.netbeans.org for more details.

  • Invoking web service with customized SOAP Header

    Hi,
    how can I invoke web services from my BPEL process with additional elements in the SOAP Header?
    Regards,
    Piotr

    I don't know if I completely understand your question, but here is an attempt at and answer.
    It place variables in the SOAP Header open the invoke popup, click on the Adapters tab and select the variable that you would like to add into the SOAP header.
    I really hope that helps.
    Chris

  • Exposing Web Services as Callable Objects

    Hello!
    I have SAP NetWeaver 04s SP7. How can I expose Web Services as Callable Objects?
    According to "Exposing Web Services as Callable Objects" (http://help.sap.com/saphelp_nw2004s/helpdata/en/44/4758351fcb1193e10000000a155369/frameset.htm), I should start with choosing type of CO "Service -> Web Service".
    Actually, I haven't this entry in CO type list!
    According to integrate Web Services with GP, this type appeared in SP8. What are the alternatives in SP7?
    "Background execution" and "External service" seem to be the best candidates...
    What is the best solution?
    Thanx in advance!

    Hello, Jan!
    I have SAP NWDS 7.0.07, and I cannot find there an option to create a CAF project. I can create Web service, EJB, Web DynPro, and something else - but not a CAF project. In documentation I did not find the connection points between NWDS and External Services, except some plug-ins.
    Maybe I've misunderstood you, sorry - I'm a newbie in SAP
    Actually, I've made a simple EJB, created a Web service from it, and deployed the WS to portal. Maybe, EJB instead of Web service can be somehow used in CAF?
    I've tried to create a CO of type Composite Application Service, but there was necessary to configure endpoint aliases. I've read the manual "Configuring Endpoint Aliases", but didn't succeed to make one for EJB remote call... I've defined the name, URL (http://<host_of_portal>:<portal_port>), user and pwd - but I've got an exception when tried to use the created alias:
    com.sap.caf.core.gp.servicelocator.exception.MetaModelBrowserException: Exception while trying to get InitialContext. at com.sap.caf.core.gp.servicelocator.CAFMetaModelBrowser.getAllApplications(CAFMetaModelBrowser.java:77) at com.sap.caf.core.gp.ui.backgroundco.admin.VSelect.browseCAFCore(VSelect.java:305) at com.sap.caf.core.gp.ui.backgroundco.admin.VSelect.onActionSelectEptAlias(VSelect.java:750) at com.sap.caf.core.gp.ui.backgroundco.admin.wdp.InternalVSelect.wdInvokeEventHandler(InternalVSelect.java:287) at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87) at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67) at
    Maybe, the easiest way is to upgrade the versions of SAP and NWDS?
    Are there some manuals that could provide me some help about:
    1) creating CAS from the deployed Web service (from its creation in NWDS till its use in CAF, step-by-step)
    2) binding Web Dynpro apps and Web services, using CAF and GP.
    Or maybe I should attend SAP courses?
    I have SAP NetWeaver 04s SP7 and NWDS ver. 7.0.07.
    Sorry for the messy post, I did my best
    Message was edited by:
            Kirill Shepitko

  • How can I invoke the web service manually in websphere?

    Hi
    I've developed a webservice application using Rational Application Developer (RAD). I deployed it in a websphere 6.1 application server, using the administration console to import the war file that I had previously exported with RAD.
    My webservice application is listed in the "Enterprise Applications" section of websphere's administration console as started.
    My question is: how can I invoke the web service manually? Is there some kind of websphere generated webpage that I can use to call it manually?
    I tried http://<server:port>/<contextroot> and http://<server:port>/<contextroot>/<servicename> in a webbrowser, but it doesn't work. Is it possible to invoke the web service manually, or do I need to develop a client?
    Thanks in advance
    Pedro

    Hi Bo Wang,
        Go to the Portal -> System Administration -> System Configuration
                               -> Portal Content folder
                               -> Open Visual Composer folder
        There you can see the Webservice Systems you have created through VC.
    You can delete the unwanted system here.
    Regards,
    Shemim

  • How to invoke web service in web Dynpro for java in CE environment.

    Hi all,
    Currently, I would like to invoke web service to retrieve data and display to the web dynpro. Do you have any sample code which I can reference?
    I am currently using CE7.1 SP3.
    Thank you.

    Hi,
    You need to use Adaptive Web Service Model for that.
    Check the tuorial in the link for accessing web services.
    https://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#16
    Regards
    Pankaj

  • How to invoke web services in sequence in ESB?

    Is there any way to invoke multiple services (web, adapter) in a sequence using only the ESB? (I don't want to bring in BEPL).
    Something like this:
    Read File using File Adapter into schema
    |
    v
    Invoke database adapter to retrieve data and use it to enrich schema
    |
    v
    Invoke web service to retrieve more data and use it to enrich schema
    |
    v
    Send enriched schema to a final web service to perform some operation.
    Thanks in advance.

    From a technical standpoint, all I want to do is move data from point a to endpoints b, c, and d, and then move the reply or the fault from one of endpoints b, c, or d (whichever one the request went to) back to a.
    The "business logic" along the way is at 3 places:
    (1). To enrich the data that's being moved. The enriching data is in a database someplace. The logic that determines what that data is in the database is in the original data (message).
    Something like this:
    //Based on values in the original message, get some row
    If OriginalData.Body.field1 = X and OriginalData.SOAPHeader.field2 = y then retrieve Database.Row Z from the database
    then
    //Enrich the original message with the data from the retrieved row
    OriginalData.Body.field3 = Database.Row Z.field9
    (2). To decide where to move the data, i.e. b, c, or d. The decision to route the data dynamically retrieved from a web service.
    Something like this:
    Rule 1: If OriginalData.Body.field3 = A and OriginalData.SOAPHeader.field1= B then move data to endpoint b.
    Rule 2: Or If OriginalData.Body.field2 = C and OriginalData.SOAPHeader.field4= C then move data to endpoint c.
    Rule 3: Or If OriginalData.Body.field5 = C and OriginalData.SOAPHeader.field6= C then move data to endpoint d.
    ... and more combinations.
    So, send web service the enriched data and it applies rules Rule 1, and it sends back "b". Send web service the enriched data and it applies rules Rule 2, and it sends back "c". Send web service the enriched data and it applies rules Rule 3, and it sends back "d". In this way, adding new rules to the web service lets the customer dynamically "grow" new endpoints.
    (3). To transform the data from the format of point a to one of the formats of endpoints b, c, or d. The decision to transform the schema of the data is taken based on the outcome of the business logic applied in (2) above.
    This is a sample use case that my customer is using to compare Oracle's ESB capabilities with other vendors', and I have to work within specific boundaries.
    So, as I stated in my first post, I cannot use BPEL. All I have to establish is whether Oracle can do this using ESB.

  • How to access .asmx Web Service using JAVA? Newbie

    Hello Experts,
    Currently, I have a project where in I have to access a ,NET web service. It is made of C#. I just want to ask how will I start the accessing process? I made this simple equation on how my project is.
    Java Project + C#.Net Web Service = Integration
    1. Do i need to create a Web Service too for the Java Project? If yes, What are the necessary tools needed for the creation of this Java Web Service?
    2. The .NET Web Service is available online. (It is made by other people).
    3. Based on the equation, what is the equivalent technology for the + sign?
    4. Can you site a concrete example for accessing a web service?
    5. I'm new here. Totally I have no idea where to start.
    6. Thank you experts.
    Edited by: Benedict.Aluan on 05 30, 08 1:38 PM
    Edited by: Benedict.Aluan on 05 30, 08 1:39 PM

    Hello
    Thanks a lot for your help ...
    I am developing simple J2EE based web service client using IBM WSAD 5.1. I have used the following code to call .asmx web service in Java
    String url = "http://www.w3schools.com/webservices/tempconvert.asmx?wsdl";
         String namespace = "http://tempuri.org/";
         name = request.getParameter("txtName");
         try
              System.out.println("In Internet Service");
              ServiceFactory factory = ServiceFactory.newInstance();
              Service serv = factory.createService(new URL(url),new QName(namespace,"TempConvert"));
              System.out.println("Got Service......");
              Call obj = (Call)serv.createCall();
              System.out.println("Got Call......");
              obj.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,"");
              obj.setProperty(Call.OPERATION_STYLE_PROPERTY,"wrapped");
              obj.setTargetEndpointAddress(url);
              obj.setPortTypeName(new QName(namespace,"TempConvertSoap"));
              obj.setOperationName(new QName(namespace,"FahrenheitToCelsius"));
              obj.addParameter("param1",XMLType.XSD_STRING,String.class,ParameterMode.IN);
              obj.setReturnType(XMLType.XSD_STRING);
              System.out.println("Parameters Set.....");
              Object[] params = new Object[]{name};
              k = (String)obj.invoke(params);
              System.out.println("Result: "+k);
         catch(Exception e)
            System.out.println("Exception is : "+e);
        }But this code is throwing exception that
    Invalid Address "http://www.w3schools.com/webservices/tempconvert.asmx?wsdl"I have also tried this URL with Java Proxy. But it showing the same error.
    Plz can u tell me how to access .asmx web service ?
    Waiting 4 reply.

  • Invoking Web Service with PKI Authentication from BPEL process

    Hello --
    I am trying to test calling a Web service utilizing PKI-based authentication from BPEL running under the 10.1.2.0.2 Process Manager. When I access the service from a browser I am prompted for Username and Password the first time. When I attempt to access it from BPEL I receive this error:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
    Is it possible to access this service from BPEL in 10.1.2.0.2? How can I pass the service the required credentials?
    Thank you for your time,
    Paul Camann

    I've gotten past the original error by importing the security certificate of the Web service into my keystore/truststore. I'm also running the process on SOA 10.1.3.1.0. Now when I invoke the Web service from the BPEL process I get this error:
    exception on JaxRpc invoke: HTTP transport error:
    javax.xml.soap.SOAPException: java.security.PrivilegedActionException:
    javax.xml.soap.SOAPException: Bad response: 403 Forbidden
    I've tried passing the credentials every way I can -- partner link properties, Oracle Web Services Manager, whatever -- and still get the same error. I would expect to see a 401 error for problems with credentials, not a 403.
    Any suggestions?
    Thanks for your time.
    Paul Camann

Maybe you are looking for