all groups > flash data integration > december 2006 >
You're in the

flash data integration

group:

Problems connecting to a Webservice


Problems connecting to a Webservice Purvez
12/7/2006 11:24:15 AM
flash data integration: Hi

I have a test webservice created in Java which accepts 2 ints and returns
their sum as an int. I use Sun App Server 9 and it works fine using JSP pages.
In Flash I did the following:

1. Dragged a Webservice connector and gave it the WSDL url. It did find this
as it displayed the 'add' operation within the service. However in the Schema
tab it did not show the 2 input parameters. Instead it shows 'Params' as a
single Object type. It also showed the 'Response' as an Object type. I have
attached the WSDL file for info.

Looking at the WSDL file, the schema is imported from a separate .xsd and
maybe Flash is not doing the import.

2. Regardless of the above I manually created 2 int type parameters under
Params and changed the type for Response to int as well. I then bound these to
3 UI Text components on the stage. Also created a button to 'trigger' the
webservice component. However although no error messages are given, nothing
happens either.

3. I then tried using the WebService class to connect to the service. I
tried calling the OnFault method and the Callback result. Again nothing. I
also tried stepping through using the debugger, but most of it went over my
head.

All the help documentation in Flash discusses an RPC style WSDL. However the
WSDL created for my webservice is of style 'document'. Where can I find info
on this?

Thanks in advance for all help.

Purvez

<?xml version="1.0" encoding="UTF-8"?><definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://calculator.calcs.nexar/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="http://calculator.calcs.nexar/" name="CalculatorWSService">
<types>
<xsd:schema>
<xsd:import namespace="http://calculator.calcs.nexar/"
schemaLocation="http://K14204.kingsch.nhs.uk:8080/CalculatorWSApplication/Calcul
atorWSService/__container$publishing$subctx/WEB-INF/wsdl/CalculatorWSService_sch
ema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
</xsd:schema>
</types>
<message name="add">
<part name="parameters" element="tns:add"/>
</message>
<message name="addResponse">
<part name="parameters" element="tns:addResponse"/>
</message>
<portType name="CalculatorWS">
<operation name="add">
<input message="tns:add"/>
<output message="tns:addResponse"/>
</operation>
</portType>
<binding name="CalculatorWSPortBinding" type="tns:CalculatorWS">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<operation name="add">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="CalculatorWSService">
<port name="CalculatorWSPort" binding="tns:CalculatorWSPortBinding">
<soap:address
location="http://K14204.kingsch.nhs.uk:8080/CalculatorWSApplication/CalculatorWS
Service" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
</port>
</service>
</definitions>
Re: Problems connecting to a Webservice Purvez
12/7/2006 3:11:45 PM
Update on my problem.

OK I found out that Flash (at least in the MX version) did not support
'import'. I suspect that is still the situation. Anybody know how to work
around this?

Thanks
Purvez

AddThis Social Bookmark Button