Announcements
The Google Cloud Community will be in read-only from July 16 - July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Consuming SOAP service with json payload

Not applicable

Hi to all, im new try apigee, i have a soap service and create Proxy SOAP service. When i consumme this service by PostMan with payload in format XML this is correct but when try with json payload is wrong.

XML

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webservicex.net/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:GetGeoIP>
         <!--Optional:-->
         <web:IPAddress>170.133.212.223</web:IPAddress>
      </web:GetGeoIP>
   </soapenv:Body>
</soapenv:Envelope>

JSON

{
  "soapenv:Envelope": {
    "xmlns:soapenv": "http://schemas.xmlsoap.org/soap/envelope/",
    "xmlns:web": "http://www.webservicex.net/",
    "soapenv:Body": {
      "web:GetGeoIP": { "web:IPAddress": "170.133.212.223" }
    }
  }
}
Solved Solved
0 7 1,960
1 ACCEPTED SOLUTION

deboraelkin
Former Googler

It's hard to give a more informed opinion without looking at the generated proxy. But if you used the default Proxy SOAP Service generator, it will most likely expect a JSON request such as this:

{ "GetGeoIP": { 
       "IPAddress": "170.133.212.223"
   }
}

or perhaps, just

{ "IPAddress": "170.133.212.223"
}

Try with any of these variations, and, if it still doesn't work, please attach the proxy as a zip file (You can obtain it by selecting Project -> Download Revision)

View solution in original post

7 REPLIES 7