1. Antony Xavier
  2. PowerServer 2020 or older (Obsolete)
  3. Wednesday, 8 January 2020 06:12 AM UTC

Hi Gurus,

I have web service, which was in Old version (pb 10.5) and convert to pb2017r3 , it is working from Design & Runtime(Exe) . When I convert to web I changed the code and using "appeonwebservicecomponent" as mentioned in the help, it is not working,  always returns -1, and in error message always null, following are my code, advice me how to solve.

 

/*********************************************************************/

/*Sample Code*/

integer IRet
any paralist[]
appeonwebservicecomponent caller
caller=create appeonwebservicecomponent
caller.calltype="1"
caller.proxydllorurl="http://myserver/DWURLIntegApp/service.asmx"
caller.classdescript=""
paralist[1]="Finance"
paralist[2]=758

TRY
   IRet=caller.of_callwebservice("GetDWIntegrationURLByDocID",paralist)
CATCH (runtimeerror EX1)
     MessageBox ( 'Find Error', ex1.GetMessage() )
END TRY

MessageBox ( string(IRet), string(caller.ErrorText))

If Isnull(caller.ReturnValue) Then
    MessageBox ( string(IRet), 'null returnvalue')
else
    MessageBox ( string(IRet), 'not null returnvalue') //always show 
    MessageBox ( string(IRet), string(caller.ReturnValue) )
end if

/*********************************************************************/

Regards

Antony

 

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 8 January 2020 06:42 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hi,

I can't really solve the problem, but maybe this could help:

- Not sure about the any type as parameter and being an array: Could the paralist[] of type any be replaced with some other datatype (or any, but not being an array)? (Just for testing purpose to see if that's the problem).

 

BTW: I don't think TRY .. CATCH will work in powerserver.

Comment
There are no comments made yet.
Marco Meoni Accepted Answer Pending Moderation
  1. Wednesday, 8 January 2020 11:37 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Hello,

any array is ok for input params.

Can you post 

http://myserver/DWURLIntegApp/service.asmx?WSDL

so we can see definition of GetDWIntegrationURLByDocID?

Best,

.m

Comment
There are no comments made yet.
Antony Xavier Accepted Answer Pending Moderation
  1. Wednesday, 8 January 2020 13:37 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 3

Hi Macro,

Following are the definition of "GetDWIntegrationURLByDocID"

 

<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://tempuri.org/">

<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="GetDWIntegrationURLByDocID">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="FileCabinetName" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="DocID" type="s:long"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetDWIntegrationURLByDocIDResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetDWIntegrationURLByDocIDResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string"/>
</s:schema>
</wsdl:types>
<wsdl:message name="GetDWIntegrationURLByDocIDSoapIn">
<wsdl:part name="parameters" element="tns:GetDWIntegrationURLByDocID"/>
</wsdl:message>
<wsdl:message name="GetDWIntegrationURLByDocIDSoapOut">
<wsdl:part name="parameters" element="tns:GetDWIntegrationURLByDocIDResponse"/>
</wsdl:message>
<wsdl:message name="GetDWIntegrationURLByDocIDHttpGetIn">
<wsdl:part name="FileCabinetName" type="s:string"/>
<wsdl:part name="DocID" type="s:string"/>
</wsdl:message>
<wsdl:message name="GetDWIntegrationURLByDocIDHttpGetOut">
<wsdl:part name="Body" element="tns:string"/>
</wsdl:message>
<wsdl:message name="GetDWIntegrationURLByDocIDHttpPostIn">
<wsdl:part name="FileCabinetName" type="s:string"/>
<wsdl:part name="DocID" type="s:string"/>
</wsdl:message>
<wsdl:message name="GetDWIntegrationURLByDocIDHttpPostOut">
<wsdl:part name="Body" element="tns:string"/>
</wsdl:message>
<wsdl:portType name="ServiceSoap">
<wsdl:operation name="GetDWIntegrationURLByDocID">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Returns DWURLIntegration URL:Possible values for FileCabinetName:AccountReceivable,AccountPayable,Finance,CustomerDocuments
</wsdl:documentation>
<wsdl:input message="tns:GetDWIntegrationURLByDocIDSoapIn"/>
<wsdl:output message="tns:GetDWIntegrationURLByDocIDSoapOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="ServiceHttpGet">
<wsdl:operation name="GetDWIntegrationURLByDocID">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Returns DWURLIntegration URL:Possible values for FileCabinetName:AccountReceivable,AccountPayable,Finance,CustomerDocuments
</wsdl:documentation>
<wsdl:input message="tns:GetDWIntegrationURLByDocIDHttpGetIn"/>
<wsdl:output message="tns:GetDWIntegrationURLByDocIDHttpGetOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="ServiceHttpPost">
<wsdl:operation name="GetDWIntegrationURLByDocID">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Returns DWURLIntegration URL:Possible values for FileCabinetName:AccountReceivable,AccountPayable,Finance,CustomerDocuments
</wsdl:documentation>
<wsdl:input message="tns:GetDWIntegrationURLByDocIDHttpPostIn"/>
<wsdl:output message="tns:GetDWIntegrationURLByDocIDHttpPostOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetDWIntegrationURLByDocID">
<soap:operation soapAction="http://tempuri.org/GetDWIntegrationURLByDocID" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetDWIntegrationURLByDocID">
<soap12:operation soapAction="http://tempuri.org/GetDWIntegrationURLByDocID" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ServiceHttpGet" type="tns:ServiceHttpGet">
<http:binding verb="GET"/>
<wsdl:operation name="GetDWIntegrationURLByDocID">
<http:operation location="/GetDWIntegrationURLByDocID"/>
<wsdl:input>
<http:urlEncoded/>
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ServiceHttpPost" type="tns:ServiceHttpPost">
<http:binding verb="POST"/>
<wsdl:operation name="GetDWIntegrationURLByDocID">
<http:operation location="/GetDWIntegrationURLByDocID"/>
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded"/>
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Service">
<wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
<soap:address location="http://myserver/DWURLIntegApp/service.asmx"/>
</wsdl:port>
<wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
<soap12:address location="http://myserver/DWURLIntegApp/service.asmx"/>
</wsdl:port>
<wsdl:port name="ServiceHttpGet" binding="tns:ServiceHttpGet">
<http:address location="http://myserver/DWURLIntegApp/service.asmx"/>
</wsdl:port>
<wsdl:port name="ServiceHttpPost" binding="tns:ServiceHttpPost">
<http:address location="http://myserver/DWURLIntegApp/service.asmx"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Regards

Antony

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 8 January 2020 15:24 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 4

Hi Anthony;

  FYI: If your Web Service works with a WS DataWindow in a native PB App, then PS will handle the WS DWO automatically with no code changes. Food for thought.

Regards  ... Chris

 

Comment
There are no comments made yet.
Marco Meoni Accepted Answer Pending Moderation
  1. Wednesday, 8 January 2020 16:44 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 5

your WSDL seems ok.

1) try to add '?WSDL' at the end of the ProxyDllorUrl string 

2) I quote Chris's suggestion, i.e test if a WS DW works: create it by binding the GetDWIntegrationURLByDocID method, have it working in PB, and then deploy to PS. 

Best,

.m

Comment
There are no comments made yet.
Antony Xavier Accepted Answer Pending Moderation
  1. Thursday, 9 January 2020 09:03 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 6

Hi,

    Macro,  I tried with "to add '?WSDL' at the end of the ProxyDllorUrl string" but no hope.

 

Chris, Thank you very much for your advice, it worked, also your documentation http://powerbuilder-world-tour.com/download/NCPBUG-Conference-May2015-Pollach-WebServicesPrimer.pdf also helped.

 

Regards

Antony

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 9 January 2020 16:36 PM UTC
Hi Anthony .. glad to help!
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.