Calling a Business Service from a Web Template File

I'm attempting to call a Business Service from my .swt
I've tried everything I can think of and can not get this to work for the life of me.
I've looked endlessly for information on this topic to no avail.
the swt call looks something like this:
<swe:case condition="My Business Service Name, My Business Service Method">
</swe:case>
I assume it is something to do with the set-up of my Business Service. Could someone please help me out here or point me to some information on this topic that is actually helpful? (The bookshelf, from what I could find, did not go into setting up the business service for this use at all)

Hi Diz,
I tried doing the same thing by following the steps as mentioned by you. Just to re iterate,
1. Created a DC "Portal Application Standalone" project by the name myservice.
2. Created a portal service inside myservice by the ame AmitsService.
3. Exposed IAmitsService.class in the public part.
4 Build and deployed the DC on server and tested it through an abstract portal component and it worked FINE !!
Now..
5. Created anoter DC of type WebDynPro
6. Added SAP_JTECHS -> epbc.prtapi._api as a "Used DC" with dependency build time and runtime
7. Specified the sharing reference in the properties as PORTAL:sap.com/myservice
8. Tried to reference the service using the following code..
IAmitsService portalservice=(IAmitsService)WDPortalUtils.getServiceReference(IAmitsService.KEY);
9.Build and deployed the DC.
10. When I run the application I am getting the following error
Processing HTTP request to servlet [dispatcher] finished with error.
The error is: com.sap.engine.frame.core.load.SAPNoClassDefFoundError: com/sapportals/portal/prt/service/IService
Exception id: [000D6008418B005C0000002C00000D200004163CE6719E1D]
PLEASE ADVISE

Similar Messages

  • Calling a function module from a Web Template

    Hi,
    I need to call a function module from a web template. Any pointers on how i can do this ? Is this even possible ?
    Thanks
    Shailesh

    Hi Rael,
    We were finally able to call a FM module from the Web. The trick as Heike suggested was to create an ABAP class which inherits from CL_RSR_WWW_HELP_WINDOW. Then you should modify the process_cmd method of this new class in order to call the FM. Now use this class to create a help service. In case you need to pass any parameters to the FM, you will need to pass them as additional parameters while calling the help service.
    An example is below.
    CMD=PROCESS_HELP_WINDOW&HELP_SERVICE=ZBOOKMARKING&TEXT=mytext&URL=myurl
    Where mytext and myurl were the parameters i pass to my FM and ZBOOKMARKING is my help service.
    Thanks a Lot to Heike for his help on this !!
    Shailesh

  • How to call a function module from the Web Template?

    Hi all,
    how can I call a function module from a BI 7.x web template and then show the result of the FM on the web template?
    Many thanks for your hints.
    Regards, Nils

    Hi!
    I am too working on a similar issue.
    Probably this helps:
    Re: Calling a function module from a Web Template
    Regards,
    Sri

  • OSB: Calling MTOM business service from non-MTOM proxy

    Hi,
    it is very easy to call non-MTOM business service from MTOM enabled proxy service, but I don't know how to do it in an opposite way. I have web service proxy (http) with binary data in Base64 in a soap body element and I'd like to call a business service (web service over http again) using MTOM format to send binary data in binary format (and not in Base64 as it is in proxy). Is it possible to somehow decode binary data from Base64 in a proxy service and send them from this proxy to a business service using MTOM?

    I understand the flow you propose, but I don't know how to pass decoded data from Java callout back to message flow. As far as I know I can only return primitives, String and XmlObject, because anything else can't be processed in message flow.Yes you are correct.But you can also return DataSource in java callout. Please http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/pojo.html
    Now the working solution/POC --Tested on my local linux box
    package manoj.javacallout.binary;
    import java.io.BufferedReader;
    import java.io.ByteArrayOutputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import javax.activation.DataSource;
    import javax.mail.util.ByteArrayDataSource;
    import com.sun.org.apache.xml.internal.security.utils.Base64;
    * TODO: I have use sun internal API for decoding for simplicity. You should modify this code with any base64 decoding library
    * Ideally should be using using http://commons.apache.org/downloads/download_codec.cgi
    * @author mneelapu
    public class Util {
         public static DataSource decodeBase64(DataSource ds) throws Exception {
         InputStream in=ds.getInputStream();
         BufferedReader bin = new BufferedReader(new InputStreamReader(in));
         byte[] decodedB64=Base64.decode(bin);
         ByteArrayDataSource decodedDS= new ByteArrayDataSource(decodedB64,"binary/octet-stream");
         return(decodedDS);
    Java Callout to decodeBase64
    Parameters
    javax.activation.DataSource=[ $body/* ]
    Result
    javax.activation.DataSource=response
    Now replace the $body with the decoded base64 response from java callout
    Replace [ node contents ] of [  undefined XPath  ]
    in [ body ] with [ $response ]
    Use $BEA_HOME/modules/javax.mail_1.4.jar for compiling.
    Let me know if this solves your problem.
    Thanks
    Manoj
    Edited by: mneelapu on Apr 20, 2009 3:23 PM

  • Calling Secured Business Service from OSB

    Hi,
    I am trying to call a Service which is secured.
    the Request SOAP message is like :
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns="urn:crmondemand/ws/activity/10/2004"
    xmlns:act="urn:/crmondemand/xml/activity"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    *<soapenv:Header>*
    *     *<wsse:Security>**
    *          *<wsse:UsernameToken>**
    *               *<wsse:Username>USERX</wsse:Username>**
    *               *<wsse:Password type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>**
    **          </wsse:UsernameToken>**
    *     </wsse:Security>*
    *</soapenv:Header>*
    <soapenv:Body>
    ========================
    ========================
    </soapenv:Body>
    </soapenv:Envelope>
    I have created a business service and attached the service to Proxy service.
    I am new to OSB.I am unable to change the header data.In the forums i found couple of responses pointing to create
    Policy file or creating service account which were not clear to me.Dear expert , please guide me what exactly need to be done in this case.
    Thanks in advance,
    Regards,
    Chandra

    hi,
    Finally i have done it with the help of documentation.
    solution is :
    In the service configuration --> Policy -->select OWSM policy bindings (your domain should be configured with OWSM extention))
    select predefined oracle/wss_username_token_client_policy from in the OWSM configuration window
    next login to the em console: http://localhost:7001/em
    In the left hand side pane Go to Weblogic Domain -> select <your domain name>
    In the central pallete Weblogic Domain drop down goto secutiry --> Credentials.
    Here create a map with name : oracle.wsm.security (if not exists)
    Create a key by selecting the map as :oracle.wsm.security
    Key name : Sample_KEY
    Type : password
    Username: The username you are expecting in the soap header
    Password: The password you are expecting in the soap header
    Now go back to your service configuration -> Policy -> select the policy that you have added.
    there you can see the properties button enabled.click on it...
    there for the default_value = basic_credentials give the over_ride value as Sample_KEY (the key name you have mapped to the map)
    Regards,
    Chandra sekhar kommalapati

  • How to make a call  to service from site studio templates?

    Hi,
    May be this is very basic but I am not able to figure out how to make a call to a service from site studio templates (hcsp). I have seen one example of service call in the dynamic list fragment. It makes a call to SS_GET_SEARCH_RESULTS service using executeService() method. But it doesn't take any parameters and also not very how returned results are captured.
    I want to execute WCM_PLACEHOLDER service. It takes 2 main parameters dataFileDocName and templateDocName. The returned result is typically a html response.
    The service typically is executed using http request and the url would be something like this
    http://hd-pratapm/ucm/idcplg?IdcService=WCM_PLACEHOLDER&dataFileDocName=VIRTUSAINC&templateDocName=DETAILS_REGION_TEMPLATE
    I think SS_GET_SEARCH_RESULTS service works in the similar fashion. I want to execute WCM_PLACEHOLDER service too using executeService() method. How to work with this? How can we pass parameters and capture returned results?
    Regards,
    Pratap

    Hey Pratap,
    If you are on a standard Site Studio template (page or subtemplate) you should be able to call the wcmPlaceholder idoc function directly. In fact calling the idoc function provides a lot more functionality then the service call (they locked down a few things in the service call since it is designed to be called from an external application).
    The idoc call would look something like: <!--$wcmPlaceholder("Sales", "placeholderDefinitionDocName=placedef_salescontact")--> (taken from page 208 in this doc: http://download.oracle.com/docs/cd/E10316_01/SiteStudio/10gr4/Pdf/Site_Studio_10gR4_Designer_Guide.pdf)
    As a general note when you are in idoc script and want to execute a service you call <$executeService()$> as you saw in the dynamic list. The parameters that the service runs on are in the data binder of the current request. To set parameters for an execute service you simply set idoc variables on the page before it. Example:
    <!--$QueryText="dDocType <matches> `Document`" -->
    <!--$executeService("GET_SEARCH_RESULTS")-->
    As for the response when you execute an idoc function, like wcmPlaceholder, that returns a String the response is immediately output to the page in the location you called the function. This would be similar in concept to a jsp scriptlet that outputs a string <%=myResponseString%>
    Hope that helps,
    Andy Weaver - Senior Software Consultant
    Fishbowl Solutions < http://www.fishbowlsolutions.com?WT.mc_id=L_Oracle_Consulting_amw_OTN_ECM >
    Edited by: Andy Weaver on Jul 7, 2010 7:59 AM
    Added response detail.

  • How to call business service from xquery transformation in OSB ??

    Hi All,
    How to call business service from xquery transformation in OSB ??
    I need to assign the response variable of Business Service to a target element in XQuery Transformation Mapper file.
    It's urgent.
    Regards,
    Jyoti Nayak

    Transformation is to mapping the source and target of 2 different schemas.
    In your case you should have a XQuery transformation between, your Business Service output schema and the target schema.
    Thanks,
    Vijay

  • Calling a Portal Service from within a Web Dynpro DC

    Hello,
    I am trying to call a Portal Service from within a Web Dynpro development component without sucess.
    Can anyone give me some hints on the necessary steps in order to accomplish this task?
    Thanks
    Diz

    Hi Diz,
    I tried doing the same thing by following the steps as mentioned by you. Just to re iterate,
    1. Created a DC "Portal Application Standalone" project by the name myservice.
    2. Created a portal service inside myservice by the ame AmitsService.
    3. Exposed IAmitsService.class in the public part.
    4 Build and deployed the DC on server and tested it through an abstract portal component and it worked FINE !!
    Now..
    5. Created anoter DC of type WebDynPro
    6. Added SAP_JTECHS -> epbc.prtapi._api as a "Used DC" with dependency build time and runtime
    7. Specified the sharing reference in the properties as PORTAL:sap.com/myservice
    8. Tried to reference the service using the following code..
    IAmitsService portalservice=(IAmitsService)WDPortalUtils.getServiceReference(IAmitsService.KEY);
    9.Build and deployed the DC.
    10. When I run the application I am getting the following error
    Processing HTTP request to servlet [dispatcher] finished with error.
    The error is: com.sap.engine.frame.core.load.SAPNoClassDefFoundError: com/sapportals/portal/prt/service/IService
    Exception id: [000D6008418B005C0000002C00000D200004163CE6719E1D]
    PLEASE ADVISE

  • Calling a Siebel Business Service from an Excel Macro

    Hi Everyone !!
    I have a requirement where i have to call a siebel Business Service from an excel macro. Please help me with the code.
    Regards,
    Abhi

    Here's a starter for one:
    Private Function ConnectToSiebel(sConnectString As String, sUserName As String, sPassword As String, _
    oSiebel As SiebelDataControl) As Boolean
    On Error GoTo ErrorHandler
    ' Uses the specified parameters to connect to the Data Control
    Dim iErrCode As Integer
    Set oSiebel = CreateObject("SiebelDataControl.SiebelDataControl.1")
    oSiebel.Login sConnectString, sUserName, sPassword
    If (oSiebel.GetLastErrCode <> 0) Then GoTo ErrorHandler
    ConnectToSiebel = True
    Exit Function
    ErrorHandler:
    MsgBox oSiebel.GetLastErrCode
    ConnectToSiebel = False
    End Function
    The connect string passed takes the format:
    host="siebel://<SERVER_HOST>/<SERVER_NAME>/PSCcObjMgr_enu"
    You can then use the 'oSiebel' object as if it was the Application(). For example, Set oService = oSiebel.GetBusService("Blah")
    Regards,
    mroshaw

  • Calling an MFL business service from a WSDL proxy service

    Hi,
    I'm using Service Bus v2.6, and trying to call an MFL business service from a wsdl based proxy service.
    I have done the following so far:
    - Define an MFL-based business service that writes MFL messages to a JMS queue and reads reply messages off another queue, and it works when I debug this business service by itself.
    - Define a wsdl proxy service that routes requests to the MFL business service.
    Since the tutorials don't have MFL examples, I'm struggling to get this working. I've tried different ways, but no luck.
    Here's my definition of the route node in the Proxy Service at the moment.
    1. Call a custom XQuery (.xq file) to convert incoming message to an XML representation of the MFL message, and assign the result to a variable "param1"
    2. Use "Service Callout" to call the MFL business service, and set Request Document Variable to "param1" and Response Document Variable to "param2".
    When I debug the flow, param2 (reply) comes up as empty, and I don't know how to make it work.
    I've turned on the JMS trace etc and the JMS bit is working (i.e messages being written, and read by the business service).
    There seems to be something wrong with the way I call it from the proxy service.
    Any help would be much appreciated..
    Thanks

    Hello,
    Can you indicate the classpath that you use to run your client, version of weblogic and the version of jaxrpc api that you are using.
    As a quick experiment adding the jaxrpc jar files to your classpath one at a time.
    This [url http://www.javaworld.com/javaforums/showflat.php?Cat=&Board=Enterprisejava&Number=3801&page=12&view=collapsed&sb=9&o=&fpart=1]chap seemed to have a similar problem to you and solved it by adding the jaxprc-spi jar file to his class path. It may be that the jaxrpc-impl is causing you greif.
    Also see this thread:
    http://forums.bea.com/bea/message.jspa?messageID=200612003&tstart=0
    Hussein Badakhchani
    www.orbism.com

  • Call VC iView from a Web Template.

    Hi Experts,
    I want to Call one of our VC iViews from a Web Template, i.e. When we Click a button or link in a Web Template a window should popup which displays the contents of VC iView.
    Is this Possible? if yes, how can we achieve this? Kindly help.
    Regards,
    Rk.

    Repost

  • Setting JMSPriority on call to Business Service on AquaLogic 2.6 ?

    I have a one-way web service receiving requests on the service bus in a Proxy Service as SOAP/HTTP and sending this further on to as Business Service as SOAP/JMS.
    As part of calling the Business Service, how do I set the JMS priority?
    I am using AquaLogic 2.6. Under the common "Transport Headers" it very much appears to me as if the existing and pre-defined "JMSPriority" does not work - trying to use it leads to a runtime error. I found someone else noting this problem too as an older post - JMS priority transport header This post has some kind of solution too but appears to be aimed at the Proxy Service and not the Business Service.
    So far, all my attempts to set the JMSPriority has failed. Information on the subject appears scarce.
    How do I make my Business Service use a specific JMS priority in its SOAP/JMS call to the actual service?

    Yes, I understand you fully - this selecting the "JMSPriority" from the dropdown is what I meant with the existing and pre-defined setting not working.
    In AquaLogic 2.6. this leads to the same as noted by the other fellow in the older post from 2008 (JMS priority transport header it at runtime results in a transport exception like -
    com.bea.wli.sb.transports.TransportException: java.lang.String
    at com.bea.wli.sb.transports.TransportException.newInstance(TransportException.java:146)
    at com.bea.wli.sb.transports.jms.JmsOutboundMessageContext.setRequestMetaData(JmsOutboundMessageContext.java:220)
    at com.bea.wli.sb.transports.jms.JmsOutboundMessageContext.send(JmsOutboundMessageContext.java:456)
    - and this is where the problem begins. I have tried all sorts of things with little result.
    I have done exactly as you describe.
    The value you assign to the expression in your 11g - does this expression happen to be special in any way?

  • Invoking one web service from another web service

    Hi there,
    I want to invoke a web service lets say X. But befor sending parameters to this web service, what i want to do is first pass the parameters to a web service called Y and Y will decide wether to call X or not. In other words i want to invoke a web service from another web service.
    Its kind of urget so do the needful asap.
    Thanks

    Calling another webservice from within a webservice does not require anything special. The service (say svc1) that calls another service (svc2) will be a web svc client. So you will have to do the same steps for svc1 as you would do for any other web service client

  • Calling a business service based on operation-soap action in Proxy service

    Hi,
    I have a requirement in which I have to call a business service based on operation-soap action defined in Proxy service wsdl.
    Like in below mentioned wsdl GetPartCostDelta and GetCurrencyList operations are there.But which ever operation I select,It just goes to one business service.
    Is there any way,I can route to some another business service based on the soap action
    proxy service WSDL
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ewopcd="urn:com:gm:gpd:schema:ewopartcostdelta" xmlns:gen="urn:com:gm:gpd:schema:genericfault" xmlns:tns="urn:com:gm:gpd:services:ewopartcostdeltaservice" targetNamespace="urn:com:gm:gpd:services:ewopartcostdeltaservice">
         <wsdl:types>
              <xs:schema>
                   <xs:import namespace="urn:com:gm:gpd:schema:ewopartcostdelta" schemaLocation="ewocostdelta.xsd"/>
                   <xs:import namespace="urn:com:gm:gpd:schema:genericfault" schemaLocation="servicefault.xsd"/>
              </xs:schema>
         </wsdl:types>
         <wsdl:message name="EWOCurrencyListRequest">
              <wsdl:part name="CurrencyListRequest" element="ewopcd:EWOCostDeltaInput"/>
         </wsdl:message>     
         <wsdl:message name="EWOCurrencyListResponse">
              <wsdl:part name="CurrencyListResponse" element="ewopcd:EWOCurrencyList"/>
         </wsdl:message>     
         <wsdl:message name="EWOPartCostDeltaRequest">
              <wsdl:part name="PartCostDeltaRequest" element="ewopcd:EWOCostDeltaInput"/>
         </wsdl:message>
         <wsdl:message name="EWOPartCostDeltaResponse">
              <wsdl:part name="PartCostDeltaResponse" element="ewopcd:EWOCostDeltaResult"/>
         </wsdl:message>
         <wsdl:message name="EWOPartCostDeltaServiceFault">
              <wsdl:part name="PartCostDeltaServiceFault" element="gen:ServiceFault"/>
         </wsdl:message>
         <wsdl:portType name="EWOPartCostDeltaPortType">
              <wsdl:operation name="GetCurrencyList">
                   <wsdl:input name="EWOCurrencyListRequest" message="tns:EWOCurrencyListRequest"/>
                   <wsdl:output name="EWOCurrencyListResponse" message="tns:EWOCurrencyListResponse"/>
                   <wsdl:fault name="EWOPartCostDeltaServiceFault" message="tns:EWOPartCostDeltaServiceFault"/>
              </wsdl:operation>
              <wsdl:operation name="GetPartCostDelta">
                   <wsdl:input name="EWOPartCostDeltaRequest" message="tns:EWOPartCostDeltaRequest"/>
                   <wsdl:output name="EWOPartCostDeltaResponse" message="tns:EWOPartCostDeltaResponse"/>
                   <wsdl:fault name="EWOPartCostDeltaServiceFault" message="tns:EWOPartCostDeltaServiceFault"/>
              </wsdl:operation>          
         </wsdl:portType>
         <wsdl:binding name="EWOPartCostDeltaBinding" type="tns:EWOPartCostDeltaPortType">
              <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
              <wsdl:operation name="GetCurrencyList">
                   <soap:operation soapAction="GetCurrencyList" style="document"/>
                   <wsdl:input>
                        <soap:body use="literal"/>
                   </wsdl:input>
                   <wsdl:output>
                        <soap:body use="literal"/>
                   </wsdl:output>
                   <wsdl:fault name="EWOPartCostDeltaServiceFault">
                        <soap:fault name="EWOCostDeltaServiceFault" use="literal"/>
                   </wsdl:fault>
              </wsdl:operation>
                        <wsdl:operation name="GetPartCostDelta">
                   <soap:operation soapAction="GetPartCostDelta" style="document"/>
                   <wsdl:input>
                        <soap:body use="literal"/>
                   </wsdl:input>
                   <wsdl:output>
                        <soap:body use="literal"/>
                   </wsdl:output>
                   <wsdl:fault name="EWOPartCostDeltaServiceFault">
                        <soap:fault name="EWOCostDeltaServiceFault" use="literal"/>
                   </wsdl:fault>
              </wsdl:operation>
         </wsdl:binding>
         <wsdl:service name="EWOPartCostDeltaService">
              <wsdl:port name="EWOPartCostDeltaPort" binding="tns:EWOPartCostDeltaBinding">
                   <soap:address location="https://localhost/EWOPartCostDelta"/>
              </wsdl:port>
         </wsdl:service>
    </wsdl:definitions>

    Did you try using the Operational branching node of OSB?
    You have copy the operation name from the inbound variable and populate the SOAP Header with that value into the SOAPAction tag.I think this will work.
    Thanks,
    Prabu

  • OSB proxy service Calling OSB proxy service from BPEL

    Dear team,
    Wehave a requirement to call a Wsdl based OSB proxy service with sb protocol from SOA Composite from BPEL process.
    We created a wsdl based OSB proxyservice with sb protocol and deployed to OSB development server.
    We tried to export the wsdl and corresponding xsd files. sbconfig.jar got created.
    When we extracted the sbconfig file and placed the wsdl and xsd into the SOA composite.
    When we are trying to create a partnerlink, that OSB proxy service wsdl is not showing up.
    Please suggest.
    How to call OSB proxy service from BPEL..

    Hi,
    Here either you need to change the protocol from 'sb' to http or use the Direct Binding in soa-composite.
    please refer this links:
    Can a business service call a proxy service in OSB
    http://biemond.blogspot.in/2009/03/calling-osb-services-from-bpel.html
    BPEL to OSB using sb transport protocol
    Thanks,

Maybe you are looking for