Hi,
We have the following issue when getting data from web service. The simplified data structure is described below:
<soapenv:Body>
<ns0:Order majorVersionNr="4" minorVersionNr="000" xmlns:ns0="http://www.abc.com/v4/abc">
<ApplicationArea>
<CreationDateTime>2017-03-06T05:46:19.327Z</CreationDateTime>
<Receiver>
<NOfReceiver>4</NOfReceiver>
<Receiver>
<SystemID>XYZ</SystemID>
<MessageInfo>
<TypeOfStandard>STXYZ</TypeOfStandard>
<Version>4</Version>
<Name>Order</Name>
<Release>4.0.106</Release>
</MessageInfo>
</Receiver>
</Receiver>
</ApplicationArea>
<DataArea>
<Action>
<ActionCode>9</ActionCode>
</Action>
<MessageContact>
<ContactCommunication>
<Type>EM</Type>
<CommID>Jakis kontakt</CommID>
</ContactCommunication>
</MessageContact>
<OrderDescription>
<Identification>
<OrderReason>Booking</OrderReason>
<UniqueOrderNumber type="Type1" legID="DEL" legCounter="001">03691</UniqueOrderNumber>
<OrderSubType>Direct</OrderSubType>
<TransportMode>1</TransportMode>
<TransportType>2</TransportType>
</Identification>
<ServiceRequest/>
<TransportConditions>
<PaymentTerm>PP</PaymentTerm>
<Incoterm>TTT</Incoterm>
<IncotermLocation>WAW</IncotermLocation>
<LoadType>1</LoadType>
<NatureOfGoods>12</NatureOfGoods>
<Characteristics>
<Characteristic>CH1</Characteristic>
</Characteristics>
</TransportConditions>
</OrderDescription>
</DataArea>
</ns0:Order>
</soapenv:Body>
The data we receive with Order.p procedure that we tested with different types of parameters.
Example 1.
DEFINE INPUT PARAMETER ApplicationArea AS LONGCHAR.
DEFINE INPUT PARAMETER DataArea AS LONGCHAR.
There are no error messages from web service, however there is no data in both input params.
Example 2.
DEFINE INPUT PARAMETER ApplicationArea AS LONGCHAR.
DEFINE INPUT PARAMETER DATASET-HANDLE DataArea.
In case there is an attribute in <order> tag, the below error message appears (only attribute xmlns:ns0="http://www.abc.com/v4/abc" is allowed):
An error was detected in the Web Service request. (10894)
Error in SOAP parameter: NULL (10914)
Without atributtes in order tag, we observed that:
In ApplictationArea is no data.
In DataArea is whole structure with data.
Example 3.
DEFINE INPUT PARAMETER DATASET-HANDLE ApplicationArea.
DEFINE INPUT PARAMETER DATASET-HANDLE DataArea.
There is error message as the data structure is nested for ApplicationArea and the same element name <Receiver>.
Example 4.
There is no issue when both params are sent as CDATA, however thus solution is not satisfactry for us.
Could you please help us resolve this issue? Why in some cases the input parameters are empty?
We tested our webservice from SoapUI.
Kind regards,
Rafal
It depends on examples. Bprowsdldoc shows what we define in procedure order..p,
For example for example 2
Parameters
ApplicationArea
This value is defined as an XML Schema string value.
DataArea
This value is defined as a DATASET-HANDLE.
result
This value is defined as an XML Schema string value.
Best regards
Rafal
Please provide the output from bprowsdldoc. That is the procedure signature. I don't believe bprowsdldoc ever recommends a DATASET-HANDLE. Also, which release are you on?
Here is a fragment from bprowsdldoc documentation
------------------------------
Order
No documentation found in WSDL.
Procedure prototype
PROCEDURE Order:
DEFINE INPUT PARAMETER ApplicationArea AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER DATASET-HANDLE DataArea.
DEFINE OUTPUT PARAMETER result AS CHARACTER NO-UNDO.
END PROCEDURE.
Function prototype
FUNCTION Order RETURNS CHARACTER
(INPUT ApplicationArea AS CHARACTER,
INPUT DATASET-HANDLE DataArea).
END FUNCTION.
Example
DEFINE VARIABLE ApplicationArea AS CHARACTER NO-UNDO.
DEFINE VARIABLE DataArea AS HANDLE NO-UNDO.
DEFINE VARIABLE result AS CHARACTER NO-UNDO.
FUNCTION Order RETURNS CHARACTER
(INPUT ApplicationArea AS CHARACTER,
INPUT DATASET-HANDLE DataArea)
IN hAbcObj.
/* Function invocation of Order operation. */
result = Order(ApplicationArea, DATASET-HANDLE DataArea).
/* Procedure invocation of Order operation. */
RUN Order IN hAbcObj(INPUT ApplicationArea, INPUT DATASET-HANDLE DataArea, OUTPUT result).
-------------------------------
DATASET-HANDLE parameter works correctly. Problem is LONGCHAR.
I suppose that we found the cause of our problem. Propbably problem is connection beetwen SoapUI and webservice. We can't read ApplicationArea as DATASET-HANDLE because there is nested elements with this same name one in second. We have to use LONGCHAR but SoapUI has problem with send xml string as parameter. I found similar problems on SoapUi forum. We checked our webservices from OpenEdge procedure and from .Net and it worked correctly. Probably it resolve our problem. We have to use other software to test webservice.
I have also other problem. How to prepare ONE-WAY service. Maybe it is strange but we don't need any output parameter.s Our procedure hasn't OUTPUT PARAMETER but bprowsdldoc generate prototype procedure with OUTPUT.
We don't know how to create webservice without it.
Rafal
I suggest that you open a call with Tech Support, and include the WSDL. This might turn into an RFA for development to investigate.
Thanks,
Robin
Hi Rafal,
You wrote
"I have also other problem. How to prepare ONE-WAY service. Maybe it is strange but we don't need any output parameter.s Our procedure hasn't OUTPUT PARAMETER but bprowsdldoc generate prototype procedure with OUTPUT. We don't know how to create webservice without it."
We do NOT support one-way Web service operations.
Robin
Thank you for explanation one-way operations.