rrawson Honored Contributor.
Honored Contributor.
821 views

start() SOAP API data format OTHER THAN STRINGS

Folks,

I am working on a PRD and trying to find documentation which eludes me even with a clever Google search. Hoping someone here has an example.

I want to make a SOAP call to start a workflow (the start() api). I want to do this in SOAPUI via XML rather than abstracting it within Java (at least to demonstrate how it's done to the developer).

So I created a simple PRD with three fields:

sampoString
sampoBool
sampoDate
sampoDN

I can send a string no problem. I am trying to figure out what element to put in the dataitem element if the data type is dn, boolean or date. It looks from my experimentation with date that it should look something like this:

<ser:dataitem>
<ser:name>SampoDate</ser:name>
<ser:value>
<ser:date>20180604123456000Z</ser:date>
</ser:value>
</ser:dataitem>

but the format of the date is unknown. I also tried to send the date in a ser:string element but that told me the XML was lonely (it was looking for a date):

[INDENT]Attempt to set value on Data item [SampoDate] using incorrect type; expecting [date] got [20180604123456000Z]..}[/INDENT]

Which led me to the conclusion that ser:date is on the right track with the wrong train.

so: My questions are:

1) is ser:date correct?
2) What format is the datetime supposed to be in?
3) is ser:boolean correct for a boolean?
4) What format is a boolean in, true/false, TRUE/FALSE, 0/1
5) is ser:dn or ser:DN right for a DN?
6) or are all of these supposed to be set as ser:string

A sample XML doc would be ideal.

Thanks!
Rob

My unsuccessul test:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.novell.com/provisioning/service">
<soapenv:Header/>
<soapenv:Body>
<ser:startRequest>
<!--DN of the workflow:-->
<ser:arg0>cn=Tester,cn=RequestDefs,cn=AppConfig,cn=UserApp,cn=IDV,ou=IDM,ou=services,o=acme</ser:arg0>
<!--DN of the recipient:-->
<ser:arg1>cn=UAAdmin,o=acme</ser:arg1>
<!--Data Items:-->
<ser:arg2>

<ser:dataitem>
<ser:name>Description</ser:name>
<ser:value>
<ser:string>999 999 9999</ser:string>
</ser:value>
</ser:dataitem>
<ser:dataitem>
<ser:name>SampoDate</ser:name>
<ser:value>
<ser:date>20180604123456000+0000</ser:date>
</ser:value>
</ser:dataitem>
<ser:dataitem>
<ser:name>SampoBool</ser:name>
<ser:value>
<ser:boolean>true</ser:boolean>
</ser:value>
</ser:dataitem>

<ser:dataitem>
<ser:name>SampoDN</ser:name>
<ser:value>
<ser:dn>cn=admin,o=acme</ser:dn>
</ser:value>
</ser:dataitem>
</ser:arg2>
</ser:startRequest>
</soapenv:Body>
</soapenv:Envelope>
Labels (1)
0 Likes
10 Replies
rrawson Honored Contributor.
Honored Contributor.

Re: start() SOAP API data format OTHER THAN STRINGS

Progress.

The attributes should all be ser:string, works for the boolean (true/false) and dn. Still trying to figure out date.
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: start() SOAP API data format OTHER THAN STRINGS

Haven't tried it myself, but this may be worth a closer look:

http://books.xmlschemata.org/relaxng/ch19-77049.html

Try
2018-06-04T12:34:56
or
2018-06-04T12:34:56+02:00

Wolfgang

On 15/06/2018 00:54, rrawson wrote:
>
> Progress.
>
> The attributes should all be ser:string, works for the boolean
> (true/false) and dn. Still trying to figure out date.
>
>

0 Likes
rrawson Honored Contributor.
Honored Contributor.

Re: start() SOAP API data format OTHER THAN STRINGS

Good try but didn't help.
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: start() SOAP API data format OTHER THAN STRINGS

Have you tried "20181231123456000+0000Z" ?

Wolfgang


On 19/06/2018 20:46, rrawson wrote:
>
> Good try but didn't help.
>
>

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: start() SOAP API data format OTHER THAN STRINGS

On 6/19/18 5:50 PM, Wolfgang Schreiber wrote:
> Have you tried "20181231123456000+0000Z" ?
>
> Wolfgang
>
>
> On 19/06/2018 20:46, rrawson wrote:
>>
>> Good try but didn't help.
>>
>>

Greetings,
I have posted what the date format needs to be a few times. I will
look on my old laptop for some soapUI projects.

--
Sincerely,
Steven Williams
Principal Enterprise Architect
Micro Focus
0 Likes
ScorpionSting Absent Member.
Absent Member.

Re: start() SOAP API data format OTHER THAN STRINGS

stevewdj;2482747 wrote:
On 6/19/18 5:50 PM, Wolfgang Schreiber wrote:
> Have you tried "20181231123456000+0000Z" ?
>
> Wolfgang
>
>
> On 19/06/2018 20:46, rrawson wrote:
>>
>> Good try but didn't help.
>>
>>

Greetings,
I have posted what the date format needs to be a few times. I will
look on my old laptop for some soapUI projects.

--
Sincerely,
Steven Williams
Principal Enterprise Architect
Micro Focus


So, if its been posted a few times, why hasn't the documentation been updated to specify the format?

Visit my Website for links to Cool Solution articles.
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: start() SOAP API data format OTHER THAN STRINGS

On 6/19/18 7:30 PM, Steven Williams wrote:
> On 6/19/18 5:50 PM, Wolfgang Schreiber wrote:
>> Have you tried "20181231123456000+0000Z" ?
>>
>> Wolfgang
>>
>>
>> On 19/06/2018 20:46, rrawson wrote:
>>>
>>> Good try but didn't help.
>>>
>>>

> Greetings,
>     I have posted what the date format needs to be a few times.  I will
> look on my old laptop for some soapUI projects.
>

Greetings,
I tested with one of my older prd deployed to 4.7. I had a date and
time field. In soapUI you have to use ser:string and the format is

YYYYMMDDHHMMSS

For Example:
<ser:string>20180624090000000-0400</ser:string>

For a Time field this will show June 24, 2018 at 9:00am


For a Date, you would set the time to 0. So, for Example:
20180624000000000-0400

<ser:string>20180624000000000-0400</ser:string>



Note: If you add a log activity after the Start and log out the values
being passed, you will see the format. So, you then start the WF
manually and you can then see what is passed in the flow. This will
then help you to know what to put in your SOAP call since it needs to
pass in the data the same as it would have been passed in from the
Request Form.




--
Sincerely,
Steven Williams
Principal Enterprise Architect
Micro Focus
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: start() SOAP API data format OTHER THAN STRINGS

Thanks for the Update!
That will help

Wolfgang


On 21/06/2018 15:07, Steven Williams wrote:
> On 6/19/18 7:30 PM, Steven Williams wrote:
> Greetings,
>    I tested with one of my older prd deployed to 4.7.  I had a date and
> time field.   In soapUI you have to use ser:string and the format is
>
> YYYYMMDDHHMMSS
>
> For Example:
> <ser:string>20180624090000000-0400</ser:string>
>
> For a Time field this will show June 24, 2018 at 9:00am
>
>
> For a Date, you would set the time to 0.  So, for Example:
> 20180624000000000-0400
>
> <ser:string>20180624000000000-0400</ser:string>
>
>
>
> Note: If you add a log activity after the Start and log out the values
> being passed, you will see the format.  So, you then start the WF
> manually and you can then see what is passed in the flow.  This will
> then help you to know what to put in your SOAP call since it needs to
> pass in the data the same as it would have been passed in from the
> Request Form.
>
>
>
>

0 Likes
rrawson Honored Contributor.
Honored Contributor.

Re: start() SOAP API data format OTHER THAN STRINGS

Thanks to everyone responding on this. This turned out to be a red herring. Once I got the format correct in a test PRD, I was still getting data item errors from the PRD I was originally trying to start.

It turned out that there is what is almost certainly a bug. In addition to all the fields which have post activity mappings, all the string / html fields are manadatory too...they have to be specified in the data items in the start. That really shouldn't be the case, there is no way for an html field to send output into the flowdata, but nonetheless if you have any html fields you have to include them in the data items. Not sure if this is a designer bug or a UA bug but IMHO it's a bug.
0 Likes
Knowledge Partner
Knowledge Partner

Re: start() SOAP API data format OTHER THAN STRINGS

rrawson;2482917 wrote:
Thanks to everyone responding on this. This turned out to be a red herring. Once I got the format correct in a test PRD, I was still getting data item errors from the PRD I was originally trying to start.

It turned out that there is what is almost certainly a bug. In addition to all the fields which have post activity mappings, all the string / html fields are manadatory too...they have to be specified in the data items in the start. That really shouldn't be the case, there is no way for an html field to send output into the flowdata, but nonetheless if you have any html fields you have to include them in the data items. Not sure if this is a designer bug or a UA bug but IMHO it's a bug.


I seem to recall discovering this as well. I think it's a feature. They can't tell which fields might be required vs. optional, so they require all of them.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.