What is the best way to resolve a web service call issue between two programmers?

mvhughes
mvhughes used Ask the Experts™
on
I have written code in both Java and C# to call a web services method on a third party web site.  I receive an "Invalid Request" response.  I told the programmer for the web service that I thought I did everything right and got this response.  He said to "Please send [him] the full request you are sending, header, body & timestamp and we’ll check the server log."  How would you generally communicate this with somebody? I created the message in Java and C#, and he doesn't want my code snippet.  Should I capture with wireshark, or is there a generally accepted method or some other convenient often use tool(s) that people use for this?  Is this a reasonable request, or since nobody is using their web service but me yet, isn't it reasonable for me to just ask them to look at their logs?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Principal Solutions Architect
Top Expert 2006
Commented:
He is requesting for the SOAP Request you have used for invoking the webservice.

Nothing wrong in providing the auto generated SOAP Request which you sent if there is a  issue in your request he will be able to pin point and assist you better.

Use fiddler or wireshark if you are not logging your SOAP Request and send it to him (I believe no harm in it).

It is a reasonable request considering that you are writing the client in some other language and also at the end of the day every thing will be in terms of SOAP msgs so it doesn't really matter what code you wrote all it matters is weather the request which arrived at the server is in acceptable format.

Most Valuable Expert 2011
Top Expert 2016
Commented:
Here is my idea.  Get rid of SOAP entirely.  Instead choose a RESTful interface.  This will tell you more than you want or need to know about REST.
http://en.wikipedia.org/wiki/Representational_state_transfer

To sum up, in a REST environment, every request is atomic and complete, and every response is complete and usually instantaneous.  The protocol is stateless, just like the World-Wide Web.  You would make a GET request to the web service providing your arguments and the service would write "browser output" providing the answers.  This code snippet is in PHP, but I am sure you can get the idea.  REST services are amazingly easy to test because the URL contains the GET arguments, and the information that comes back is in clear text.

Test a simple example on my server here:
http://www.laprbass.com/RAY_REST_get_last_name.php?key=ABC&name=Ray

An example of a reasonably well-documented RESTful interface is here:
http://www.carpool2camp.org/v2api/apidocs.php
<?php // RAY_REST_get_last_name.php
error_reporting(E_ALL);



// DEMONSTRATE HOW A RESTFUL WEB SERVICE WORKS
// INPUT FIRST NAME, OUTPUT FAMILY NAME
// CALLING EXAMPLE:
// file_get_contents('http://laprbass.com/RAY_REST_get_last_name.php?key=ABC&resp=XML&name=Ray');



// OUR DATA MODEL CONTAINS ALL THE ANSWERS - THIS COULD BE A DATA BASE - AS SIMPLE OR COMPLEX AS NEEDED
$dataModel
= array
( 'Brian'   => 'Portlock'
, 'Ray'     => 'Paseur'
, 'Richard' => 'Quadling'
, 'Dave'    => 'Baldwin'
)
;


// RESPONSE CAN BE PLAIN TEXT OR XML FORMAT
$alpha = NULL;
$omega = NULL;
if ( (isset($_GET["resp"])) && ($_GET["resp"] == 'XML') )
{
    // PREPARE THE XML WRAPPER
    $alpha = '<response>';
    $omega = '</response>';
}



// TEST THE 'API KEY' - THIS COULD BE A DATA BASE - AS SIMPLE OR COMPLEX AS NEEDED
$key = (!empty($_GET["key"])) ? $_GET["key"] : FALSE;
if ($key !== 'ABC')
{
    echo $alpha . 'BOGUS API KEY' . $omega;
    die();
}



// LOOK UP THE FAMILY NAME
$name = (!empty($_GET["name"])) ? $_GET["name"] : FALSE;

// IF THE NAME FROM THE URL IS FOUND IN THE DATA MODEL
if (array_key_exists($name, $dataModel))
{
    // RETURNS THE APPROPRIATE FAMILY NAME FROM THE DATA MODEL
    echo $alpha . $dataModel[$name] . $omega;
    die();
}

// RETURNS THE UNKNOWN NAME INDICATOR
else
{
    echo $alpha . 'UNKNOWN' . $omega;
    die();
}

Open in new window

Author

Commented:
I gave more points to the one solution because it was more of a direct answer to my question, but I really appreciate the other information.  Good to know, thank you.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial