Quantcast
Channel: SCN : All Content - PowerBuilder Developer Center
Viewing all 2935 articles
Browse latest View live

Creating a REST web service using PowerBuilder.Net 12.5

$
0
0

One of the new features introduced with PowerBuilder.Net 12.5 was the ability to create WCF web services.  The version of the product also introduced a client for REST web services as well, and a WCF client had been introduce in an earlier version.  One frequent question I heard when presenting the new features in conference or online sessions was when PowerBuilder.Net would provide the capability to create REST services, not just consume them.

 

Perhaps what few people realized (including myself at the time) is that WCF web services isn't just for creating SOAP services.  Since .Net 3.0, they have been capable of creating REST services as well.  So we've actually have had the capability to create REST web services with PowerBuilder.Net since 12.5 was released.  In this blog post we'll look at how we do that.

 

The first thing we need to do is go ahead and create a WCF soap web service.  We're going to use pretty much the same approach that is demonstrated in this SAP D&T Academy video.   One difference is that I'm just going to use an ODBC data source for this sample.  In the video I used an ADO.Net datasource, which is the better approach for anything more than a demo when using .Net targets.

 

As in that video, I have a datawindow that selects the employees from the EAS demo database.  I also have a structure that has the same configuration as the result set of the datawindow, so transferring the data to and array of that structure can be accomplished through a one line dot notation call.  The code for the function that retrieves the employees looks like this.

 

DataStore     lds
long          ll_rc
s_structure     emps[]
Transaction     ltrans
ltrans = create Transaction
// Profile EAS Demo DB V125
ltrans.DBMS = "ODBC"
ltrans.AutoCommit = False
ltrans.DBParm = "ConnectString='DSN=EAS Demo DB V125 Network Server;UID=dba;PWD=sql'"
//ltrans.DBParm = "ConnectString='DSN=EAS Demo DB V125 - 64 bit;UID=dba;PWD=sql'"
connect using ltrans ;
if ltrans.SQLCode <> 0 then     emps[1].emp_fname = "Connect failed: " + ltrans.SQLErrText
else     lds = create DataStore     lds.DataObject = 'd_grid'     ll_rc = lds.SetTransObject ( ltrans )     if ll_rc <> 1 then          emps[1].emp_fname = "SetTransObject failed: " + string ( ll_rc )     else          ll_rc = lds.Retrieve()          if ll_rc < 0 then               emps[1].emp_fname = "Retrieve failed: " + string ( ll_rc )          else               emps = lds.Object.Data          end if          disconnect using ltrans ;     end if ;     destroy ltrans 
end if ;
return emps

I'm running the EAS Demo database in network server mode with TCP enabled as a communications method so that the web service can connect to an already running database.

 

At this point we can go into the project painter for the service, select that function to be exposed in the service and run the project (having specified the wfcservice_host.exe file in the webservice.out/bin/Debug directory as what is run when we run the project).  We'll see a command prompt window display, and we should be able to access the WSDL for the SOAP service and create a WCF client for it.

 

Once we know that part is working, we're going to make a few modifications to make it a REST service instead.  The first thing we're going to do is go back into the project painter, select the method we're exposing and then click on the operational attributes button.  Note that the button won't be enabled until you select a method that you want to adjust the attributes for.

 

operationalattribute.PNG

 

Within the dialog that appears, select the WebInvoke Attribute category.  Within that category, set the Method to Get and provide a UriTemplate.  In a REST web service, the method is called by adding the UriTemplate onto the end of the root URL for the service.  So in this case, since the service URL is:

 

http://localhost:8001/n_customnonvisual

 

The method for retrieving the employees becomes:

 

http://localhost:8001/n_customnonvisual/employees

 

Normally in REST services, a GET method is mapped to a retrieve, PUT to an insert, POST to an update, and DELETE deletes.  Arguments to the method are additional entry on the URL.  For example, we could create a method that returns a single employee record and takes the employee id as an argument.  If the employee id was 123, then the method URL might look like this:

 

http://localhost:8001/n_customnonvisual/employee/123

 

Unless we specify a specific ResponseFormat and RequestFormat, XML is assumed (same as the SOAP service).  REST services are more likely to return JSON though, as it is not as verbose.  We can tell WCF that we want JSON returned instead by specifying that for the ResponseFormat.

 

attributes.PNG

We're done with the service project.  What we need to do now is make some changes to the <projectname>.config file in the root directory.  First, we need to find the endpoint address entry for the service and change the binding from basicHttpBinding to webHttpBinding.  We're also going to add a behaviorConfiguration attribute and give it a name.  We'll define that a bit later in the same file.

 

Original File:

  <system.serviceModel>    <services>      <service name="Sybase.PowerBuilder.WCFNVO.n_customnonvisual"  behaviorConfiguration="ServiceNameBehavior">        <endpoint address=""  binding="basicHttpBinding"   contract="Sybase.PowerBuilder.WCFNVO.n_customnonvisual"  bindingNamespace="http://tempurl.org" />

Revised File

  <system.serviceModel>    <services>      <service name="Sybase.PowerBuilder.WCFNVO.n_customnonvisual"
behaviorConfiguration="ServiceNameBehavior">        <endpoint address=""   binding="webHttpBinding"   contract="Sybase.PowerBuilder.WCFNVO.n_customnonvisual"  bindingNamespace="http://tempurl.org"   behaviorConfiguration="EndpointNameBehavior" />

There should already be a serviceBehaviors section in the file within the behaviors section.  What we're going to do is add a endpointBehaviors section to the file as well below the serviceBehaviors.  Give it the same name as you referenced in the new attribute for the endpoint earlier.  The only thing we need to include it in is the webHttp attribute:

 

    </serviceBehaviors>      <endpointBehaviors>        <behavior name="EndpointNameBehavior">          <webHttp />        </behavior>      </endpointBehaviors>    </behaviors>

With that, we're done.  Redeploy the project so that all of the new settings apply.  You should now be able to open a browser and give it the base URL plus the URITemplate.  If all is working correctly, you should see JSON being returned.

 

json.PNG

 

One of the downsides of REST services that there really isn't a way to automatically generate documentation for how the service operates, like the WSDL for a SOAP operation.   You're going to have to develop documentation by hand to let users know how to consume the service.

 

One last note.  ODBC profiles are unique between 32 and 64 bit apps.  PowerBuilder.Net is 32 bit, and the WCF service will (if run on a 64 bit machine) be running as a 64 bit app.  That means the service would need to use a different ODBC profile than the one I used to develop the app.  Further, PowerBuilder.Net has an easier time debugging the WCF service if it's running as 32 bit rather than 64 bit.  Therefore, I actually wanted the WCF service host to run as 32 bit rather than 64 bit for development and debugging.

 

To accomplish that, I copied the wcfservices_host.exe file in the output folder and renamed the copy to wcfservices_host32.exe.  I then ran corflags on it to change it to a 32 bit application.  I copied the wcfservices_host.exe.config file that PowerBuilder generated and renamed it to match the new executable name. Next, I marked them both read only so PowerBuilder wouldn't delete them the next time I deployed the app.  Finally, I modified the service project so it ran the 32 bit executable whenever  I wanted to run or debugged the service.


How to do dynamic SQL in PB

$
0
0

To create a dynamic SQL statement in PB i did this:

 

SQLTEST = "select id,name  from ss_test where id = @i;";

DECLARE cursor_base DYNAMIC CURSOR FOR SQLSA;

PREPARE SQLSA FROM :SQLTEST;

OPEN DYNAMIC cursor_base USING :i;

FETCH cursor_base INTO :i2,:test2;

 

 

however i am getting the error "Mismatch between prepared number of substitution variables and execute parameters".. Which i don't understand? This same SQL runs on the database and the i is a int value just like in the database? What am i doing wrong?

 

I wanted to be able to do bind variables with the SQL. 

Getting PB hanged(Not Responding) status while creating DW object using SQL Select

$
0
0

I am creating DW using SQL Select, when I select SQL Select data source and click on Next in DW painter my PB got hanged(Not Responding) status.

Also getting same probelm when creating DW through Stored Procedure.

 

I am having 1500 tables in my database.

 

Please help me...

 

 

Thanks ,

Pralhad.

Slow performance when deploying web forms app

$
0
0

Hi all,

 

Suddenly (from one day to another) I began to experience a significant lack of performance when I try to deploy a very simple app to IIS. The "Checking IIS Server", "Generating .NET assembly file", "Generating PBD files", steps now take three or four times more than they used to.

 

The debugger now is also showing a remarkable lack of performance when I try to debug some code by using debugbreak()

 

.NET Web Forms Application

PB 11.5.1 Build 4897

Workstation: Windows 7 / IIS 7.5

 

Any clue ?

Please help

 

Best regards,

 

--------------------------

AUS Julián Tagarro

NeoSistemas SRL

Issue while selecting return type in the Webservice datasource

$
0
0


Hi Team,

 

Good Morning!

 

I am using Webservice as a datasource in the Powerbuilder 12.5 Classic version. while using the webservice datasource i am not able to select return type in the select parameter dialogue box. My return type is defined as a object(webservice.Party), Can you please explain on how to proceed on this? is it required to modify the return type? Please find the below wsdl file and xsd files.

 

Thanks,

Naresh

 

WSDL

 

<?xml
version="1.0" encoding="UTF-8"
?>

 





-<types>



-<xsd:schema>



<xsd:importnamespace="http://services.edpm.usb.metlife.com/party" schemaLocation="PartyServices_schema1.xsd" />

</xsd:schema>

</types>


-<message name="addIdentityToPartyResponse">



<partname="parameters"
element
="tns:addIdentityToPartyResponse" />

</message>


-<message name="findPartyByNaturalId">



<partname="parameters"
element
="tns:findPartyByNaturalId" />

</message>


-<message name="mergePartiesByNaturalId">



<partname="parameters"
element
="tns:mergePartiesByNaturalId" />

</message>


-<message name="findPartyByNaturalIdV2">



<partname="parameters"
element
="tns:findPartyByNaturalIdV2" />

</message>


-<message name="mergePartiesByNaturalIdResponse">



<partname="parameters"
element
="tns:mergePartiesByNaturalIdResponse" />

</message>


-<message name="cloneParty">



<partname="parameters"
element
="tns:cloneParty" />

</message>


-<message name="deleteRangeOfPartiesResponse">



<partname="parameters"
element
="tns:deleteRangeOfPartiesResponse" />

</message>


-<message name="addIdentityToParty">



<partname="parameters"
element
="tns:addIdentityToParty" />

</message>


-<message name="registerPartyResponse">



<partname="parameters"
element
="tns:registerPartyResponse" />

</message>


-<message name="mergeParties">



<partname="parameters"
element
="tns:mergeParties" />

</message>


-<message name="addOrUpdateDeliveryPreferenceForPartyResponse">



<partname="parameters"
element
="tns:addOrUpdateDeliveryPreferenceForPartyResponse" />

</message>


-<message name="mergePartiesResponse">



<partname="parameters"
element
="tns:mergePartiesResponse" />

</message>


-<message name="clonePartyResponse">



<partname="parameters"
element
="tns:clonePartyResponse" />

</message>


-<message name="deleteRangeOfParties">



<partname="parameters"
element
="tns:deleteRangeOfParties" />

</message>


-<message name="findPartyById">



<partname="parameters"
element
="tns:findPartyById" />

</message>


-<message name="removeIdentityFromPartyResponse">



<partname="parameters"
element
="tns:removeIdentityFromPartyResponse" />

</message>


-<message name="setERecordConsentForPartyResponse">



<partname="parameters"
element
="tns:setERecordConsentForPartyResponse" />

</message>


-<message name="EntityNotFoundException">



<partname="fault"
element
="tns:EntityNotFoundException" />

</message>


-<message name="addOrUpdateDeliveryPreferencesForParty">



<partname="parameters"
element
="tns:addOrUpdateDeliveryPreferencesForParty" />

</message>


-<message name="registerParty">



<partname="parameters"
element
="tns:registerParty" />

</message>


-<message name="sendEmailResponse">



<partname="parameters"
element
="tns:sendEmailResponse" />

</message>


-<message name="addOrUpdateAdditionalContactForPartyResponse">



<partname="parameters"
element
="tns:addOrUpdateAdditionalContactForPartyResponse" />

</message>


-<message name="addOrUpdateAdditionalContactForParty">



<partname="parameters"
element
="tns:addOrUpdateAdditionalContactForParty" />

</message>


-<message name="deletePartyResponse">



<partname="parameters"
element
="tns:deletePartyResponse" />

</message>


-<message name="addOrUpdateDeliveryPreferencesForPartyResponse">



<partname="parameters"
element
="tns:addOrUpdateDeliveryPreferencesForPartyResponse" />

</message>


-<message name="setERecordConsentForParty">



<partname="parameters"
element
="tns:setERecordConsentForParty" />

</message>


-<message name="deleteParty">



<partname="parameters"
element
="tns:deleteParty" />

</message>


-<message name="setPrimaryEmailForParty">



<partname="parameters"
element
="tns:setPrimaryEmailForParty" />

</message>


-<message name="findPartyByNaturalIdResponse">



<partname="parameters"
element
="tns:findPartyByNaturalIdResponse" />

</message>


-<message name="removeIdentityFromParty">



<partname="parameters"
element
="tns:removeIdentityFromParty" />

</message>


-<message name="setPrimaryEmailForPartyResponse">



<partname="parameters"
element
="tns:setPrimaryEmailForPartyResponse" />

</message>


-<message name="splitPartyResponse">



<partname="parameters"
element
="tns:splitPartyResponse" />

</message>


-<message name="addOrUpdateDeliveryPreferenceForParty">



<partname="parameters"
element
="tns:addOrUpdateDeliveryPreferenceForParty" />

</message>


-<message name="sendEmail">



<partname="parameters"
element
="tns:sendEmail" />

</message>


-<message name="splitParty">



<partname="parameters"
element
="tns:splitParty" />

</message>


-<message name="findPartyByIdResponse">



<partname="parameters"
element
="tns:findPartyByIdResponse" />

</message>


-<message name="findPartyByNaturalIdV2Response">



<partname="parameters"
element
="tns:findPartyByNaturalIdV2Response" />

</message>


-<portType name="PartyServices">



-<operation name="registerParty">



<inputmessage="tns:registerParty"
/>


<outputmessage="tns:registerPartyResponse" />

</operation>


-<operation name="findPartyById">



<inputmessage="tns:findPartyById"
/>


<outputmessage="tns:findPartyByIdResponse" />

</operation>


-<operation name="findPartyByNaturalIdV2">



<inputmessage="tns:findPartyByNaturalIdV2" />


<outputmessage="tns:findPartyByNaturalIdV2Response" />

</operation>


-<operation name="findPartyByNaturalId">



<inputmessage="tns:findPartyByNaturalId" />


<outputmessage="tns:findPartyByNaturalIdResponse" />

</operation>


-<operation name="addIdentityToParty">



<inputmessage="tns:addIdentityToParty" />


<outputmessage="tns:addIdentityToPartyResponse" />

</operation>


-<operation name="removeIdentityFromParty">



<inputmessage="tns:removeIdentityFromParty" />


<outputmessage="tns:removeIdentityFromPartyResponse" />

</operation>


-<operation name="setERecordConsentForParty">



<inputmessage="tns:setERecordConsentForParty" />


<outputmessage="tns:setERecordConsentForPartyResponse" />


<faultname="EntityNotFoundException" message="tns:EntityNotFoundException" />

</operation>


-<operation name="setPrimaryEmailForParty">



<inputmessage="tns:setPrimaryEmailForParty" />


<outputmessage="tns:setPrimaryEmailForPartyResponse" />


<faultname="EntityNotFoundException" message="tns:EntityNotFoundException" />

</operation>


-<operation name="addOrUpdateAdditionalContactForParty">



<inputmessage="tns:addOrUpdateAdditionalContactForParty" />


<outputmessage="tns:addOrUpdateAdditionalContactForPartyResponse" />

</operation>


-<operation name="addOrUpdateDeliveryPreferenceForParty">



<inputmessage="tns:addOrUpdateDeliveryPreferenceForParty" />


<outputmessage="tns:addOrUpdateDeliveryPreferenceForPartyResponse" />

</operation>


-<operation name="addOrUpdateDeliveryPreferencesForParty">



<inputmessage="tns:addOrUpdateDeliveryPreferencesForParty" />


<outputmessage="tns:addOrUpdateDeliveryPreferencesForPartyResponse" />

</operation>


-<operation name="mergePartiesByNaturalId">



<inputmessage="tns:mergePartiesByNaturalId" />


<outputmessage="tns:mergePartiesByNaturalIdResponse" />

</operation>


-<operation name="mergeParties">



<inputmessage="tns:mergeParties"
/>


<outputmessage="tns:mergePartiesResponse" />

</operation>


-<operation name="splitParty">



<inputmessage="tns:splitParty"
/>


<outputmessage="tns:splitPartyResponse" />


<faultname="EntityNotFoundException" message="tns:EntityNotFoundException" />

</operation>


-<operation name="cloneParty">



<inputmessage="tns:cloneParty"
/>


<outputmessage="tns:clonePartyResponse" />

</operation>


-<operation name="deleteParty">



<inputmessage="tns:deleteParty"
/>


<outputmessage="tns:deletePartyResponse" />

</operation>


-<operation name="deleteRangeOfParties">



<inputmessage="tns:deleteRangeOfParties" />


<outputmessage="tns:deleteRangeOfPartiesResponse" />

</operation>


-<operation name="sendEmail">



<inputmessage="tns:sendEmail"
/>


<outputmessage="tns:sendEmailResponse" />

</operation>

</portType>


-<binding name="PartyServicesPortBinding" type="tns:PartyServices">



<soap:bindingstyle="document" transport="http://schemas.xmlsoap.org/soap/http" />


-<operation name="registerParty">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="findPartyById">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="findPartyByNaturalIdV2">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="findPartyByNaturalId">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="addIdentityToParty">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="removeIdentityFromParty">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="setERecordConsentForParty">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>


-<fault name="EntityNotFoundException">



<soap:faultname="EntityNotFoundException" use="literal" />

</fault>

</operation>


-<operation name="setPrimaryEmailForParty">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>


-<fault name="EntityNotFoundException">



<soap:faultname="EntityNotFoundException" use="literal" />

</fault>

</operation>


-<operation name="addOrUpdateAdditionalContactForParty">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="addOrUpdateDeliveryPreferenceForParty">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="addOrUpdateDeliveryPreferencesForParty">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="mergePartiesByNaturalId">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="mergeParties">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="splitParty">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>


-<fault name="EntityNotFoundException">



<soap:faultname="EntityNotFoundException" use="literal" />

</fault>

</operation>


-<operation name="cloneParty">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="deleteParty">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="deleteRangeOfParties">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>


-<operation name="sendEmail">



<soap:operationsoapAction="" />


-<input>



<soap:bodyuse="literal" />

</input>


-<output>



<soap:bodyuse="literal" />

</output>

</operation>

</binding>


-<service name="PartyServices">



-<port name="PartyServicesPort"
binding
="tns:PartyServicesPortBinding">


</service>

</definitions>

Manually converting individual texts to RTF

$
0
0

Hi all,

 

I needhelp for the followingproblem.


I use PB 12.5 on W8.1 with Oracle database.


I want to readrecords from table.I formateach sentence inaRTFformat(egbold, underline, etc..). Each recordmayhavedifferent formatting. The sentencesare then joinedtogethersetas a string andstoredin the database asCBLOB.

 

Who can give mean exampleor a functionwith which Ican formateach set.


Thanks for thehelp.


André Rust

How to call a structure inside another structure.

$
0
0

Hi Team,

 

How can i declare a structure inside another structure.Is there any way .

 

If no is there any alternative

 

If yes how

 

 

Regards

Subrat

 


importstring with xml merging row data

$
0
0

I have a simple XML import I'm trying to do, rather than manually parsing the data. There's a problem though. The following XML generates 3 rows in the datawindow instead of 4. I'm using a default template.

 

<?xml version="1.0"?><dw_tqxml>

<dw_tqxml_row><dosetime>AM</dosetime><qty>1</qty></dw_tqxml_row>

<dw_tqxml_row><dosetime>8pm</dosetime><qty>1.25</qty></dw_tqxml_row>

<dw_tqxml_row><dosetime>NOON</dosetime></dw_tqxml_row>

<dw_tqxml_row><qty>3.00</qty></dw_tqxml_row>

</dw_tqxml>

 

The first and second rows come out fine, the third row is a combination of the two last rows.

 

Here's the result data

"AM", "1"

"8pm", "1.25"

"NOON", "3.00"

 

dw sql is:

select space(10) as dosetime, space(10) as qty from dummy

 

It's my understanding that missing data should use the default values in the datawindow.

 

PB 12.5 Build 5583

 

Anyone have any ideas on why it's merging rows? This is the first time I've used XML import, don't really have a clue what I'm missing.


Webservice issue

$
0
0

Hi All,

 

we have done the webservice coding in JAVA with SOAP UI. Now we are tried to invoke the service through PowerBuilder. While accesing the WSDL from Web Service Proxy , I am not able to invoke the service with Easy Soap. if i click the Radio Button  ".Net Engine". i can able to invoke the service and get the all functions, while trying with soap i got invalid wsdl file error.

 

WSDL: https://dev.services.edpm.usb.metlife.com/dpm/services/PartyServices/PartyServices.wsdl

 

when i proceed with the .Net, I am getting error on the service

 

Long ll_ret
string ll_v1 = 'STRK', ll_v2 = "Test"
party ll_ReturnVal
String str_proxy_name = "partyservices"
//String ls_url = "https://dev.services.edpm.usb.metlife.com/dpm/services/PartyServices"

SoapConnection lsc_Conn
partyservices lproxy_obj
lsc_Conn = create SoapConnection
lsc_Conn.SetOptions("SoapLog=~"C:\\soaplog.txt~"")
ll_ret = lsc_Conn.CreateInstance(lproxy_obj, str_proxy_name)
IF ll_ret <> 0 THEN
MessageBox("Error","CreateInstance failed " + String(ll_ret))
return
END IF
Try

ll_ReturnVal = lproxy_obj.findpartybynaturalidv2(ll_v1, ll_v2) //Getting Error in this line

MessageBox("Message", String(ll_v1) + "+" + String(ll_v1) + "=" + String(ll_ReturnVal))

Catch ( SoapException e )
MessageBox("Error","Exception: " + e.getmessage())
end try
Destroy lsc_Conn

 

In the findpartybynaturalidv2 function we are getting the error as, Exception: The SoapClient doesn't Support .NET Proxy. I have attached the wsdl file in the txt format for your reference.

 

Please help me on this issue,  I am using PowerBuilder12.5 Classic version

 

Thanks

Naresh

release date of powerbuilder 15

PowerBuilder 12.5.2 EBF

$
0
0


Is there a location for the current EBF files? I'm running PM 12.5.2 Build 5583

Missing Datatype for 64 Bit unsigned integers in PB (Classic/Native).

$
0
0


Hello SAP,

 

please include the Missing datatype ULongLong / UnsignedLongLong in PB 12.5.x and PB 15 (Classic/Native).

I like to use the WINAPI KERNEL32 function GlobalMemoryStatusEx this uses the Structure memoryStatusEx which requires 64 Bit unsigned integers (DWORDLONG) see: http://msdn.microsoft.com/en-us/library/windows/desktop/aa366770(v=vs.85).aspx

 

Please notice that this function is independet from the process bittness (32Bit or 64Bit) so that the new LongPtr im PB15 is not suitable for 32Bit deployment.

 

It seems to work with the 64 Bit signed integers LongLong which are available in PB 12.5 but we have to handle the overflow when the value is getting greater than 9223372036854775807.

 

Kind regards

 

   Marco

passing string variable to select query not working

$
0
0

Friends,

 

PB 7.0

DB: sql server 2008

 

string mid;

mid=get_user();

messagebox("test",mid);

 

 

above message box is showing the value of mid correctly...

but when i pass this variable to the below query i am not getting the value.

where i am making mistake....? please check the red colored text and correct me...my issue is only with the variable not with the query...

 

s4 = 'insert into student select RollNumber, FirstName,CSubjectCode, ' & 

         + 'Internal_1,Mentor  ' &

    + 'FROM Marks_Final ' &

   + 'WHERE (Internal_1 is not null)  and ' &

    + '(feeactive="Y") and mentor="+mid+" ' &

+ 'GROUP BY RollNumber'

 

thanks

count selected rows for a group

$
0
0

Hi,

 

I want to show the number of selected rows of a group (tree level) in a treeview datawindow (PB 12.1 classic).

 

I have created a computed field in the tree level header with

     sum (if (IsSelected(), 1, 0) for group 1)

but it always shows 0.

I've tested it with a computed field for each row (expression: if (IsSelected(), 1, 0) ). This result is as expected 0 or 1. If I sum this I get 0.

I've tested it with a field in trailer band too but the result is always 0.

But if I sum it for all I get the expected result.

 

How can I get the number of selected rows for a single group?

What is return code -30953 fro importfile?

$
0
0

PB 12.5.1 (build 4015)

The return code from an importfile command is -30953.

li_return   = parent.dw_process.ImportFile (ls_pathname)

The file is a csv file that contains 34583 records.

Can somebody please confirm this is a maximum number of rows error.

Also, I assume my option is to split the file into two files to process.


How to deploy a webservice in a server

$
0
0

Hi Team,

 

Hi have created small webserver application using powerbuilder 12.5.1 (PB.net).I have deployed the application in my local IIS server.Its working finr.Now i want to deploy the same application in a server, so that it will be available for external people also.

 

So can anybody help me  on this, how can i deploy this in a server ?

- What should be configuration f the server?

- What are preliminary softwares/applications required to support the webservice?

 

 

Thanks in advance.

 

Regards

Subrat

Trying to Install PB 12.5 - Getting .NET 4.0 SDK Message

$
0
0

My objective is to create a web service datawindow however, I was getting a message that .NET Framework 4.0 SDK was required.  It is installed according to my "Programs and Features" on the Control Panel.

 

I uninstalled PB12.5 and tried to re-install PB 12.5 however, I am getting the message during the install that .NET Framework 4.0 SDK is required.  It is installed on my computer so I don't understand why PB is not recognizing .NET Framework 4.0 SDK.

 

Any suggestions are welcome!

How can i pass integer,long and datetime datatype to a webservice

$
0
0

Hi Team,

 

I am trying to create a simple webservice in powerbuilder 12.5.1. I have created a function of_function_return of return type String.It takes one argument as integer.Please find the image below.

 

of_function_return.PNG

 

 

 

 

After that i delpoyed this an local iis server and a webservice generated.

 

Now i am accessing this newly created webservice in powerbuilder classic in a webservice datawindow.

 

webservcie_datawindow.PNG

 

Here its is showing as two aruguments ( dont know why).Now i have selected the return value.The below issue is coming.

 

error.PNG

 

Is there any limitation that in input parameter we should only pass string variables.

 

please help on this.

 

Regards

Subrat

How to pass a structure/array of structure as input parameter in a webservice

$
0
0

Hi Team,

 

I am trying to create a webservice in powerbuilder .net( pb 12.5.1) . As this webservice will be used by external world to access some of data on basis of some input paarameter.

 

So can i use array of structure as input parameter to a webservice ? If no, then how can i pass a result set ( mora then 1 row with more than one column)

as an argument to the webservice.

 

 

 

Regards

Subrat

Profilestring - can I tell where they are pulling the ini from

$
0
0

I have a client, who put our software on a citrix xenix 4.5 server.

it was on a windows 2003 server

originally... they put an ini file, in each of the documents and settings / user directories

 

now, they have upgraded to a citrix 6.5 server on windows 2008

windows 08, doesn't have the documents & settings folders.... they have user sub-directories

but, it doesn't seem to want to find the ini file that we are reading thru profile functions

 

I don't really know enough about citrix to be able to tell what's going on... or, what needs to be done

 

we don't put a path, on the Profilestring function

so... it's searching their windows path

 

Is there a way, that I can tell... what / where it found the INI file?

 

it works... if, on the windows server... we put a path like C:|temp

and, put that... in the path, on the server

 

but... we need to have each user, pick up their own ini file

Viewing all 2935 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>