cancel
Showing results for 
Search instead for 
Did you mean: 

cap-solutions.co.uk - how does SoapUI get the response?

SOLVED
Occasional Contributor

cap-solutions.co.uk - how does SoapUI get the response?

We have a test suite for some IDOX (formerly CAP solutions I believe) web services in SoapUI, and also generated from the WSDL in C#.

 

One of the tests uses the AddVisitsToInspection service:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:mes="http://www.caps-solutions.co.uk/webservices/connectors/731/servicerequest/messagetypes"
xmlns:xit="http://www.caps-solutions.co.uk/schema/uniform/731/xi/xitypes"> <soapenv:Header/> <soapenv:Body> <mes:AddVisitsToInspection> <!--Optional:--> <xit:InspectionIdentifier>18/00716/PCOMP</xit:InspectionIdentifier> <!--Optional:--> <mes:Visits> <!--Zero or more repetitions:--> <xit:SubmittedVisit> <!--Optional:--> <xit:VisitTypeCode>PC</xit:VisitTypeCode> <!--Optional:--> <xit:ActualDateOfVisit>2018-12-11T13:10:00</xit:ActualDateOfVisit> <!--Optional:--> <xit:OfficerCode>IPAUL</xit:OfficerCode> <!--Optional:--> <xit:HoursTaken>1.5</xit:HoursTaken> <!--Optional:--> <xit:Comments>No treatment required</xit:Comments> </xit:SubmittedVisit> </mes:Visits> </mes:AddVisitsToInspection> </soapenv:Body> </soapenv:Envelope>

This is the response - I've deliberately posted from an example which failed:

 

<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"> <soap:Body> <TransactionReport> <TransactionComplete>True</TransactionComplete> <TransactionSuccess>False</TransactionSuccess> <TransactionMessages> <TransactionMessage> <MessageType>CAPS.CentralServices.CN.InvalidCnCodeValueException</MessageType> <MessageBrief>The code value provided for this field is invalid. ListName: XIVTYPE, CodeValue: PC, CodeCategory:</MessageBrief> <MessageDetail>CAPS.CentralServices.CN.InvalidCnCodeValueException: The code value provided for this field is invalid. ListName: XIVTYPE, CodeValue: PC, CodeCategory: at CAPS.CentralServices.CN.CnCodeManager.ValidateCnCodeValueByListName(PersistenceSession session, String strListName, String strCodeValue) at CAPS.Modules.XI.XiVisit.ValidateVisitForInsert(PersistenceSession session) at CAPS.Modules.XI.XIManager.CreateVisitBase(XiInspection inspection, XiVisit visit) at CAPS.Modules.XI.XIManager.AddVisitToInspectionWithoutTransaction(XiInspection inspection, XiVisit visit) at CAPS.Modules.XI.XIManager.AddVisitsToInspection(XiInspection inspection, XiVisit[] visits) at CAPS.Web.Connectors.ServiceRequest.ServiceRequestConnectorService.AddVisitsToInspection(String InspectionIdentifier, SubmittedVisitType[] Visits)</MessageDetail> </TransactionMessage> </TransactionMessages> </TransactionReport> </soap:Body> </soap:Envelope>

 

However I can find no trace of TransactionReport or 

http://www.caps-solutions.co.uk/webservices/connectors/731/servicerequest/messagetypes

in the WSDL response:

      <s:element name="AddVisitsToInspection">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" ref="s9:InspectionIdentifier" />
            <s:element minOccurs="0" maxOccurs="1" name="Visits" type="s9:ArrayOfSubmittedVisitType" />
          </s:sequence>
        </s:complexType>
      </s:element>
<s:element name="AddVisitsToInspectionResponse"> <s:complexType /> </s:element>

Nor is it in the generated C# code which does mention the messagetypes namespace :

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(
WrapperName="AddVisitsToInspectionResponse",
WrapperNamespace="http://www.caps-solutions.co.uk/webservices/connectors/731/servicerequest/message" + "types", IsWrapped=true)] public partial class AddVisitsToInspectionResponse { public AddVisitsToInspectionResponse() { } }

So we are mystified as to how SoapUI does this.  Can anyone shed a light?  

What we want is TransactionReport to come back into the C# code, can see no way of doing this at present.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: cap-solutions.co.uk - how does SoapUI get the response?

Hi,

 

Thank you for the file.

Hm-m-m... It does not mention any Transaction or Report entities indeed...

What I would do is to use some recording proxy (Fiddler, for example) to check the traffic generated for this given test that fails.

If only one request for the called service method (AddVisitsToInspection) is generated, then I would say that you need to talk with developers and ask them why wsdl file lacks some info and how this can be resolved. Another option (if developers are not accessible or no changes are possible) is to parse the response manually as a regular xml content.

If more than one request is generated by SoapUI, then (this is my wild guess) I can imagine that it requests additional definitions that are referenced in the wsdl file but are not included in it. I haven't met such case yet and don't know, as we speak, how to handle it. So some investigation might be needed.

 

Sorry for not been of much help...

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
7 REPLIES 7
Community Hero

Re: cap-solutions.co.uk - how does SoapUI get the response?

Hi,

 

Is web service you are talking about publicly accessible? Can you provide its address?

If the service is not publicly accessible, can you post here complete WSDL?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Occasional Contributor

Re: cap-solutions.co.uk - how does SoapUI get the response?

The WSDL is over 6,000 lines and is too long to paste in so it's attached.  

Community Hero

Re: cap-solutions.co.uk - how does SoapUI get the response?

Hi,

 

Thank you for the file.

Hm-m-m... It does not mention any Transaction or Report entities indeed...

What I would do is to use some recording proxy (Fiddler, for example) to check the traffic generated for this given test that fails.

If only one request for the called service method (AddVisitsToInspection) is generated, then I would say that you need to talk with developers and ask them why wsdl file lacks some info and how this can be resolved. Another option (if developers are not accessible or no changes are possible) is to parse the response manually as a regular xml content.

If more than one request is generated by SoapUI, then (this is my wild guess) I can imagine that it requests additional definitions that are referenced in the wsdl file but are not included in it. I haven't met such case yet and don't know, as we speak, how to handle it. So some investigation might be needed.

 

Sorry for not been of much help...

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Occasional Contributor

Re: cap-solutions.co.uk - how does SoapUI get the response?

Thanks, we have reached similar conclusions to yourself.  Since the software developers have not yet fixed a bug in one of their web services I found a year ago, reporting it to them is unlikely to resolve the situation this year or (I suspect) next!

 

However this web service is in effect a wrapper to one in a different connector, so we should be able to use that directly.

 

Would still love to know what's going on in SoapUI though, so will have a Fiddle.  Smiley Happy

Community Hero

Re: cap-solutions.co.uk - how does SoapUI get the response?

> Since the software developers [...] a year ago, reporting it to them is unlikely [...] this year or (I suspect) next!

LOL! (Y)  This has to be quoted indeed Smiley Happy

 

> will have a Fiddle.

I would appreciate it if you update this thread with your findings as it made me curious.

You may also consider to put a direct question to Support via the https://support.smartbear.com/message/?prod=ReadyAPI form.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Occasional Contributor

Re: cap-solutions.co.uk - how does SoapUI get the response?

This has been passed on to our resident Clever Clogs, will let you know how he gets on.  

Occasional Contributor

Re: cap-solutions.co.uk - how does SoapUI get the response?

To add, he's on holiday until some time next week.

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors