Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problem with PB 10.5 and .net web service engine

197 views
Skip to first unread message

saska

unread,
Nov 16, 2006, 11:53:41 PM11/16/06
to
Hi,

I'm building a web services client using Powerbuilder 10.5 and the .net
web service engine

I have imported the pbwsclient105.pbx into the library and successfully
generated the proxy.

I have confirmed that I have the .net framework v2.0 installed on my
machine. However I continue
to receive the error "Failed to load the .net framework".

I managed to get rid of this message (but not consistently) When I
placed the wsdl.exe file into
the local directory. I then got the message "There is an error when
load the specified assembly" (sic)

I noticed that when the proxy wizard generates the cs file it seems to
add a namespace of WebService to the resulting .cs file. My code is
attached below.

Any ideas?

Sarah

//////////CODE LISTING/////////////
SoapConnection conn
bpa proxy_obj
long rVal, lLog

string str_endpoint
str_endpoint = "http://" + ws_location + ":8080/REP/analytics.asmx"
// using tcp trace on 8080

try
conn = create SoapConnection
rVal = Conn.CreateInstance(proxy_obj, "bpa", str_endpoint)
if rVal <> 0 then
emsg = "Cannot create Web service proxy"
return 1
end if
success = proxy_obj.method(tok, assn, trade, mmm)

catch ( SoapException e )
emsg = "Cannot invoke Web service: " + e.Text
catch (PBXRuntimeError e2)
emsg = e2.Text + "There is a runtime error when invoking Web service"
catch (RuntimeError e3)
emsg = e3.Text + "There is an unknown error when invoking Web service"
end try

destroy conn

if success = FALSE then
messagebox("ERROR",emsg)
end if

Bruce Armstrong [TeamSybase]

unread,
Nov 16, 2006, 11:59:41 PM11/16/06
to

Do you have the .Net 1.x SDK in the system path? And if so, is it
located before the .Net 2.x SDK? If so, reverse the order they appear
in the system path.

On 16 Nov 2006 20:53:41 -0800, "saska"

saska

unread,
Nov 19, 2006, 11:25:18 PM11/19/06
to
Hi Bruce,

No I dont' have the .Net 1.x SDK in the system path -- only the .Net
2.x SDK. Any other ideas?

Sarah

Bruce Armstrong [TeamSybase]

unread,
Nov 21, 2006, 7:35:06 AM11/21/06
to

Check for another file on your system also called wsdl.exe that is
located earlier in the system path.

It sounds like you've got an issue with your SDK install. You might
also consider removing and re-installing it.

On 19 Nov 2006 20:25:18 -0800, "saska"

Steven Davis

unread,
Nov 21, 2006, 9:49:35 PM11/21/06
to
Hi Bruce,

Thanks for following up again. I work with Sarah and reproduced her problem.
It all works fine if our code is run as a Powerbuilder app. It goes awry
when we try and deploy the code (below) to EAServer with error messages as
described by Sarah. It's probably a simple path issue with EAServer not
being able to find the generated C# DLL but I haven't figured it out yet.

I've just moved to EAServer 6 with the same result as in Sarah's EAserver
5.1 setup. Do you have a quick win for us?

Regards,

Steve Davis


"Bruce Armstrong [TeamSybase]" <NOCANSPAMbru...@teamsybase.com>
wrote in message news:8lv5m29lfv13mqj0s...@4ax.com...

Steven Davis

unread,
Nov 21, 2006, 9:59:27 PM11/21/06
to
As a quick follow-up to avoid confusion, the C# DLL and the various PB DLLs
(Sybase.Powerbuilder.WebService.Runtime.dll etc) are all in the system path,
but from the look of the error messages I'm not sure EAServer is finding
them.

Steve


"Steven Davis" <steven...@boundaryrider.com.au> wrote in message
news:4563c8cf@forums-1-dub...

Bruce Armstrong [TeamSybase]

unread,
Nov 22, 2006, 1:04:03 AM11/22/06
to

I'm a bit lost here. This is the first time I've heard anything about
deploying it to EAServer. I assumed from the description of the
problem and the reference to the .Net SDK that we were talking about
operations on the developer's machine. The SDK isn't needed on the
deployed machine, only the .Net 2.0 framework. Is *that* on the
machine you are deploying to?


On 21 Nov 2006 19:59:27 -0700, "Steven Davis"

Steven Davis

unread,
Nov 22, 2006, 7:05:02 PM11/22/06
to
It's all on the one machine (development environment is a laptop with
EAServer, PowerBuilder and .net 2.0 framework). Also on the same machine is
some C# code hosted by IIS and exposed as a web service. We are trying to
access this web service from PB.

This all works if we build the PB code as a standalone exe. It doesn't work
when we deploy as an EAServer component, then connect to EAServer from a
separate PB app, create an instance of the component, and try to call the
web service. At this point presumably EAServer (or the PB VM it is hosting)
would have to find and load the .net 2.0 framework).

We actually have two laptops, each containing the complete environment above
and each displaying the same behaviour; the only difference being one of the
machines has EAServer 5.1 and PB 10.5; the other machine has EAServer 6.0
ebf 14142 and PB 10.5.1.

Sorry about the confusion.

Regards,

Steve

"Bruce Armstrong [TeamSybase]" <NOCANSPAMbru...@teamsybase.com>
wrote in message news:91t7m29bn1ieguefl...@4ax.com...

Jim O'Neil [Sybase]

unread,
Nov 22, 2006, 8:43:50 PM11/22/06
to
ONe thing you could try is run FileMonitor from www.sysinternals.com
as you access the component. Perhaps through the various file system
accesses, you'll discover something that is being sought and not
found?

On 22 Nov 2006 17:05:02 -0700, "Steven Davis"

Steven Davis

unread,
Nov 23, 2006, 12:23:22 AM11/23/06
to
Thanks Jim,
a very good suggestion.

I found I had to put the files into the directory
C:\Program Files\Sybase\Shared\jdk1.5.0_06\bin

The files I put there are:
Sybase.Powerbuilder.WebService.Runtime.dll
Sybase.PowerBuilder.WebService.RuntimeRemoteLoader.dll
Sybase.PowerBuilder.WebService.WSDL.dll
Sybase.PowerBuilder.WebService.WSDLRemoteLoader.dll
plus the DLL generated by the .net web service proxy project.

Please let me know iff there is a more elegant way to get EAServer to find
them. Is it something to do with the Java CLASSPATH?

Regards,

Steve Davis


"Jim O'Neil [Sybase]" <joneil_@_sybase_dot_com> wrote in message
news:582am2t0c2o2bhoqd...@4ax.com...

Bruce Armstrong [TeamSybase]

unread,
Nov 23, 2006, 9:00:16 AM11/23/06
to

Probably has more to do with the system path. Were the files
originally located in a directory that was in the system path?

On 22 Nov 2006 22:23:22 -0700, "Steven Davis"

Steven Davis

unread,
Nov 23, 2006, 3:00:54 PM11/23/06
to
Yes, they definitely were in the system path and near the front. I also
tried dumping them in c:\windows\system32 but they weren't found there
either. I even tried adding the directory to the very front of the path in
EAServer's run-server.bat but FileMonitor still showed that they were not
found. They were only found when put in the jdk directory below.

Steve


"Bruce Armstrong [TeamSybase]" <NOCANSPAMbru...@teamsybase.com>
wrote in message news:lddbm2tcv8khjf5pk...@4ax.com...

0 new messages