This is likely using the WSDL 1.2 specification in which case the Flex
client cannot currently communicate with it. If you post the WSDL, I can
verify this.


Carson 


____________________________________________
 
Carson Hager
Cynergy Systems, Inc.
http://www.cynergysystems.com
 
Email:  [EMAIL PROTECTED]
Office:  866-CYNERGY
Mobile: 1.703.489.6466
 


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of tobiaspatton
Sent: Tuesday, January 31, 2006 8:25 AM
To: [email protected]
Subject: [flexcoders] Problems accessing .NET 2.0 web service

Hello everyone;

I'm having dificulty accessing a web service using ws:WebService. 
The service was created using .NET 2.0 and Windows Communication 
Foundation. It's hosted on my local machine. A client written in C# 
has no problem accessing it. When accessed through a small Flex 2.0 
application, the fault handler is invoked with this message: "There 
are no valid ports in the WSDL file for the JobHierarchyService 
service".

I've run the Restaurant example project to confirm that web services 
work on my machine.

I'm new to Flash and Flex and would appreciate any help.

Thanks.

Tobias.

Here's the relevant code:

var ws:WebService = new WebService();                   
ws.wsdl = "http://localhost:8080/JobHierarchyService?wsdl";;
ws.fetchWSDL();
ws.addEventListener("result", wsResult);
ws.addEventListener("fault", wsFault);
var call : Object  = ws.Echo( "Hello World" );

Here's the debug trace:

[SWF] /Flash/WebService1-debug.swf - 1,016,919 bytes after 
decompression
Registering schema namespace: http://www.w3.org/1999/XMLSchema
Registering schema namespace: http://www.w3.org/2000/10/XMLSchema
Registering schema namespace: http://www.w3.org/2001/XMLSchema
Registering schema namespace: 
http://schemas.xmlsoap.org/soap/encoding/
Registering schema namespace: http://xml.apache.org/xml-soap
Registering schema namespace: http://rpc.xml.coldfusion
Creating WSDL object for http://localhost:8080/JobHierarchyService?
wsdl
Fetching document http://localhost:8080/JobHierarchyService?wsdl for 
destination 'defaultHttp'
Creating SOAP Operation for Echo
Queueing SOAP operation Echo
Processing imports
Parsing schemas
Done parsing schemas: 0 ms
Fetching document http://localhost:8080/JobHierarchyService?
wsdl=wsdl1 for destination 'defaultHttp'
Processing imports
Parsing schemas
Registering schema namespace: 
http://kodak.com/WPE/Dashboard/JobServer/Imports
Done parsing schemas: 1 ms
Done processing imports: 258 ms
Parsing services
Parsing individual services
Parsing service: JobHierarchyService
Parsed service: 1 ms
Done parsing services: 3 ms
WSDL parse took 263 ms
WSDL loaded
Faulting previously queued operation calls Echo
Service stub found fault upon receiving WSDL
(http://localhost:8080/JobHierarchyService?wsdl): 
        There are no valid ports in the WSDL file for the 
JobHierarchyService service.
[UnloadSWF] /Flash/WebService1-debug.swf

Here's the WSDL:

  <?xml version="1.0" encoding="utf-8" ?> 
- <wsdl:definitions name="JobHierarchyService" 
targetNamespace="http://tempuri.org/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:i0="http://kodak.com/WPE/Dashboard/JobServer"; 
xmlns:tns="http://tempuri.org/"; 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; 
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"; 
xmlns:ci="http://schemas.microsoft.com/ws/2005/01/WSDL/Extensions/Con
tractInheritance" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"; 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
wssecurity-utility-1.0.xsd" 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";>
- <wsp:Policy wsu:Id="WSHttpBinding_IJobHierarchyService_policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:SymmetricBinding 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
- <wsp:Policy>
- <sp:ProtectionToken>
- <wsp:Policy>
- <sp:SecureConversationToken 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy
/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
  <sp:RequireDerivedKeys /> 
  <mssp:RequireCancel wsp:Optional="true" 
xmlns:mssp="http://schemas.microsoft.com/ws/2005/07/securitypolicy"; /
> 
- <sp:BootstrapPolicy>
- <wsp:Policy>
- <sp:SymmetricBinding>
- <wsp:Policy>
- <sp:ProtectionToken>
- <wsp:Policy>
- <sp:SpnegoContextToken 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy
/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
  <sp:RequireDerivedKeys /> 
  <mssp:RequireCancel wsp:Optional="true" 
xmlns:mssp="http://schemas.microsoft.com/ws/2005/07/securitypolicy"; /
> 
  </wsp:Policy>
  </sp:SpnegoContextToken>
  </wsp:Policy>
  </sp:ProtectionToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
  <sp:Basic256 /> 
  </wsp:Policy>
  </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
  <sp:Strict /> 
  </wsp:Policy>
  </sp:Layout>
  <sp:IncludeTimestamp /> 
  <sp:OnlySignEntireHeadersAndBody /> 
  </wsp:Policy>
  </sp:SymmetricBinding>
- <sp:Wss11>
- <wsp:Policy>
  <sp:MustSupportRefKeyIdentifier /> 
  <sp:MustSupportRefIssuerSerial /> 
  <sp:MustSupportRefThumbprint /> 
  <sp:MustSupportRefEncryptedKey /> 
  </wsp:Policy>
  </sp:Wss11>
- <sp:Trust10>
- <wsp:Policy>
  <sp:MustSupportIssuedTokens /> 
  <sp:RequireClientEntropy /> 
  <sp:RequireServerEntropy /> 
  </wsp:Policy>
  </sp:Trust10>
  </wsp:Policy>
  </sp:BootstrapPolicy>
  </wsp:Policy>
  </sp:SecureConversationToken>
  </wsp:Policy>
  </sp:ProtectionToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
  <sp:Basic256 /> 
  </wsp:Policy>
  </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
  <sp:Strict /> 
  </wsp:Policy>
  </sp:Layout>
  <sp:IncludeTimestamp /> 
  <sp:OnlySignEntireHeadersAndBody /> 
  </wsp:Policy>
  </sp:SymmetricBinding>
- <sp:Wss11 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
- <wsp:Policy>
  <sp:MustSupportRefKeyIdentifier /> 
  <sp:MustSupportRefIssuerSerial /> 
  <sp:MustSupportRefThumbprint /> 
  <sp:MustSupportRefEncryptedKey /> 
  </wsp:Policy>
  </sp:Wss11>
- <sp:Trust10 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
- <wsp:Policy>
  <sp:MustSupportIssuedTokens /> 
  <sp:RequireClientEntropy /> 
  <sp:RequireServerEntropy /> 
  </wsp:Policy>
  </sp:Trust10>
  <wspe:Utf816FFFECharacterEncoding 
xmlns:wspe="http://schemas.xmlsoap.org/ws/2004/09/policy/encoding"; />
 
  <wsap:UsingAddressing 
xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/09/policy/addressing"; 
/> 
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
- <wsp:Policy 
wsu:Id="WSHttpBinding_IJobHierarchyService_Echo_Input_policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:SignedParts 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
  <sp:Body /> 
  <sp:Header Name="To" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  <sp:Header Name="From" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  <sp:Header Name="FaultTo" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  <sp:Header Name="ReplyTo" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  <sp:Header Name="MessageID" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  <sp:Header Name="RelatesTo" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  <sp:Header Name="Action" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  </sp:SignedParts>
- <sp:EncryptedParts 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
  <sp:Body /> 
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
- <wsp:Policy 
wsu:Id="WSHttpBinding_IJobHierarchyService_Echo_output_policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:SignedParts 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
  <sp:Body /> 
  <sp:Header Name="To" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  <sp:Header Name="From" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  <sp:Header Name="FaultTo" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  <sp:Header Name="ReplyTo" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  <sp:Header Name="MessageID" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  <sp:Header Name="RelatesTo" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  <sp:Header Name="Action" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"; /> 
  </sp:SignedParts>
- <sp:EncryptedParts 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
  <sp:Body /> 
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
  <wsp:UsingPolicy /> 
  <wsdl:import namespace="http://kodak.com/WPE/Dashboard/JobServer"; 
location="http://localhost:8080/JobHierarchyService?wsdl=wsdl1"; /> 
  <wsdl:types /> 
- <wsdl:binding name="WSHttpBinding_IJobHierarchyService" 
type="i0:IJobHierarchyService">
  <wsp:PolicyReference 
URI="#WSHttpBinding_IJobHierarchyService_policy" /> 
  <soap12:binding 
transport="http://schemas.xmlsoap.org/soap/http"; /> 
- <wsdl:operation name="Echo">
  <soap12:operation 
soapAction="http://kodak.com/WPE/Dashboard/JobServer/IJobHierarchySer
vice/Echo" style="document" /> 
- <wsdl:input>
  <wsp:PolicyReference 
URI="#WSHttpBinding_IJobHierarchyService_Echo_Input_policy" /> 
  <soap12:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <wsp:PolicyReference 
URI="#WSHttpBinding_IJobHierarchyService_Echo_output_policy" /> 
  <soap12:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="JobHierarchyService">
- <wsdl:port name="WSHttpBinding_IJobHierarchyService_port" 
binding="tns:WSHttpBinding_IJobHierarchyService">
  <soap12:address 
location="http://localhost:8080/JobHierarchyService"; /> 
- <wsa:EndpointReference>
  
<wsa:Address>http://localhost:8080/JobHierarchyService</wsa:Address> 
- <Identity 
xmlns="http://schemas.microsoft.com/ws/2004/04/addressingidentityexte
nsion">
  <Upn>[EMAIL PROTECTED]</Upn> 
  </Identity>
  </wsa:EndpointReference>
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

And, finally, here's ?wsdl=wsdl1

  <?xml version="1.0" encoding="utf-8" ?> 
- <wsdl:definitions 
targetNamespace="http://kodak.com/WPE/Dashboard/JobServer"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:tns="http://kodak.com/WPE/Dashboard/JobServer"; 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; 
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"; 
xmlns:ci="http://schemas.microsoft.com/ws/2005/01/WSDL/Extensions/Con
tractInheritance" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"; 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
wssecurity-utility-1.0.xsd" 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";>
- <wsdl:types>
- <xsd:schema 
targetNamespace="http://kodak.com/WPE/Dashboard/JobServer/Imports";>
  <xsd:import 
schemaLocation="http://localhost:8080/JobHierarchyService?xsd=xsd0"; 
namespace="http://kodak.com/WPE/Dashboard/JobServer"; /> 
  <xsd:import 
schemaLocation="http://localhost:8080/JobHierarchyService?xsd=xsd1"; 
namespace="http://schemas.microsoft.com/2003/10/Serialization/"; /> 
  </xsd:schema>
  </wsdl:types>
- <wsdl:message name="IJobHierarchyService_Echo_InputMessage">
  <wsdl:part name="parameters" element="tns:Echo" /> 
  </wsdl:message>
- <wsdl:message name="IJobHierarchyService_Echo_OutputMessage">
  <wsdl:part name="parameters" element="tns:EchoResponse" /> 
  </wsdl:message>
- <wsdl:portType name="IJobHierarchyService">
- <wsdl:operation name="Echo">
  <wsdl:input 
wsa:Action="http://kodak.com/WPE/Dashboard/JobServer/IJobHierarchySer
vice/Echo" message="tns:IJobHierarchyService_Echo_InputMessage" /> 
  <wsdl:output 
wsa:Action="http://kodak.com/WPE/Dashboard/JobServer/IJobHierarchySer
vice/EchoResponse" 
message="tns:IJobHierarchyService_Echo_OutputMessage" /> 
  </wsdl:operation>
  </wsdl:portType>
  </wsdl:definitions>





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to