WebService class

Hello, everybody!
I would say that working with arrays returned from the web
service (written on C# if it matters) is the most peculiar things
in the FMS. For starting FMS documentation states: "Note: The
WebService class is not able to retrieve complex data or an array
returned by a web service.". But it IS able to work with arrays
return by the web service. The result has length property, you can
select any array element by index. What is that documentation note
for? Is it deprecated and authors forgot to remove it from the
docs?
The second strange thing with arrays is the following. If I
try to work with array returned from the web server in the most
natural way, for example:
service.onResult = function(result)
for (var i = 0; i < result.length; i++)
// do something
the application often is unloaded WITHOUT any additional
information besides "Unloaded application instance xxx". And
application event onAppStop is never called in such cases.
I found workaround, and it works. The workaround is the
following:
service.onResult = function(result)
for (var k = 0; k < result.length; k++)
result[k] = result.sCall.decodeResultNode(
result.xmlNodes[k],result.arrayType);
// do something
And it is documented nowhere!
Now I have bumped into next problem -- the web service
returns an array with many elements (~650). The FMS application
again just unloaded with the last words "unloaded application
instance" even if service onResult handler doesn't contain any code
at all!
I am using FMS 3. Does anybody know how to work with arrays
returned from web service correctly and have explanations for all
bizarre thing I've just described?

Thankyou very much for your reply, Eric (both here and in the web services forum).
The way I generate the web service is just to right click on the java file and say 'generate web service'. I can't seem to get at the code that is generated, but it appears that there is nothing in there that I can change to rename the classes.
I may just live with it and refactor the existing client code to match the class names that are given.
Tim

Similar Messages

  • Webservice classes from WSDL

    Hi all,
    I have a WSDL and within eclipse am trying to generate the Webservice classes from the WSDL. As i select the .wsdl file, Right Cick,webservices,Generate Client, i get number of classes. But these classes dont have annotations like '@XmlRootElement','@XmlType'. i want something like. How can i generate class with these annotations?
       @XmlRootElement(name = "XXXSecurity", namespace =     "http://www.xxx.com/XMLSchema/XXXWS/XXXX/v1.0")

    Arushi,
    I would refer to the online tutorial for JWSDP, which walks you through creating a web service and a Client to the service.

  • Posting parameters with Webservice class

    HI,
    I'm trying to use the mx.services.webservice class to
    interrogate and use my .net services. Everything seems to work as
    documented with the exception of passing parameters. There is
    little documentation on how to pass parameters, but a few examples
    seem to indicate passing an ordered list as parameters to the
    method name. So my web service - GetTableOfContents expects a
    string parameter - SectionName. I assumed
    WS.GetTableOfContents(&quot;TheSectionName&quot;) would
    accomplish this, but on inspection of the request xml
    TheSectionName is not included in the xml. Below I've attached the
    webservices debug/info output so you can see what I mean. Note at
    the end the trace of the xml the webservice class builds for the
    request and note the request bit -
    &lt;request&gt;&lt;SectionName
    /&gt;&lt;/request&gt; with a blank parameter tag.
    The parameter is being interpreted in some way by the
    webservices class as you can see at 2/4 10:34:7 SOAP : parameter -
    value - MySectionName, but it's not being in cluded in the xml
    immediately after. Anyone seen this behaviour and know what might
    be going wrong?

    Thankyou very much for your reply, Eric (both here and in the web services forum).
    The way I generate the web service is just to right click on the java file and say 'generate web service'. I can't seem to get at the code that is generated, but it appears that there is nothing in there that I can change to rename the classes.
    I may just live with it and refactor the existing client code to match the class names that are given.
    Tim

  • Where is the WebService class located in the Flex SDK?

    I checked there and all I found in the
    \frameworks\source\mx\rpc folder is the IResponder.as class file.
    There wasn't a soap package or anything... When you do the
    import mx.rpc.soap.Webservice where is it coming from?

    Still no answer to this important question, nearly a year after it was posted? WHERE IS THE REMOTE BUTTON that we are supposed to pair Remote app on the iPhone with? Here's what the help file says in French :
    Jumeler Remote avec une bibliothèque iTunes
    1. Touchez Remote sur l’écran d’accueil de votre appareil.
    2. Touchez Ajouter une bibliothèque iTunes.Un code à 4 chiffres apparaît.
    3. Ouvrez iTunes sur votre ordinateur, puis cliquez sur le bouton Remote .
    4. Tapez le code à 4 chiffres dans la fenêtre iTunes.iTunes jumelle la bibliothèque de votre ordinateur avec l’app Remote de votre appareil.
    NO REMOTE BUTTON ANYWHERE IN ITUNES THAT I CAN SEE... HELP!

  • Importing WebService class into Forms10g

    Hi ,
    I want to import webservice from Jdeveloper in Forms10g.I am using Jdeveloper 10.1.3.4 complaint with JDK 1.4. When I import the class in Forms10g from Jdeveloper it gave me error:
    Importing Class Proxy.classes.oracle.srtutorial.datamodel.proxy.SendServiceSoapClient...
    Exception occurred: java.lang.UnsupportedClassVersionError: Proxy/classes/oracle/srtutorial/datamodel/proxy/SendServiceSoapClient (Unsupported major.minor version 49.0)
    I figured out that this error is due to different versions of JDK used in Oracle Forms10g(JDK 1.3) and Jdeveloper 10.1.3.4(JDK 1.4). So I changed the compile properties in Jdev to 1.3.
    After changing this to 1.3 when I import the class the previous error is resolved but I get another error :
    Importing Class Proxy.classes.oracle.srtutorial.datamodel.proxy.SendServiceSoapClient...
    Exception occurred: java.lang.NoClassDefFoundError: Proxy/classes/oracle/srtutorial/datamodel/proxy/SendServiceSoapClient (wrong name: oracle/srtutorial/datamodel/proxy/SendServiceSoapClient)
    Please help how to resolve this.
    Regards,
    Noman
    Edited by: user773433 on Aug 11, 2009 4:33 AM

    Hi,
    I have tried. The problem is when I make the JAR file in Jdeveloper and Change the class path in Windows. The Jar doesnt shows up in Formgs10g when we import the class. I have tried several times by adding the path of JAR file in windows environment but still it doesnt shows up..
    Regards,
    Edited by: user773433 on Aug 12, 2009 10:54 AM

  • How to access Current Servlet Context from a java webservice class?

    Hi,
    I' am developing a Java Web Service Class, and I want to access some application settings information stored in the application context,
    but I couldn't get access to the current ServletContext?
    Note:
    I added my settings to the web.xml file in the WEB-INF folder.
    Normally I' am using getInitParameter(key) to get the value.
    Can any one help me please?
    Message was edited by:
    MySecreen

    Hi,
    I' am developing a Java Web Service Class, and I want
    to access some application settings information
    stored in the application context,
    but I couldn't get access to the current
    ServletContext?
    Note:
    I added my settings to the web.xml file in the
    WEB-INF folder.
    Normally I' am using getInitParameter(key) to get the
    value.
    Can any one help me please?
    Message was edited by:
    MySecreenI was faced with a similar issue, here's what worked for me:
    Have your class implement the ServiceLifecycle Interface and use it as you normally would, here's a sample
    import javax.xml.rpc.ServiceException;
    import javax.xml.rpc.server.ServiceLifecycle;
    import javax.xml.rpc.server.ServletEndpointContext;
    import javax.servlet.ServletContext;
    public class SomeClass implements ServiceLifecycle {
         private ServletContext sc = null;
    ....// rest of class code......
    public void init(Object arg0) throws ServiceException {
              ServletEndpointContext ctx;
              ctx = (ServletEndpointContext) arg0;
              sc = (ServletContext) ctx.getServletContext();
    ...}

  • Questions on the @ServiceClient annotation and Asynchronous webservices

    1. Is their a way to invoke a webservice in an asynchronous manner without using the @ServiceClient annotation? I’ve tried a few things to get access to the async versions of the web methods and each time I get an exception stating “java.rmi.RemoteException: Asynchronous methods can only be invoked from stubs with the ServiceClient annotation”.
    2. Is their anyway to generate a dynamically sized array of service port variables with the @ServiceClient annotation? All the examples that I have seen only have a single port variable annotated with @ServiceClient. I’ve tried creating a class that uses the @ServiceClient annotation, and while it does compile it fails when I try to invoke the services methods. I also found in some documentation a restriction that the @ServiceClient annotation can only be used in the core java (jws) webservice class.
    3. Is their a way to use a single service port variable with the @SeriviceClient annotation to invoke multiple calls to an asynchronous web method if that web method is part of a conversation? When I tried this I found that even though the asynchrounous calls were going out with any problems they were being processed serially on the target services side (I assume due to the conversation).
    The problem I am trying to solve is I need to invoke a stateful webservice in an asynchronous manner multiple times from the same starting service.

    Hi
    That is how I understand that document:
    Locking: Forms, by default, locks a row as soon as the user starts modifying the data. That is pessimistic locking. Apex, on other hand (and optionally forms also) do not lock the record, but before applying any changes checks if the data has changed since the user queried it (what for some reason is called optimistic "locking")
    DB connections: I am not sure why they used the terms synchronous/asynchronous, but the difference is that Forms, by default, keeps an permanent DB connection while the user is using the application, while Apex gets a connection from a connection pool every time a page is requested/submitted.
    Architecture: Forms (in its web version at least) has 3 tiers: the browser, the appserver where the forms service runs and the database. As Apex runs inside the database, there are only 2 tiers: the browser and the database (though you still may need an http server in between which serves static content, I don't think it is considered part of the application in this context). If you are talking about client/server forms, then there are only 2 tiers.
    I hope this helps!
    Luis

  • How to read parameter in WebService

    hello, i am new to webservices and i want to pass a parameter to my webservice.
    i declared a parameter "myname" in my wsdd file:
    <deployment xmlns="http://xml.apache.org/axis/wsdd/"
        xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
      <service name="TestService" provider="java:RPC">
        <parameter name="className" value="testService.TestService"/>
        <parameter name="allowedMethods" value="*"/>
        <parameter name="myname" value="myvalue"/>
      </service>
    </deployment>how can i read this parameter in my webservice classes?

    Hi,
    Here is an incomplete answer for our problem that works for me, but is unfortunately not enough because it is not specific to one webservice but to the whole axis server...
    This is certainly not the official way to do it (don't even know if there is any one) but hey...
    Okay, you have first to open the web.xml file under the following directory on my computer, I let you find yours ;)
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\web.xml
    BEFORE any <servlet> tag, add this:
    <context-param>
       <param-name>myParamName</param-name>
       <param-value>myParamValue</param-value>
    </context-param>then in the java code, in the init function of the ServiceLifeCycle, use the context Object passed as parameter like this:
    import javax.servlet.ServletContext;
    import javax.xml.rpc.server.ServletEndpointContext;
    public void init(Object context){
    ServletContext sc = ((ServletEndpointContext)context).getServletContext();
    String myParamValue = sc.getInitParameter("myParamName");
    }There you go (works for me)!
    As I said, I really hope It is possible to specify such a parameter Value for a given webservice because currently this is a very global declaration and it is not easy to modify it. The best way of doing it would be to put the thing in the wsdd file!
    Hope that help!
    Don't hesitate to post anything new if you find something, that would help me too!

  • Error while deploying New WebService as part my EAR

    Hi,
    Jdev Version: 11.1.1.6.0
    I have created a new Model project for WebService and did all the configuration mentioned on below url,
    I am able to test this new webservice project by launching "TasksServiceImpl.java" file locally but getting some error while deploying it on standalone server. See below log for more details,
    08:03:16 PM INFO: Unable to load annotation javax.interceptor.Interceptors for parsing. The annotation is ignored.
    08:03:16 PM INFO: Unable to load annotation javax.interceptor.Interceptors for parsing. The annotation is ignored.
    08:03:16 PM INFO: GenericWSWarAnnotationListener.parseAnnotatedClass Adding Servlet Mapping with URL pattern /TalentTasksService for annotated WebService class oracle.apps.xyz.common.tasksService.applicationModule.server.TasksServiceImpl
    08:03:16 PM Error: Could not load endpointInterface oracle.appsxyz.common.tasksService.TasksService
    08:03:17 PM #### Deployment incomplete. ####
    08:03:17 PM WSA process exited with code 1.
    Full deployment log file is also attached.
    I have verified the jar selection mention on this forum link: help..
    Any help on this will be greatly appreciate.

    Yes Frank. Ours is an SDO service created as per [Service enabled Application Modules|http://docs.oracle.com/cd/E23943_01/web.1111/b31974/bcextservices.htm#CJAJGIEB] . We have created the deployment profile as a 'Business Component Service Interface' profile.
    Our attempt to deploy onto standalone from Jdev also fails with the same error. Unsure why the interface is unable to load - Error: Could not load endpointInterface oracle.apps.xyz.common.tasksService.TasksService.
    Does this mean, the deployment process is unable to locate this interface? We have cross checked our deployment profiles quite a few times and could not find anything amiss.

  • Getting error while deploying New WebService project on standalone server

    Hi,
    I have created a new Model project for WebService and I am able to test this new webservice project by launching "TalentTasksServiceImpl.java" file locally but getting some error while deploying it on standalone server. See below log for more details,
    08:03:16 PM INFO: Unable to load annotation javax.interceptor.Interceptors for parsing. The annotation is ignored.
    08:03:16 PM INFO: Unable to load annotation javax.interceptor.Interceptors for parsing. The annotation is ignored.
    08:03:16 PM INFO: GenericWSWarAnnotationListener.parseAnnotatedClass Adding Servlet Mapping with URL pattern /TalentTasksService for annotated WebService class oracle.apps.hcm.talent.common.tasksService.applicationModule.server.TalentTasksServiceImpl
    *08:03:16 PM Error: Could not load endpointInterface oracle.apps.hcm.talent.common.tasksService.TalentTasksService*
    08:03:17 PM #### Deployment incomplete. ####
    08:03:17 PM WSA process exited with code 1.
    I have verified the jar selection mention on this forum link: help..
    Any help on this will be greatly appreciate.

    Yes Frank. Ours is an SDO service created as per [Service enabled Application Modules|http://docs.oracle.com/cd/E23943_01/web.1111/b31974/bcextservices.htm#CJAJGIEB] . We have created the deployment profile as a 'Business Component Service Interface' profile.
    Our attempt to deploy onto standalone from Jdev also fails with the same error. Unsure why the interface is unable to load - Error: Could not load endpointInterface oracle.apps.xyz.common.tasksService.TasksService.
    Does this mean, the deployment process is unable to locate this interface? We have cross checked our deployment profiles quite a few times and could not find anything amiss.

  • Making a call over HTTPS with LoadVars, XML.load(), and WebService - Yes or No?

    Hello, do LoadVars, XML.load(), or WebService support HTTPS-based endpoints, Yes or No?
    BACKGROUND
    ============
    I've been trying to get a LoadVars to actually make a call to an HTTPS endpoint. There is nothing in the documentation that says it can't. I know that there's also XML.load() and WebService class, but from the looks of it they don't do HTTPS.
    During my tests I have absolutely no issues with making calls to the same service over HTTP. When I change it to HTTPS I don't see HTTPStatus or even failures. Also, netstat on my server will show a connection being established with the endpoint when using HTTP but not when using HTTPS. I've also tried setting SSLVerifyCertificate to "false" in my Server.xml and after a restart of AMS it doesn't help, same symptom.
    I've also googled and looked through all Adobe forum posts that I can find:
    https://forums.adobe.com/message/4938426#4938426
    https://forums.adobe.com/thread/1661461
    https://forums.adobe.com/thread/782037
    https://forums.adobe.com/message/74981
    https://forums.adobe.com/message/5107735#5107735
    https://forums.adobe.com/message/7815#7815
    https://forums.adobe.com/message/53870#53870
    https://forums.adobe.com/message/87797#87797
    WebService Class - http://stackoverflow.com/questions/5619776/webservice-and-fms
    The best I found from the posts above is a non-commital answer from adobe staff at https://forums.adobe.com/message/4938426#4938426 and a 3rd party person saying that Webservice doesn't work at http://stackoverflow.com/questions/5619776/webservice-and-fms.
    All I need is an official supported/not-supported from the Adobe staff. Shouldn't be to hard after 5 years or so of ignoring the questions in the forum right?

    Adobe, please provide some details to your current and possibly potential customers, in at least one of the many unanswered posts about making HTTPS requests from AMS.
    P.S.
    realeyes_jun,
    RealEyes Media has been an inspiration to me for many years, and I would like to thank them for their efforts to better the media streaming community.
    Also, would it be possible to please release the source to REDbug?

  • Create Server-side WebService un an ADF Fusion-Web application

    Hello,
    I have a Fusion Web application with a model having several entities / VOs.
    I saw in the Application Module options that I can expose some of the methods as a Web Service. Since I may need to use this model in a remote way (from another application for instance) I tried to do this.
    But once I add the module as a WS, it does not deploy anymore in test environment. Another point, I don't have the WSDL file to generate the client-side proxy.
    I can't find a how-to for helping me fix that. I think I forgot something but I don't know what.
    Any input ?

    I come back to this thread because I got an error while creating a WS from an application module...
    Steps I did :
    - Create a generic application
    - create a generic project
    - add ADF BC technology to project
    - add an entity to the project
    - add the related VO
    - create an application module with Java class
    - create a simple method (no parameter, return the string "OK")
    - in the AM interface, enable use of WS with addition of the single method
    When I right-click on the AppModuleServiceImpl.java and select "test web service" I got :
    [09:25:24 AM] java.lang.NullPointerException
    [09:25:24 AM]      at oracle.j2ee.ws.tools.wsa.jaxws.AssemblerProcessor.getClassNamesFromEjb(AssemblerProcessor.java:180)
    [09:25:24 AM]      at oracle.j2ee.ws.tools.wsa.jaxws.AssemblerProcessor.processEjb(AssemblerProcessor.java:149)
    [09:25:24 AM]      at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsEjbAssembler.processEjb(JaxwsEjbAssembler.java:182)
    [09:25:24 AM]      at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsEjbAssembler.ejbAssemble(JaxwsEjbAssembler.java:152)
    [09:25:24 AM]      at oracle.j2ee.ws.tools.wsa.cli.Processor.jaxwsEjbAssemble(Processor.java:630)
    [09:25:24 AM]      at oracle.j2ee.ws.tools.wsa.cli.Processor.execute(Processor.java:327)
    [09:25:24 AM]      at oracle.j2ee.ws.tools.wsa.cli.Processor.execute(Processor.java:230)
    [09:25:24 AM]      at oracle.j2ee.ws.tools.wsa.Main.mainNoSystemExit(Main.java:84)
    [09:25:24 AM]      at oracle.j2ee.ws.tools.wsa.Main.main(Main.java:49)
    [09:25:24 AM] WARNING: Error while processing ejb-jar.xml for EJB module at "C:\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\TestWS\ModelEJB.jar".
    [09:25:24 AM] INFO: Unable to load annotation javax.interceptor.Interceptors for parsing.  The annotation is ignored.
    [09:25:24 AM] INFO: Unable to load annotation javax.interceptor.Interceptors for parsing.  The annotation is ignored.
    [09:25:24 AM] INFO: GenericWSWarAnnotationListener.parseAnnotatedClass Adding Servlet Mapping with URL pattern /AppModuleService for annotated WebService class  test.webservices.server.serviceinterface.AppModuleServiceImpl
    [09:25:25 AM] WSA process exited with code 0
    [09:25:25 AM] Deploying Application...I didn't do anything on EJB, do I have to configure anything ?

  • Enums as members of another class????

    Hi ,
    I have the following example on the server side
    public Enum Colors
    RED,
    ORANGE,
    UNKNOWN,
    the above enum is in a separate file/class
    Now the webservice class.
    @WebService
    public class A
    Colors myColor =Colors.UNKNOWN
    public void setMyColor(Colors newValue)
    MyColor = newValue;
    public Colors getMyColor()
    return myColor;
    Now On the client side...(Using .NET WebReference)
    if I say
    A MyServer = new A();
    A.setMyColor(Color.RED)
    A.getMyColor(). returns UNKNOWN...I still get this as UNKNOWN?????
    Please let me know what is the best way to achieve this?
    Regards,
    Vijay

    I tried the following using JAX-WS on both the client and the server and it worked fine using the latest build.
    @WebService(name="Echo", serviceName="echoService", targetNamespace="http://echo.org/")
    public class EchoImpl {
    // Enum tests
    public enum Color { RED, ORANGE, UNKNOWN};
    Color color = Color.UNKNOWN;
    @WebMethod
    public void setColor(Color color) {
    this.color = color;
    @WebMethod
    public Color getColor() {
    return color;
    Client:
    stub.setColor(Color.RED);
    assertTrue(stub.getColor().equals(Color.RED));

  • Server-side error including webservice

    Hi,
    I'm struggling with the webservice functionality on the
    server-side.
    At the top of my main.asc-file I have this line:
    load("webservices/WebServices.asc");
    That puts the following in my administration console:
    "WebServices Loaded successfully."
    However, when someone connects to the media server and it
    tries to initialize and use this webservice using this code:
    MyService = new WebService("uri.to.wsdl.file");
    I get the following error in the administration console:
    Sending error message: C:\Program Files\Adobe\Flash Media
    Server 3\scriptlib\webservices\XMLSchema.asc: line 110:
    ReferenceError: document is not defined
    Failed to execute method (XML.onData).
    I've tried googling it and that gave this result, but the
    solution suggested here didn't work:
    Link
    to other forum
    This is not caused by the webservice itself, since other
    flash and .Net applications can use it without any problems.
    Everything also works just fine when I run everything off my local
    workstation, but as soon as I put the stuff on the server the error
    message appears (and, yes, I've changed all references to the
    webservice to be the one on the server instead of the local
    workstation ;))
    What is causing this? Why do I get an error from Adobe's own
    code?

    Sorry... I take back what I said about it not being the
    webservice. It seemed it was the webservice after all... but not in
    the way you'd think.
    It seems that the webservice handling on server-side AS can't
    handle webmethods that return complex types. I had two methods that
    returned DataTable-objects (.Net-objects). As soon as I removed
    those the webservice calls worked just the way they should again.
    All the webmethods in the webservice now only return primitive
    types.
    This still seems like a bug in Adobe's webservice classes,
    though. A consumer of a webservice should be able to handle complex
    types.

  • Endless WebService Pain

    I'm at wits end with the WebService support in Flex. It's bad
    enough to have recode a bunch of stuff for every hotfix, but Flex 3
    seems to have just flat out broken web services entirely. Even the
    wizard generated code doesn't work. All I get out of it is
    "TypeError: Cannot marshall type '
    http://www.w3.org/2001/XMLSchema::Object'
    to simple content." Does anybody know of a backend web service tier
    that the "latest and worst ever" WebService classes will work with?
    I'm currently running Axis 1.4 under Jboss and WebLogic. That used
    to work fine with Flex 2.0.1 hotfix 1. Now nothing is encoded right
    on the client side (incoming or outgoing).

    Problem with AppleTv is that so many other bits - network, itunes, OS - must be running fine for it to function properly. It could be your itunes library is somehow corrupted and it gets to an entry it can't do anything with for some reason.
    You could create a new user account and set up a test library but if you sync that to AppleTV anything already on it will be deleted as you can only sync 1 library.
    If that worked ok it might point to the other itunes library being at fault, in which case you could 'rebuild' the library (there's a support article for this somewhere) though I would warn you that any custom tags you've manually added to things in iTunes as well as some album artwork might get wiped in the process (this happened to me).

Maybe you are looking for