Question

Help with SOAP

  • 25 January 2016
  • 6 replies
  • 12 views

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

Userlevel 2
Badge +17

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

Userlevel 4

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

Badge +14

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:

Badge +11

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

Badge +6

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

 

 

Userlevel 4
@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.

Reply