LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-05-2017, 06:28 PM   #1
Belikewater
Member
 
Registered: Mar 2016
Location: Ann Arbor Mi
Distribution: Slackware/Peppermint
Posts: 150

Rep: Reputation: Disabled
Please help me with credentials in header in SoapUI


Hello everyone,

I am new to programming, I just started working with a book on Python. I have worked a little bit with sql, but I am still learning.

I need help concerning connecting to web services using SoapUI.

I was charged with the task of running some API calls at my job, but the problem is I am just learning about this and I need to get this set up by Tuesday.

I am willing to learn, but getting things set up by Tuesday will be difficult.

I am in desperate need of assistance on something I am sure is basic.

I need to enter user name, password, account number and account secret in SoapUI.

From what I understand is that you do this by modifying the header on a request call. I have used the wsdl file to populate the data, but I have not figured out how to enter the credentials in the header in the right language so to speak.

So my request is can someone help me how to do this in the header given the basic and only instructions from the web service guide which is below:
"The following section provides instruction for connecting to the service.
To use the Automotive Description Service, you must supply a valid user ID and password, the URL for the WSDL defining the service, and the service namespace or package name. Chrome Data’s order fulfillment department sends an email with a User ID and password to the contact person at your organization. Use the ID and password to initialize the number and secret attributes described in the Account Info section."

This is the wsdl: http://services.chromedata.com/Description/7b?wsdl

I have all the information, but not knowing how to enter it in language suitable to recognize the credentials in the Header I am lost.


Thanks

Last edited by Belikewater; 08-05-2017 at 07:02 PM.
 
Old 08-06-2017, 02:26 PM   #2
Belikewater
Member
 
Registered: Mar 2016
Location: Ann Arbor Mi
Distribution: Slackware/Peppermint
Posts: 150

Original Poster
Rep: Reputation: Disabled
I think I may have figured it out. Ill have to test some calls. But it appears that you can enter the username and password in the request properties or the Auth tab.

Within the call itself it appears you can enter the account number and account secret.

I will mark it the thread as solved once I can confirm everything is in order
 
Old 08-06-2017, 02:43 PM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,454
Blog Entries: 6

Rep: Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394
Quote:
Originally Posted by Belikewater View Post
I was charged with the task of running some API calls at my job, but the problem is I am just learning about this and I need to get this set up by Tuesday.
If your paid job has responsibilites for which you are not qualified, perhaps you should discuss that with your employer. Please understand that everyone here volunteers their time, so the urgency is all on your end.

That said, what you will need to know to complete the task is basic XML and knowledge of how WSDL and SOAP work.

First, you may think of XML as the basic syntax of the language - how things are expressed. Any XML document will consist of elements, attributes and data, something like this...

Code:
<element_name attribute="attribute value">
   <nested_element>content data</nested_element>
</element_name>
XML provides the means of structuring arbitrary data in a way that can be parsed and validated according to some schema. The actual structure, or allowed elements and attributes are defined by the schema document, itself written in XML. In other words, the schema defines a valid document for that web service.

You should first gain a basic knowledge of XML by doing an online search for tutorials - there are many, here is one.

Next, WSDL, or Web Service Description Language is a specification of an XML document, or language used to describe web services. SO, to communicate with this web service you will need to understand the format of WSDL documents. Again, you may find many tutorials online, here is one.

The schema which you linked defines the documents recognized by that particular web service.

Right at the top it describes a set of elements and attributes contained within an AccountInfo element, which is probably what you are looking for. The basic structure described there looks something like this...

Code:
<AccountInfo number="..." secret=".." country="..." language="..." behalfOf="..." />
Finally, Soap defines an XML language which serves as a kind of envelope for passing data between systems across the internet. Find many tutorials online, here is one.

To interact with their web service you will need to create a complete WSDL document according to that schema and the desired activity, put it into a SOAP wrapper and submit it to their URL. It will then return the result, also in an XML document which you must then parse to extract the desired data.

All of this may be done in various scripting languages such as Python, PHP, Perl or others. The language used will determine the details of how the XML document (usually a simple string) is formed and how the HTTP request is performed (socket, curl, fileget, etc.).

I hope this helps get you started, good luck!

*** EDIT, or you could just use the auth tab of your application... (we were typing at the same time)

Last edited by astrogeek; 08-06-2017 at 02:47 PM.
 
2 members found this post helpful.
Old 08-07-2017, 01:27 PM   #4
Belikewater
Member
 
Registered: Mar 2016
Location: Ann Arbor Mi
Distribution: Slackware/Peppermint
Posts: 150

Original Poster
Rep: Reputation: Disabled
Quote:
If your paid job has responsibilites for which you are not qualified, perhaps you should discuss that with your employer. Please understand that everyone here volunteers their time, so the urgency is all on your end.
Hello Astrogeek,

Sorry if my message implied some type of demand from people on the forum to help me. It was just a request to get started. I am a fast learner, and I have taken on projects which at first I had no clue how to navigate, but eventually figured it out.

Thanks for helping me out on this and taking the time to explain the concepts. I have been reading through the links you provided. I have also watched a few video tutorials.

I am returning data and the next steps is to parse the data, then I will return to the API to see if I can do what we are wanting to get out of it.

If so, it will be good as I will be working more with SoapUI and the web service along with some Python that I have just started learning.

I am marking this thread as solved
 
1 members found this post helpful.
Old 08-08-2017, 04:47 AM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,454
Blog Entries: 6

Rep: Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394
You are welcome!

At one time or another, we all know what it is like to be under the pressure of a short deadline, not knowing what to do next! I did not intend to criticize, some need focus more than others so I just tweaked the knob a little.

I hope the XML references were helpful. It really is pretty simple, but finding all the pieces the first time can be confusing.

Thanks for returning to mark the thread solved, hope you made your deadline!
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MAC header Incorrect and extra 2 bytes seen in Ethernet header pjlnaveen Linux - Networking 1 04-29-2016 05:13 AM
[SOLVED] Amavis: invalid header: all-whitespace header field deathsfriend99 Linux - Server 2 02-16-2012 09:41 AM
How can i get soapui software in ubuntu jsaravana87 Linux - Software 1 09-19-2011 02:18 PM
Want to add data in the header field of tcp/ip header Maitrikkshah Linux - Networking 1 08-06-2011 06:07 AM
How to check missing header files included from another header file adisan82 Linux - Software 1 01-28-2011 03:57 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration