I'm new to both Flex and the CXF/XFire API I'm using for simple web
services. I've gotten a basic interface working with Flex, and a
simple service working with CXF and deployed to Tomcat locally, so now
I'm trying to connect the two. I was able to connect to the webservice
with a simple client from the CXF tutorials so I know that's working. 

One of the errors in the tomcat log was an IllegalArgumentException. I
searched the CXF user forums for similar issues, and found one poster
who mentioned that Flex uses RPC and CXF defaults to document/literal,
could that be a problem?

The error on the Flex side doesn't help much : 

[RPC Fault faultString="HTTP request error"
faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent
type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error
#2032: Stream Error. URL:
http://localhost:8080/OrderViewWeb/services/FullOrder";]. URL:
http://localhost:8080/OrderViewWeb/services/FullOrder";]
        at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
        at mx.rpc::Responder/fault()
        at mx.rpc::AsyncRequest/fault()
        at ::DirectHTTPMessageResponder/errorHandler()
        at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()

Here's the wsdl, hope that's not too much : 

<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid XML Studio 1.0.4.0
(http://www.liquid-technologies.com) -->
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:tns="http://services.project.company.com/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
name="FullOrderServiceImplService"
targetNamespace="http://services.project.company.com/";>
        <wsdl:types>
                <xs:schema xmlns="http://services.project.company.com/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://services.project.company.com/";>
                        <xs:complexType name="fullOrder">
                                <xs:sequence>
                                        <xs:element minOccurs="0" name="desc" 
type="xs:string" />
                                        <xs:element name="id" type="xs:int" />
                                </xs:sequence>
                        </xs:complexType>
                        <xs:element name="getFullOrder" type="getFullOrder" />
                        <xs:complexType name="getFullOrder">
                                <xs:sequence>
                                        <xs:element name="fullOrderId" 
type="xs:int" />
                                </xs:sequence>
                        </xs:complexType>
                        <xs:element name="getFullOrderResponse" 
type="getFullOrderResponse" />
                        <xs:complexType name="getFullOrderResponse">
                                <xs:sequence>
                                        <xs:element minOccurs="0" name="return" 
type="fullOrder" />
                                </xs:sequence>
                        </xs:complexType>
                </xs:schema>
        </wsdl:types>
        <wsdl:message name="getFullOrderResponse">
                <wsdl:part element="tns:getFullOrderResponse" name="result">
                </wsdl:part>
        </wsdl:message>
        <wsdl:message name="getFullOrder">
                <wsdl:part element="tns:getFullOrder" name="parameters">
                </wsdl:part>
        </wsdl:message>
        <wsdl:portType name="FullOrderService">
                <wsdl:operation name="getFullOrder">
                        <wsdl:input message="tns:getFullOrder" 
name="getFullOrder">
                        </wsdl:input>
                        <wsdl:output message="tns:getFullOrderResponse"
name="getFullOrderResponse">
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="FullOrderServiceImplServiceSoapBinding"
type="tns:FullOrderService">
                <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"; />
                <wsdl:operation name="getFullOrder">
                        <soap:operation soapAction="" style="document" />
                        <wsdl:input name="getFullOrder">
                                <soap:body use="literal" />
                        </wsdl:input>
                        <wsdl:output name="getFullOrderResponse">
                                <soap:body use="literal" />
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="FullOrderServiceImplService">
                <wsdl:port binding="tns:FullOrderServiceImplServiceSoapBinding"
name="FullOrderServiceImplPort">
                        <soap:address
location="http://localhost:8080/testWebApp/services/FullOrder"; />
                </wsdl:port>
        </wsdl:service>
</wsdl:definitions>

Reply via email to