Service Virtualization

 View Only

DevTestTool: How to handle tags like "multiRef" generated by Apache Axis APIs for a WSDL (SOAP)

  • 1.  DevTestTool: How to handle tags like "multiRef" generated by Apache Axis APIs for a WSDL (SOAP)

    Posted Jan 12, 2016 01:59 PM

    Hi,

    I have setup an image using WSDL for SOAP services.

    It works very well when I use plain XML request.

    However, when I call this service through my application it fails as my application generates a request using Apache Axis WSDL2JAVA maven plugin wihch will add "multiRef" key into all the tags.

    Is there a way to handle such different forms of the requests for the same WSDL in the DevTestTool?

     

    working XML:

    <soapenv:addUser xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"  xmlns:ns1="http://v9_6.service.api.clearpath.pb.com">

    <user>

        <active>0</active>

        <address>

            <city>anything</city>

            <company>kcF05</company>

            <country>QxyMrLHoP</country>

            <email>NsMl66r1LRMj4</email>

            <faxNumber>q7XfuGu</faxNumber>

            <firstName>hu3W2q32</firstName>

            <lastName>R1lLG</lastName>

            <middleName>WfKie8V0UHpI</middleName>

            <phoneNumber1>LjhJtS7s5</phoneNumber1>

            <phoneNumber2>42k3H</phoneNumber2>

            <postalCode>UF27Qvq72Y3jU</postalCode>

            <region>V343F12</region>

            <street1>8UrAK</street1>

            <street2>EsQr3o</street2>

            <street3>HA8v44HLQ</street3>

        </address>

        <userName>VdtuScA4E8n4VKF</userName>

    </user>

    </soapenv:addUser >

     

    Problem XML:

     

    <?xml version="1.0" encoding="UTF-8"?>

    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

       <ns1:addUser soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

          <user href="#id0" />

       </ns1:addUser>

       <multiRef xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:User">

          <address href="#id2" />

          <userName xsi:type="soapenc:string">TESTUSER</userName>

       </multiRef>

       <multiRef xmlns:ns6="urn:v9_6.domain.pbclearpath.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns6:Address">

          <city xsi:type="soapenc:string">city</city>

          <company xsi:type="soapenc:string">comp</company>

          <country xsi:type="soapenc:string">US</country>

          <email xsi:type="soapenc:string">TESTUSER@email.com</email>

          <faxNumber xsi:type="soapenc:string">123123123</faxNumber>

          <firstName xsi:type="soapenc:string">NN</firstName>

          <lastName xsi:type="soapenc:string">MM</lastName>

          <middleName xsi:type="soapenc:string" xsi:nil="true" />

          <phoneNumber1 xsi:type="soapenc:string">123123123</phoneNumber1>

          <phoneNumber2 xsi:type="soapenc:string" xsi:nil="true" />

          <postalCode xsi:type="soapenc:string">6801</postalCode>

          <region xsi:type="soapenc:string">CT</region>

          <street1 xsi:type="soapenc:string">6 Oak Tree CT</street1>

          <street2 xsi:type="soapenc:string" xsi:nil="true" />

          <street3 xsi:type="soapenc:string" xsi:nil="true" />

       </multiRef>

    </soapenv:Body>xml