Here is the following WSDL web services xml structures:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.5. -->
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.5. -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://dispproj/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dispproj/" name="DipService">
<types>
<xsd:schema>
<xsd:import namespace="http://dispproj/" schemaLocation="http://www.example.com:8888/OfficeSRV/DipPort?xsd=1" />
</xsd:schema>
</types>
<message name="getDisp">
<part name="parameters" element="tns:getDisp" />
</message>
<message name="getDispResponse">
<part name="parameters" element="tns:getDispResponse" />
</message>
<message name="getActiveoffice">
<part name="parameters" element="tns:getActiveoffice" />
</message>
<message name="getActiveofficeResponse">
<part name="parameters" element="tns:getActiveofficeResponse" />
</message>
<portType name="Dip">
<operation name="getDisp">
<input message="tns:getDisp" />
<output message="tns:getDispResponse" />
</operation>
<operation name="getActiveoffice">
<input message="tns:getActiveoffice" />
<output message="tns:getActiveofficeResponse" />
</operation>
</portType>
<binding name="DipPortBinding" type="tns:Dip">
<soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
<operation name="getDisp">
<soap12:operation soapAction="" />
<input>
<soap12:body use="literal" />
</input>
<output>
<soap12:body use="literal" />
</output>
</operation>
<operation name="getActiveoffice">
<soap12:operation soapAction="" />
<input>
<soap12:body use="literal" />
</input>
<output>
<soap12:body use="literal" />
</output>
</operation>
</binding>
<service name="DipService">
<port name="DipPort" binding="tns:DipPortBinding">
<soap12:address location="http://www.example.com:8888/OfficeSRV/DipPort" />
</port>
</service>
</definitions>
And here is the schema:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.5. -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://dispproj/" version="1.0" targetNamespace="http://dispproj/">
<xs:element name="getActiveoffice" type="tns:getActiveoffice" />
<xs:element name="getActiveofficeResponse" type="tns:getActiveofficeResponse" />
<xs:element name="getDisp" type="tns:getDisp" />
<xs:element name="getDispResponse" type="tns:getDispResponse" />
<xs:complexType name="getDisp">
<xs:sequence>
<xs:element name="arg0" type="xs:int" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="getDispResponse">
<xs:sequence>
<xs:element name="return" type="tns:disp" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="disp">
<xs:sequence>
<xs:element name="disps" type="xs:anyType" nillable="true" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="getActiveoffice">
<xs:sequence />
</xs:complexType>
<xs:complexType name="getActiveofficeResponse">
<xs:sequence>
<xs:element name="return" type="tns:activeOffices" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="activeOffices">
<xs:sequence>
<xs:element name="offADDRESS" type="xs:string" minOccurs="0" />
<xs:element name="offEMAIL" type="xs:string" minOccurs="0" />
<xs:element name="offFAX" type="xs:string" minOccurs="0" />
<xs:element name="offLIECENE" type="xs:string" minOccurs="0" />
<xs:element name="offMobile" type="xs:string" minOccurs="0" />
<xs:element name="offPHONE" type="xs:string" minOccurs="0" />
<xs:element name="offid" type="xs:int" />
<xs:element name="offname" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:schema>
I am using Postman (which is http request/response client) for Chrome:
Request URL: http://www.example.com:8888/OfficeSRV/DipPort
Request Body (I learned this body after testing it with: http://tomi.vanek.sk/index.php?page=wsdl-viewer):
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://dispproj/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<mns1:getActiveoffice xmlns:mns1="http://dispproj/" />
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The online WSDL client successfully retrieves a result, but when I tried the url and body of the request with Postman I got the following issues:
415: Unsupported Media Type
Are there some HTTP request headers that I am missing with my requests?
After lots of tries I figured out that I have to supply the following HTTP Request Header:
Content-Type -> Content-Type: application/soap+xml;charset=UTF-8
I figured out that by using: SoapUI