2 Replies Latest reply on Apr 21, 2008 4:48 PM by baldrick9

    Flex with Oracle ESB Services

      Hi all,

      I have a rather frustrating problem calling Oracle ESB services from Flex. I've tried both Flex 3 and 2.0x.

      I have one ESB service that works great with Flex, and another that, when I try to call it from within Flex, results in the following error: "Unrecognized binding style 'null'. Only 'document' and 'rpc' styles are supported."

      Both ESB services have WSDL's generated by the Oracle system and they have similar "features" (i.e importing a namespace from another wsdl - it's generated that way) but they have different schemas.

      I can call both ESB services from SoapUI without any problems and also from the Oracle test harness in their control console.

      The offending WSDL is below (not that I think it matters as the other "good" one looks very similar which leads me to believe the issue is on the Flex side) :-

      Any ideas, suggestions, workarounds or patch/fixes ;-) very much appreciated.


      <?xml version="1.0" encoding="UTF-8"?>
      <definitions targetNamespace=" http://oracle.com/esb/namespaces/WWS2BPMRS" xmlns=" http://schemas.xmlsoap.org/wsdl/" xmlns:tns=" http://oracle.com/esb/namespaces/WWS2BPMRS" xmlns:ws=" http://www.example.com/webservice" xmlns:http=" http://schemas.xmlsoap.org/wsdl/http/" xmlns:plt=" http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:esb=" http://www.oracle.com/esb/" xmlns:xs=" http://www.w3.org/2001/XMLSchema" xmlns:soap=" http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/" xmlns:import=" http://oracle.com/esb/namespaces/WWS2BPMRS">
      <import namespace=" http://oracle.com/esb/namespaces/WWS2BPMRS" location=" http://lc23hosoa1.lc.local:80/esb/slide/ESB_Projects/Application1_BPMRS_DVM/WWS2BPMRS_rsGe tDVMlist.wsdl"/>
      <binding name="__soap_rsGetDVMlist_execute_ppt" type="tns:execute_ppt">
      <soap:binding xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/" style="document" transport=" http://schemas.xmlsoap.org/soap/http"/>
      <operation name="execute">
      <soap:operation xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/" style="document" soapAction="execute"/>
      <soap:body xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/>
      <soap:body xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/>
      <binding name="__esb_rsGetDVMlist_execute_ppt" type="tns:execute_ppt">
      <operation name="execute">
      <esb:operation event-name="WWS2BPMRS.rsGetDVMlist.execute"/>
      <service name="ESB_rsGetDVMlist_Service">
      <port name="__esb_rsGetDVMlist_execute_ppt" binding="tns:__esb_rsGetDVMlist_execute_ppt">
      <port name="__soap_rsGetDVMlist_execute_ppt" binding="tns:__soap_rsGetDVMlist_execute_ppt">
      <soap:address xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/" location=" http://lc23hosoa1.lc.local:8888/event/WWS2BPMRS/rsGetDVMlist"/>
      <plt:partnerLinkType name="execute_pptLT">
      <plt:role name="execute_pptProvider">
      <plt:portType name="tns:execute_ppt"/>
        • 1. Re: Flex with Oracle ESB Services
          baldrick9 Level 1
          Hmm it seems to be when the schema is "deeper" i.e when there are collections of complex types. If there's no collection, just complex types at the "top level" of the response it seems to work ok.

          Of course being part of SOA, I shouldn't have to alter the service being consumed as there will be times when that's not an option. That, after all, is the point of SOA.

          I'll keep y'all updated on the progress...

          • 2. Flex with Oracle ESB Services
            baldrick9 Level 1
            It seems I've finally found the answer - doh!

            You'll notice in the WSDL above, there are 2 bindings "__soap_rsGetDVMlist_execute_ppt" and "__esb_rsGetDVMlist_execute_ppt". It appears that Flex has trouble deciding which one to use. The order in which they appear in the generated WSDL varies, and it seems the one that Flex chooses also varies (it can be the first or second one). To sum up, occassionally Flex chooses to use the non-SOAP binding! (I'm only talking about using MXML here of course).

            To get around this I saved the WSDL out of the ESB, and into a file stored in the Oracle Application Server document space. I then removed the entire ESB binding section (binding name="__esb_rsGetDVMlist_execute_ppt") and the port that references it (port name="__esb_rsGetDVMlist_execute_ppt"). Then point the Flex WSDL URL to this new WSDL location and it works every time.

            You might be thinking a better way to do this would be to use the new Web Services import wizard in Flex 3. This looks good and uses Axis 2 under the hood. It also lets you choose which binding to use (now we're talkin!). Except there's a problem with it, it seems to generate the wrong data structure for the request! It wants to send one of the tags in twice (i.e the same tag nested), which of course the web service rejects as being invalid. I tried jiggering things around to no avail for a while, then I didn't want to spend any more time fixing a problem Adobe seem to have left behind - oh well, next version Adobe!
            Without knowing the details, I can't help but wonder:- in the generated Axis 2 code, it mentions "modified by Adobe" - would things have worked better had they *not* modified Axis 2?! One hopes the mods were only to integrate it with Flex builder and nothing more.

            I hope Adobe address these problems, as having to do things this way raises some awful SOA Governance issues! Now we have to track which services are using the various separate WSDL files and keep the separate WSDL's in synch should any changes be made to the services they represent.

            Happy SOA'ing!
            Greg from Aussie