I'm trying to consume a web service running on port 8080. When loading the WSDL directly from HTTP it works great:
But when we save this exact same WSDL definition to a file and use the file instead, e.g:
The WSDL loads, but whenever we try to run something on it (i.e. consume a service) it fails.
I've done some network traces and found that it's making the call on port 8080 when using the http address directly, but when using the file it's going back to port 80 - and fails.
The port number is defined in the WSDL file itself:
<wsdl:service name="AuthService"><wsdl:port binding="tns:AuthServiceSoapBinding" name="AuthPort"><soap:address location="mip-vpm.mip.co.za:8080/.../wsdl:service>
Any idea how to fix this? Is this a bug?
OE11.3.3 CentOS7 64-bit and Windows 32-bit.
I am using 11.6.3
The documentation states the following about additional parameters -Service and -Port (documentation.progress.com/.../index.html
The local name of the service element within the WSDL document that the application will use. This field is optional. Many WSDL documents only support one service and this parameter is optional if there is only one (or zero) service elements defined. Used in conjunction with -Port.
The local name of the port element contained within the service element. Used in conjunction with -Service. This parameter is optional if -Service contains only one port.
Connection parameter combinations
The CONNECT( ) method is used to connect an ABL SERVER object to a specific application service. This service can be either an AppServer or a Web service. Independent of the type of application service to which the client is connecting, the client needs to provide the location of the service and transport information. There are two mechanisms for providing this information when connecting to a Web service:
1. The CONNECT( ) method can identify a specific service element name and port element name from the WSDL document. The combination of these two element names identify the location of a set of operations that are available on the Web service. It also identifies the transport data. The service element name is specified with the -Service connection parameter and the port element name is specified with the -Port connection parameter.
If the WSDL document contains several service elements, the CONNECT method must identify which service element the client wants to connect to, via -Service. If the WSDL document only identifies one service element, the CONNECT method does not need to contain the service element name. Similarly if the WSDL document (or if the identified service element) only identifies one port element, the CONNECT method does not need to contain the port element name.
If the application needs to provide account name and password information, it can accomplish this by providing the account name and password information in the -SoapEndpointUserid and -SoapEndpointPassword parameters.
If the WSDL document identifies multiple service elements with the same local name, the CONNECT ( ) method must also contain the -ServiceNamespace connection parameter.
2. If the WSDL document contains several binding elements, the CONNECT method must identify which binding element the client wants to use, via the -Binding parameter. If the WSDL document only identifies one binding element, the CONNECT method does not need to contain the binding element name.
If the WSDL document identifies multiple binding elements with the same local name, the CONNECT( ) method must also contain the -BindingNamespace connection parameter.
So the question is, does your WSDL file contain more than one service/binding?
If so, you should address these parameters accordingly.
No there is only one service/binding.
My question is why does it work when you use the URI directly, but it doesn't work if you use a file with exactly the same contents of the URI?
hmm I did get this to work, the response that I get back is a SOAP response (being an invalid username/password):
def var hServer as handle no-undo.
def var hAuth as handle no-undo.
def var username as character.
def var password as character.
def var blaat as character.
create server hServer.
IF NOT hServer:CONNECTED() THEN DO:
MESSAGE "is not connected"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
/* use the Port type name here to create proxy and set a handle to it */
RUN Auth SET hAuth ON hServer.
RUN login IN hAuth(input username, input password, output blaat).
IF NOT VALID-HANDLE(hAuth) THEN DO:
MESSAGE "PortType: " VALID-HANDLE(hAuth) " is not valid"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
Interesting. What version of OE are you using? It's not working in OE13.3.
Thanks. So somewhere between 11.3.3 and 11.6.3 this was fixed.