Forum Discussion

sallyw's avatar
sallyw
Occasional Contributor
6 years ago

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.

 

 

  • 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...

     

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    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?

     

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        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...