History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: SDK-13050
Type: Bug Bug
Status: Closed Closed
Resolution: Not a Bug
Assignee: wichan
Reporter: Ian Ilsley
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Flex SDK

AMF Channel endpoint uri - relative path is prepended with http giving an invalid uri

Created: 10/14/07 01:42 PM   Updated: 10/22/07 10:28 AM
Component/s: RPC: RemoteObject
Security Level: Public (All JIRA Users )

Severity: Incorrectly Functioning
Reproducibility: Every Time
Discoverability: High
Found in Version: None
Affected OS(s): Windows - Vista
Steps to Reproduce:

Steps to reproduce:

1. create a channel with an endpoint uri that is a relative path eg:

<channel-definition id="my-amfphp" class="mx.messaging.channels.AMFChannel">
<endpoint uri="amfphp/gateway.php" class="flex.messaging.endpoints.AMFEndpoint"/>
</channel-definition>
2. run a flex app that references that channel .

 
 Actual Results:
 
 ArgumentError: Error #2004: One of the parameters is invalid. url: 'http:amfphp/gateway.php'
at flash.net::NetConnection/connect()

 Expected Results:
no error
 
 Workaround (if any):
 
 
 Comments:

Note the http: has been prepended to the url ..
Language Found: English
Bugbase Id: none
Regression: Yes
QA Owner: Trevor Baker
Resolved by: wichan
Participants: Ian Ilsley, Trevor Baker and wichan
Browser: Firefox 2.x
JDK: Sun 1.6.x


 All   Comments      Sort Order:
wichan - [10/18/07 01:54 PM ]
I don't think it is a bug. Relative path isn't a possible choice. Anything inside WEB-INF is not accessible to web. services-config.xml is located in WEB-INF/flex. Using relative path, it has nothing related to. Similar inside web.xml, it doesn't take a path like this. It should use '/' as web root

Trevor Baker - [10/18/07 05:21 PM ]
Are you saying that /amfphp/gateway.php would work? ie. the context root is missing?

<endpoint uri="/amfphp/gateway.php" class="flex.messaging.endpoints.AMFEndpoint"/>

Ian Ilsley - [10/18/07 10:13 PM ]
@wichan

We are not talking about a WEB-INF/services-config.xml . This is using AMFPHP .
Documentation seems to indicate relative uri is possible ..

[quote]
uri property
uri:String [read-write]

Provides access to the URI used to create the whole endpoint URI for this channel. The URI can be a partial path, in which case the full endpoint URI is computed as necessary.
[/quote]

@trbaker

Yes using the web ROOT does work , ie

<endpoint uri="/amfphp/gateway.php" class="flex.messaging.endpoints.AMFEndpoint"/>
providing u have amfphp installed in your web root . :) . Thats my whole argument is that I dont want to force customers to install things in webroot .


Trevor Baker - [10/22/07 10:17 AM ]
There are only three things the swf can compute at runtime, protocol, hostname and port (mx.utils.URLUtil). So while it is true that you can use a relative path, it must be resolvable from hostname:port downwards.

Ian Ilsley - [10/22/07 10:28 AM ]
The issue is the relative url being pre-pended with "http" .

ex:

URI = "/myamfphp/gateway.php" - this works fine if myamfphp is in the ROOTDIR of my webserver .
URI="myamfphp/gateway.php" - this doesnt work because it's getting changed to "http:myamfphp/gateway.php" .

Its possible to use relative uri's with WebServices and HttpService why not RemoteObject ?