I deployed the soap sample and receiving errors, 403 in console.

Not applicable

I have deployed the soap sample:

https://github.com/apigee/api-platform-samples/tree/master/sample-proxies/soap

When I test the API invoke.sh I get:

Using org and environment configured in /setup/setenv.sh
+ curl 'http://johnshealy-eval-test.apigee.net/simplesoap?wsdl'
{"fault":{"faultstring":"Evaluation of script calculateaddress.py (py) failed with reason: \"AttributeError: 'NoneType' object has no attribute 'find'\"","detail":{"errorcode":"steps.script.ScriptEvaluationFailed"}}}

When I try and test from the API Console I get

HTTP/1.1 403 Forbidden

Date:
Fri, 09 Mar 2018 15:18:29 GMT
Content-Length:
319
Expires:
Fri, 09 Mar 2018 15:18:28 GMT
Connection:
keep-alive
Content-Type:
text/html
Mime-Version:
1.0
Server:
AkamaiGHost
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
 
You don't have permission to access "http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php" on this server.<P>
Reference #18.efddedcc.1520608708.20ab81d
</BODY>

The deployment looks correct to me. Do I need credentials, tried to have my Apigee credentials as Basic Auth in the console but still got the same issue.

0 1 1,542
1 REPLY 1

Hi -

I think the service that was originally available at http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php. ... has changed. It is now listening on the https protocol, and is no longer listening on http.

How did I figure this out? I tried this:

curl -i -X POST -H content-type:application/xml -d '<root/>'  \
    http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php

and got this response:

HTTP/1.1 301 Moved Permanently
Server: AkamaiGHost
Content-Length: 0
Location: https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php
Date: Fri, 09 Mar 2018 16:43:43 GMT
Connection: keep-alive

That tells me that it is now listening on https. So then I just modified the original request to use https. and tried again.

curl -i -X POST -H content-type:application/xml -d '<root/>' \
  https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php

And then I got a proper SOAP response:

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
      <faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode>
      <faultactor xsi:type="xsd:string"></faultactor>
      <faultstring xsi:type="xsd:string">Operation '' is not defined in the WSDL for this service</faultstring>
      <detail xsi:type="xsd:string"></detail>
    </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Which tells me the SOAP Service is alive and well. So what you need to do is modify the default.xml in the target, to be https instead of http.

<TargetEndpoint name="default">
  <HTTPTargetConnection>
    <URL>https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php</URL>
  </HTTPTargetConnection>
</TargetEndpoint>

Then, re-deploy, and try it. I just did this, and it works for me.

I'll make sure to get that sample fixed.