Update service fail - Error during entity validation

22 views
Skip to first unread message

Sebastian Van Lacke

unread,
Apr 20, 2012, 4:07:52 PM4/20/12
to DevTargetProcess, lcan...@caesarsystems.com
Hi,
Some services started to fail after installing the new version of tp.
For example, I get an error when trying to do a bug update call, with
a changed custom field. "Error during entity validation --- Object
reference not set to an instance of an object".

I'm sending this envelope:

<env:Envelope xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tp="http://targetprocess.com" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<env:Header>
<wsse:Security env:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
wssecurity-secext-1.0.xsd">
<wsse:UsernameToken
wsu:Id="UsernameToken-6722010"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
wssecurity-utility-1.0.xsd">
<wsse:Username
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
wssecurity-secext-1.0.xsd">user</wsse:Username>
<wsse:Password
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
wssecurity-secext-1.0.xsd"
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
username-token-profile-1.0#PasswordText">xxxxxxx</wsse:Password></
wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<Update xmlns="http://targetprocess.com">
<tp:entity>
<ID xsi:type="xsd:string">21704</ID>
<Effort xsi:type="xsd:string">0.0000</Effort>
<CustomField4 xsi:type="xsd:string">May affect documentation</
CustomField4>
<TimeRemain xsi:type="xsd:string">0.0000</TimeRemain>
<ProjectID xsi:type="xsd:string">5001</ProjectID>
<NumericPriority xsi:type="xsd:string">8962</NumericPriority>
<CreateDate xsi:type="xsd:string">2012-02-17T11:56:54</CreateDate>
<ReleaseName xsi:type="xsd:string">Backlog</ReleaseName>
<OwnerID xsi:type="xsd:string">13</OwnerID>
<TimeSpent xsi:type="xsd:string">0.0000</TimeSpent>
<EffortToDo xsi:type="xsd:string">0.0000</EffortToDo>
<BugID xsi:type="xsd:string">21704</BugID>
<ModifyDate xsi:type="xsd:string">2012-04-11T12:28:04</ModifyDate>
<ProjectName xsi:type="xsd:string">PetroVR</ProjectName>
<Name xsi:type="xsd:string">Enable Flex borrow from PetroVR</Name>
<CustomField1 xsi:type="xsd:string">Suggestion</CustomField1>
<PriorityName xsi:type="xsd:string">Before next release</
PriorityName>
<LastEditorID xsi:type="xsd:string">82</LastEditorID>
<EntityStateName xsi:type="xsd:string">Open</EntityStateName>
<PriorityID xsi:type="xsd:string">7</PriorityID>
<EntityTypeName xsi:type="xsd:string">Tp.BusinessObjects.Bug</
EntityTypeName>
<EntityStateID xsi:type="xsd:string">5</EntityStateID>
<EffortCompleted xsi:type="xsd:string">0.0000</EffortCompleted>
<Description xsi:type="xsd:string">&lt;div&gt;
Add an option to borrow a flex license from the application.&lt;/
div&gt;
</Description>
<SeverityName xsi:type="xsd:string">Enhancement</SeverityName>
<SeverityID xsi:type="xsd:string">5</SeverityID>
</tp:entity>
</Update>
</env:Body>
</env:Envelope>

Thanks for your help,


Sebastian





Alex Fomin

unread,
Apr 24, 2012, 4:27:53 AM4/24/12
to devtarge...@googlegroups.com, lcan...@caesarsystems.com
Hi,

What version of TP do you use now? What is the full response you get?

Thanks,
Alex

пятница, 20 апреля 2012 г., 23:07:52 UTC+3 пользователь Sebastian Van Lacke написал:

Sebastian Van Lacke

unread,
Apr 24, 2012, 3:25:01 PM4/24/12
to DevTargetProcess, lcan...@caesarsystems.com, svan...@caesarsystems.com
Hi Alex, we are using this version:

Build 2.23.2.21716 / 27-Mar-2012
Client: 26.254

And here is the full response:

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://
schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://
docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-
secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-
utility-1.0.xsd"><soap:Header><wsa:Action>http://schemas.xmlsoap.org/
ws/2004/08/addressing/fault</wsa:Action><wsa:MessageID>urn:uuid:
871d0c94-6024-4443-85d1-2c859b5c3812</
wsa:MessageID><wsa:RelatesTo>urn:uuid:34f8b432-2d26-431b-91b9-
efc9c718bcd1</wsa:RelatesTo><wsa:To>http://schemas.xmlsoap.org/ws/
2004/08/addressing/role/anonymous</
wsa:To><wsse:Security><wsu:Timestamp
wsu:Id="Timestamp-0df96b2e-4c5e-4156-8b42-3eb43052c67e"><wsu:Created>2012-04-24T19:00:32Z</
wsu:Created><wsu:Expires>2012-04-24T19:05:32Z</wsu:Expires></
wsu:Timestamp></wsse:Security></
soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</
faultcode><faultstring>Server was unable to process request. ---&gt;
Error during entity validation. ---&gt; Object reference not set to an
instance of an object.</faultstring><detail /></soap:Fault></
soap:Body></soap:Envelope>

Regards,

Sebastian


On Apr 24, 5:27 am, Alex Fomin <shurickfo...@gmail.com> wrote:
> Hi,
>
> What version of TP do you use now? What is the full response you get?
>
> Thanks,
> Alex
>
> пятница, 20 апреля 2012 г., 23:07:52 UTC+3 пользователь Sebastian Van Lacke
> написал:
>
>
>
>
>
>
>
>
>
> > Hi,
> > Some services started to fail after installing the new version of tp.
> > For example, I get an error when trying to do a bug update call, with
> > a changed custom field. "Error during entity validation --- Object
> > reference not set to an instance of an object".
>
> > I'm sending this envelope:
>
> > <env:Envelope xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:tp="http://targetprocess.com" xmlns:xsi="http://www.w3.org/2001/
> > XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance>"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> > env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> > <env:Header>
> > <wsse:Security env:mustUnderstand="1"
> > xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
> > wssecurity-secext-1.0.xsd<http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-se...>">
>
> > <wsse:UsernameToken
> >         wsu:Id="UsernameToken-6722010"
> >         xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
>
> > wssecurity-secext-1.0.xsd<http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-se...>"
>
> >         xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
>
> > wssecurity-utility-1.0.xsd<http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-ut...>">
>
> >         <wsse:Username
> >         xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
>
> > wssecurity-secext-1.0.xsd<http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-se...>">user</wsse:Username>
>
> >         <wsse:Password
> >         xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
>
> > wssecurity-secext-1.0.xsd<http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-se...>"
>
> >         Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
> > username-token-profile-1.0#PasswordText<http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-toke...>">xxxxxxx</wsse:Password></

Andrew

unread,
Apr 25, 2012, 6:04:05 AM4/25/12
to DevTargetProcess
Hi,

I have verified it locally with your version of TP without errors. Can
you send me your sample that gives you error to
"andrey.v...@targetprocess.com".

Regards,
Andrey

On Apr 24, 10:25 pm, Sebastian Van Lacke <svanla...@caesarsystems.com>
wrote:

Sebastian Van Lacke

unread,
Apr 25, 2012, 3:55:23 PM4/25/12
to DevTargetProcess, Sebastian Van Lacke, Leandro Caniglia
Hi Andrey, what do you mean by your sample? The SOAP envelope that I
have copied is a real one. Do you need anything else?

Thank you

Sebastian


On Apr 25, 7:04 am, Andrew <andrei.vaskovs...@gmail.com> wrote:
> Hi,
>
> I have verified it locally with your version of TP without errors. Can
> you send me your sample that gives you error to
> "andrey.vaskovs...@targetprocess.com".

Andrew

unread,
Apr 26, 2012, 5:23:55 AM4/26/12
to DevTargetProcess
The SOAP envelope seems to be fine...my working sample envelope looks
like below...the server gives that exception when validating the
entity before save, but normally it's a readable message...can we
schedule a go to meeting with you ?

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://
schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://
docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-
secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsa:Action>http://targetprocess.com/Update</wsa:Action>
<wsa:MessageID>urn:uuid:5c9d56f2-0738-4186-a001-16274ed19970</
wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/
anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:To>http://demo8.tpondemand.com/Services/BugService.asmx</
wsa:To>
<wsse:Security soap:mustUnderstand="1">
<wsu:Timestamp wsu:Id="Timestamp-33b6abc0-b738-4421-
a43a-41ea4c69e3d0">
<wsu:Created>2012-04-26T08:44:06Z</wsu:Created>
<wsu:Expires>2012-04-26T08:49:06Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/
2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="SecurityToken-e0b75cd4-b22d-4d0f-b7ad-596d0d6d9061">
<wsse:Username>admin</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-username-token-profile-1.0#PasswordText">admin</
wsse:Password>
<wsse:Nonce>ZJy9CWlEvu/EbI52CUdZEg==</wsse:Nonce>
<wsu:Created>2012-04-26T08:44:06Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<Update xmlns="http://targetprocess.com">
<entity>
<ID>5539</ID>
<BugID>5539</BugID>
<Name>AA</Name>
<Description>
&lt;div&gt;
aAA&lt;/div&gt;
</Description>
<StartDate xsi:nil="true" />
<EndDate xsi:nil="true" />
<CreateDate>2012-04-25T02:51:18</CreateDate>
<ModifyDate>2012-04-25T02:51:57</ModifyDate>
<LastCommentDate xsi:nil="true" />
<NumericPriority>1538</NumericPriority>
<CustomField1>00000000000000000255</CustomField1>
<Effort>0.0000</Effort>
<EffortCompleted>0.0000</EffortCompleted>
<EffortToDo>0.0000</EffortToDo>
<TimeSpent>0.0000</TimeSpent>
<TimeRemain>0.0000</TimeRemain>
<LastCommentUserID xsi:nil="true" />
<OwnerID>1</OwnerID>
<LastEditorID>1</LastEditorID>
<EntityStateID>27</EntityStateID>
<PriorityID>7</PriorityID>
<ProjectID>1577</ProjectID>
<IterationID xsi:nil="true" />
<ParentID xsi:nil="true" />
<ReleaseID xsi:nil="true" />
<SeverityID>5</SeverityID>
<BuildID xsi:nil="true" />
<UserStoryID xsi:nil="true" />
<EntityTypeName>Tp.BusinessObjects.Bug</EntityTypeName>
<EntityStateName>Backlog</EntityStateName>
<PriorityName>Fix If Time</PriorityName>
<ProjectName>KB</ProjectName>
<ReleaseName>Backlog</ReleaseName>
<SeverityName>Enhancement</SeverityName>
</entity>
</Update>
</soap:Body>
</soap:Envelope>

On Apr 25, 10:55 pm, Sebastian Van Lacke <svanla...@caesarsystems.com>

Sebastian Van Lacke

unread,
May 2, 2012, 2:32:39 PM5/2/12
to DevTargetProcess, svan...@caesarsystems.com, lcan...@caesarsystems.com
Andrew, I have noted that the service works if I put all the entity
tags in the same order as in your example. Besides, it is not
necessary to include null values.

Is it mandatory to send the parameters in that order?

Regards,

Sebastian
> ...
>
> read more »

Andrew

unread,
May 3, 2012, 5:30:18 AM5/3/12
to DevTargetProcess
Hi Sebastian,

He have recently added [XmlElement(Order =...)] attributes to all our
DTO's. This can be the root cause of the problem. Can you please try
to regenerate the ServiceProxies from the wsdl in your
TargetProcess...
Let me know if this didn't help.

Regards,
Andre

On May 2, 9:32 pm, Sebastian Van Lacke <svanla...@caesarsystems.com>
> ...
>
> read more »

Sebastian Van Lacke

unread,
May 3, 2012, 11:28:58 AM5/3/12
to DevTargetProcess
Hi Andrew, we have changed our Smalltalk framework to use the order
described in the services documentation.
It seems that the order is required only for the Update service not
for Create, for example. Is that correct?

Thanks for your help.

Regards,

Sebastian
> ...
>
> read more »

Andrew

unread,
May 4, 2012, 7:25:25 AM5/4/12
to DevTargetProcess
Hi Sebastian,

The order is required for all methods. Some calls might work but it's
better to follow the order for all them

Regards,
Andrey

On May 3, 6:28 pm, Sebastian Van Lacke <svanla...@caesarsystems.com>
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages