Jump to content

Consume nusoap WS


jogisarge

Recommended Posts

Hi,

 

i have written my first webservice with nusoap and it works fine.

i use the php SoapClient to consume the webservice.

 

now i want to know, how to consume the ws with curl or fsockopen.

is this possible?

 

i have no idea how the xml code must be look like

The WSDL-File(generated by nusoap) looks like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:kriegshopwebservice" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:kriegshopwebservice">
<types>
<xsd:schema targetNamespace="urn:kriegshopwebservice"
>
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
<xsd:complexType name="iteminartikelupdate_intanr">
  <xsd:all>
   <xsd:element name="intartnr" type="xsd:string"/>
   <xsd:element name="bestand" type="xsd:int"/>
   <xsd:element name="preis" type="xsd:float"/>
  </xsd:all>
</xsd:complexType>
<xsd:complexType name="iteminartikelupdatelist_intanr">
  <xsd:complexContent>
   <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:iteminartikelupdate_intanr[]"/>
   </xsd:restriction>
  </xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="itemoutartikelupdate_intanr">
  <xsd:all>
   <xsd:element name="intartnr" type="xsd:string"/>
   <xsd:element name="errorcode" type="xsd:int"/>
   <xsd:element name="errortext" type="xsd:string"/>
  </xsd:all>
</xsd:complexType>
<xsd:complexType name="itemoutartikelupdatelist_intartnr">
  <xsd:complexContent>
   <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:itemoutartikelupdate_intanr[]"/>
   </xsd:restriction>
  </xsd:complexContent>
</xsd:complexType>
</xsd:schema>
</types>
<message name="Artikelupdate_intartnrRequest">
  <part name="ArtikelupdateIntartnrEingabe" type="tns:iteminartikelupdatelist_intanr" /></message>
<message name="Artikelupdate_intartnrResponse">
  <part name="ArtikelupdateIntartnrAusgabe" type="tns:itemoutartikelupdatelist_intartnr" /></message>
<portType name="shopwebservicePortType">
  <operation name="Artikelupdate_intartnr">
    <documentation>Artikel per interner Artikelnummer aktualisieren</documentation>
    <input message="tns:Artikelupdate_intartnrRequest"/>
    <output message="tns:Artikelupdate_intartnrResponse"/>
  </operation>
</portType>
<binding name="shopwebserviceBinding" type="tns:shopwebservicePortType">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="Artikelupdate_intartnr">
    <soap:operation soapAction="urn:kriegshopwebservice#Artikelupdate_intartnr" style="rpc"/>
    <input><soap:body use="encoded" namespace="urn:kriegshopwebservice" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="urn:kriegshopwebservice" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
</binding>
<service name="shopwebservice">
  <port name="shopwebservicePort" binding="tns:shopwebserviceBinding">
    <soap:address location="http://testws.de/testws.php"/>
  </port>
</service>
</definitions>

can anybody give me some help, please?

 

bye jogi

 

Link to comment
https://forums.phpfreaks.com/topic/227609-consume-nusoap-ws/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.