HTML Client RIA Services implementation question

I would like to use a custom RIA service query as the data source for a browse screen.  The RIA service query will have many (50+) parameters.  The underlying table has 50+ columns so I want to pass in all of the parameters to the RIA service,
execute the query, and return a custom entity that contains only the 5 or 6 columns I want to display as a summary in the browse screen table.  When a user selects a row on the table, they will have the ability to edit the record.  They will also
have the ability to add a new record.  However, in both the add and edit scenarios, I want them to be able to add/update the underlying table, not the RIA entity, which obviously does not contain all of the columns.  The RIA service entity will contain
the Id column of the underlying table so I plan to open the add new and details screens (built on the underlying table) with a custom button passing in the Id value.  Has anyone tried this approach?  Are their any drawbacks? 

Hey Hessc,
I've not actually done this, but the idea came up whilst replying to your post above. I'm convinced it can be done and will work well and will be relatively clean, so here are the steps as I see it:
Create screen properties for each of the 50 params that you would require and create corresponding UI controls as required
In the screen _created event instantiate a new Javascript object that has properties for each of the above 50 params. Assign this object to myapp.MyScreen so that you can access it from any other function in the screen (e.g. myapp.MyScreen.QueryParams =
new {...})
Declare a string screen property that will represent the single RIA query parameter (e.g. RiaParameter)
In the screen _created event hook up change listeners to each of the 50 screen properties and inside each of those listeners you assign the value from the changed screen property to the equivalent myapp.MyScreen.QueryParams property to keep the QueryParams
properties in sync and then serialize the latest version of the myapp.MyScreen.QueryParams to a JSON string and assign it to the screen.RIaParameter property which will cause the query to be refreshed and the JSON parameter to be passed to the RIA query
method in the backend
To add a change handler to each of the 50 screen properties to a) update the javascript object and b) to update the RIA query parameter to refresh the query:
screen.addChangeListener("Parameter1", function (value) {
// assign the screen property value to the javascript object property
myapp.MyScreen.QueryParams.Parameter1 = value;
// serialize javascript object to JSON
var jsonStr = JSON.stringify(myapp.MyScreen.QueryParams);
// update query parameter with JSON string
screen.RiaParameter = jsonStr;
On the C# side you can deserialize the passed JSON string parameter using something like:
http://stackoverflow.com/questions/4535840/deserialize-json-object-into-dynamic-object-using-json-net
Note: To ensure that your query is not refreshed 50 x times when the screen initially loads, you may want put some code in place that will only update the screen.RiaParameter once the screen is totally initialized... perhaps something like a boolean IsInitialized
flag...
Hope this helps.
Regards, Xander. My Blog

Similar Messages

  • Can't edit a RIA service column

    I've created a RIA service. I display it in a Data Grid. I only have one column that I want to be editable (Text Box). There are other columns but all are labels. When I click on the field it turns white then immediately turns gray and can't be edited. I've
    looked online but can't find the solution. I have the [Key] attribute. The Update routine is spelled correctly. I have views elsewhere the have a check box "Is Editable" but there isn't a checkbox for my RIA service entity. I'm stuck!
    DebitFeeMethodValue is the field that should be editable.
    Here is the code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.ServiceModel.DomainServices.Server;
    using System.Data.EntityClient;
    using System.Web.Configuration;
    using System.Configuration;
    using LightSwitchApplication.Implementation;
    namespace FeeRia
    public class EditableConceptDepartmentFeeCreditDebit
    [Key]
    public int DebitDetailId { get; set; }
    public int CreditDetailId { get; set; }
    public int ConceptId { get; set; }
    public string Concept { get; set; }
    public int DepartmentId { get; set; }
    public int Department { get; set; }
    public int ?TaxStateId { get; set; }
    public string TaxStateName { get; set; }
    public string FeeName { get; set; }
    public int FeeMethodId { get; set; }
    public string FeeMethodName { get; set; }
    public int DebitFeeId { get; set; }
    public double DebitFeeMethodValue { get; set; }
    public int? DebitGLAccountId { get; set; }
    public string DebitGLAccount { get; set; }
    public string DebitGLDepartment { get; set; }
    public bool DebitIsDebit { get; set; }
    public int CreditFeeId { get; set; }
    public double CreditFeeMethodValue { get; set; }
    public int? CreditGLAccountId { get; set; }
    public string CreditGLAccount { get; set; }
    public string CreditGLDepartment { get; set; }
    public bool CreditIsDebit { get; set; }
    public class FeeRiaService : DomainService
    // This Context property is code that connects to the LightSwitch database
    #region Database connection
    private SPDCData m_context;
    public SPDCData Context
    get
    if (this.m_context == null)
    return this.m_context;
    #endregion
    [Query(IsDefault = true)]
    public IQueryable<EditableConceptDepartmentFeeCreditDebit> GetAllEditableConceptDepartmentFeeCreditDebits()
    // Get all the Order Details
    IQueryable<EditableConceptDepartmentFeeCreditDebit> colEditableFee = from Fees in this.Context.ConceptDepartmentFeeDebitCredits
    select new EditableConceptDepartmentFeeCreditDebit
    DebitDetailId = Fees.DebitDetailId,
    CreditDetailId = Fees.CreditDetailId,
    ConceptId = Fees.ConceptId,
    Concept = Fees.Concept,
    DepartmentId = Fees.DepartmentId,
    Department = Fees.Department,
    TaxStateId = Fees.TaxStateId,
    TaxStateName = Fees.TaxStateName,
    FeeName = Fees.FeeName,
    FeeMethodId = Fees.FeeMethodId,
    FeeMethodName = Fees.FeeMethodName,
    DebitFeeId = Fees.DebitFeeId,
    DebitFeeMethodValue = Fees.DebitFeeMethodValue,
    DebitGLAccountId = Fees.DebitGLAccountId,
    DebitGLAccount = Fees.DebitGLAccount,
    DebitGLDepartment = Fees.DebitGLDepartment,
    DebitIsDebit = Fees.DebitIsDebit,
    CreditFeeId = Fees.CreditFeeId,
    CreditFeeMethodValue = Fees.CreditFeeMethodValue,
    CreditGLAccountId = Fees.CreditGLAccountId,
    CreditGLAccount = Fees.CreditGLAccount,
    CreditGLDepartment = Fees.CreditGLDepartment,
    CreditIsDebit = Fees.CreditIsDebit
    return colEditableFee;
    // Override the Count method in order for paging to work correctly
    protected override int Count<T>(IQueryable<T> query)
    // Get all the Order Details
    return this.Context.ConceptDepartmentFeeDebitCredits.Count();
    public void UpdateEditableConceptDepartmentFeeCreditDebit(EditableConceptDepartmentFeeCreditDebit objEditableConceptDepartmentFeeCreditDebit)
    Scott Mitchell

    The simple edit screen uses a data grid. What makes the List Detail screen's data grid so it won't edit? Am I wasting time looking for that?
    Scott Mitchell
    Can you show us a screen shot so we know we are talking about the same thing?
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • Problem in writing a client web service from WSDL document

    Hi,
    I wrote a web service using .Net and a WSDL document. I tried after that to generate a client web service using Jdeveloper. but, the methode generated by Jdeveloper (in the stub) does not represente the original methode.
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!--Generated by the Oracle9i JDeveloper Web Services WSDL Generator-->
    <!--Date Created: Fri Aug 09 13:59:52 EDT 2002-->
    <definitions
    name="CreditCard"
    targetNamespace="http://tempuri.org/jdeveloper/generated/CreditCard/CreditCard"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://tempuri.org/jdeveloper/generated/CreditCard/CreditCard"
    xmlns:ns1="http://tempuri.org/jdeveloper/generated/CreditCard/CreditCard/schema">
    <types>
    <schema
    targetNamespace="http://tempuri.org/jdeveloper/generated/CreditCard/CreditCard/schema"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"/>
    </types>
    <message name="Validate0Request">
    <part name="cardNumber" type="xsd:string"/>
    <part name="lngDate" type="xsd:long"/>
    </message>
    <message name="Validate0Response">
    <part name="return" type="xsd:boolean"/>
    </message>
    <portType name="CreditCardPortType">
    <operation name="Validate">
    <input name="Validate0Request" message="tns:Validate0Request"/>
    <output name="Validate0Response" message="tns:Validate0Response"/>
    </operation>
    </portType>
    <binding name="CreditCardBinding" type="tns:CreditCardPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="Validate">
    <soap:operation soapAction="" style="rpc"/>
    <input name="Validate0Request">
    <soap:body use="encoded" namespace="CreditCard.CreditCard" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </input>
    <output name="Validate0Response">
    <soap:body use="encoded" namespace="CreditCard.CreditCard" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </output>
    </operation>
    </binding>
    <service name="CreditCard">
    <port name="CreditCardPort" binding="tns:CreditCardBinding">
    <soap:address location="http://localhost:8888/FirstSample-CreditCard-context-root/CreditCard.CreditCard"/>
    </port>
    </service>
    </definitions>
    Here The methode Validate consume two parameters : string and long
    the generated stub look like :
    public Vector Validate(Element requestElem) throws Exception
    There is some one who have a solution ?
    ---------------------------------------

    My guess is that it is because .NET defaults to generating a document style interface whereas JDeveloper defaults to generating an RPC style interface. The end result is that JDeveloper wraps the document interface in something that looks document like - thus your client. To see how to handle this right now, check out this sample - you have to parse the XML:
    http://otn.oracle.com/tech/webservices/htdocs/series/net/content.html
    In the preview of JDeveloper 9.0.3 which is due quite soon - next few weeks roughly (crossing my fingers) - JDeveloper will wrap .NET document based Web services in a much more elegant wrapper - giving you exactly what you are looking for - a method called Validate rather than a vector of Elements.
    What I don't understand in your sample, however, is that you have WSDL generated from JDeveloper versus WSDL generated from .NET. Did you also do an implementation of the validate method in Java too?
    Mike.

  • Sizing the HTML client's content area above the footer

    As I'm fairly new to the intricacies of the HTML client, I've a simple question with hopefully a simple answer.
    Having designed the following screen (containing a custom scheduling control above a standard LS table) I've found that the footer (class: mssl-footer, data-role: footer) is overlaid on top of the content area (class: mssl-content, data-role: content): -
    As a result, the lower portion of the table is obscured (in the above screen-shot I've adjusted the opacity of the footer to illustrate this overlay).  As a consequence this will make scrolling the table and viewing the entries slightly awkward
    and it looks a bit messy.
    So the question I have is, what's the 'best-practice' approach to avoid this overlay and have the content area stop short just above the footer?
    Any guidance on how to address this would be appreciated.
    Kind regards,
    Chris

    I don't know the answer but I would love to see a sample project that uses this custom control. I need to implement something very similar but am not a developer just and admin trying to use Lightswitch in a small business.
    Hi Dave,
    I've only just noticed your question regarding the scheduling control (as it was posted against a temporary user account I don't monitor) so apologies for the delay in replying.
    The control in the screen-shot is the
    dhtmlxScheduler which works very well with LightSwitch and offers a great set of features.
    Also, for Sergey, we addressed the sizing issue with a change to the msls LightSwitch library as covered in the following post: -
    HTML Client Custom Control Stretch to Container Sizing Bug, Problem?
    HTH,
    Chris

  • Problem with accessing parameter in HTML client, Access is not possible before created.

    I have one Screen in which I set a date.
    I pass the date to another Screen. In this screen I have a tile list showing all the busses and I want to show the current number of orders of the passed date for each bus.
    So I created a custom field in the tile for showing the amount of orders,  and it workes fine for a hardcoded date.
    But I have no access to the passed parameter, because it is to early.
    I get access after Screen.created to the Parameter, but there it is too late, because the list is already created with 0 as order Count.
    myapp.freieBusse.bkz1_render = function (element, contentItem) {
    var querybus = contentItem.value;
    // var querydatum = new Date(); <=== This works fine for today
    var querydatum = screen.queryDatumScreen; <== queryDatumScreen = Null at this Moment.
    myapp.activeDataWorkspace.wksqlData.QueryDispoByDatAndBus(querybus,querydatum).execute().then(function (results) {
    var countDispo = CountDispo(results);
    element.innerHTML = countDispo;
    function CountDispo(disposaetze) {
    var totalDisp = 0;
    var dispos = disposaetze.results;
    dispos.forEach(function (dispo) {
    totalDisp = totalDisp + 1;
    return totalDisp;
    How can I get an eralier Access to the Parameter. Or how can I manipulate the order Count of each row in the created of the Screen?
    Helmut

    The result is as slow that you can count the order with your fingers, but it works.
    If you use a
    WCF RIA Service the result will be fast. The calculations are performed inside SQL server and returned to the LightSwitch client in a single call per page.
    You can also use a Web API call but for a table of data it actually takes a lot of careful JavaScript code and you lose the drag and drop and strong typing in the HTML designer.
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • OAAM web services implementation class for WebSphere 6.1

    Hi All,
    My client is running OAAM 10.1.4.5 and looking to migrate to WebSphere 6.1. I'd like to replace the (default) Apache Axis web services implementation class with a custom-built WebSphere 6.1 implementation class. Does anyone have any code they'd been willing to share?
    Regards,
    Steven

    It is may be because BO is not ready for Java 2 and you can find more info about readyness of applications at
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/csec_rsecmgr2.html
    I am not sure if BO is prepared for the very fine-grain access control programming model that Java 2 security is capable of enforcing.
    May be some one from PG should be able to answer readyness of BO with Java2.
    -Gokul.

  • Issues using WCF RIA Service with CRM Odata endpoint

    Hi,
    We are here trying to build up a simple mock-up with LS and Dynamics Crm and use it as potential platform for enterprise solutions. When we add the datasource(CRM
    odata endpoint) on the Server project everything goes well, we can bind html components with data on the screens, get access to the context through javascript, etc. We are trying to go a bit forward in the architecture, we want to have a server-side layer
    hosting our business logic (WCF RIA Service layer), and we used Michael´s example as base (great post BTW):
    WCF RIA SERVICE using Lightswitch
    In this case, loading the context fails (ContextData Object), we are trying to create that object exactly as the platform does but apparently the connection
    string is not valid (?). This is the code, pretty much the same that MIchael has in his example and the same (apparently) that the platform uses internally:
    string assemblyName = global::System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
    string connString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["MYContextData"].ConnectionString;
    EntityConnectionStringBuilder builder = new EntityConnectionStringBuilder();
    builder.Metadata = "res://" + assemblyName + "/WCF_RIA_MyServiceData.csdl|res://" + assemblyName + "/WCF_RIA_MyServiceData.ssdl|res://" + assemblyName + "/WCF_RIA_MyServiceData.msl";
    builder.Provider = "System.Data.SqlClient";
    builder.ProviderConnectionString = connString;
    this.m_context = new CSMADevContextData(builder.ConnectionString);
    And this is the error:
    {"Keyword not supported: 'service url'."}
    Web config connectionString="Service Url=http://myserver/myCRM/XRMServices/2011/OrganizationData.svc;Is Windows Authentication=True;Allow Invalid Certificate=False" />
    which is weird because we were looking into the GeneratedArtifacts/DataServiceImplementation.cs (platform generated files) and looking at how Ligthswitch
    platform creates the context and apparently is the same code.
    We got a bit stuck on this, any comment will be welcome,
    Cheers.
    Israel

    The connection string that is in my article (that you are trying to adapt for your situation) is for a connection to a Entity Framework data context. It is not for an OData source. I regret that I do not have any good examples :(
    Hopefully someone has a good example.
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • Web service handler could not called in client web service

    Hi All,
    I have two web service ServiceA & ServiceB and both implemented in weblogic.
    The ServiceA is SSL enable and protocol is https which is not published by me.
    The ServieB is my web service(wls8.1) and act as client for ServiceA.
    My problem is when i hit my service, its not able set the handler when it call ServiceA but it is invoking the service and giving application exception like authentication error.
    My service file:
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.HandlerRegistry;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import weblogic.webservice.client.SSLAdapterFactory;
    import weblogic.webservice.client.WLSSLAdapter;
    public class HelloService {
    String wsdl = "https://188.122.123.23/RemoetService?WSDL";
    static {
    SSLAdapterFactory factory = SSLAdapterFactory.getDefaultFactory();
    WLSSLAdapter adapter = (WLSSLAdapter) factory.getSSLAdapter();
    adapter.setTrustedCertificatesFile("D:\\lib\\certs
    cacerts");
    factory.setDefaultAdapter(adapter);
    System.setProperty("weblogic.xml.encryption.verbose","true");
    System.setProperty("weblogic.xml.signature.verbose","true");
    System.setProperty("weblogic.webservice.verbose","true");
    public String sayHello(String user) {
    RemoteService_Impl service = new RemoteService_Impl(wsdl);
    RemotePortType port = service.getRemoteServicePort1();
    String namespace = service.getServiceName()
    .getNamespaceURI();
    QName portName = new QName(namespace,
    "RemoteServicePortType");
    HandlerRegistry reg = service.getHandlerRegistry();
    List handlerList = new ArrayList();
    Map map = new HashMap();
    map.put("Username", "user1");
    map.put("Password", "pwd1");
    HandlerInfo info = new HandlerInfo();
    info.setHandlerClass(WSClientHandler .class);
    info.setHandlerConfig(map);
    handlerList.add(info);
    reg.setHandlerChain(portName,(List)handlerList);
    RemoteServiceResponse = port.callMe(name);
    My Handler file:
    package com.test;
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.Handler;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.MessageContext;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import javax.xml.soap.Name;
    import javax.xml.soap.SOAPElement;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPException;
    import javax.xml.soap.SOAPHeader;
    import javax.xml.soap.SOAPHeaderElement;
    public class WSClientHandler implements Handler {
    private HandlerInfo handlerInfo;
    public WSClientAuthenticateHandler(){}
    public void init(HandlerInfo hi) {
    System.out.println("Handler init");
    handlerInfo = hi;
    public void destroy() {
    System.out.println("Handler destroy method called");
    handlerInfo = null;
    public QName[] getHeaders() {
    System.out.println("Handler Header method called");
    try {
    Map map = handlerInfo.getHandlerConfig();
    QName[] headers = handlerInfo.getHeaders();
    System.out.println(" Config :"+map);
    for(int i=0;i<headers.length;i++) {
    System.out.println(headers.getLocalPart()+" "+
    headers.toString()+" "+headers.getNamespaceURI());
    }catch(Exception e) {
    e.printStackTrace();
    return handlerInfo.getHeaders();
    public boolean handleRequest(MessageContext mc) {
    SOAPMessageContext smc = (SOAPMessageContext) mc;
    System.out.println("Calling handler class.....................");
    try {
    SOAPEnvelope se = smc.getMessage().getSOAPPart().getEnvelope();
    System.out.println("Calling handler class.....................");
    SOAPHeader soapHeader = se.getHeader();
    Name headerName = se.createName("Security","wsse","http://schemas.xmlsoap.org/ws/2002/07/secext");
    SOAPHeaderElement headerElement = soapHeader.addHeaderElement(headerName);
    SOAPElement element = headerElement.addChildElement(se.createName("UsernameToken", "wsse", "http://schemas.xmlsoap.org/ws/2002/07/secext"));
    element.addChildElement(se.createName("Username", "wsse","http://schemas.xmlsoap.org/ws/2002/07/secext")).addTextNode("testuser");
    element.addChildElement(se.createName("Password", "wsse","http://schemas.xmlsoap.org/ws/2002/07/secext")).addTextNode("testpwd");
    System.out.println("Calling handler class.....................");
    System.out.println("** Request: \n "se.toString()"\n");
    }catch(SOAPException e) {
    e.printStackTrace();
    return true;
    /** * Specifies that the SOAP response message be logged to a
    * log file before the
    * * message is sent back to the client application
    * that invoked the Web service.
    public boolean handleResponse(MessageContext mc) {
    System.out.println("Handler Response method called");
    SOAPMessageContext messageContext = (SOAPMessageContext) mc;
    System.out.println("** Response: \n"messageContext.getMessage().toString()"\n");
    return true;
    /** * Specifies that a message be logged to the log file if a SOAP fault is
    * * thrown by the Handler instance.
    public boolean handleFault(MessageContext mc) {
    SOAPMessageContext messageContext = (SOAPMessageContext) mc;
    System.out.println("** Fault: \n"messageContext.getMessage().toString()"\n");
    return true;
    Please need help here.
    Thanks in Advance,
    pps

    I have tested static client calling using handler simple above service and found the issues.
    QName portName = new QName(namespace,
    "*RemoteServicePortType*");
    The above line code has created the issues,becuase in wsdl file ( given similar wsdl file).
    <?xml version="1.0"; encoding="UTF-8"?>
    <definitions name="HelloService"
    targetNamespace="http://www.ecerami.com/wsdl/HelloService.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://www.ecerami.com/wsdl/HelloService.wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <message name="SayHelloRequest">
    <part name="firstName" type="xsd:string"/>
    </message>
    <message name="SayHelloResponse">
    <part name="greeting" type="xsd:string"/>
    </message>
    *<portType name="RemoteServicePortType">*
    <operation name="sayHello">
    <input message="tns:SayHelloRequest"/>
    <output message="tns:SayHelloResponse"/>
    </operation>
    </portType>
    <binding name="Hello_Binding" type="tns:*RemoteServicePortType*">
    <soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="sayHello">
    <soap:operation soapAction="sayHello"/>
    <input>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:examples:helloservice"
    use="encoded"/>
    </input>
    <output>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:examples:helloservice"
    use="encoded"/>
    </output>
    </operation>
    </binding>
    <service name="Hello_Service">
    <port binding="tns:Hello_Binding" name="*RemoteServicePortType1*">
    <soap:address
    location="http://host1:8080/soap/servlet/rpcrouter"/>
    </port>
    <port binding="tns:Hello_Binding" name="*RemoteServicePortType2*">
    <soap:address
    location="http://host2:8080/soap/servlet/rpcrouter"/>
    </port>
    <port binding="tns:Hello_Binding" name="*RemoteServicePortType3*">
    <soap:address
    location="http://host3:8080/soap/servlet/rpcrouter"/>
    </port>
    <port binding="tns:Hello_Binding" name="*RemoteServicePortType4*">
    <soap:address
    location="http://host4:8080/soap/servlet/rpcrouter"/>
    </port>
    </service>
    </definitions>
    From the above WSDL, I have four port name (port binding="tns:Hello_Binding" name="*RemoteServicePortType1*) which is not matching with PortType (portType name="*RemoteServicePortType*")
    even i have iterated from getPorts() method and used to invoke the service.But handler was not calling when i invoke.
    Please guide me here how i specify correct portname which can call Handler class also.
    Thanks in advance,
    pps

  • Web service handler could not registered/called in client web service

    Hi Expert,
    I have two web service ServiceA & ServiceB and both implemented in weblogic.
    The ServiceA is SSL enable and protocol is https which is not published by me.
    The ServieB is my web service(wls8.1) and act as client for ServiceA.
    My problem is when i hit my service, its not able set the handler when it call ServiceA but it is invoking the service and giving application exception like authentication error.
    My service file:
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.HandlerRegistry;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import weblogic.webservice.client.SSLAdapterFactory;
    import weblogic.webservice.client.WLSSLAdapter;
    public class HelloService {
    String wsdl = "https://188.122.123.23/RemoetService?WSDL";
    static     {
              SSLAdapterFactory factory =                SSLAdapterFactory.getDefaultFactory();
              WLSSLAdapter adapter = (WLSSLAdapter)     factory.getSSLAdapter();
              adapter.setTrustedCertificatesFile("D:\\lib\\certs\\cacerts");
              factory.setDefaultAdapter(adapter);
              System.setProperty("weblogic.xml.encryption.verbose","true");
              System.setProperty("weblogic.xml.signature.verbose","true");
              System.setProperty("weblogic.webservice.verbose","true");
         public String sayHello(String user) {
              RemoteService_Impl service = new RemoteService_Impl(wsdl);
              RemotePortType port = service.getRemoteServicePort1();
              String namespace = service.getServiceName()
                        .getNamespaceURI();
              QName portName = new QName(namespace,
                        "RemoteServicePortType");
              HandlerRegistry reg = service.getHandlerRegistry();
              List handlerList = new ArrayList();
              Map map = new HashMap();
              map.put("Username", "user1");
              map.put("Password", "pwd1");
              HandlerInfo info = new HandlerInfo();
              info.setHandlerClass(WSClientHandler .class);
              info.setHandlerConfig(map);
              handlerList.add(info);
              reg.setHandlerChain(portName,(List)handlerList);
              RemoteServiceResponse = port.callMe(name);
    My Handler Class:
    package com.test;
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.Handler;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.MessageContext;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import javax.xml.soap.Name;
    import javax.xml.soap.SOAPElement;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPException;
    import javax.xml.soap.SOAPHeader;
    import javax.xml.soap.SOAPHeaderElement;
    public class WSClientHandler implements Handler {
         private HandlerInfo handlerInfo;
         public WSClientAuthenticateHandler(){}
         public void init(HandlerInfo hi) {   
              System.out.println("Handler init");
              handlerInfo = hi;
         public void destroy() {
              System.out.println("Handler destroy method called");
              handlerInfo = null;
         public QName[] getHeaders() {
              System.out.println("Handler Header method called");
              try     {
                   Map map = handlerInfo.getHandlerConfig();
                   QName[] headers = handlerInfo.getHeaders();
                   System.out.println(" Config :"+map);
                   for(int i=0;i<headers.length;i++)     {
                        System.out.println(headers.getLocalPart()+" "+
                        headers[i].toString()+" "+headers[i].getNamespaceURI());
              }catch(Exception e)     {
                   e.printStackTrace();
              return handlerInfo.getHeaders();
         public boolean handleRequest(MessageContext mc) {   
              SOAPMessageContext smc = (SOAPMessageContext) mc;
              System.out.println("Calling handler class.....................");
              try     {
              SOAPEnvelope se =      smc.getMessage().getSOAPPart().getEnvelope();
              System.out.println("Calling handler class.....................");
         SOAPHeader soapHeader = se.getHeader();
         Name headerName = se.createName("Security","wsse","http://schemas.xmlsoap.org/ws/2002/07/secext");
         SOAPHeaderElement headerElement = soapHeader.addHeaderElement(headerName);
         SOAPElement element = headerElement.addChildElement(se.createName("UsernameToken", "wsse", "http://schemas.xmlsoap.org/ws/2002/07/secext"));
         element.addChildElement(se.createName("Username", "wsse","http://schemas.xmlsoap.org/ws/2002/07/secext")).addTextNode("testuser");
         element.addChildElement(se.createName("Password", "wsse","http://schemas.xmlsoap.org/ws/2002/07/secext")).addTextNode("testpwd");
         System.out.println("Calling handler class.....................");
                   System.out.println("** Request: \n "+se.toString()+"\n");
              }catch(SOAPException e)     {
                   e.printStackTrace();
              return true;
         /** * Specifies that the SOAP response message be logged to a
         * log file before the
         * * message is sent back to the client application
         * that invoked the Web service.
         public boolean handleResponse(MessageContext mc) {  
              System.out.println("Handler Response method called");
              SOAPMessageContext messageContext = (SOAPMessageContext) mc;
              System.out.println("** Response: \n"+messageContext.getMessage().toString()+"\n");
              return true;
         /** * Specifies that a message be logged to the log file if a SOAP fault is
         * * thrown by the Handler instance.
         public boolean handleFault(MessageContext mc) {   
              SOAPMessageContext messageContext = (SOAPMessageContext) mc;
              System.out.println("** Fault: \n"+messageContext.getMessage().toString()+"\n");
              return true;
    Please need help here.
    Thanks in Advance,
    pps

    I have tested static client calling using handler simple above service and found the issues.
    QName portName = new QName(namespace,
    *"RemoteServicePortType");*
    The above line code has created the issues,becuase in wsdl file ( given similar wsdl file).
    <?xml version="1.0"; encoding="UTF-8"?>
    <definitions name="HelloService"
    targetNamespace="http://www.ecerami.com/wsdl/HelloService.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://www.ecerami.com/wsdl/HelloService.wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <message name="SayHelloRequest">
    <part name="firstName" type="xsd:string"/>
    </message>
    <message name="SayHelloResponse">
    <part name="greeting" type="xsd:string"/>
    </message>
    <portType name="*RemoteServicePortType*">
    <operation name="sayHello">
    <input message="tns:SayHelloRequest"/>
    <output message="tns:SayHelloResponse"/>
    </operation>
    </portType>
    <binding name="Hello_Binding" type="tns:*RemoteServicePortType*">
    <soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="sayHello">
    <soap:operation soapAction="sayHello"/>
    <input>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:examples:helloservice"
    use="encoded"/>
    </input>
    <output>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:examples:helloservice"
    use="encoded"/>
    </output>
    </operation>
    </binding>
    <service name="Hello_Service">
    +<port binding="tns:Hello_Binding" name="*RemoteServicePortType1*">+
    +<soap:address+
    location="http://host1:8080/soap/servlet/rpcrouter"/>
    +</port>+
    +<port binding="tns:Hello_Binding" name="*RemoteServicePortType2*">+
    +<soap:address+
    location="http://host2:8080/soap/servlet/rpcrouter"/>
    +</port>+
    +<port binding="tns:Hello_Binding" name="*RemoteServicePortType3*">+
    +<soap:address+
    location="http://host3:8080/soap/servlet/rpcrouter"/>
    +</port>+
    +<port binding="tns:Hello_Binding" name="*RemoteServicePortType4*">+
    +<soap:address+
    location="http://host4:8080/soap/servlet/rpcrouter"/>
    +</port>+
    </service>
    </definitions>
    From the above WSDL, I have four port name (port binding="tns:Hello_Binding" name="*RemoteServicePortType1*) which is not matching with PortType (portType name="*RemoteServicePortType*")
    even i have iterated from getPorts() method and used to invoke the service.But handler was not calling when i invoke.
    Please guide me here how i specify correct portname which can call Handler class also.
    Thanks in advance,
    pps

  • Error During install Exchange 2013 through Powershell on Server 2012 "Mailbox role: Client Access service"

    Dear all
    During install Exchange 2013 through Powershell on Server 2012 I got this error in Mailbox role: Client Access service :
    The following error was generated when "$error.Clear();
    $BEVdirIdentity = $RoleNetBIOSName + "\OWA (Exchange Back End)";
    new-OwaVirtualDirectory -Role Mailbox -WebSiteName "Exchange Back End" -DomainController $RoleDomainController
    set-OwaVirtualdirectory -Identity $BEVdirIdentity -FormsAuthentication:$false -WindowsAuthentication:$true;
    " was run: "An error occurred while creating the IIS virtual directory 'IIS://MONAMBX2.mona.local/W3SVC/2/ROOT/o
    wa' on 'MONAMBX2'.".
    The following error was generated when "$error.Clear();
    $BEVdirIdentity = $RoleNetBIOSName + "\OWA (Exchange Back End)";
    new-OwaVirtualDirectory -Role Mailbox -WebSiteName "Exchange Back End" -DomainController $RoleDomainController
    set-OwaVirtualdirectory -Identity $BEVdirIdentity -FormsAuthentication:$false -WindowsAuthentication:$true;
    " was run: "The operation couldn't be performed because object 'MONAMBX2\OWA (Exchange Back End)' couldn't be fo
    und on 'MonaDc1.mona.local'.".
    Any advice please !!

    I can't answer your question but I had a similar issue when I was trying to move our mailbox database off the C: drive.  Our environment still has an Exchange 2007 server in it and when I was trying to move the database on the 2013 server, I would get
    error messages saying the database does not exist.  It seemed like it was trying to move the database on the 2007 server from the similar error messages that I was getting.  To get around it, I deleted the database and created a new one on the drive
    where we wanted it.
    I discovered this when I was configuring the Antispam settings.  I deleted our 2007 settings, added them to the 2013 shell, the settings appeared on our 2007 server.  The shell on 2013 was making changes to 2007.
    I'm not sure if there is a "Get|Set or New" command that I/we should be using when this happens.  Or maybe my issues will be fixed if I just remove the Exchange 2007 server?  I'm not ready to do that yet because I can't configure the spam filtering
    on 2013 yet with its shell not being able to make the changes that we need.
    I don't know if your environment is in coexistence mode like mine.
    Hopefully someone else out there has an answer or can tell us when/how the shell can make the appropriate changes to the 2013 server.  Does this happen after the 2007 server is removed?

  • Window inheritance problem, implementation question

    This is a multi-part message in MIME format.
    --------------F5AF60803BB8EFA34C8D4288
    Content-Type: multipart/alternative;
    boundary="------------24CDBE5DFBEC0C4205C15C80"
    --------------24CDBE5DFBEC0C4205C15C80
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Hi!
    I have a window inheritance and implementation question. I'm using
    Forte 3.0.J.1.
    I have a super (base) window with a PushButton on it. I want to
    handle the Click event of the button in this super window therefore
    I create an event handler.
    <MyBtn> : PushButton
    I create a sub window inheriting from the previous super window.
    I put some data widgets on it and group all of them (the inherited
    button as well) into a GridField. When I set the mapped type of the grid
    the name of the inherited PushButton widget changes:
    <MainGrid.MyBtn> : PushButton
    When I run the application I get a SystemException with the
    message:
    Attempt to register an event on a NIL object (qqds_C_FieldWidget, 10).
    Traceback:
    SuperWindow.EH at line 0
    SubWindow.Display at line 5
    C++ Method(s)
    UserApp.Run at offset 105
    It is quite understandable that in runtime there is no widget called
    <MyBtn>
    and the event handler of the super class fails.
    But what I don't know : after specifing a mapped type of a GridField why
    changes
    the name of those widgets that haven't got mapped type e.g.: PushButton,
    PictureButton etc.
    How to solve this situation?
    I made a sall example which i send in attachment.
    Thanks for any help and advice in advance...
    Attila Racz Lufthansa Systems
    Hungary
    BUD LSYH
    E-mail: [email protected] .-``'.
    Tel.: (36 1) 431-2910 .` .' Mazsa ter 2-6.
    Fax : (36 1) 431-2977 _.-' '._ H-1107 Budapest,
    Hungary
    --------------24CDBE5DFBEC0C4205C15C80
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    <tt>    Hi!</tt><tt></tt>
    <p><tt>I have a window inheritance and implementation question. I'm using</tt>
    <br><tt>Forte 3.0.J.1.</tt><tt></tt>
    <p><tt>I have a super (base) window with a PushButton on it. I want to</tt>
    <br><tt>handle the Click event of the button in this super window therefore</tt>
    <br><tt>I create an event handler.</tt><tt></tt>
    <p><tt>&lt;MyBtn> : PushButton</tt><tt></tt>
    <p><tt>I create a sub window inheriting from the previous super window.</tt>
    <br><tt>I put some data widgets on it and group all of them (the inherited</tt>
    <br><tt>button as well) into a GridField. When I set the mapped type of
    the grid</tt>
    <br><tt>the name of the inherited PushButton widget changes:</tt><tt></tt>
    <p><tt>&lt;MainGrid.MyBtn> : PushButton</tt><tt></tt>
    <p><tt>When I run the application I get a SystemException with the</tt>
    <br><tt>message:</tt><tt></tt>
    <p><tt>Attempt to register an event on a NIL object  (qqds_C_FieldWidget,
    10).</tt>
    <br><tt>      Traceback:</tt>
    <br><tt>          SuperWindow.EH
    at line 0</tt>
    <br><tt>          SubWindow.Display
    at line 5</tt>
    <br><tt>          C++ Method(s)</tt>
    <br><tt>          UserApp.Run
    at offset 105</tt><tt></tt>
    <p><tt>It is quite understandable that in runtime there is no widget called
    &lt;MyBtn></tt>
    <br><tt>and the event handler of the super class fails.</tt><tt></tt>
    <p><tt>But what I don't know : after specifing a mapped type of a GridField
    why changes</tt>
    <br><tt>the name of those widgets that haven't got mapped type e.g.: PushButton,</tt>
    <br><tt>PictureButton etc.</tt><tt></tt>
    <p><tt>How to solve this situation?</tt>
    <br><tt>I made a sall example which i send in attachment.</tt><tt></tt>
    <p><tt>Thanks for any help and advice in advance...</tt><tt></tt>
    <p><tt>---------------------------------------------------------------------------</tt>
    <br><tt> Attila Racz                                    
    Lufthansa Systems Hungary</tt>
    <br><tt>                                                
    BUD LSYH</tt>
    <br><tt>E-mail: [email protected]      
    .-``'.</tt>
    <br><tt>Tel.: (36 1) 431-2910               
    .`   .'     Mazsa ter 2-6.</tt>
    <br><tt>Fax : (36 1) 431-2977           
    _.-'     '._    H-1107 Budapest, Hungary</tt>
    <br><tt>---------------------------------------------------------------------------</tt>
    <br><tt></tt> </html>
    --------------24CDBE5DFBEC0C4205C15C80--
    --------------F5AF60803BB8EFA34C8D4288
    Content-Type: application/x-zip-compressed;
    name="Inh.zip"
    Content-Transfer-Encoding: base64
    Content-Disposition: inline;
    filename="Inh.zip"
    UEsDBBQAAAAIAAdlGicvhmSHbAUAAFITAAAHAAAASW5oLnBleO1YbW/bNhD+bAP+D/yWDGsN
    Uq9WvQxwHQfx4MSGra7oR0qkYq2yZEhys/z73ZGSLdty0A7rMAyloDfy7rkXUndHBfIpTok/
    n8/INF3LPC6nm23yMU6HvW6vG6dhshOyILdxsU34yyLP/pBhOWyM3OV8I5+z/DN03o9WZLGc
    LyZL/xOZFrM4yHn+Qm7I3Wi2mijEt2/Jyh8tfXI3X34cLW/JeDZarcjtBO7LkT+dP6563SjL
    n3kuCFntAlBFZM8kLsiGb7dSDI+GtzJvIQAhk8fbV0W0afJhuZovT+hOodpoGlhj6PBHjz5Q
    3E0fp8cg7YNNbnI78kfE/7SYtANcGm9iVMYejYYJL4p2d5FYT3tBojzbnEx0/0NRcyBMr7vm
    BdnugiQOCdnIcp2JmmPYOjhN43J4yii/yLQka56KROZkcn/904Ekz0DH8qXX7RRrnktxc82T
    JHu+ydI3JPsi8zwWUr0IGfFdUt5kUYTsnTLnacHDMs5Snnw11yYDBbNvkSPioszjYFc2eKKo
    yaQJlT297s82s5nlmIxiY1zouyO9SJqUUdVv4N2gdTPgcCj1LDqgFCAYMHlRFClyC4gjeGDM
    UO+MucijxuumhQTBgEacKgh63oDVQTFnzRPIClfFrFsNwUAlEw4G4sQZp6HNUS2iFrXh7tQj
    GkITVF6AM9j36WYq6mN/2ACFZCFCGIreRlyXo4OspnfwuOQdJUZroeTbIojwbMjWB6prUYvT
    g/2H5gmcVGDzxBEzNvSO4wxqg04ENLyDWnjqSbnnxF4XDjRvAHCGGrGpbQnXswzXcqTqsQDC
    YMeHspUpW+u5ETCNpmfD1TDAV9KmbIBaqBO1ONhso7su2BxKhNCsh8ZogBConOVEsGY9Fyeq
    uQpcxj3mhXhwEyGovkq8OpI5zMMFzs2BYzim6wJxUJFTxRKGwC6hT4aKkTZARA2FWjCT4aut
    kO1I4+NKhdgIi8SSpufpGCZTQVRAHDZD41miOQmMx9mx34il/0Rk/N+EvY7yZxKnkj9JyPzX
    0NVJoUSA56vLPry6GDINt4ogzPwRMpXFP0ImvRgyQzRP6QrB0xIOczxHWq5rwN1SYQLXQ6vF
    qMnAthzbHbgWBDQGsZZ5kmpnhwctVNixB14Ik214ATVNd6/HSThtWy3KnRiQIdKJI2ZsSgt2
    mGDDhWgHBln6rTkjVBnC6oVcLefq+6h8Ze0ZcWIG6lF5rrnAIdQqPc0aH6LuoHkCRUs+Aojj
    lNSaj4yTfBSGDp46FwHEIR01nOfSr85FB0MgHb2ai/ilXAQQ+OBxvHKFHqiUCTklYt7XZCeA
    eC1BUWapfkfovKQMMJRQtxatVie3TnRgAsOKoQDBxVqrfVrj1GQ8Ok9r9X6hbS+w3ymsJsvf
    p+MJmb//bTJu37G8RtLcc9S7opYtS8tQgxO3MjDWyto61uB9mPj389vz4b/fet0qOe/LgX6V
    w3vdADfKvW4hk6g/38pUbVr0TibJsi2K7mxzmQNZUcoc0179TApMdP39RqfzvJYpKXnxub9a
    70oQkxKRIYf8UxUFOJUKelgJHCdZIbVEGNJKDr+DtViUHExVWmPXd5S8rwC+wdP/Pf8drPjX
    PHi8iW6qgOtsr0Kvq5z1y8PL+zL9FRwRh5+1s5T/Fjwv+7Ps6eEp7y925QzqtuurBti7d0ec
    VZnW9G/1sbZ9jM3fQSBwnG22vIyDOInLlxnwJ1ATUqwZq78N/ssWy8TRYjGbjtXPFRxcSqw8
    Qyg8Gz+SOg9QnMb+OpdcqAF/+UH1T1P44KAUbtJW/6Eeqyq0quvjKxxbleCBOH160FMJBave
    ENwcvoo3dcl+U1f02gvaD2d/zf4CUEsBAhQAFAAAAAgAB2UaJy+GZIdsBQAAUhMAAAcAAAAA
    AAAAAQAgALaBAAAAAEluaC5wZXhQSwUGAAAAAAEAAQA1AAAAkQUAAAAA
    --------------F5AF60803BB8EFA34C8D4288--

    import javax.swing.JOptionPane;
    public class Test{
         public static void main(String[] args)
              String newItem = "Item";
              float newSerial = 4234;
              float newCode = 3424;
              int newBase = 1000;
              boolean YesWarranty = true;
              boolean NoWarranty = true;
              Machinery test1 = new Machinery(newItem, newCode, newSerial, newBase, YesWarranty, NoWarranty);
              JOptionPane.showMessageDialog(null, "Item: " + test1.getItem() + " Serial: " + test1.getSerial() + " Code: " + test1.getCode()
              + " Warranty: " + test1.IncludeWarranty() + " No Warranty: " + test1.ExcludeWarranty()+ " Base: " + test1.getPrice());
    }Tested with this and it seems to be ok?
    Changed my final code too because it seemed to always add the 10% whether YesWarranty was true or false, so made it
              if (TrueWarranty==true) //There is a warranty, it returns the base price plus 10%
                   return (base+((base/100)*10));May have posted here too early if it does work, but there is another part so if ive trouble with that il be back :P
    Edited by: dave_the_bear on 16-Nov-2010 07:17
    Changed base to double and used the *0.1 method

  • Lightswitch HTML Client - Detail picker for each related List Item

    I have a doubt in Lightswitch Html Client application.
    Scenario:
    Suppose i have two tables  "Property" and "PropertyVaues".
    A Property can have many PropertyValues is the relationship between them.
    I want to show the data on screen like below:
    Property List:
    XYZ            [___10____(+)]
    MNO          [___abc____(+)]
    PQR           [___30.5___(+)]
    Xyz  is the list item
    assume [___10____(+)]  is the detail picker of
    PropertyValues which allow to select one value related to
    XYZ Property item, and same for other list items.
    Only Related "PropertyValues" for each list item must be available in the detail picker.
    Please help me out if any one has the solution to solve it.
    Or you can give me any other way to accomplish the above scenario.
    Thanks

    Hello Josh,
    I am implementing it on AddEdit screen.
                      (1)                                              
    (2)                           
    Screen description:
    [Note: Some Images are in my next post]
    1. Image(1) shows the list of properties (GSM, Mill Name, CMS). These Properties have its respective property values in drop down.
    2. When i select any value from the dropdown list (eg. 10 from GSM). the value is assigned to all other drop down.
    [shown in image(3) next post]
    (4) Again when suppose i select value for "Mill Name" Property as "Abc", it is assigned to all other drop down.
    [shown in image(4) next post]
    I want that a property value must be assigned to its respective Property only.
    Please help me on this. Or suggest me another way out to accomplish such scenario.
    Thanks
    Ravi Patel

  • Silverlight 5 and WCF Ria Services Link Visual Studio 2012

    Hi, I have a Visual Studio 2010 Project, I installed Visual Studio 2012 and Opened the Project with VS 2012. I can run the Project without issues but at design time the Web Project is no recognized as a valid reference.
    My Silverlight application has a WCF RIA Services link to this Project. If I switch to Visual Studio 2010 I have not design time errors.
    Why in Visual Studio 2012 my Silverlight 5 Project shows a message indicating the Web Project namespace does not exists?
    Obiously the reference does not exists because is a WCF RIA Services link and VS Should infer the namespace.
    I've notice that the generated code is being created with the right namespace, it's just that Visual Studio 2012 is not recognizing the classes in the generated code.
    Help please.

    Hi,
     You need add web service again for VS-2012. You can see the step by step process
     http://atikpassion.blogspot.com/2013/01/add-service-after-migrating-silverlight.html
    Hope it will help you.
    Regards atik sarker

  • "No service implementation available" with adhoc template in 1.3

    Hello
    I'm trying to use the adhoc template available since 1.3, using "X" global variables for connection name, system, query name and query type ...
    And I systematically get the error message :
    "No service implementation available"
    query could not be loaded
    I know that some have faced this issue and that it's known from many specialists here...
    - I've checked that everything is OK when I don't use the variables and execute the adhoc template app as a standard one (incl. the DSource, everything works well).
    - I've also checked that the olap connection language was not saved (it solved most of the cases described in the community)
    But I still have it.
    Any idea?
    Thanks a lot in advance
    Best Regards

    Hello Karol
    Thanks a lot for your answer.
    In fact it all has to do with events order : datasource manually assigned in designer will be initialized before X parameters evaluation, so if this datasource is an inexisting one, I'll get an error message before X parameters evaluation.
    Understood!
    It's not a problem to manually assign the datasource in designer.
    By the way, if you refer to Michael Howles "making-adhoc-analysis-template-images-and-css-work" document, you have to manually set at least the datasource connection, whether or not it is replaced at run time by XSYSTEM parameter, to make the template work on BI platform.
    So it works with a manually assigned query, as soon as this query exists : OK it's useless in case of X parameters usage, as this query will be initialized and immediately replaced by the one defined in the XQUERY parameter, but it works. It was not working for me (no effect from X parameters) because the manually assigned query was wrong and execution was some kinda stopped after the error message.
    Question)
    Finally, this template doesn't work for me (same error message : no service implementation available) if I use the system alias in the XSYSTEM parameter (for example "B73"). It works only if I use the cuid of the OLAP connection defined in the CMC (...&XSYSTEM=cuid:AUoUxgljSKNFkFeselrOJ1Q&XQUERY=DSTUDIO_DASH_4&XTYPE=BW). When I look at the adhoc template start up script :
    DS_1.assignDataSource(XSYSTEM, DataSourceType.QUERY, XQUERY);
    the assigndatasource method first parameter is supposed to be set with that kind of cuid : even if the contextual help describes a "Q99" parameter as an example - i.e. the connection name - in fact it doesn't accept this "name" format ; furthermore, using the wizard leads to a cuid anyway!
    DS_1.assignDataSource("cuid:AUoUxgljSKNFkFeselrOJ1Q", DataSourceType.QUERY, "DSTUDIO_DASH_4");
    I guess it's not normal, because both contextual help, documentation and tutorial (where "HBW" is used as XSYSTEM parameter) would then be wrong, and because this template would not be user friendly at all, if cuid were mandatory, as no one knows them by heart.
    So where did I go wrong? Do you have any idea why I can't use connection alias ?
    Thanks in advance,
    Regards
    Rémi
    DS 1.3 SP0, BI Platform

  • Web Service Implementation Heavily Based on The Singleton Pattern

    Dear all
    I have recently joined a project that is 2/3 through development of a medium sized application providing synchronous and asynchronous implementations for a number of Use Cases exposed as Web Services. The design is one that I have not come across before and am keen to understand.
    Web Service calls enter the application through a singleton, which in other respects is a POJO. This class manages a number of instance variable references to other classes responsible for implementing each Web Service method, including data access using Hibernate. Since the top level singleton class is, well, a singleton, I understand this to mean that all of the other classes maintained as instance variables will themselves only ever have one object instantiated (assuming of course that no other thread of execution instantiates them except our singleton WS entry point). To my way of thinking this turns the whole of the Web Service implementation into a kind of singleton application. This strikes me as a procedural programming idiom that happens to be implemented using Java, since Objects with state are not being used. I have not yet asked the question "why?" of my new colleagues but I would like to ask you what the consequences of this design are likely to be. Particularly considering that this application will be expected to handle concurrent servicing of Web Service requests - and so be thread-safe. Can it be thread safe? Are there likely performance implications? Forgive my ignorance is what I describe known as a Singleton Web Service?
    Regards
    David

    Web Service calls enter the application through a
    singleton, which in other respects is a POJO. I'm confused about this sentence. Is the application somehow separate from the web service? Is the application acting as a service to this web service? How is the application being hosted? Does it run in a container as well?
    This
    class manages a number of instance variable
    references to other classes responsible for
    implementing each Web Service method, including data
    access using Hibernate. If all the references are stateless, preferably interfaced-based, you aren't likely to have thread issues.
    Since the top level
    singleton class is, well, a singleton, I understand
    this to mean that all of the other classes maintained
    as instance variables will themselves only ever have
    one object instantiated (assuming of course that no
    other thread of execution instantiates them except
    our singleton WS entry point). To my way of thinking
    this turns the whole of the Web Service
    implementation into a kind of singleton application.You keep using web service and application. Are we just talking about a web service implementation here?
    This strikes me as a procedural programming idiom
    that happens to be implemented using Java, since
    Objects with state are not being used. You are correct, sir. If services are stateless, and they should be, then they aren't exactly rich objects with state and behavior. It's very procedural, indeed.
    I have not
    yet asked the question "why?" of my new colleagues
    but I would like to ask you what the consequences of
    this design are likely to be. Particularly
    considering that this application will be expected
    to handle concurrent servicing of Web Service
    requests - and so be thread-safe. Can it be thread
    safe? If the web service is indeed stateless, then it should be thread-safe.
    Are there likely performance implications?Maybe. Best to measure if those arise to see if the web service is the cause.
    Forgive my ignorance is what I describe known as a
    Singleton Web Service?I don't know if it's been given a pattern name. If it's a Singleton, then that's true. If it's a service, that applies. If it's deployed on the web, I'd say the label fits.
    %

Maybe you are looking for

  • How to extract multiple rows from a query and how to populate it in form.

    hi all, i want to populate multiple rows fetched from a cursor into form. i write this procedur. PROCEDURE populate_q (v_t_no IN number) IS cursor ext_q is select test_question.no, q_no, text, ans1 from test_question , question where test_question.no

  • TV@anywhere master huge problem

    I have the TV@anywhere master and when i am changing the channel ( after a few times) the comp friezes

  • Action script 3 and adding code to buttons

    When I open a new doc and selct action script 3 it won't allow me to insert code by selcting the button on the stage. It does if I select action script 2. All my old pages update ok but if I make new buttons it wont take the code. CAn someone tell me

  • Updated to 3.0, Won't send MMS messages?

    I recently updated my iPhone to the 3.0 software and under my ROGERS iPhone value pack it tells me i get unlimited MMS messages but right now I am unable to send MMS messages. My phone tells me that it has sent them but 3 of my friends who all have i

  • WLS 6.1 SP2 console will not start

    NT4 sp6 weblogic 6.1 sp2 MS IE 6.0.26 Hi, I can not start the weblogic console when running 6.1 sp2. I have gone back to the original mydomain as installed and I still can't start the console. The browser attempts to load the console but hangs and th