Consuming ABL WSA web services with a ColdFusion client. - Forum - OpenEdge Development - Progress Community

Consuming ABL WSA web services with a ColdFusion client.

 Forum

Consuming ABL WSA web services with a ColdFusion client.

  • My CF code is as follows:

    My problem is that the pdCustBal holder never gets populated.

    The log files for the WSA look fine:

    P-003544 T-http-8080-Processor8 3 wsa1 WSA New Request: ID=51 (10927)

    P-003544 T-http-8080-Processor8 3 wsa1 WSA New Request: ID=51 (10927)

    P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug POST request received from client anonymous at address 127.0.0.1 (10963)

    P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug Raw SOAP request:

    P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug

    1 (10964)
    [07/08/07@13:29:10.644-0400] P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug    Raw SOAP response:
    [07/08/07@13:29:10.644-0400]]>
    [07/08/07@13:29:10.644-0400] P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug    
    [07/08/07@13:29:10.644-0400] P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug    
    [07/08/07@13:29:10.644-0400] P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug    
    [07/08/07@13:29:10.644-0400] P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug    903.64
    [07/08/07@13:29:10.644-0400] P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug    
    [07/08/07@13:29:10.644-0400] P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug    
    [07/08/07@13:29:10.644-0400] P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug    
    [07/08/07@13:29:10.644-0400] P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug    ]]>

    P-003544 T-http-8080-Processor8 4 wsa1 Message-Debug (10960)

    Any ideas?

    CF 7.0.2MX

    OE 10.1B

    Thanks,

    Phillip

  • I've had some recent experiences working with ColdFusion against Webserverices (and OpenEdge services in specific).

    When ColdFusion first accesses the WSDL of a webservice, it produces stubs for each method found.

    Since your typical ABL procedure (generated to a webservice) has input and OUTPUT parameters, the resulting Java methods have a return value and output parameter]]>.

    When you try to access the methods as you have:

    webService.checkBalance(piCustNum,pdCustBal);

    CF doesn't realize that pdCustBal is an "output" parameter. It's expecting that the method only has a "return value".

    I've found success with two avenues:

    1: write a java wrapper to the Webservice classes that exposes a method to retrieve the output parameter. --

    webservericewrapper.checkbalance(picustnum);

    pdCustbal = webservicewrapper.getCustBal();

    2: use a combination of the HTTP request object and XML parsing to build and parse the SOAP/XML "manually"

    I hope that helps.

  • @Chad,

    Thanks for the info. Here's what I ended up doing:

    piCustNum = 1;

    piCustNum = JavaCast("int", piCustNum);

    pcCustBal = CreateObject("java","javax.xml.rpc.holders.StringHolder").init();

    webService = createObject("webservice", "http://localhost:8080/wsa/wsa1/wsdl?targetURI=urn:wsCBalance");

    webService.checkBalance(piCustNum,pcCustBal);

    returnEnv = getSOAPResponse(webService);

    pcCustBal = returnEnv;

    I basically modified your concept with idea #2 so that I wouldn't have to generate the HTTP request. It's not the greatest solution but it's significantly less work.

    Thanks again-

    Phil