Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
my wsdl file resides in ./wsdl path:
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://soap.client.chipkarte.at" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soap.client.chipkarte.at" name="ServiceManager">
<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://soap.client.chipkarte.at" version="1.0">
<xs:element name="getServices" type="tns:getServices" />
<xs:element name="getServicesResponse" type="tns:getServicesResponse" />
<xs:complexType name="getServices">
<xs:sequence />
</xs:complexType>
<xs:complexType name="getServicesResponse">
<xs:sequence>
<xs:element name="return" type="tns:service" maxOccurs="unbounded" minOccurs="0" nillable="true" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="service">
<xs:sequence>
<xs:element name="description" type="xs:string" minOccurs="0" />
<xs:element name="endPointURL" type="xs:string" minOccurs="0" />
<xs:element name="name" type="xs:string" minOccurs="0" />
<xs:element name="type" type="xs:string" minOccurs="0" />
<xs:element name="version" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
<message name="getServices">
<part name="parameters" element="tns:getServices" />
</message>
<message name="getServicesResponse">
<part name="parameters" element="tns:getServicesResponse" />
</message>
<portType name="IServiceManager">
<operation name="getServices">
&lt;input wsam:Action="http://soap.client.chipkarte.at/IServiceManager/getServicesRequest" message="tns:getServices" />
<output wsam:Action="http://soap.client.chipkarte.at/IServiceManager/getServicesResponse" message="tns:getServicesResponse" />
</operation>
</portType>
<binding name="servicemanager_1Binding" type="tns:IServiceManager">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="getServices">
<soap:operation soapAction="" />
&lt;input>
<soap:body use="literal" />
&lt;/input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="ServiceManager">
<port name="servicemanager_1" binding="tns:servicemanager_1Binding">
<soap:address location="http://localhost/servicemanager/1" />
</port>
</service>
</definitions>

The url to be used is "https://10.196.2.98/servicemanager/1"

What I have tried:

I tried
JavaScript
<pre lang="HTML"><script type="text/javascript" src="./inc/soapclient.js">


function getServices(ECard_IP)
{
var sv = new SOAPClient("./wsdl/ServiceManager.wsdl");
var svres = sv.invoke("https://" + ECard_IP + "/servicemanager/1", "getServices", sv);
alert("SVres " + svres.toSource());
}

which did not work. Could anyone give me a sample how to solve my problem?
Thanks Mikr41
Posted
Updated 30-Sep-16 2:24am
v2

1 solution

Check following documentation if you are looking for the same soapclient.js. The code samples are for .Net but should help get you an idea as the required stuffs are written in javascript as it seems.
JavaScript SOAP Client - Source Code[^]

Please let me know if you are refering to something other than this.

:)
 
Share this answer
 
Comments
mkr3004 1-Oct-16 5:50am    
Thank you, my problem is, I am using php, most confusing is the fact, that my wsdl file resides on the server side of my application, my soap server has to be called with an other address (https://10.196.2.98/servicemanager/1). Looking at soapclient.js I see no way to overcome this. Could it be, that I have to exchange one of the http://.. addresses in the wsdl file - if yes, please tell me, which one.
The whole story I solved already with php, but this works only starting from localhost, from the server side of my application it gets no access to https://10.196.2.98/servicemanager/1. Could it be to solve it by installing a VPN access from the server to https://10.196.2.98 and use the php coding???
Thanks in advance Mikr41
mkr3004 2-Oct-16 5:33am    
function getServices()
{
try
{
var pl = new SOAPClientParameters();
pl.add("location", "https://10.196.2.98/servicemananger/1");
SOAPClient.invoke("./wsdl/ServiceManager.wsdl", "getServices", pl, true, Services_callback);
}
catch(sc)
{
alert(sc.toSource());
}
}

function Services_callback(r, soapResponse)
{
if(soapResponse.xml) // IE
alert(soapResponse.xml);
else // MOZ
alert((new XMLSerializer()).serializeToString(soapResponse));
}
using this I get
(new ReferenceError("SOAPClientParameters is not defined", "http://localhost/Asys/trysoap.php", 13))
What I am doing wrong?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900