JEE5: Calling a JAX - WS WebService EJB3

Hello

I'm calling a local ejb3 since a JAX - WS. (I get a null pointer exception)
I am able to call from a servlet ejb3 (works of annotation @EJB and the container injects the ejb).

It seems that the injection does not work in a JAX - WS webservice.
It seems that my only option is to call the ejb using jndi.

How can I accomplished this? I don't see local ejb3 in the jndi tree. I don't see the ejb3 distance.

My EJB implements only the local interface.
I really want to add a mapped name and a remote interface, as I already have 200 EJB3.

Any ideas?

Hello

Well, according to the specifications, you can use the injection at the start of a servlet or an another EJB.
If you want to call your EJB from the JAX - WS webservice, I'm afraid you will have to rely on the mechanism of comp/approx.

That is what you call "mappedName"?

If this isn't the case, I explained to him how an EJB provided by a context loca on my blog:
http://m-button.blogspot.com/2008/07/reminder-on-how-to-use-EJB3-with.html

Search for it "part two: call the EJB from the POJO" section.
The mechanism is the same.

I hope this will help.

Kind regards.

Published by: m on October 8, 2008 17:02

Tags: Fusion Middleware

Similar Questions

  • Set when you call WS thru ADF webservice SOAP header element data control

    Experts,

    I'm trying to call/call a webservice (using the command of ADF data web service) awaits the element in the SOAP header. I want to know the steps required to define the custom SOAP header when using ADF data control web service. Custom SOAP header element will be of type string, something like
    < soap: Header > < element1 > String < / element1 > < / soap: Header >

    Thank you
    Ashish

    Hello

    extend the SOAPProvider class

    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPException;
    import javax.xml.soap.SOAPMessage;
    
    import oracle.adf.model.adapter.AdapterException;
    
    import oracle.adfinternal.model.adapter.webservice.provider.soap.SOAPProvider;
    
    public class CustomSOAProvider extends SOAPProvider {
        public CustomSOAProvider() {
            super();
        }
    
        //expose protected method to public
    
        public void handleRequest(SOAPMessage soapMessage) throws AdapterException {
    
            super.handleRequest(soapMessage);
        }
    
        //Expose protetcted method to public
    
        public void handleResponse(SOAPMessage soapMessage) throws AdapterException {
    
            super.handleResponse(soapMessage);
        }
    

    And configure it in the file DataControls.dcx to your WS DC project


    ...
    xmlns = "http://xmlns.oracle.com/adfm/datacontrol" >


    name = "..." "version ="1.0 ".
    Provider = "ADF. Sample.wsdc.CustomSOAProvider ".
    WSDL = "http:/ /...". ">
    ...

    Frank

  • JAX - RPC, Webservice and the dateTime type elusive everything

    I need to interface with a web service. I have no control over it, so I can't change the WSDL, the server, or something similar.

    One of the types of data used is xsd: DateTime, a guy who according to it (table 1, JAX - RPC support for data types), is not supported on J2ME. Of my research (on this forum and on the Internet), person doesn't use any date/time/dateTime any form or is ordered to change their WSDL so it it does not use if they intend to use a client on J2ME.

    If anyone has a clue on how to use it, because I said, I have no control over the server or the WSDL. Would be his replacement formatted by a string in the work in an appropriate manner or the JAX - RPC system would say it's the wrong type?

    I used wscompile to get static stubs for the service, I can't compile without figure this (Type has only primitive types, 'UNKNOWN' what wscompile replaces the unsupported types is not cutting it for obvious reasons). Temporarily, I've replaced 'UNKNOWN' with Type.STRING but I don't know if it will work (that's why I asked).

    OK, the base64Binary Type I used was Type.STRING. Then I just ran through the Base64InputStream.decode that does the job. I realized that two types do not work (wscompile is good for a general idea of how a web service must be implemented but horrible to the actual implementation) so I need to rewrite much of the code and decided to rewrite it so that it works better and is more clean.

    Thanks for the help.

    EDIT:

    It was also the help function, I used to convert a string to a timetable so that it works with the web service:

    public static String toSOAPString(Calendar cal)
    {
        if(cal == null)
        {
            return null;
        }
        StringBuffer buf = new StringBuffer();
    
        //Get format
        new SimpleDateFormat("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS").format(cal, buf, null);
        buf.append("0000");
    
        //Timezone
        String zoneID = cal.getTimeZone().getID();
        int index = zoneID.indexOf('-');
        if(index == -1)
        {
            index = zoneID.indexOf('+');
            /* If no timezone offset exists, it isn't needed
            if(index == -1)
            {
                buf.append("+00:00");
            }
            */
        }
        if(index != -1)
        {
            buf.append(zoneID.substring(index + 1));
        }
        return buf.toString();
    }
    
  • How to call several individual BPEL webservices of the only mediator?


    Hi all

    I have 3 Web Services BPEL and WSDL and endpoint 3 files. But asked to provide only one of client endpoint and WSDL. Is it possible to call all the Web Services BPEL of the only mediator.

    BR,

    Hari

    Hi Hari,

    Yes, do. Each WSDL is itself a stand-alone service, and will have its own namespace and request/response messages.

    As mentioned earlier, you need to come with a new WSDL that will have the same structures of request/response message from all your files, WSDL and the mediator, it would be a pass through the transformations based on the operation. It will be useful.

  • Facing problem when calling a JAX WS WSDL

    Hello

    I have a simple JAVA WS, deployed on a server and I want to call from ODI, the JAVA class takes some input as an input parameter and writes data in the DB.

    I did not use any explicit XSD for the design of the WS, WS has of its own inline schema.

    " definitions targetNamespace = ' http://ws.test.com/ "name ="TestWSService"' > < types > < xsd: Schema > < namespace XSD: import =" " http://ws.test.com/ "schemaLocation =" " http://localhost:7001 / Test-context-root/TestPort? xsd = 1 "/ > < / xsd: Schema > < / types > .


    When I use by clicking Connect to WSDL of OdiInvokeWebService the editor of advance tool, it gives an error as ODI-20362: unable to connect to the web Service, in the detailed description, it is showing as

    "This URL points to a valid WSDL"

    I don't get why I get this error, any help is much appreciated.

    Thank you.

    This problem is solved.

    I just changed the IP address of the WSDL for the host name where the server is installed.

    If it does not work with the IP address, change your host name and click Connect to the WSDL button in the Advanced section in the tool OdiInvokeWebService.

    Thank you all for sharing of relevant documents.

  • JAX - WS WebService on a PL/SQL Package

    Hello
    Does anyone know how to create a Web service from JAX - WS based on a package of pl - sql using JDeveloper 11.1.1.3. This is what JDeveloper cannot consume the wizard generated JAX - RPC style web service based on a PL/SQL package.


    Thank you

    Another question, we can create or have you already tried to create a Web service in the EOs or your at least their implementations of java.

    Service enable your application module and expose the methods you like of your. Read the doc here http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcextservices.htm#CJAJGIEB

    Timo

  • How call JAX - WS service db

    Hello

    I'm new to JDeveloper and I'm having a few problems when calling a jax - ws a function within the db. To ensure that the problem is not my jax - ws, I have implemented a simple jax - ws based on JDeveloper tutorials to test and have found the same problem. However, if I call this same jax - ws monitor JDeveloper of Altova or simply call using a web browser, the w - jax is behaving properly?

    JAX - ws contains only a single class. I made use of the JDeveloper to generate the jax - ws. Please see the class and the methods below.

    I've also included below the wsdl for this same jax - ws also generated through JDeveloper.

    And the last quotation is the function that calls the method of the 'sayHello' in the db class.


    The function db is the use of the SOAP_API according to the http://www.oracle-base.com/dba/miscellaneous/soap_api.sql


    Function of the error I get when you call the db is:

    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00249: invalid external ID declaration
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 48
    ORA-06512: at "MET.SOAP_API", line 153
    ORA-06512: at "MET.AA", line 32
    31011. 00000 -  "XML parsing failed"
    *Cause:    XML parser returned an error while trying to parse the document.
    *Action:   Check if the document to be parsed is valid.
    
    

    = The code around line 153 SOAP_API: =.


    FUNCTION invoke(p_request IN OUT NOCOPY  t_request,
                    p_url     IN             VARCHAR2,
                    p_action  IN             VARCHAR2)
      RETURN t_response AS
    -- ---------------------------------------------------------------------
      l_envelope       VARCHAR2(32767);
      l_http_request   UTL_HTTP.req;
      l_http_response  UTL_HTTP.resp;
      l_response       t_response;
    BEGIN
      generate_envelope(p_request, l_envelope);
      show_envelope(l_envelope, 'Request');
      l_http_request := UTL_HTTP.begin_request(p_url, 'POST','HTTP/1.1');
      UTL_HTTP.set_header(l_http_request, 'Content-Type', 'text/xml');
      UTL_HTTP.set_header(l_http_request, 'Content-Length', LENGTH(l_envelope));
      UTL_HTTP.set_header(l_http_request, 'SOAPAction', p_action);
      UTL_HTTP.write_text(l_http_request, l_envelope);
      l_http_response := UTL_HTTP.get_response(l_http_request);
      UTL_HTTP.read_text(l_http_response, l_envelope);
      UTL_HTTP.end_response(l_http_response);
      show_envelope(l_envelope, 'Response');
      l_response.doc := XMLTYPE.createxml(l_envelope); -- <<<<<<<<<< Line 153
      l_response.envelope_tag := p_request.envelope_tag;
      l_response.doc := l_response.doc.extract('/'||l_response.envelope_tag||':Envelope/'||l_response.envelope_tag||':Body/child::node()',
                                               'xmlns:'||l_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/"');
      check_fault(l_response);
      RETURN l_response;
    END;
    -- ---------------------------------------------------------------------
    
    


    ================================================ Java class================================

    package wizard;
    
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    import javax.xml.ws.BindingType;
    import javax.xml.ws.soap.SOAPBinding;
    
    @WebService(name = "MyWebService1", serviceName = "MyWebService1", portName = "MyWebService1Port")
    @BindingType(SOAPBinding.SOAP12HTTP_BINDING)
    public class HelloService {
        public HelloService() {
            super();
        }
    
    
        @WebMethod
        public String sayHello (@WebParam(name = "arg0") String s) {
                 return "Hello " + s;
            }
    }
    
    

    ======================================================= WSDL  file ================

    <?xml version="1.0" standalone="yes"?>
    <!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.8-b13937 svn-revision#13942. -->
    <definitions targetNamespace="http://wizard/" name="MyWebService1" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://wizard/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <types>
        <xsd:schema>
          <xsd:import namespace="http://wizard/" schemaLocation="MyWebService1_schema1.xsd"/>
        </xsd:schema>
      </types>
      <message name="sayHello">
        <part name="parameters" element="tns:sayHello"/>
      </message>
      <message name="sayHelloResponse">
        <part name="parameters" element="tns:sayHelloResponse"/>
      </message>
      <portType name="MyWebService1">
        <operation name="sayHello">
          <input wsam:Action="http://wizard/MyWebService1/sayHelloRequest" message="tns:sayHello"/>
          <output wsam:Action="http://wizard/MyWebService1/sayHelloResponse" message="tns:sayHelloResponse"/>
        </operation>
      </portType>
      <binding name="MyWebService1PortBinding" type="tns:MyWebService1">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <operation name="sayHello">
          <soap12:operation soapAction=""/>
          <input>
            <soap12:body use="literal"/>
          </input>
          <output>
            <soap12:body use="literal"/>
          </output>
        </operation>
      </binding>
      <service name="MyWebService1">
        <port name="MyWebService1Port" binding="tns:MyWebService1PortBinding">
          <soap12:address location="http://192.168.1.107:7101/Webservices-Wizard-context-root/MyWebService1Port"/>
        </port>
      </service>
    </definitions>
    
    

    ======================================================= DB Function  ================

    create or replace FUNCTION AA
    (
      PARAM1 IN VARCHAR2
    ) RETURN VARCHAR2 AS
    
    
      l_request   soap_api.t_request;
      l_response  soap_api.t_response;
      l_return    VARCHAR2(32767);
    
      l_url          VARCHAR2(32767);
      l_namespace    VARCHAR2(32767);
      l_method       VARCHAR2(32767);
      l_soap_action  VARCHAR2(32767);
      l_result_name  VARCHAR2(32767);
    
    BEGIN
    
    
      l_url         := 'http://192.168.1.107:7101/Webservices-Wizard-context-root/MyWebService1Port/';
      l_namespace   := 'xmlns="http://192.168.1.107:7101/Webservices-Wizard-context-root/MyWebService1Port?WSDL"';
      l_method      := 'sayHello';
      l_soap_action := 'http://192.168.1.107:7101/Webservices-Wizard-context-root/MyWebService1Port/sayHello';
      l_result_name := 'return';
    
      l_request := soap_api.new_request(p_method       => l_method,
                                        p_namespace    => l_namespace);
    
    
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'arg0',
                             p_type    => 'xsd:string',
                             p_value   => PARAM1);                                             
    
    
      l_response := soap_api.invoke(p_request => l_request,
                                    p_url     => l_url,
                                    p_action  => l_soap_action);
    
    
      l_return := soap_api.get_return_value(p_response  => l_response,
                                            p_name      => l_result_name,
                                            p_namespace =>  NULL);
                                           
      return l_return;      
    
    END AA;
    
    

    I would appreciate if you could point me in the right direction about this number when you call the jax - ws feature in the comic book?

    Thank you

    Daniel

    Found the solution. I had not noticed that the jax - ws and the SOAP_API according to the http://www.oracle-base.com/dba/miscellaneous/soap_api.sql spoke different version of SOAP. JAX - ws used SOAP12HTTP_BINDING while I understand that SOAP_API is SOAP 1.1

  • Secure RestFul WebService call with basic authorization via https

    Hello

    is it possible to call a secure RestFul WebService with basic authorization via https to APEX?

    Database: Oracle 11g XE
    APEX: 4.2.1

    I have a solution by calling the Java Web service, which was called from the database via a scheduled task (run).

    As my hosting partner does not support Java, I'm looking for another option.

    Concerning
    Markus

    Hello

    Oracle XE can USE a wallet with utl_http without problem. Just create a portfolio from a version supporting the creation of the portfolio and copy this portfolio to your XE machine and use it. It really works.

    ---
    Lavenu
    MaxApex accommodation
    http://www.maxapex.com

    Published by: Richard on January 23, 2013 23:32

  • Connect my BB app to a webservice

    First of all Hello to everyone , this is my first post, I recently started to develop apps for BB

    I searched a lot, but I'll get into trouble trying to connect my blackberry application to a Web service that I am running. My Web service runs on a JBoss 5.0 Server and an Apache Axis2 runtime.

    If possible, good advice to want me please on what I need to accomplish this connectivity required.

    Kind regards!!!

    BB-DUDE!

    I got it to work, after a lot of research on! The only problem I had was that I wasn't running the MDS Simulator...

    So for the sum for all those wishing to have connectivity between BB and an Axis2 webservice (any compatible JSR - 172, JAX - WS webservice actually works wonderful too, .NET, etc.)

    1. you generate your heel using the Webtoolkit above, if you need a tut on how to do this, google "lotus domino Web service with blackberry", it is a very detailed example he

    2. Once you have your heels, import them into your BB project

    3. If you want to call your heels, you just need to instantiate the class stub (is the class that ends with '_Stub', generated by the webtoolkit)

    4. you call a method of the stub surrounded by try-catch

    5. PREVIOUSLY, use the BB Simulator, install and launch the Simulator MDS (BlackBerry® mail and v4.1.2). MDS Services Simulator Package If you don't do this, you will have a net.rim.VMError on the BB

    6. it is, you have connectivity between BB and the webservice - FINALLY!

    It is a solution not KSoap2, I read that KSoap2 was good, but now that BB natively supports the connection methods, you mustn't use KSoap2. This means that using Ksoap2 does not work, I just personally preferred to go with this solution.

    Best regards to all!

  • OEDQ address own webservice

    Hello

    We have integrated with Siebel 8.1.1.11 11.1.1.7.3 OEDQ. I know that the address cleaning is doen by siebel connector if data cleaning is enabled.

    We seek to make an external call to treat own webservice using the following WSDL

    http://servername:8001 / disqualification/webservices/Disqualification - CDS:AddressClean? WSDL

    I imported wsdl in Siebel. My question is still without providing a name of user and password, siebel is able to make a call to OEDQ own webservice and return response succssfully return address.

    Why SOAP call is successful even without passing credentials.

    There's nothing specific to the Disqualification here, but here's a pointer to the WebLogic documentation:

    Security and administration WebLogic Web Services - 11g Release 1 (11.1.1.6)

  • The VC management Webservices is installed by default?

    I didn't install the VMware file - WebClient.exe that comes with installing vCenter 5.  But a service called 'VMware VirtualCenter Management Webservices' has been installed as part of installing vCenter, that starts Tomcat and listening on port 8443.  I can connect on port 8443 with a web browser and it juice shows some "garbage" characters  I guess I can just turn off the service, but I would have preferred a more clean install (IE do not install any of these components unless I specified to install the management web client).

    Yet once again, the management of Web services provide: functional areas in the vSphere Client, such as the tables of performance, State of the material, vCenter Service status.

    This article describes what happens when it does not work correctly: http://kb.vmware.com/kb/2013082

    -KjB

  • JAX - WS how to read a different character set

    How can I define a JAX - WS webservice to accept content with charset = "iso-8859-1" on a system that uses "utf-8"?

    If it was just a servlet, I would have done something like this:
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
         String content = "";
         BufferedReader reader = new BufferedReader(new InputStreamReader(
                   request.getInputStream(), "ISO-8859-1"));
         try {
              for (String line = reader.readLine(); line != null; line = reader.readLine()) {
                   content += line;
              }
         } finally {
              reader.close();
         }
    }     
    But how can I achieve the same thing using a web service?

    MortenN wrote:
    We did a lot of testing and the conclusion is the same thing that you say, be default ISO-8859-1. I also read that he must use the XML in utf - 8, but with tests, we found that the text/plain and text/xml by default is ISO-8859-1.

    We have isolated the cause, we must find a way to fix it.

    This Web service is running to a 7.1.1 jboss using cxf 2.4.6

    1. is it possible to set a different default iso-8859-1 value if no charset is defined?

    2. is it possible to intercept the query in a Manager or a filter and change the http headers by adding the charset for the content-type before it is handled?

    3. is there a another way to force the system to use utf - 8 instead of iso-8859-1 by changing the xml, queries, etc.?

    You need to replace the HTTP request header. Take a look on:

    http://CXF.Apache.org/docs/JAX-RS-filters.html#JAX-RSFilters-OverridingrequestURI%2Cqueryandheaders

    I suggest you do the substitution ONLY if:

    1. when the HTTP Content Type is not a character set is defined, and perhaps only for the Type of content you are interested... text/xml or application/soap + xml

    2. when the body lacks a XML declaration. Be aware that XML can be a byte-order-mark (BOM) in front of the XML declaration.

    Of course, if you can convince the client to send the right kind of content AND the XML declaration, you don't have to do the foregoing.

    On a unrelated note:

    I just noticed that the SOAP payload is in fact a request for MM7. I used to work in the industry mobile, actually implemented of the MM7 3GPP specification and need to test with different carriers in the world. Operators or other software vendors who have implemented the specification took informative sections as normative spec... but informative sections had bugs in them that I had to report to get corrected in the spec as vendors and operators were focused on the informative sections and not the normative part... I'm not surprised that you have this same scenario I had 6 years ago.

    Published by: jmsjr on November 28, 2012 03:10

  • Question of WebServices

    Hi all

    I work again with the API out Angel.com IVR (I posted here once before on this subject). This time, I need to get the statutes of appeal that have been placed. They have a function called getStatus() where you simply pass in an Appeal Board identifies, and they give you information about them. The problem is that I can not understand how to access the information, because they give an array of functions (which some contain other functions).

    They have many languages sample code. Here's the java example, since it is the closest to Cold Fusion. Here's the code that does what I want.

            ocss = oc.getStatus(ocl.getToken(), guids.toArray(new String[0]));
          
             /**
             * Print out status information of each call.
             */
    
          
            for(int i = 0; i < ocss.length; i++) {
                CallIDentifier cid = ocss[i].getCallIDentifier();
    
                for(int j = 0; j < ocss[i].getStatusItems().length; j++) {
    
                    OutboundCallStatusItem ocsi = ocss[i].getStatusItems()[j];
                    System.out.println(cid.getOutboundCallGUID() + "|\t\t\t|" + 
                                       cid.getPhoneNumber() + "|\t\t\t|" + 
                                       ocsi.getMessage() + "|\t\t\t|" + 
                                       ocsi.getStatus());
                }
            }
    

    The line that confuses me, there is

    OutboundCallStatusItem ocsi = ocss[i].getStatusItems()[j];
    


    What the hell is that [j] made after the function call? This syntax does not simply compute for me. Anyway I tried to write a cold similar function fusion

         <cffunction name="GetCallStatus" access="public" hint="Find call statuses for an array of call GUID's">
              <cfargument name="outBoundCallGUIDs" type="array" hint="An array of call GUID's" required="yes">
              <cfargument name="token" type="string" hint="Login token for the API" required="yes">
              <cfset var CallInfo = [] />     
              
              <!--- Send the call object to the webservice --->
              <cfinvoke webservice="http://www.angel.com/outbound/wsdl/OutboundCallService.wsdl" method="getStatus" returnvariable="ocss">
                   <cfinvokeargument name="token" value="#arguments.Token#"/>
                   <cfinvokeargument name="outboundCallGUIDs" value="#arguments.outboundCallGUIDs#"/>
              </cfinvoke> 
              
    <cfloop from="0" to="#arraylen(ocss[i].getStatusItems())#" index="j">
    <cfset CallInfo[i]["EntireReturnedObject"] = ocss[i]>
    <cfset CallInfo[i]["CallGuid"] = cid.getOutboundCallGUID()>
    <cfset Callinfo[i]["NumberDialed"] = cid.getPhoneNumber()>
    <cfset Callinfo[i]["Object"] = cid>
    <cfset Callinfo[i]["ocsi"] = ocss[i].getStatusItems()>
    
    <!---- Does not work, returns "Invalid CFML construct found on line 248 at column 96."
    <cfset CallInfo[i]["GetStatusItems"] = ocss[i].getStatusItems()[j]>
    ---->
    
    <!--- Does not work, returns "1 null <br>The error occurred on line 244."
    <cfset CallInfo[i]["GetStatusItems"] = ocss[i].getStatusItems(j)>
    ---->
                   
    <!--- Does nto work, returns "The getMesage method was not found."
    <cfset Callinfo[i]["Message"] = ocss[i].getStatusItems().getMesage()>
    ----->
    </cfloop>
    
              
              <cfreturn CallInfo>
         </cffunction>
    

    But the last line of < cfset > in the loop fails. I have no idea how to make reference to getStartTime function which is stored in the getStatusItems function.

    I'm totally stuck, I tried the 1 million on syntax variation, and I always get an error indicating that the getStartTime method is not found, even if there is very clearly within the getStatusItems().

    You can see my test here page, to see the data is returned.

    http://portal.fpitesters.com/IVR/getCallStatus.cfm

    Here you can see their code in the java example

    http://www.Socialtext.NET/ivrwiki/index.cgi?java_sample_code

    Here is their library complete on the API, with other languages to code sample listed at the bottom of the page, as well as more than information about the getStatus function.

    http://www.Socialtext.NET/ivrwiki/index.cgi?java_sample_code

    Any help is appreciated. Thank you.

    (FYI when I get it done I intend when you release a CFC with all these features put together so other CF coders use Angel.com without having to fight through all the shit that I am).

    The outer cfloop to from '0 = '. Try from = '1 '. CF uses base tables 1 instead of from 0.

  • New-WebserviceProxy could not load file or Assembly

    Hi, I'm calling a WebService from powershell, but I get the error ' could not load file or assembly "file:///C:Windows\TEMP\xbnahjh.dll '"

    I am however able to call the weather sample webservice as shown in "http://blogs.technet.com/b/heyscriptingguy/archive/2009/11/17/hey-scripting-guy-november-17-2009.aspx", but not that which is placed on a different server. I have no knowledge about the services of Powershell or webservice. Any suggestions on where I should look would be useful.

    I'm running the powershell in administrator mode and also used the unrestricted set-execution policy.

    Hello Silvia,.

    Thanks for posting your concern on the forum.

    According to the description of the problem you want to call a webservice from powershell and get the error could not load file or assembly 'file:///C:Windows\TEMP\xbnahjh.dll '.

    As the problem is related to a dll file, this means that some dll files are missing or damaged. In order to repair, I suggest you to check the system files are they work very well or not and to check who are trying to run the (SFC) System File Checker tool.

    Scan SFC will be scans all protected system files and replaces incorrect versions with appropriate Microsoft versions.

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    1. Go to Start, click all programs and open the Accessories.
    2. Right-click on command prompt in the list programs, and then select run as administrator. If you are prompted for an administrator password or for confirmation, type your password, or click OK.
    3. In the command prompt, type the following command and press ENTER:

    sfc/scannow

    For more information, refer to this link:

    http://support.Microsoft.com/kb/929833/en-us

    You can see the article mentioned below to call a WebService from powershell.

    Calling a web service from script Powershell

    Hope that the information provided is useful. Keep us updated on the issue and we will be happy to help you further.

    Kind regards

  • Updade UI thread

    Hello

    I want to show a list of message on a scree. I have to get a web service messages, showing a popUpScreen with a message waiting, while the service is invocated.

    To do that I have created a RespuestaServicio interface and three classes, MyScreen where I want to display messages, it implements RespuestaServicio methods that are called after the Web service response is obtained, PleaseWaitPopupScreen extends from PopupScreen, which has a method that receives a thread to run while the popupscreen is showed and close itself when the thread end and finally

    LlamadaWSThread is passed to the PleaseWaitPopupScreen call and that the webservice to get the list of messages.

    It's code summarized:

    public class MyScreen extends MainScreen implements RespuestaServicio{
    
        private VerticalFieldManager listaMensajes;
    
        public MyScreen() {
            super(Manager.NO_VERTICAL_SCROLL);
            HorizonlatFieldManager fondo = new HorizonlatFieldManager();
            listaMensajes = new VerticalFieldManager();
            vertical.add(listaMensajes);
            fondo.add(vertical);
            this.add(fondo);
            buscarMensajes();
        }
    
        public void buscarMensajes(){
        // Here I get some parameters like url an xml to pass to LlamadaWSThread constructor
           LlamadaWSThread serviceCaller = new LlamadaWSThread(url, this, xml);
                  PleaseWaitPopupScreen.showScreenAndWait(serviceCaller);
        }
    
        private void llenarLista(String[] campos){
            LabelField campo;
            for(int i = 0; i < campos.length; i++){
                campo = new LabelField(campos[i]);
                campo.setMargin(0, 10, 0, 10);
                listaMensajes.add(campo);
            }
        }
    
        public void requestFailed(final String message) {
           UiApplication.getUiApplication().invokeLater(new Runnable() {
                     public void run() {
                    Dialog.alert("requestFailed: "+message);
                     }
                  });
        }
    
        public void requestSucceeded(Document result) {
            String[] mensajes;
            // Here I proccess result to get mesajes...;
            llenarLista(campos);
        }
    }
    
    public class PleaseWaitPopupScreen extends PopupScreen {
    
        private static LabelField _ourLabelField = null;
    
        private PleaseWaitPopupScreen() {
            super(new VerticalFieldManager());
            ourLabelField = new LabelField("Please wait");
            this.add(urLabelField);
        }
    
        public static void showScreenAndWait(final Runnable runThis) {
            final PleaseWaitPopupScreen thisScreen = new PleaseWaitPopupScreen(text);
            Thread threadToRun = new Thread() {
                public void run() {
    
                    UiApplication.getUiApplication().invokeLater(new Runnable() {
                        public void run() {
                            UiApplication.getUiApplication().pushScreen(thisScreen);
                        }
                    });
    
                    try {
                        runThis.run();
                    } catch (Exception t) {
    
                    }
    
                    UiApplication.getUiApplication().invokeLater(new Runnable() {
                        public void run() {
                            if(thisScreen != null){
                                try {
                   UiApplication.getUiApplication().popScreen(thisScreen);
                } catch (Exception e) {
                   Dialog.alert(e.getMessage());
                      }
                            }
                        }
                    });
                }
            };
            threadToRun.start();
        }
    }
    
    public class LlamadaWSThread extends Thread {
        private RespuestaServicio pantalla;
        private ConstructorXml xml;
        private String url;
    
        public LlamadaWSThread(String url, RespuestaServicio pantalla, ConstructorXml xml) {
            super();
            this.url = url;
            this.pantalla = pantalla;
            this.xml = xml;
        }
    
        public  void    run()
        {
            HttpConnection  conn = null;
            OutputStream    oStream = null;
            try
            {
                conn    =   (HttpConnection)Connector.open( url );
                conn.setRequestMethod( HttpConnection.POST );
                oStream =   conn.openOutputStream();
                oStream.write( xml.getXml().getBytes() );
                oStream.flush();
    
                      InputStream is = conn.openInputStream();
                byte [] response = IOUtilities.streamToBytes(is);
                is.close();
                ByteArrayOutputStream   baos  =  new ByteArrayOutputStream();
                baos.write( response );
                DocumentBuilderFactory  dbf =   DocumentBuilderFactory.newInstance();
                DocumentBuilder db  =   dbf.newDocumentBuilder();
                Document    doc =   db.parse( new ByteArrayInputStream( baos.toByteArray() ) );
                pantalla.requestSucceeded(doc);
            }
            catch (Exception except)
            {
                pantalla.requestFailed(except.toString());
            }
        }   
    
    }
    

    My problem is that I'm getting this exception:

    IllegalStateExeption: UI engine accesed without hoding the lock of the event

    When you call llenarLista (...)  of requestSucceeded (...) who is called to LlamadaWSThread

    Please reread what I proposed. You missed a part on the displacement of campo in the body of the loop for?

    What you see, it's quite normal - plan you a change in the user interface that will update the display with the contents of an object, once you're done. Then you quickly change the contents of this object before all your regular screen updates has a chance to be executed. No wonder that all of these updates are only the last value of this object.

    Compare your loop for:

    for (int i = 0; i < campos.length; ++i) {
      final String campo = campos[i];
      UiApplication.getUiApplication().invokeLater(new Runnable() {
        public void run() {
          listaMensajes.add(new LabelField(campo));
        }
      });
    }
    

    You see the difference?

Maybe you are looking for

  • I need to keep a message from a number idk so stuck?

    I have a number that will be the text me, I do not know this person and did know that I do not want their text me.  They continued to text me, so I blocked the number (I went to the details and clicked on the i and scroll down to the block caller). M

  • No upgrade to 4.3 for excite Pro AT10LE-A-108 and possibilities of rooting

    It seems that everyone has upgraded to 4.3 on this machine, but I get no update system 4.2.1 via settings - system updates - service station. Is there another way to get this update?Why do I not receive an update option when other people like me in t

  • Satellite 2800-200 - what external enclosure that I can use for HARD drive

    My daughter has a laptop of Toshiba S2800-200 eldely.It is broken where the mains cable between the machine and she has been quoted £100 for repair!She has already bought a new computer repair is not an option. Toshiba, however, contains some files (

  • String conversion

    Hi all Need help solve the problem. Here, I have attached a vi for your reference.

  • Cannot use the mouse after installing windows 7

    Original title: mouse W7 disorders linux Instalation Hello so I had linux on my computer, but now I myself bought a treat - W7 Home premium 64-bit. So I had wiped the hard disks and clean. Everything worked before (on linux), but while I was installi