2

Whenever I create my XSD element name: Ansh, it(wsdl) doesnt get loaded in my SOAPUI(Soapui doesnt create operation for this request) bu when i change my element name as: AnshRequest, request template is generated.

    <xsd:element name="Ansh">
       <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="SignonRq" type="tns:SignonRq" />
                <xsd:element name="BillerSvcRq" type="tns:BillerSvcRq" />
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

This works fine: when i change rootelement as AnshRequest:

    <xsd:element name="AnshRequest">
       <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="SignonRq" type="tns:SignonRq" />
                <xsd:element name="BillerSvcRq" type="tns:BillerSvcRq" />
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

SOAP UI:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
                  xmlns:acc="http://accountupload.atheeb.net">
   <soapenv:Header />
   <soapenv:Body>
      <acc:AnshRequest>
         <acc:SignonRq>
            <acc:ClientDt>4</acc:ClientDt>
            <acc:LanguagePref>?</acc:LanguagePref>
         </acc:SignonRq>
         <acc:BillerSvcRq>
            <acc:StatusCode>1</acc:StatusCode>
            <acc:RqUID>uuid</acc:RqUID>
         </acc:BillerSvcRq>
      </acc:AnshRequest>
   </soapenv:Body>
</soapenv:Envelope>

Please help, i am new to SOAP WS. I want only "Ansh" to be the root element.

dbc
  • 104,963
  • 20
  • 228
  • 340
Ansh Hora
  • 31
  • 3
  • 2
    You're having issues with a WSDL, but decided to ask without showing the relevant parts of the WSDL? Hmmm... – Andreas Sep 05 '20 at 09:56
  • Where is your content and c# classes defined? The response, content, and classes have to be consistent. You can add an attribute to the class [XmlRoot("AnshRequest")] so the class Ansh will recognize the xml tag AnshRequest. – jdweng Sep 05 '20 at 11:57

0 Answers0