Skip to main content
Question

Help with SOAP


Hi,

Need to access a web service. Below are the information I get when I use SOAPUI tool:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">  <soapenv:Header>  <tem:Authentication>  <!--Optional:-->  <tem:SuperUserName>?</tem:SuperUserName>  <!--Optional:-->  <tem:LicenseKey>?</tem:LicenseKey>  <!--Optional:-->  <tem:SessionID>?</tem:SessionID>  <!--Optional:-->  <tem:Version>?</tem:Version>  </tem:Authentication>  </soapenv:Header>  <soapenv:Body>  <tem:AuthenticateUser>  <!--Optional:-->  <tem:UserName>?</tem:UserName>  <!--Optional:-->  <tem:Password>?</tem:Password>  </tem:AuthenticateUser>  </soapenv:Body></soapenv:Envelope>

Raw:

POST <a href="https://skywebapi.skytrac.ca/Webserviceapi/skyweb...</a>" target="_blank">https://skywebapi.skytrac.ca/Webserviceapi/skywebservice.asmx">https://skywebapi.skytrac.ca/Webserviceapi/skyweb...</a> HTTP/1.1Accept-Encoding: gzip,deflateContent-Type: text/xml;charset=UTF-8SOAPAction: "http://tempuri.org/AuthenticateUser"Content-Length: 751Host: skywebapi.skytrac.caConnection: Keep-AliveUser-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Anybody can help me? Please..

Regards,

Azreen

6 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • January 25, 2016

If you are looking for a way to extract the XML element values as feature attributes, the XMLFlattener or XMLFragmenter might help you.


david_r
Evangelist
  • January 25, 2016

In addition to what Takashi said, there is also the XMLTemplater in conjunction with the HTTPCaller to construct and transmit the SOAP request.


davideagle
Contributor
Forum|alt.badge.img+21
  • Contributor
  • January 25, 2016

Further to the other comments, I'd agree that a good way to do this is with a combination of the XMLTemplater to build the request and the HTTPCaller (new name) to post the SOAP request itself. I have attached an example that I built to do a similar request against a road works service, by running in prompt and run mode you can issue all the parameters required by the SOAP service.

roadworksextractor.fmw

More on this and other similar approaches in this webinar:


steveatsafe
Safer
Forum|alt.badge.img+12
  • Safer
  • October 3, 2017

This article will also help with this workflow (in case any stumbles upon this question looking for more).

https://knowledge.safe.com/articles/45314/working-with-soap-services.html


jurgenmack
Contributor
Forum|alt.badge.img+9
  • Contributor
  • January 18, 2018
david_r wrote:

In addition to what Takashi said, there is also the XMLTemplater in conjunction with the HTTPCaller to construct and transmit the SOAP request.

@david_r I have a problem accessing the results of the xml-fragmenter. I am using a soap service. When I view the data in the inspector I get 39 attributes in the "property" and "value" fields. I am not able to access them with any other transformer or writer. I have manually created the xml file and used a solution proposed by takashi and was able to extract the attributes using an attributekeeper. When using the xml reader the attributes and values were available to the attributekeeper. Why does it not work the same way in xml-fragmenter? I see the attributes and values in the inspector as pairs but not as available fields in the transformer.

 

 

Jurgen

 

 


david_r
Evangelist
  • January 19, 2018
jurgenmack wrote:
@david_r I have a problem accessing the results of the xml-fragmenter. I am using a soap service. When I view the data in the inspector I get 39 attributes in the "property" and "value" fields. I am not able to access them with any other transformer or writer. I have manually created the xml file and used a solution proposed by takashi and was able to extract the attributes using an attributekeeper. When using the xml reader the attributes and values were available to the attributekeeper. Why does it not work the same way in xml-fragmenter? I see the attributes and values in the inspector as pairs but not as available fields in the transformer.

 

 

Jurgen

 

 

If you're using the XMLFragmenter you'll have to manually specify the attributes to expose in the workspace (you only need to expose the attributes you need working with):

 

 

 

 

When using the XML Reader, this is done for you automatically, which explains the difference.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings