cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service Proxy Generator

Former Member
0 Kudos

Hi PB Gurus,

This is my first post in this forum and looking forward to contributing in the future.  Glad to know that this forum exists for PowerBuilder.

Does anyone have any idea why PowerBuilder 12.5.2 would generate a "Cannot build the code generated from WSDL into an assembly." error when creating a .NET Web Service Proxy for the attached WSDL file (kindly change the extension from txt to wsdl)?


I have been able to create proxies in the past for other WSDL's but for some reason PB is unable to parse it.  Maybe there is something inside the file that causes PB to not like it?

We are using  Windows 7 Pro and PowerBuilder 12.5.2 Build 5006.

Thanks and more power to PowerBuilder!

Accepted Solutions (1)

Accepted Solutions (1)

former_member190719
Active Contributor
0 Kudos

Whenever you have problems generating a .Net proxy you can try running WSDL.exe directly against the WSDL at the command line.  That will give you more detailed information about the problem.

When I did that I got:


Microsoft (R) Web Services Description Language Utility

[Microsoft (R) .NET Framework, Version 4.0.30319.17929]

Copyright (C) Microsoft Corporation. All rights reserved.

Warning: one or more optional WSDL extension elements were ignored.

Warnings were encountered. Review generated source comments for more details.

Looking at the outputted C# I found:


/// <remarks/>

// CODEGEN: The optional WSDL extension element 'Policy' from namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' was not handled.

Sure enough, the WSDL utility that PB Classic uses for the .Net engine doesn't handle WS-POLICY, and it's referenced in that WSDL.  You have to use WCF to suppor that.

wsdl.exe ignores PolicyReference when generating Proxy Class

I also noted that WS-Security is referenced as well in the WSDL, which also requires the use of the WCF client rather than the older ASP.Net web service approach.

Former Member
0 Kudos

PowerBuilder did not seem to have a problem generating a .NET proxy for a similar file (attached) - which has references to both WS-POLICY and WS-Security.  In addition, the utility wsdl.exe generated the same warnings/errors for this file and the one that I sent earlier.

I suspected that the file is not well-formed but it ran fine against a number of WSDL validators and even with SoapUI, SoapSonar and ReadyAPI.  Not sure what line is causing PB to complain.

former_member190719
Active Contributor
0 Kudos

If the service requires WS-Policy and WS-Security you can't call it using the ASP.Net web services that PowerBuilder Classic uses.  You have to use the WCF based client that PowerBuilder.Net provides.  Not sure what to offer you beyond that.

Answers (2)

Answers (2)

Former Member
0 Kudos

Simply changing "System" to "SYSTEM" fixed things.  Must be because it's a reserved word in PowerBuilder.  Now PowerBuilder is able to generate the proxy.

Thanks everyone for your help!

Former Member
0 Kudos

Hi Carl;

  FYI:  PB's support of WS's restricts itself to standard data types and 2 dimensional arrays. This would  normally represent an ANSI Result Set that PB would expect from an ANSI SQL Select.

  Once you wander outside of the above WS Result Set restrictions - the PB WS support will no longer work (parse).

Regards ... Chris

former_member190719
Active Contributor
0 Kudos

FYI:  PB's support of WS's restricts itself to standard data types and 2 dimensional arrays. This would  normally represent an ANSI Result Set that PB would expect from an ANSI SQL Select.

The reference to 2 dimensional arrays might make sense from a web service sourced DataWindow, but not for the web service proxy.