BookmarkSubscribeRSS Feed
Keith22
Calcite | Level 5

I am trying to make a PROC SOAP call from SAS using a saved file instead of a URL. The reason for this is firewall/proxy issues calling some of the "w3" websites. The xml from the WSDL is saved to a text file with a ."wsdl" extension and the problematic URLs are replaced with ".xsd" files stored in the same directory.

This solution does work when testing in SOAP UI 5.2 , but the challenge I am having is getting SAS to reference the local file saved to SAMGW instead of using the URL. Has anyone had any experience with this? Below is the code I am trying to use. The statement in bold is the problematic part. The SOAP Envelope is contained in the REQUEST.xml file referenced in the first line of code.

 

filename REQUEST "samplefilepath/REQUEST.xml" ; 
filename RESPONSE "samplefilepath/RESPONSE.xml" ;

proc soap in=REQUEST
out=RESPONSE
URL="samplefilepath/ChangeRiskModel2.wsdl" /*this is the line I am trying to figure out. Instead of using a URL I need it to reference a static file
soapaction="http://urltowsdl"
WEBUSERNAME="xxxxxx"
WEBPASSWORD="xxxxxx";
run;

 

4 REPLIES 4
ballardw
Super User

I think you need to use a comment such as /* <=== This line is the problem line */

as the posted code doesn't show any bold text.

Keith22
Calcite | Level 5

thanks. I added a comment next to the line I am having difficulties with. 

ballardw
Super User

I am guessing here but if your URL would generally be http:// <etc> I might try Url= "file://<local path>"

Keith22
Calcite | Level 5

Thanks, that helped! I also found that I had reversed my URL and SOAPAction. It seems now that the PROC SOAP command is connecting but  I am seeing an issue with the SOAP Envelope now. The envelope works in SOAPUI 5.2 but the same envelope returns an error - 

 

<SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>SOAP-ENV:Server</faultcode><faultstring>A CXmlApiException was raised in native code : error 16 : scxmlapi(16) - Invalid or missing file name in XML request</faultstring><faultactor>Server</faultactor></SOAP-ENV:Fault>

 

Anyone know a way around this? Details of the envelope I am using below: 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://schemas.hp.com/SM/7" xmlns:com="http://schemas.hp.com/SM/7/Common" xmlns:c="file:///c:\dev\xmlmime">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:UpdateChangeRiskModelRequest attachmentInfo="" attachmentData="" ignoreEmptyElements="true" updateconstraint="-1">
         <ns:model query="">
            <ns:keys query="" updatecounter="">
               <!--Optional:-->
               <ns:ChangeID type="String" mandatory="" readonly="">C02766647</ns:ChangeID>
            </ns:keys>
            <ns:instance query="" uniquequery="" recordid="" updatecounter="">
               <ns:header type="Structure">
                  <!--Optional:-->
                  <ns:ChangeID type="String" mandatory="" readonly=""></ns:ChangeID>
                  <!--Optional:-->
                  <ns:CurrentPhase type="String" mandatory="" readonly=""></ns:CurrentPhase>
                  <!--Optional:-->
                  <ns:RiskAssessment type="String" mandatory="" readonly=""></ns:RiskAssessment>
                  <!--Optional:-->
                  <ns:TestingResults type="String" mandatory="" readonly=""></ns:TestingResults>
                  <!--Optional:-->
                  <ns:RecoveryScope type="String" mandatory="" readonly=""></ns:RecoveryScope>
                  <!--Optional:-->
                  <ns:CodeRepository type="String" mandatory="" readonly=""></ns:CodeRepository>
                  <!--Optional:-->
                  <ns:PerformingGroup type="String" mandatory="" readonly=""></ns:PerformingGroup>
               </ns:header>
               <ns:middle type="Structure">
                  <!--Optional:-->
                  <ns:AssociatedCIs type="Array">
                     <!--Zero or more repetitions:-->
                     <ns:AssociatedCIs type="String" mandatory="" readonly=""></ns:AssociatedCIs>
                  </ns:AssociatedCIs>
               </ns:middle>
               <!--Optional:-->
               <ns:Service type="String" mandatory="" readonly=""></ns:Service>
               <!--Optional:-->
               <ns:ScoredRiskFlag type="String" mandatory="" readonly="">Scored</ns:ScoredRiskFlag>
               <!--Optional:-->
               <ns:ScoredRisk type="String" mandatory="" readonly="">Low</ns:ScoredRisk>
               <!--Optional:-->
               <ns:attachments>
                  <!--Zero or more repetitions:-->
                  <com:attachment c:contentType="" href="" contentId="" action="" name="" type="" len="" charset="" attachmentType="">cid:1331595433226</com:attachment>
               </ns:attachments>
            </ns:instance>
            <!--Optional:-->
            <ns:messages>
               <!--Zero or more repetitions:-->
               <com:message severity="" module=""></com:message>
            </ns:messages>
         </ns:model>
      </ns:UpdateChangeRiskModelRequest>
   </soapenv:Body>
</soapenv:Envelope>

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2277 views
  • 0 likes
  • 2 in conversation