Initiating a SOAP WSDL request

Looking to create a Request for Comment (RFC) using a SAP function. A SAP data source was generated from this function. Upon visiting the following address: , a page with XML definitions is displayed.

<?xml version="1.0" encoding="UTF-8"?>  
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:s0="urn:sap-com:document:sap:rfc:functions" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="urn:sap-com:document:sap:rfc:functions">  
...

Created a JavaScript function to send a POST request as shown below:

var webServiceURL = 'http://xxx.xxx.com:8000/sap/bc/soap/wsdl11?sap-client=200&services=ZTEST';  
function createSoapEnvelope(contents) {  
...
HelloWorld();  

However, upon running the code, the user remains on the description page instead of seeing a list of users. Seeking a solution. Thank you!

Edit 1

Upon visiting , the following message is displayed:

<soap:Envelope>
  <soap:Body>
    <soap:Fault>
      <faultcode>
...

Visiting results in a blank page. In the transaction code soamanager, the webservice is listed with the configuration details including Service, Endpoints, State, and Creation Type as mentioned.

Answer №1

It appears that your post is directed to the incorrect URI, and there seems to be an issue with the content as well.
Since I am unable to determine the correct values for you, I have set up a test service for comparison. By examining the URIs and messages used in a functioning service, you may be able to pinpoint the error.
I have established a ZTEST RFC that simply outputs a parameter message with the text Hello, World!. I have created a SOAP service from this RFC and set up a binding using the soamanager transaction (did you miss this final step?). Here are the results:

WSDL URI:

http://sapserver/sap/bc/srt/wsdl/srvc_[guid]/wsdl11/allinone/ws_policy/document?sap-client=200

The WSDL lists the following binding URIs:

http://sapserver/sap/bc/srt/rfc/sap/ztest/200/ztest/binding

http://sapserver/sap/bc/srt/rfc/sap/ztest/200/ztest/binding

Sending a POST request (Content-Type text/xml) to either of these binding URIs with the provided body should return the expected outcome:

<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Header>
        <sapsess:Session xmlns:sapsess="http://www.sap.com/webas/630/soap/features/session/">
            <enableSession>true</enableSession>
        </sapsess:Session>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <ns1:Ztest xmlns:ns1='urn:sap-com:document:sap:soap:functions:mc-style'></ns1:Ztest>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to integrate external JavaScript libraries into Meteor.js?

When working with Meteor, how can I incorporate a 3rd party JavaScript library like gridster.js (http://gridster.net/)? Typically, I would include the script directly in the HTML page. However, is there a way to require it directly in the JavaScript file, ...

JavaScript code for validating two passwords is malfunctioning

I'm currently working on a registration form for my website and I'm trying to implement a JS script that compares two password inputs (password and repeat password) and displays a message saying "passwords are not the same." Below is the code I h ...

Error in Internet Explorer when attempting to close a Fancybox iframe that plays a YouTube video

Even the FancyApps page itself contains the error mentioned below. If you visit using Internet Explorer 9, for example, follow these steps: Go to Internet Options > Advanced > Disable script debugging (Internet Explorer). Then click on the YouTube ( ...

Unlocking the secrets of extracting dimensions from imported SVG components in nextJS

I am facing an issue with importing an SVG file as a component and trying to obtain its dimensions, but it keeps returning null. Can someone provide me with advice on how to resolve this? PS. When I try using getBBox(), it throws an error. Here is the co ...

How to make Angular 5 wait for promises to finish executing in a for loop

My task involves working with an array like this: arr = ['res1', 'res2', 'res3']; For each value in the arr, I need to make an API call that returns a promise. arr.forEach(val => this.getPromise(val)); The getPromise me ...

fluctuating random percentage in JavaScript/jQuery

I am currently faced with the challenge of selecting a random number based on a given percentage ranging from 0 to 5. 0 - 25% (25/100) 1 - 25% (25/100) 2 - 20% (20/100) 3 - 15% (15/100) 4 - 10% (10/100) 5 - 5% (5/100) However, there are instances where ...

Uniqid in React fails to generate unique IDs

Currently working on creating my first react project and developing a todo list. I have incorporated the uniqid generator into my todo object, but it seems to be returning an empty id rather than a random one. Oddly enough, if I move the todo state outsi ...

Avoid running the second then() function in a promise if a specific condition is satisfied

Can anyone help me figure out how to prevent the code block below from executing any further once arkIsEnabled is evaluated as true? return promise .then(response => { if (arkIsEnabled) { dispatch(createArk(respo ...

Customize the styling of an individual 'LI' item within an array by utilizing Jquery

Just starting out with Javascript and jQuery. Created a basic image slider that's running into a jQuery problem. Here's the HTML for the image list: <div id = "slider-auto"> <ul class= "slides"> <li class = "slide"&g ...

Tips on utilizing ajax to load context without needing to refresh the entire page

As a beginner in AJAX, I have some understanding of it. However, I am facing an issue on how to refresh the page when a new order (order_id, order_date, and order_time) is placed. I came across some code on YouTube that I tried implementing, but I'm n ...

Incorporate a hanging indent within the text enclosed by the <li> element

(revised multiple times to enhance clarity) Disclaimer: I did not create the HTML code. Below is the structure of the HTML (please note that the links and text following them are on the same line): <li> <strong>Heading of section</str ...

Submit the form without displaying any output in the browser, not even in the view source code

I have a basic form that needs to be submitted multiple times, but I want the submission process to be hidden from the browser. Simply using "hidden" or "display:none" won't completely hide the form code when viewing the page source. I tried using PHP ...

Is there a way for me to locate the ownerID?

I have a simple task that I need to complete My goal is for the user to be identified using my token when creating a post This is how the create function looks like: exports.create = async (req, res) => { const user = req.token; const users = awai ...

The dropdown menu is not able to retrieve information from the secondary database

I have been encountering multiple challenges while working on a web-based dynamic form that I am developing. My current major issue is with populating the second #bodytype dropdown based on the selection made in the first, #bodyman, dropdown. Subsequently ...

It appears that Javascript variables are behaving in a static manner

I am currently building a PHP website with a registration page for users. I am implementing the LOOPJ jQuery Autocomplete script from to enable users to select their country easily. In this process, I encountered an issue where the value of another field ...

Obtaining various object values from a data set

I need help with identifying elements in an object: object["key1"] = "text1" object["key2"] = "text2" object["key3"] = "text1" object["key4"] = "text3" How can I alert the elements that have the same values (such as text1, text2, etc.)? For the provided ...

Exploring the concept of making nested API requests within a route using Node.js and

Being a newbie in the world of coding, I'm excited to make my first post here. My current learning project involves developing a website that utilizes an external CRM for storing client data received from web forms. The storage functionality is up an ...

Troubleshooting: jQuery AJAX Post - Issue with Greater than conditional not functioning as expected

Having an issue with a conditional in my code. Everything is functioning properly except for this specific line. <if condition="$show['member']"> <script type="text/javascript" > $(function() { $("#submitbutton$post[postid]").click(f ...

The equation:() is malfunctioning

Here is a code snippet I'm working with: $("#button").click(function () { for (var i = 0; i < 4; i++) { setTimeout(function () { $(".rows:eq("+i+")").css("background-color", "blue"); ...

Customizing the appearance and dimensions of JWPlayer Audio Player with percentage-based styling

I'm currently attempting to set up an audio embed using JWPlayer, following the instructions provided in this particular article. The article suggests setting it up with the following code: <div id="myElement">Loading the player...</div> ...