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

"Error Creating PBNI Object", worked a few times before I tried to deploy the test application

121 views
Skip to first unread message

Cfauvel

unread,
Nov 20, 2006, 8:59:13 AM11/20/06
to
I have a small littel application to get the ip address of a computer in
front of a firewall, and it worked a couple of times before I tried to build
the application as an EXE...

There are just a few bjects

1) application object with script in the OPEN event as such

SoapConnection conn // Define SoapConnection
nws_addressinfosoap lsoap_Address // Declare proxy


string ls_ip
long rVal, lLog

//in debig mode this is the line that generates the error
conn = create SoapConnection //Instantiated connection

lLog = conn.SetOptions("SoapLog=~"C:\mySoapLog.log~"")
// Set trace file to record soap interchange data,
// if string is "", disables the feature rVal =
Conn.CreateInstance(proxy_obj, & "syb_currencyexchangeport",
str_endpoint)

rval = conn.createinstance( lsoap_Address, "nws_addressinfosoap")
ls_ip = lsoap_Address.getaddress( )
messagebox('test','my IP should be:' + ls_ip)

destroy conn
destroy lsoap_Address


2) the wsdl proxy object: (nws_addressinfosoap)
$PBExportHeader$nws_addressinfosoap.srx
$PBExportComments$Proxy imported from Web Service via Web Service Proxy
generator.
global type NWS_AddressInfoSoap from NonVisualObject
end type

type variables
Protected:
string xmlns = ""
string tm = "http://microsoft.com/wsdl/mime/textMatching/"
string soapenc = "http://schemas.xmlsoap.org/soap/encoding/"
string wsdl = "http://schemas.xmlsoap.org/wsdl/"
string http = "http://schemas.xmlsoap.org/wsdl/http/"
string mime = "http://schemas.xmlsoap.org/wsdl/mime/"
string soap = "http://schemas.xmlsoap.org/wsdl/soap/"
string tns = "http://tempuri.org/WhatIsMyIP/AddressInfo"
string s = "http://www.w3.org/2001/XMLSchema"
string pb__TargetNamespace =
"http://tempuri.org/WhatIsMyIP/AddressInfo"

string endpoint =
"http://www.mcwtech.com/webservices/whatismyip/addressinfo.asmx"
string __tns__HeaderVariables = "HeaderVariables(s:string
ALL_HTTP,s:string ALL_RAW,s:string APPL_MD_PATH,s:string
APPL_PHYSICAL_PATH,s:string AUTH_TYPE,s:string AUTH_USER,s:string
AUTH_PASSWORD,s:string LOGON_USER,s:string REMOTE_USER,s:string
CERT_COOKIE,s:string CERT_FLAGS,s:string CERT_ISSUER,s:string
CERT_KEYSIZE,s:string CERT_SECRETKEYSIZE,s:string CERT_SERIALNUMBER,s:string
CERT_SERVER_ISSUER,s:string CERT_SERVER_SUBJECT,s:string
CERT_SUBJECT,s:string CONTENT_LENGTH,s:string CONTENT_TYPE,s:string
GATEWAY_INTERFACE,s:string HTTPS,s:string HTTPS_KEYSIZE,s:string
HTTPS_SECRETKEYSIZE,s:string HTTPS_SERVER_ISSUER,s:string
HTTPS_SERVER_SUBJECT,s:string INSTANCE_ID,s:string
INSTANCE_META_PATH,s:string LOCAL_ADDR,s:string PATH_INFO,s:string
PATH_TRANSLATED,s:string QUERY_STRING,s:string REMOTE_ADDR,s:string
REMOTE_HOST,s:string REMOTE_PORT,s:string REQUEST_METHOD,s:string
SCRIPT_NAME,s:string SERVER_NAME,s:string SERVER_PORT,s:string
SERVER_PORT_SECURE,s:string SERVER_PROTOCOL,s:string
SERVER_SOFTWARE,s:string URL,s:string HTTP_CONNECTION,s:string
HTTP_ACCEPT,s:string HTTP_ACCEPT_ENCODING,s:string
HTTP_ACCEPT_LANGUAGE,s:string HTTP_HOST,s:string HTTP_USER_AGENT)@tns"
tns__HeaderVariables i__tns__HeaderVariables
end variables

forward prototypes
public:
function string GetAddress () alias for "GetAddress() return s:string
GetAddressResult@http://tempuri.org/WhatIsMyIP/AddressInfo@http://tempuri.org/WhatIsMyIP/AddressInfo/GetAddress"
function tns__HeaderVariables GetHeaderVariables () alias for
"GetHeaderVariables() return tns:HeaderVariables
GetHeaderVariablesResult@http://tempuri.org/WhatIsMyIP/AddressInfo@http://tempuri.org/WhatIsMyIP/AddressInfo/GetHeaderVariables"
end prototypes

3) new webservice sructure (tns__headervariables)
global type tns__HeaderVariables from structure
string ALL_HTTP
string ALL_RAW
string APPL_MD_PATH
string APPL_PHYSICAL_PATH
string AUTH_TYPE
string AUTH_USER
string AUTH_PASSWORD
string LOGON_USER
string REMOTE_USER
string CERT_COOKIE
string CERT_FLAGS
string CERT_ISSUER
string CERT_KEYSIZE
string CERT_SECRETKEYSIZE
string CERT_SERIALNUMBER
string CERT_SERVER_ISSUER
string CERT_SERVER_SUBJECT
string CERT_SUBJECT
string CONTENT_LENGTH
string CONTENT_TYPE
string GATEWAY_INTERFACE
string HTTPS
string HTTPS_KEYSIZE
string HTTPS_SECRETKEYSIZE
string HTTPS_SERVER_ISSUER
string HTTPS_SERVER_SUBJECT
string INSTANCE_ID
string INSTANCE_META_PATH
string LOCAL_ADDR
string PATH_INFO
string PATH_TRANSLATED
string QUERY_STRING
string REMOTE_ADDR
string REMOTE_HOST
string REMOTE_PORT
string REQUEST_METHOD
string SCRIPT_NAME
string SERVER_NAME
string SERVER_PORT
string SERVER_PORT_SECURE
string SERVER_PROTOCOL
string SERVER_SOFTWARE
string URL
string HTTP_CONNECTION
string HTTP_ACCEPT
string HTTP_ACCEPT_ENCODING
string HTTP_ACCEPT_LANGUAGE
string HTTP_HOST
string HTTP_USER_AGENT
end type
4) project to crreat the proxy objects (P_ws_proxy)
$PBExportHeader$p_ws_proxy.srj
$PBExportComments$Generated Web Service Proxy Project
GeneratorID:{1B1DCEE2-E514-11D1-B30A-006008925BD4}GENBC00000000
WSDLLOCATION:http://www.mcwtech.com/webservices/whatismyip/addressinfo.asmx?wsdl
COMPONENT:1 AddressInfo::AddressInfoSoap::NWS_AddressInfoSoap
PACKAGE:1 tns__HeaderVariables
COMMENT:Web Service Proxy Generator
DEPLOYMENT:c:\develop\my_ip.pbl 0 0
PROJECT:p_ws_proxy
PREFIX:NWS_

5) project to create the final executable(p_my_ip_exe)
$PBExportHeader$p_my_ip_exe.srj
$PBExportComments$Generated Application Executable Project
EXE:C:\DEVELOP\WhatsMyIP.exe,,0,1,0
CMP:1,0,0,2,0,0
COM:Answers Systems
DES:Get your IP address in front of a firewall
CPY:
PRD:What's My IP
PVN:1,0,0,1
PVS:1,0,0,1
FVN:1,0,0,1
FVS:1,0,0,1
PBD:c:\develop\my_ip.pbl,,1
PBD:c:\Program Files\Sybase\Shared\PowerBuilder\pbsoapclient90.pbd,,1
6) the two NVOs found in PBSOAPCLIENT90.PBD
soapconnection and soapexception


In my final project I have sent both the my_ip.pbl and pbsoapclient.pbd set
up to become DLLs, I'm guessing that is wrong.

Either way, now it doesn't compile pass the "conn = create SoapConnection "
line, throws the error creating PBNI object , and crashes PB.

I'm running PB 9.02-7509

I am a newbie to consuming webservices, so be gentle.

Thanks

Chris


Bruce Armstrong [TeamSybase]

unread,
Nov 20, 2006, 9:49:05 AM11/20/06
to
If you want people to answer your questions, you need to make them fairly
succinct. I'll try to address the create SoapConnection issue, I'm not
even going to read the rest.

You do *not* want to recompile the soapclientXX.pbd into anything. Just
leave it alone and deploy the one that Sybase originally provided you. It's
a wrapper for the pbsoapclientXX.dll/.pbx, which you also need to deploy
with your application (that is, both the original pbd and the original
dll/pbx need to be deployed with your application).

"Cfauvel" <TheFa...@verizon.net> wrote in message
news:4561c2c1$1@forums-1-dub...

Cfauvel

unread,
Nov 20, 2006, 2:42:00 PM11/20/06
to
Ok now that I have tried to recomplie, the pbsoapclient.pbd, why doesn't
reloading the 7509 EBF fix my problem?

Is it that the EBF doesn't contain the pbsoapclient.pbd file and I have to
go get it from the original pb9.0 disks?

Also in the project painter for the app it comes up with the
pbsoapclient.pbd in the library search path, how would I not include the PBD
in the project?

The PBD needs to be in the app's library search path to see the two objects,
right?

>"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
>wrote in message news:4561ce71$1@forums-1-dub...

Bruce Armstrong [TeamSybase]

unread,
Nov 20, 2006, 10:56:12 PM11/20/06
to
It's most likely that you've corrupted the pbsoapclient90.pbd. It's
not a normal PBL/PBD file, it's just a wrapper fore the
pbsoapclient90.dll. You could use the PBX2PBD90 utility to recreate
it from the DLL though.

Until 10.5, you do have to include the PBD in the library search path,
and you have to deploy it and the underlying DLL/PBX with your
application. (With 10.5, you can directly import the objects from the
DLL/PBX into a normal PBL).

The problem is that you marked PBD on the PBD, which means that PB
actually tries to write back out to that file, corrupting it.

On 20 Nov 2006 12:42:00 -0700, "Cfauvel" <TheFa...@verizon.net>
wrote:

Cfauvel

unread,
Nov 30, 2006, 3:33:22 PM11/30/06
to
actually I boobooed the pbsoapclient90.dll, since I had the check mark next
to pbsoapclient90.pbd.
I wonder if the new version of PB doesn't allow you to goof those DLLs up.
The check box shouldn't be present for PBDs should it?


any ways it is working again...
Thanks

Chris

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

Bruce Armstrong [TeamSybase]

unread,
Nov 30, 2006, 4:03:49 PM11/30/06
to
If you do the import into an existing PBL option with 10.5, there isn't a
PBD to worry about.

"Cfauvel" <TheFa...@verizon.net> wrote in message

news:456f4e22$1@forums-1-dub...

0 new messages