Web Service and result handler problem

Hi!
I load WSDL file and then invoke addnumbers() method without
problems. But I don't get any results. resultHandler and
faultHandler silent after addnumbers invoke. Where is the
problem???
My code:
public function useWebService():void {
WS = new WebService();
WS.wsdl = "................?wsdl"
WS.addEventListener("load", loadHandler);
WS.addEventListener("fault",faultHandler);
WS.useProxy = false;
WS.loadWSDL();
WS.addnumbers.addEventListener("result", resultHandler);
WS.addnumbers.addEventListener("fault", faultHandler);
public function loadHandler(event:LoadEvent):void {
Alert.show("WSDL is loaded");
WS.addnumbers(2,5);
public function resultHandler(event:ResultEvent):void {
Alert.show("in result handler");
myTextArea.text = event.result.toString();
public function faultHandler(event:FaultEvent):void {
Alert.show("fault: "+ event.toString());
My WSDL:
<?xml version="1.0" encoding="UTF-8"?><definitions
xmlns="
http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="urn:TestWebservice/wsdl"
xmlns:ns2="urn:TestWebservice/types" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"
name="TestWebservice" targetNamespace="urn:TestWebservice/wsdl">
<types>
<schema xmlns="
http://www.w3.org/2001/XMLSchema"
xmlns:tns="urn:TestWebservice/types" xmlns:soap11-enc="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"
targetNamespace="urn:TestWebservice/types">
<complexType name="addnumbers">
<sequence>
<element name="int_1" type="int"/>
<element name="int_2"
type="int"/></sequence></complexType>
<complexType name="addnumbersResponse">
<sequence>
<element name="result"
type="int"/></sequence></complexType>
<element name="addnumbers" type="tns:addnumbers"/>
<element name="addnumbersResponse"
type="tns:addnumbersResponse"/></schema></types>
<message name="TestWebserviceSEI_addnumbers">
<part name="parameters"
element="ns2:addnumbers"/></message>
<message name="TestWebserviceSEI_addnumbersResponse">
<part name="result"
element="ns2:addnumbersResponse"/></message>
<portType name="TestWebserviceSEI">
<operation name="addnumbers">
<input message="tns:TestWebserviceSEI_addnumbers"/>
<output
message="tns:TestWebserviceSEI_addnumbersResponse"/></operation></portType>
<binding name="TestWebserviceSEIBinding"
type="tns:TestWebserviceSEI">
<soap:binding transport="
http://schemas.xmlsoap.org/soap/http"
style="document"/>
<operation name="addnumbers">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body
use="literal"/></output></operation></binding>
<service name="TestWebservice">
<port name="TestWebserviceSEIPort"
binding="tns:TestWebserviceSEIBinding">
<soap:address location="
http://................../FlexWebserviceTest2/TestWebservice"
xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"
xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/"/></port></service></definitions>
--------------------

Here it is:
<mx:WebService
id="WS"
wsdl="
http://................................TestWebservice?wsdl"
useProxy="false"
fault="Alert.show(event.fault.faultString), 'Error'"
showBusyCursor="true" >
<mx:operation name="addnumbers" >
<mx:request>
<int_1>
2
</int_1>
<int_2>
5
</int_2>
</mx:request>
</mx:operation>
</mx:WebService>
<mx:Panel>
<mx:VBox >
<mx:HBox fontSize="12">
<mx:Button label="Go!" click="WS.addnumbers.send()"/>
</mx:HBox>
<mx:HDividedBox width="800">
<mx:TextArea id="myTextArea"
text="{WS.addnumbers.lastResult.toXMLString()}" width="390"
height="400" fontSize="12"/>
</mx:HDividedBox>
</mx:VBox>
</mx:Panel>
----------------

Similar Messages

  • Making a web service and have a problem

    Hi all.
    I've greated a synchronous communication. SOAP<->XI<->RFC
    No problem to create a webservice from this.
    When I implement a BPM for that communication the web service makes the request message as respones message and the response message as request message. I don't get why?
    In the synchronous setup the inteface for the SOAP are outbound, synchronous and for the BPM solution the the inteface are abstract, synchronous. I've made abstract asynchronous interfaces for the request and the respone to use inside the BPM.
    Can somebody please give me a hint of why the web service swiches the request and respones message in the BPM solution? If you need more information I gladly provide what you need about my solution.
    BR
    Kalle

    Yes the request and the respones are mapped with the Abstarct Asynchronous interfaces.
    The mappings are called inside the BPM from a transformation step.
    There are no mappings with the source synchronous interface that are abstract when using BPM and outbound when not using BPM and same with the target synchronous interface that are abstract. Created the target synchronous interface when implementing BPM in teh solution.
    If not using BPm how should I do this then?
    //Kalle

  • Envy 100 410A Web Services and Ipod problems

    Hi,
    I purchased the Envy 410A and I'm having a few problems.  I have two Macbooks and a 4th gen Ipod Touch setup on a wireless network with a Linksys WRT100 router.  First, what's working:
    I successfully installed the printer on both computers through USB and I can print wirelessly from each without any difficulties.  (I set a fixed IP address for the printer to avoid having to 'find' it each time it got a new address by DHCP.)
    Here are my problems:
    1) On setup, the printer successfully connected to the HP web service and printed out a code for ePrinting.  I entered this code and was able to print via email.  However, sometime between last night and today (and after I installed 6 updates) the printer reported that it no longer had an email address.  I turned off Web Services to troubleshoot, but now when I try to enable it I get the "Problem Connecting to the Web Services Server" error.  Powercycling the router and/or printer does not fix this.  Nor does turning off the printer's wireless functions for 5 minutes.  I've tried restoring factory defaults, but it did not actually restore anything.  How can I fix this?  Is the server down, or is something screwed up?
    2) My iPod Touch is completely updated to iOS 4.2, bluetooth is turned off, and I've verified that it's on the same network as the printer, but I cannot detect the printer on my iPod either through Apple's AirPrint or through the HP iPhoto App 3.0.  Both just say "No printers found".  This is really frustrating since I bought this with printing from mobile devices in mind.  Any advice?
    Thanks for your help,
    Dave

    I am glad your first problem is resolved. When it comes to iPod having OS 4.2, the device supports AirPrint which is new from Apple.
    For more information on how to use the AirPrint on your iPod refer to below link:
    http://h10025.www1.hp.com/ewfrf/wc/document?lc=en&dlc=en&cc=us&docname=c02623193
    If the iPod still does not find the printer, try unchecking the option "Enable Multicast Streams" in the router EWS page and see if it works or not. Contact your router support for more info.
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

  • Problem with MDM web services and webdynpro

    Hi MDMguru,
    I have created web services from SDN example: it reads the MDM version.
    If I use J2ee Navigator Web Services and I try  mywebservices, it works very well.
    I have created a webdynpro (from this SDN Example https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/creating%20an%20email-client%20using%20web%20dynpro%20and%20web%20services.pdf).
    I have followed step by step the example.
    But when run webdynpro and it calls my webservices it not works because it throws this exception:
    javax.xml.rpc.soap.SOAPFaultException: Exception in method getVersion. , Debug ,  , com.enel.sap.ws.component.WSComponent.VersionMDM , sap.com/tcwddispwda , J2EE_GUEST
    Can someone help me?

    It appears that %ROWTPYE is not supported directly, and that we need to create a TYPE to wrap the return data
    Thanks to Marc Thompson for the details (http://marc-on-oracle.blogspot.co.uk/2007/12/11g-database-installation-and-native.html)
    PD

  • Web Services with database backend problem

    Hi im new to webservices and having problems implementing a project that i am working on.
    What i would like to do is have a webservice that recieves information from the client to input into a database using jdbc.
    Following the tutorials and using netbeans 6 to create the webservice itself i can manage to pass the parameter to the webservice itself.
    However i encounter a problem, normally i would seperate all the logic into seperate classes, one to handle the database connection, another for query execution etc...
    Is there a way to do this for webservices? reference a normal class or does all the code have to be in the webservice and nested classes?
    Atm what i have is a web application project in netbeans 6 with a custom created webservice that i get the parameters from a working client. im just a little unsure on how to proceed at the moment any help would be greatly appreciated.

    Of course you can have separate classes. All you need is to make sure they are visible from the class implementing the Web Service. That means either creating them in the same package or importing the package.
    You probably need more than one projects. One for the web service and one for the (web) client.

  • Web Services and JHS

    My company is exploring the use of JHeadstart and we are very impressed with its capabilities. The enterprise environment into which our system will be deployed requires separation between the View Layer, and the Model Layer, with a SOAP-based messaging agent as the go-between (it's MQ series-based). We have been able to get a prototype plain-old UIX application to work where we deploy the Application Module in the Model project as a web service, and then create a data control from the stub to consume in the UIX ViewController project. We can then simply drag and drop the Web Service call result sets onto the UIX pages. However, when trying to do this with JHeadstart, the Wizard for creating Application Structure Files requests an Application Module on one of the first screens. In our environment, we won't be able to allow the ViewController project to see the Model project. Is there any way to use a web service instead of the Application Module? If not, is there any plan to support this type of activity in a future JHS release?
    Thanks in advance,
    Dan Schiff

    Dan,
    Currently JHeadstart only supports ADF Business Components as the Business Service layer (directly accessed, not through a Web Service wrapper). As you found out, ADF supports other Business Services as well, not only Web Services but also TopLink, EJB, etc.
    JHeadstart is primarily intended for data manipulation (select, insert, update, delete) and our philosophy is that that type of functionality (that part of your application) is most efficiently handled directly by ADF Business Components. Also, this is the most productive technique for application developers. Of course, the end result of generating an application with JHeadstart is that you have a "normal" ADF application, to which you can add Web Service functionality with the normal JDeveloper visual editors and drag-and-drop features.
    So you could generate efficient data manipulation screens using JHeadstart and direct ADF Business Components, and then add interoperability with other Business Services to your application using Web Services. The latter part is not JHeadstart-generated.
    The next JHeadstart release (10.1.3) will be focused on supporting JSF (JavaServer Faces). We are also looking into support for other Business Services like TopLink, but we don't have any schedule for that yet.
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Pl/Sql web service and collections not working

    Hello
    I'm trying to create a web service from a function in a package which returns a collection. The creation of the web service and its deployment seem to work correctly. I do get the following warning :
    WARNING: OWS-00077 The Value Type class: pxWsLang.PamLanguagerecordBase does not have a valid JAVA Bean pattern
    but I don't think this is the source of the problem.
    When I try to test the web service using the endpoint in the wsdl I get the following answer in the browser:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>Error creating target: pxWsLang.WsLangUser</faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>
    In the DOS window for the OC4J I get the following error :
    2006-11-15 09:21:25.852 ERROR OWS-04005 An error occurred for port: {http://pxWs
    Lang/WsLang.wsdl}wsLangSoapHttpPort: javax.xml.rpc.JAXRPCException: Error creati
    ng target: pxWsLang.WsLangUser.
    The PL/SQL code is as follows :
    Object:
    CREATE OR REPLACE TYPE PAM_LanguageRecord as OBJECT
    NR NUMBER(3),
    SYMBOL VARCHAR2(2)
    Collection:
    CREATE OR REPLACE Type PAM_LanguageTable as Table of PAM_LanguageRecord;
    Package body :
    create or replace package body PAM_TEST is
    function CursorTest return Pam_LanguageTable is
    Res_LangTable PAM_LanguageTable;
    cursor cur is select * from stc_languages;
    begin
    Res_LangTable := new PAM_LanguageTable();
    for Rec in cur loop
    Res_LangTable.Extend(1);
    Res_LangTable(cur%ROWCOUNT) := new PAM_LanguageRecord
    (Rec.NR,
    Rec.SYMBOL
    end loop;
    Return Res_LangTable;
    end;
    end;
    I'm using JDeveloper version 10.1.3.1.0.3984
    How can I get this to work ? (without using Apache Axis or other tools :-)
    Is it supposed to work ?
    Many Thanks
    Paul

    Hi,
    for the "error creating target" problem I found the solution here:
    [WS from a PL/SQL package]: Error creating target
    Hope this helps.
    Regards,
    Patrik

  • Web service and servlets in the same project...web.xml?

    Hello, I have a problem with my web service.
    I have a server, which displays a web service. I programmed this service with JAXRPC.
    I have a client, in another directory. I succeded in compiling, deploying and running the web service.
    The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
    These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
    But of course, it's not working by itself. I know there's something to do with the web.xml files.
    The thing is that I created a web.xml file for the service, and another for the servlets.
    I was thinking of joining both of them in one xml file, but everything crashes then...
    Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
    Thanks for any help
    Philippe

    Hello, I have a problem with my web service.
    I have a server, which displays a web service. I programmed this service with JAXRPC.
    I have a client, in another directory. I succeded in compiling, deploying and running the web service.
    The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
    These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
    But of course, it's not working by itself. I know there's something to do with the web.xml files.
    The thing is that I created a web.xml file for the service, and another for the servlets.
    I was thinking of joining both of them in one xml file, but everything crashes then...
    Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
    Thanks for any help
    Philippe

  • Quick questions on the topic of Web Services and EJB POJOs

    I have been reading about Web Services and the data types that are aloud as operation parameters and return types. I was wondering what the standard practice for return types; is it to use the Entity classes straight and customize the WSDL instead of letting the EE container do it (avoid cyclic problems in the schema that can occur when using entity 1-to-many and many-to-1 mappings) or; is it to off load the data into a DTO/VO/Bean and let the EE container take care of all the schema mapping for the WSDL? I look at the EE tutorial and bought a EE book both use very basic examples that do not include connecting to a database or using EJB3 for the data store.
    Thanks for any information

    bump

  • Web services and control characters

    Hi,
    We are using JAXWS and JAXB to create web services. We have a problem with our current data because it sometimes contains "bad" characters, such as control characters. Is there a nice way for us to remove these characters when creating the messages or when retrieving the data from the database? We use java persistence / hibernate to retrieve the data from the database.
    I would prefer a method that doesn't include having to "clean" each string manually...
    Thanks!

    hi, i�m doing something like you but in jbuilder that is another IDE, i don�t know if it is useful for you but i entered to the help of jbuilder and i wrote in the index "web services" and then i found a topic called : "export classes as webservices" and in that place i can see some steps to follow, may be in eclipse you can find something like this.

  • [jaxrpc] defining web services and WSDL spec

    Greetings,
    I'm starting in JAXRPC web service's concepts and its WSDL specification. After I tested some samples from the jaxrpc tutorial, I tried to make my custom web service, but, I have problems when I deploy the web service and I tried to see in my browser the endpoint url - I got a internal server exception! I pick up the hello sample, I added to it my custom core sample web service functionality - using the same operations, the same signatures methods - and it worked fine!!
    So, what' is wrong? The main difference between them is that I have differents configuration files for xrpcc that will give a wsdl files for each one. Whats changes? The service name? The interface/package name? Is there some kind of limitation in the package name convention with the service names beyound the basic ones in the xrpcc (jaxrpc) specification?
    thanks,
    Pedro Salazar.

    I upgraded webservices developer pack to 1.0 version (final) and I solved my problems!
    Pedro Salazar

  • Last Chance to Weigh In On Web Services and SOA

    <p>
    IDC is conducting a worldwide survey to get a developer's perspective on Web Services and Service-Oriented Architecture (SOA) in collaboration with several large IT vendors, including SAP.  Originally the survey was scheduled to close on January 22; however the deadline for participating has been extended until January 31, 2007.
    </p>
    <p>
    We invite members of the SDN community to participate in this survey regardless of what role you may play in the software development life cycle, and whether you are an individual contributor or a manager. 
    </p>
    <p>
    The results of this survey will be made available in a variety of forms to information technology vendors.  Please be assured that the information you provide is intended to be used only in aggregation with the answers of other respondents.
    </p>
    If you complete the survey and provide your email address, the following incentives will be made available to you:
    <p>
    <UL type="sqaure">
    <li>Access later to a pre-selected IDC publication</li>
    <li>Access to a selected subset of this survey's results when they become available</li>
    <li>20 contribution points on SDN</li>
    </UL>
    </p>
    <p>
    The survey is Web-based, and should take approximately 30 minutes to complete. 
    </p>
    <p>
    Click <a href=http://www.idcswdc.com/cgi-bin/survey?id=306cft target="_blank">"here"</a> to take the survey.
    </p>
    Thank you for your participation.

    hi user572206
    If you don't get an answer here, there is also a "BPEL" forum:
    BPEL
    (tip : You can use "Your Control Panel" to make your name visible in forum posts.)
    success
    Jan Vervecken

  • Weigh In On Web Services and SOA

    IDC, an independent world-wide market research company, is conducting a worldwide survey to get a developer's perspective on Web Services and Service-Oriented Architecture (SOA) in collaboration with several large IT vendors, including SAP. 
    We are inviting members of the SDN community to participate in this survey regardless of what role you may play in the software development life cycle, and whether you are an individual contributor or a manager. 
    The results of this survey will be made available in a variety of forms to information technology vendors.  Please be assured that the information you provide is intended to be used only in aggregation with the answers of other respondents.
    If you complete the survey and provide your email address you will be awarded 20 contribution points on SDN, in addition to the incentives that IDC is offering as outlined in the survey introduction.
    The survey, which is open until January 22, is Web-based and should take approximately 30 minutes to complete.
    Click <a href="http://www.idcswdc.com/cgi-bin/survey?id=306cft">here</a> to take the survey.

    hi user572206
    If you don't get an answer here, there is also a "BPEL" forum:
    BPEL
    (tip : You can use "Your Control Panel" to make your name visible in forum posts.)
    success
    Jan Vervecken

  • Web services and e print not working on 7520e

    After the update it instructed me to turn off my printer so the update could take effect which I did but my printer would not turn back on. leaving it overnight it was the same the next day so I had to unplug it from the wall outlet. I lost my internet connection and no matter what I did I could not get it to connect.I called cloud services who put in a network address of 192.168.223.1 and hung up leaving me with no printer and sending me an email to get my ISP server to fix.
    I called HP support and they got it connected just fine but when I try to log into my printers web page it still has my
    hp email address but when I try to get to the web page it leads me to Launch HP network check.
     on the front of my printer it says unable to connect to the internet, enter a proxy address, my server does not use one.
    I tried to disable web services and then enabled them again hoping to get a new code but no luck. In my own network it has the last digit different to the one being used and set as a static IP address . I was not able to scroll any Apps before any of this happened, is the server down or has anyone any ideas how to fix this. has anyone else got the same problem. The schedulled Apps printed off just fine before this.

    Hello dylon,
    Thank you for being an active member of the HP support community.  I understand that your Photosmart 7520 printer is indicating that it is not connected since doing a firmware update  last week.
    Please start by setting a manual IP address and manual DNS servers.  Please use this post with the steps and screen shots on how to do this.  The screen shots are for the Photosmart 7510 but the steps are the same.
    If you find that you are still unable to connect to web services please call HP’s Cloud Services at 1-855-785-2777 if you live in the USA/Canada region. If you live outside the USA/Canada region please click here to find the Technical Support number for your country/region.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Java app with web service and servlets

    Hi. I intend to make a java application which exposes some methods as a web service and as jsp/servlets. It's core functionality is not really web centric, but its more a java app with a web tier. I am not sure about how the architecture of such a system would look like using the java platform. I currently see three options:
    1. Run everything in a servlet container like tomcat. I hesitate to do this because i would be putting a lot of functionality which isn't about the web into a servlet container. Also, I have a lot of application scope data that is maintained and shared by all servlets/web services. However, it would be really easy just to put everything into tomcat and use ServletContext to maintain some global objects.
    2. Use a Java EE to seperate application/business logic and data access into session beans and entity beans. I hesitate to this because it seem a bit overkill because the system isn't very big or complex right now. It also means that I would have to learn to use EJB's instead of just using some POJOs.
    3. Run the web tier in a servlet container and the main app in a separate JVM, and then connect the tier by sending serialized objects over TCP sockets. I don't like writing network code but at least there is some separation of the tiers.
    What would you do? Maybe I have overlooked a much better solution to the problem?
    Let me just say that the system is the product of a student project spanning one semester, so it's important to choose the RIGHT solution (architectural-wise) instead of the something quick and dirty that is hard to defend.

    jschell wrote:
    Run everything in a servlet container like tomcatTomcat is a JEE container.Now I am confused. Maybe you mean Glassfish? Tomcat is definitely a web container(?).
    Let me just say that the system is the product of a student project spanning one semester, so it's important to choose the RIGHT solution (architectural-wise) That pretty much makes it impossible then.
    1. A "Right" solution is generally only proven by time.
    2. It requires a great deal of knowledge about the business domain.Yeah, you are right. Let be try to rephrase it. What solution (pattern) would be considered the most common or appropriate when you have a Java App and want to expose a few methods as a website and web service?
    I hesitate to do this because i would be putting a lot of functionality which isn't about the web into a servlet container. Also, I have a lot of application scope data that is maintained and shared by all servlets/web servicesHuh? Do you already have an exposed web service? If you already have a server which other clients communicate then where does this functionality that you don't want to be tomcat running now? Or where do you think that you want to run it? And if you are or do run it somewhere else then tomcat could access it the same way any other client accesses that server.Sorry, that sentence was written badly. I don't have anything right now. What I meant to write was that I will have a lot of application scope data, objects that are kept in memory as long as the server is running, shared by multiple servlet instances.

Maybe you are looking for

  • The "Find Faces" function is deactivated on iPhoto 9.5, in OSX Mavericks. Is there any way to activate / deactivate this function?

    Hello, Instead of deactivting the "Find Faces" Function, I would like iPhoto 9.5.1 to run this. On my MacBook Aluminium Late 2008, running Mavericks 10.9.3 this function is grayed out, and never run. Is there a way to activate this function?

  • Error in BAPI_ACC_DOCUMENT_CHECK

    Hi! I would like to call function "BAPI_ACC_DOCUMENT_CHECK" and I encounter the error: <i>Type conflict when calling a function module (field length).</i> First, I upload an excel file. Then, I fill in my document header and line items as below: CALL

  • Email Server Shuts Itself Off

    Using Mountain Lion Server. I was getting errors when trying to send emails and was curious as to why I was not receiving any. I checked the email server to find it was switched off. I turned it back on and a couple of minutes later it switched itsel

  • Add Exchange Rate

    Dear Experts, I want to add new exchange rate using sap object. I found this SetCurrencyRate Method in help, but I don't know how to use it. The company object doesn't show this method. Is there an exchange rate object or can anyone give me an exampl

  • HT201263 iPhone 5 keep goes to Recovery Mode !!!!

    Hi , My iPhone 5 went into recovery time after time, I recovered it many times but it takes a two days or a day and sometimes even twice a day. it is really annoying and wasting time , effort and valuable multimedia. please help