Proxy sends the AUTHORITY rather than SOAP

I'm trying to implement the SOAP over SSL communication between an AIR application and a remote server by using basic HTTP authentication. I realized that this is possible to do it via the Web service proxy. I was unable, however, to convince the proxy to talk SOAP, and AUTHORITY. Documentation on the services-config settings. XML has been a bit light and so it's hard to say how the problem can be solved. I compiled the code with Flex 3 Beta 3 and Flex 3.0.0 with the same results.

After the instantiation of a WebService and configure it to use the proxy (useProxy = true), loadWSDL() causes an AMF message to send to the SOAP server as a kind of a ping. The SOAP server, of course, impossible to analyze it and returns a SOAP fault. WebService, expected AMF in response pours and produces an error, without loading the WSDL file.

Here is the code used to load the WSDL file.

var ws:WebService =
new WebService ('destination.cpiapi.https',
"https://192.168.1.123:8080/api/cpiapi.php");
ws.useProxy = true;
ws.loadWSDL ();

Here are my services - config.Xml. I'm guessing that there is a problem of configuration somewhere here tells the proxy to talk about the AUTHORITY instead of SOAP. Note that there are references of passage to HTTP and HTTPS in this listing... using SSL was not a problem, so I went to HTTP, so I could sniff the messages without changing my BOM. Ignore this.


<? XML version = "1.0" encoding = "UTF-8"? >
<>services-config
< services >
< id = "service.cpiapi service"
Class = "Flex.Messaging.services.http.SOAPProxyAdapter"
messageTypes = "flex.messaging.messages.HTTPMessage, flex.messaging.messages.SOAPMessage" > "
< id = "destination.cpiapi.https destination" >
<>channels
< ref = "channel.https" / channel >
< / channels >
Properties of <>
< wsdl > http://192.168.1.123:8080 / cpiapi.wsdl < /wsdl & gt;
< SOAP > http://1921.68.1.123:8080/api/cpiapi.php < /soap & gt;
< / properties >
< security >
< ref = "security.authBasic security-constraint" / > "
< / security >
< / destination >
< / service >
< / services >
<>channels
< id = 'channel-definition channel.https'
Class = "MX. Messaging.Channels.HTTPChannel">
< endpoint
"URI =' http://192.168.1.123:8080/api/cpiapi.php '
Class = "Flex.Messaging.Endpoints.HTTPEndpoint"
/ >
< / channel-definition >
< / channels >
< security >
< id = "security.authBasic security-constraint" >
Basic < auth-method > < / auth-method >
< / security constraint >
< / security >
< / services-config >


After compiling (SEO services-config. ("XML with the amxmlc flag '-services = services - config.xml") and the execution of the code, call loadWSDL() causes the following message to send to the endpointURI.


[HTTP Headers deleted]

"< amfx worm = '3' xmlns =" http://www.macromedia.com/2005/amfx "> "
< body >
< object type = "flex.messaging.messages.CommandMessage" >
features of <>
body < String > < / string >
clientId < string > < / string >
correlationId < string > < / string >
destination < string > < / string >
headers < string > < / string >
messageId < string > < / string >
operation of < String > < / string >
< string > timestamp < / string >
timeToLive < string > < / string >
< / characters >
[ ... ]
< body / > < / amfx >

As expected, the server responds with an error code SOAP and an exception is thrown when an attempt is made to decode the fault as the authority for the financial markets.


[MessagingError message = 'invalid AMFX package. [Content must begin with a < amfx > node ']
at mx.messaging.channels.amfx::AMFXDecoder$/decodePacket() [E:\dev\flex_3_beta3\sdk\framework s\projects\rpc\src\mx\messaging\channels\amfx\AMFXDecoder.as:155]
at mx.messaging.channels.amfx::AMFXDecoder/decode() [E:\dev\flex_3_beta3\sdk\frameworks\proje cts\rpc\src\mx\messaging\channels\amfx\AMFXDecoder.as:97]
at mx.messaging.channels::HTTPChannel/decodePacket() [E:\dev\flex_3_beta3\sdk\frameworks\proj ects\rpc\src\mx\messaging\channels\HTTPChannel.as:545]
at mx.messaging.channels::HTTPChannel/pingCompleteHandler() [E:\dev\flex_3_beta3\sdk\framewor ks\projects\rpc\src\mx\messaging\channels\HTTPChannel.as:557]
to ChannelRequestLoader / callEventCallback () [E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\ src\mx\messaging\channels\HTTPChannel.as:1164]
to ChannelRequestLoader / completeHandler ([E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\sr c\mx\messaging\channels\HTTPChannel.as:1200])
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()




So, my question is, why the proxy talking AMF? When I set useProxy = false, no the AMF message is sent, and SOAP communication goes very well until I have ever setCredentials(user,pass) on the WebService (whith throws a fault, saying me that I need useProxy). Y at - it a config within the services-config. XML which tell HTTPChannel not to send a ping from the AMF?

Thanks for the reply. I thought incorrectly that the proxy was an integrated/transparent entity in the AIR motor. I put endpoint URI must be the webservice, not the URI of a sort of proxy of the AMF.

My original goal was to be able to define authentication HTTP headers, as in "Authentication: Basic...". I'd be a bad engineer if I set up a proxy just so that I could use AbstractWebService.set [Remote] Credentials (). My first attempt to do not use a proxy has been to:

var ws:WebService = new WebService();
ws.useProxy = false;
WS.wsdl = «...» » ;
ws.endpointURI = «...» » ;
var header: URLRequestHeader =
New URLRequestHeader ("authentication", "Basic...");
ws.httpHeaders = header;

However, the header was ignored. The documentation available for me is not a lot to tell me that if httpHeaders:Object wanted a URLRequestHeader or only a string or only an object of the name pair: value... None of them seem to make a difference. Is the httpHeaders parameter used only in the useProxy = true parameter?

Thanks again for the help. Any help most to push me in the right direction toward making communication HTTP authenticated SOAP would be greatly appreciated.

Tags: Flex

Similar Questions

  • The back button often responds with a drop down menu of the story rather than simply go back to the previous page. There used to be a small arrow for that, why did you do that?

    The back button often responds with a drop down menu of the story rather than simply go back to the previous page. There used to be a small arrow for that, why did you do that?

    When I left click on the back instead of the browser navigation back button, I go almost every time to get the list of previous browsing history or it will just doing nothing until I click on the new button. The history of combination of button "return" rather than a separate between the historical click of the buttons box is the problem. Combined with my arthritic fingers of aging that is. If I was as fast as I used to be I guess it wouldn't be a problem. I liked the separate history area. This action combination navigation / buttons story scenario is problematic. I'm fairly certain that if I find it quite disturbing to bring to your attention that there are others (old beards) in the same boat I am.

    Thanks for listening
    D

    Use one of the following methods to open the tab history list:

    • Right-click on the back or next button
    • Press and hold the left button of the mouse on the active back or forward button until the list opens

    You can watch this extension:

  • How to change the graphics rather than the windows screen resolution

    Hello

    Intel graphics card;
    In response to the question of size screen. How him alter the graphics rather than windows.

    Granniebiker

    Hello

    I m not very well what you want to do?  :|
    You want to change the resolution of your laptop screen?

    I assume you have an XP operating system.
    If you can make them using two different ways.

    (1) go to-> graphic display Manager Control Panel Intel-> in one available tabs, you can change the display settings

    (2) using a second way to make a right click on the desktop-> properties-> settings tab
    There is also a setting to change the display resolution.

    Good bye

  • Where can I download the 971644 rather than do it from Windows update?

    Where can I download the 971644 rather than do it from Windows update?

    Only WU apparently-

    http://support.Microsoft.com/kb/971644

    Description of the update for Windows Server 2008 platform and Platform for Windows Vista update

    TaurArian [MVP] 2005-2010 - Update Services

  • My taskbar has moved to the right side of the screen rather than on the bottom. Is it possible to fix?

    My taskbar has moved to the right side of the screen rather than on the bottom. Is it possible to fix?

    1. right click on the taskbar and uncheck "lock the taskbar".

    2. move the mouse on the border of the taskbar until the mouse turns into black arrow; then stop, left-button-down and drag the taskbar whenever you want.

    3. then, you can lock the taskbar again.

  • That's why when I want to sign into xbox live on my console, I get the join rather than the sign in guest

    Original title: sign in error xbox

    That's why when I want to sign into xbox live on my console, I get the join rather than the sign in guest?

    Hello

    The issue you have posted is related to Xbox Live, I recommend you post this question in the Xbox forum.

    http://forums.Xbox.com/xbox_forums/xbox_support/default.aspx

  • How to print pictures on the corner of the page rather than the Center on photoshop elements 8?

    How to print pictures on the corner of the page rather than the Center on photoshop elements 8?

    sofiat75502936 wrote:

    How to print pictures on the corner of the page rather than the Center on photoshop elements 8?

    Go to file > new > empty file. Enter the dimensions of your paper stock

    Go to file > place, point on the image, and then position it on the corner.

  • You can change a song somewhere in the Middle rather than start from the beginning?

    You can change a song somewhere in the Middle rather than start from the beginning?

    Hello Gene,

    Currently, there isn't a way to do. It's a great idea and we will certainly look at it later!

    Thank you

    Bronwyn

    Community Manager for first Clip

  • Why the highlight of text appears below the text rather than exactly on the text

    Expert PDF here help me this.

    When I try to highlight the text in a PDF document, the highlight appears below the text rather than exactly above the text.

    The document is a text based on a knowledge, it is not an image embedded in a PDF file.

    Thanks in advance.

    highlight-is-offset-from-text.png

    This problem does not exist when the PDF file is displayed in PDF Xchange Viewer 2.5.

  • Can I add a new trigger to the beginning rather than at the end of a blank publication widget?

    Hi guys,.

    I am creating a page of photo gallery using the widget a blank publication. I want to be able to add new content on a regular basis by adding new pictures to the top (beginning) of the gallery for my most recent photos indicate at the beginning of the gallery.

    Currently, the small + symbol to add another trigger doesn't add a new trigger to the right (bottom) of the trigger group, putting actually newly added content to the rear of the gallery rather than at the front. I am able to get to add a new trigger in the Group and have that trigger to be first in the group to display?

    The widget seems to display the same behavior of the command, so I'm pretty stuck on how to work around this problem. I tried to re - arrange triggers, which became incredibly heavy but everytime I want to add new photos in the Group and move older further down in the order of the gallery.

    Any help would be greatly appreciated with this, cheers, David.

    Hi David

    With composition, adding the image would be as well as the addition to use the most (+) sign which will add next to the previous content.

    At this stage, you would have to re - arrange the triggers or you can display them randomly if you want not to re - organize. Those are the only options.

    Thank you

    Sanjit

  • Using the scanner rather than generic software WIA support PES 9

    Updated PES 9 a couple of weeks. Already got PSE6.  With PSE6, with my Canon LiDE90 scanner, when I chose import on the file menu and import selected from a scanner, I gives me the option to use the WIA interface or software compatible WIA Canon Scan Gear which has more controls. With PSE9, the only option when I select the LiDE90 is to use the generic Windows WIA driver.

    I can, of course, to use the Canon scanner software apart from PSE9 and send the file to PSE9 for editing. That works very well, but what I don't like about the digitization of this way, is that a temporary file should be created by the scanner software which is saved immediately and then load that into PSE9.

    With PSE6 when to use Scan Canon material in PSE6, the scanned image has been loaded in PSE 6 as a new image without title. If I chose to delete the scanned image, that I edited rather than save the file, there is no temporary file has been saved on the disk at all. I much prefer this work sequence.

    SOOOO... How can I get the Canon Scan Gear software optionally via the PSE9 file - menu import? I tried to reinstall PSE9 and reloaded the scanning Canon driver, too. No luck so far. Why Adobe would have FEWER options with a software upgrade?

    Technical details: Toshiba laptop running Vista 32 bit with all updates.

    If you need the TWAIN driver from Adobe, you must move it in the optional plug-in folder are in the folder plugins ol ' ordinary, as explained in the linked higher tech doc in this thread.

  • Why bookmarks are displayed on the navigation rather than the bookmarks bar bar?

    In order to see my bookmarks toolbar, I must now click on ' view/tools/navigation toolbars toolbar' rather than 'toolbar view/tools/bookmark toolbars. I also can no longer with the right button on the navigation or bookmarks toolbar area to get the menu that allows you to select a new bookmark. I now have to use the menu bookmarks at the top of the page to enter a new bookmark in the toolbar.

    What happened here?

    Thank you

    https://support.Mozilla.org/en-us/KB/customize-Firefox-controls-buttons-and-toolbars

    Open the Palette to customize and use the Restore Default Set button at the bottom right of the Palette.

  • Firefox10 presents a new icon in the taskbar rather than display it in the same symbol

    Firefox10 updated and now it opens a new Firefox icon when Firefox is running rather than change taskbar icon to display its execution. This mess up my whole task bar Setup. Quite annoying.

    Hello

    You can try to Remove the old icon and the PIN to the taskbar for the new icon from the start.

  • When I open a new tab, it goes straight to the Bing, rather than the white page.

    I recently downloaded a program called PDFlite to view the PDF files. He seems to have changed some settings on my Firefox, I does not allow to do so. I am today and there was a Bing toolbar, which I disabled it without problem. But now when I open a new tab, it goes directly into the Bing search engine, rather than the blank page where it used to go. This turn off the coast. I hate Bing. I checked my addons and there is no new addons added by the program. I can't understand what is happening. Help, please!

    Restore the default home page

    Check and tell if its working.

  • FF4, Win7 - is possible to pin history on the left side of the page, rather than having it open as a whole "nother window? (Where it was!)

    FF4, Win7x64 - is there a way to pin history on the left side of the FF page - as it was - rather than having to click on bookmarks and a new window opens and then must click history etc etc etc -

    Press F10 or press and hold the Alt key to bring up the 'Menu Bar' temporarily.

    Then you go to the view menu: view > sidebar

Maybe you are looking for