How to connect to WSDL web service? - web-services

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

Related

Different responses in different environments

I have two environments - local and UAT which are a SOAP web service is deployed on WAS 7. The response in the local env. is proper as it sends only the fault but the uat is sending what is sent in the request + fault which is undesirable
LOCAL
request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://xmlns.scania.com/logistics/schema/transport/v1">
<soapenv:Body>
<v1:TransportInformationRequest>
<!--1 or more repetitions:-->
<v1:ChassisNumber>9181398</v1:ChassisNumber>
</v1:TransportInformationRequest>
</soapenv:Body>
</soapenv:Envelope>
response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Faults indicating that the consumer agent is failed by a authentication or authorization mechanism.</faultstring>
<detail>
<SecurityFault>
<FaultTypeDescription>Faults indicating that the consumer agent is failed by a authentication or authorization mechanism.</FaultTypeDescription>
<CustomMessage>Security header not present in the SOAP request</CustomMessage>
</SecurityFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
UAT
request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://xmlns.scania.com/logistics/schema/transport/v1">
<soapenv:Header/>
<soapenv:Body>
<v1:TransportInformationRequest>
<!--1 or more repetitions:-->
<v1:ChassisNumber>9181398</v1:ChassisNumber>
</v1:TransportInformationRequest>
</soapenv:Body>
</soapenv:Envelope>
response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://xmlns.scania.com/logistics/schema/transport/v1">
<soapenv:Body>
<v1:TransportInformationRequest>
<!--1 or more repetitions:-->
<v1:ChassisNumber>9181398</v1:ChassisNumber>
</v1:TransportInformationRequest>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Faults indicating that the consumer agent is failed by a authentication or authorization mechanism.</faultstring>
<detail>
<SecurityFault>
<FaultTypeDescription>Faults indicating that the consumer agent is failed by a authentication or authorization mechanism.</FaultTypeDescription>
<CustomMessage>Security header not present in the SOAP request</CustomMessage>
</SecurityFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
The only difference we could spot was the local env. returns 3 namespaces xsd, xsi and soapenc in soapenvelope while UAT returns only v1 namespace.
The WSDL is :
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="TransportInformationService" xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sch="http://xmlns.scania.com/logistics/schema/transport/v1"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:fault="http://xmlns.scania.com/common/schema/fault/v4"
xmlns:tns="http://xmlns.scania.com/logistics/contract/transport/v1"
xmlns:tns1="http://xmlns.scania.com/productdev/contract/part/v1"
targetNamespace="http://xmlns.scania.com/logistics/contract/transport/v1">
<types>
<xsd:schema>
<xsd:import namespace="http://xmlns.scania.com/logistics/schema/transport/v1"
schemaLocation="logistics_transport_v1.xsd" />
</xsd:schema>
</types>
<message name="GetTransportInformationRequest">
<part element="sch:TransportInformationRequest" name="parameters" />
</message>
<message name="GetTransportInformationResponse">
<part element="sch:TransportInformationResponse" name="parameters" />
</message>
<message name="EmptyChasisInformationFault">
<part element="sch:EmptyChasisFault" name="fault" />
</message>
<message name="UnknownServerFault">
<part name="UnknownServerFault" element="sch:UnknownServerFault" />
</message>
<message name="RequestMessageFormatFault">
<part name="RequestMessageFormatFault" element="sch:RequestMessageFormatFault" />
</message>
<message name="NonExistingEntityFault">
<part name="NonExistingEntityFault" element="sch:NonExistingEntityFault" />
</message>
<message name="SystemResourceUnavailableFault">
<part name="SystemResourceUnavailableFault" element="sch:SystemResourceUnavailableFault" />
</message>
<message name="SecurityFault">
<part name="SecurityFault" element="sch:SecurityFault" />
</message>
<portType name="TransportInformationDelegate">
<operation name="GetTransportInformation">
<input message="tns:GetTransportInformationRequest" />
<output message="tns:GetTransportInformationResponse" />
<fault message="tns:EmptyChasisInformationFault" name="EmptyChasisInformationFault"/>
<fault name="SystemResourceUnavailableFault" message="tns:SystemResourceUnavailableFault"/>
<fault name="NonExistingEntityFault" message="tns:NonExistingEntityFault"/>
<fault name="RequestMessageFormatFault" message="tns:RequestMessageFormatFault"/>
<fault name="UnknownServerFault" message="tns:UnknownServerFault"/>
<fault name="SecurityFault" message="tns:SecurityFault"/>
</operation>
</portType>
<binding name="TransportInformationPortBinding" type="tns:TransportInformationDelegate">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="GetTransportInformation">
<soap:operation
soapAction="http://xmlns.scania.com/logistics/contract/transport/v1/GetTransportInformation" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
<fault name="EmptyChasisInformationFault">
<soap:fault name="EmptyChasisInformationFault" use="literal" />
</fault>
<fault name="SystemResourceUnavailableFault">
<soap:fault name="SystemResourceUnavailableFault" use="literal"/>
</fault>
<fault name="NonExistingEntityFault">
<soap:fault name="NonExistingEntityFault" use="literal"/>
</fault>
<fault name="RequestMessageFormatFault">
<soap:fault name="RequestMessageFormatFault" use="literal"/>
</fault>
<fault name="UnknownServerFault">
<soap:fault name="UnknownServerFault" use="literal"/>
</fault>
<fault name="SecurityFault">
<soap:fault name="SecurityFault" use="literal"/>
</fault>
</operation>
</binding>
<service name="TransportInformationService">
<port binding="tns:TransportInformationPortBinding" name="TransportInformationPort">
<soap:address
location="http://localhost:9081/SoleilWS.WEB/TransportInformationService" />
</port>
</service>
</definitions>
The xsd :
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" xmlns:types="http://ws.soleil.scania.com/"
xmlns="http://xmlns.scania.com/logistics/schema/transport/v1"
targetNamespace="http://xmlns.scania.com/logistics/schema/transport/v1">
<xs:complexType name="chassisInfo">
<xs:sequence>
<xs:element name="ChassisNumber" type="xs:int" />
<xs:element name="TransportLegs" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="From" type="xs:string" />
<xs:element name="To" type="xs:string" />
<xs:element name="OutsideEU" type="xs:boolean" />
<xs:element name="ModeOfTransport" type="xs:string" />
<xs:element name="NameOfTransport" type="xs:string"
minOccurs="0" />
<xs:element name="NationalityOfTransport" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:annotation>
<xs:documentation>Two character ISO 3166-1 code for the
nationality of the transport
</xs:documentation>
</xs:annotation>
<xs:length value="2" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Departure" type="xs:dateTime"
minOccurs="0" />
<xs:element name="EstimateTimeOfArrival" type="xs:dateTime"
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="TransportInformationRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="ChassisNumber" type="xs:int" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TransportInformationResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="Chassis" type="chassisInfo" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="EmptyChasisFault">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="message" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="CustomMessage">
<xs:restriction base="xs:string" />
</xs:simpleType>
<xs:simpleType name="FaultTypeDescription">
<xs:restriction base="xs:string" />
</xs:simpleType>
<xs:element name="RequestMessageFormatFault">
<xs:complexType>
<xs:sequence>
<xs:element
fixed="Request message format validation fault. Note that there may be other fault message types capturing faults for more specific request message problems."
name="FaultTypeDescription" type="FaultTypeDescription" />
<xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SystemResourceUnavailableFault">
<xs:complexType>
<xs:sequence>
<xs:element
fixed="Faults which are of temporary character and not caused by incorrect request messages. This message may be used to communicate that the client can expect an invocation with the same request message to work at a later time. Example: required resource of the service realization, such as a database or another service, is temporarily inaccessible."
name="FaultTypeDescription" type="FaultTypeDescription" />
<xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="UnknownServerFault">
<xs:complexType>
<xs:sequence>
<xs:element
fixed="Faults which are not classified to any other category. Note that there may be, although so should be avoided when possible, other undeclared fault message types as well."
name="FaultTypeDescription" type="FaultTypeDescription" />
<xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NonExistingEntityFault">
<xs:complexType>
<xs:sequence>
<xs:element
fixed="Faults indicating that the request message is referencing an entity not existing in the service datastore."
name="FaultTypeDescription" type="FaultTypeDescription" />
<xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="InvalidReferenceFault">
<xs:complexType>
<xs:annotation>
<xs:documentation>This fault may be extended using specific faults
for specific, or specific groups of, foreign keys.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element
fixed="Faults indicating that the entity contained in the request has an invalid reference to another entity."
name="FaultTypeDescription" type="FaultTypeDescription" />
<xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NotSupportedForEntityStateFault">
<xs:complexType>
<xs:annotation>
<xs:documentation>This fault may be extended using specific faults
for specific, or specific groups of, state-machine rules.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element
fixed="Faults indicating that the operation issued on an entity is not permitted due to the state of the same entity."
name="FaultTypeDescription" type="FaultTypeDescription" />
<xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SecurityFault">
<xs:complexType>
<xs:annotation>
<xs:documentation>This fault may be extended for specific security
faults. Remember, however, that revealing too much information on
the inner workings of a security mechanism in fault messages may
risk the security of the solution.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element
fixed="Faults indicating that the consumer agent is failed by a authentication or authorization mechanism."
name="FaultTypeDescription" type="FaultTypeDescription" />
<xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Why the difference between the responses ?
What is the difference in the environments? Check the WAS service pack level, JVM service pack level, feature pack versions, WAS config, etc. Do both environments have the same network access?
Do your logfiles show any differences? Perhaps you can increase logging levels or turn on WAS tracing to identify the cause of the errant behaviour.

SOAP server reads web method parameters as null

I have a client that connects to a SOAP server endpoint:
Endpoint.publish("http://localhost:8081/todo", new ToDoWebService());
The server offers the next simple method:
#WebService
public class ToDoWebService {
#WebMethod()
public String addToDo(String task, String context, String project, int priority) {
return "ToDo: \n "
+ "\t Task : "+task+"\n"
+ "\t Context : "+context+"\n"
+ "\t Project : "+project+"\n"
+ "\t Priority: "+priority;
}
}
This is the client:
public class Client {
public static void main(String[] args) {
ToDoWebServiceService tdwss = new ToDoWebServiceService();
ToDoWebService tdws = tdwss.getToDoWebServicePort();
System.out.println(tdws.addToDo("Task 1","My Context","My Project",9));
}
}
The thing is that the connection between client and server is succesful, but not entirely: the pass of the arguments from the client to the service is not made as expected, been this the result on the client once executed:
The server doesn't receive correctly the arguments that the client has passed with the method "addToDo()" call. It returns the string format expected but with nulls instead the arguments passed by the client. And that's what I can't figure out...
Of course, I'm pretty confident the WSDL file is well written:
<?xml version='1.0' encoding='UTF-8'?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.8 svn-revision#13980. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.8 svn-revision#13980. -->
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://todows.bigws/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://todows.bigws/" name="ToDoWebServiceService">
<types>
<xsd:schema>
<xsd:import namespace="http://todows.bigws/" schemaLocation="toDo.xsd"/>
</xsd:schema>
</types>
<message name="addToDo">
<part name="parameters" element="tns:addToDo"/>
</message>
<message name="addToDoResponse">
<part name="parameters" element="tns:addToDoResponse"/>
</message>
<portType name="ToDoWebService">
<operation name="addToDo">
<input wsam:Action="http://todows.bigws/ToDoWebService/addToDo" message="tns:addToDo"/>
<output wsam:Action="http://todows.bigws/ToDoWebService/addToDoResponse" message="tns:addToDoResponse"/>
</operation>
</portType>
<binding name="ToDoWebServicePortBinding" type="tns:ToDoWebService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="addToDo">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="ToDoWebServiceService">
<port name="ToDoWebServicePort" binding="tns:ToDoWebServicePortBinding">
<soap:address location="http://localhost:8081/todo"/>
</port>
</service>
</definitions>
As well as the schema "toDo.xsd":
<?xml version='1.0' encoding='UTF-8'?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.8 svn-revision#13980. -->
<xs:schema xmlns:tns="http://todows.bigws/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://todows.bigws/">
<xs:element name="addToDo" type="tns:addToDo"/>
<xs:element name="addToDoResponse" type="tns:addToDoResponse"/>
<xs:complexType name="addToDo">
<xs:sequence>
<xs:element name="task" type="xs:string" minOccurs="0"/>
<xs:element name="context" type="xs:string" minOccurs="0"/>
<xs:element name="project" type="xs:string" minOccurs="0"/>
<xs:element name="priority" type="xs:int" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="addToDoResponse">
<xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
I've tried different actions in the server method, as writing the string with the parameter in a file, but the result is the same, an error cause the parameters are null. That's what I think proves that the failure is located in the way the server receive the parameters passed to the "addToDo()" method.
I've review the WSDL & schema files over and over....but I've not been able to find what make this code run wrongly. I've also tested this code with the SoapUI software and the outcome is the same.
¿Any ideas?
P.D.: Sorry about all the posted code.
In case you need the whole project: my SOAP project at GitHub
I reviewed your WSDL and XSD in your project todows-cli-ws and the problem is the WSDL and XSD files in your client project are outdated!
For example, this is the current content of the XSD file of your server.
<xs:schema xmlns:tns="http://todows.bigws/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="1.0" targetNamespace="http://todows.bigws/">
<xs:element name="addToDo" type="tns:addToDo"/>
<xs:element name="addToDoResponse" type="tns:addToDoResponse"/>
<xs:element name="listToDo" type="tns:listToDo"/>
<xs:element name="listToDoResponse" type="tns:listToDoResponse"/>
<xs:element name="removeToDo" type="tns:removeToDo"/>
<xs:element name="removeToDoResponse" type="tns:removeToDoResponse"/>
<xs:complexType name="addToDo">
<xs:sequence>
<xs:element name="arg0" type="xs:string" minOccurs="0"/>
<xs:element name="arg1" type="xs:string" minOccurs="0"/>
<xs:element name="arg2" type="xs:string" minOccurs="0"/>
<xs:element name="arg3" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="addToDoResponse">
<xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="removeToDo">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="removeToDoResponse">
<xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="listToDo">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="listToDoResponse">
<xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Note that the current name of the params are arg0, arg1, arg2 and arg3. The server expects as param names task, context, project and priority, and therefore the method is invoked with the default values (null for a String and 0 for an int).

Is it possible to send and receive XML to WSDL function using Delphi..?

We have used Web Services with Delphi in the past and those are simple with few parameters and returned a single value to the client. A new service we working should able to XML input and receive XML output.
Is there any componenet which can be used for this purpose?
When i tried using like below am getting an error "Exception in SearchAgreements input parameter XmlElement - System.NullReferenceException: Object reference not set to an instance of an object."
LDocument := NewXMLDocument;
<<framed an XML input>>
DocSearchOut := SearchArgsResponse.Create();
DoxSerchIn := SearchArgs.Create();
DoxSerchIn.SOAPTOObject(LDocument.DocumentElement,LDocument.DocumentElement,HTTPRIO1.Converter);
DoxService := GetIDoxService(True,'',HTTPRIO1);
DocSearchOut :=DoxService.SearchAgreements(DoxSerchIn)
I even tried converting SearchArgs as widestring and tried to pass as a string.This is working with minor changes on HTTPRIO execute. Final Edit
LDocument := NewXMLDocument;
<<framed an XML input>>
DocSearchOut := SearchArgsResponse.Create();
DoxSerchIn := SearchArgs.Create();
DoxSerchIn.SearchArgs := LDocument.DocumentElement.XML;
DoxService := GetIDoxService(True,'',HTTPRIO1);
DocSearchOut :=DoxService.SearchAgreements(DoxSerchIn)
its wsdl
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 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" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:i0="http://www.bank.com/dox/service/v1.0.0" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" name="DoxService" targetNamespace="http://tempuri.org/">
<wsdl:import namespace="http://www.bank.com/dox/service/v1.0.0" location="http://devldn.ldn.bank.com:8258/doxManual/DoxService.svc?wsdl=wsdl0"/>
<wsdl:types/>
<wsdl:binding name="BasicHttpBinding_IDoxService" type="i0:IDoxService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SearchAgreements">
<soap:operation soapAction="http://www.bank.com/dox/service/v1.0.0/IDoxService/SearchAgreements" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="DoxService">
<wsdl:port name="BasicHttpBinding_IDoxService" binding="tns:BasicHttpBinding_IDoxService">
<soap:address location="http://devldn.ldn.bank.com:8258/doxManual/DoxService.svc"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
wsdl0
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 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" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://www.bank.com/dox/service/v1.0.0" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" targetNamespace="http://www.bank.com/dox/service/v1.0.0">
<wsdl:types>
<xsd:schema targetNamespace="http://www.bank.com/dox/service/v1.0.0/Imports">
<xsd:import schemaLocation="http://ldndev.ldn.bank.com:8258/doxManual/DoxService.svc?xsd=xsd0" namespace="http://www.bank.com/dox/service/v1.0.0"/>
<xsd:import schemaLocation="http://ldndev.ldn.bank.com:8258/doxManual/DoxService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="IDoxService_SearchAgreements_InputMessage">
<wsdl:part name="parameters" element="tns:SearchAgreements"/>
</wsdl:message>
<wsdl:message name="IDoxService_SearchAgreements_OutputMessage">
<wsdl:part name="parameters" element="tns:SearchAgreementsResponse"/>
</wsdl:message>
<wsdl:portType name="IDoxService">
<wsdl:operation name="SearchAgreements">
<wsdl:input wsaw:Action="http://www.bank.com/dox/service/v1.0.0/IDoxService/SearchAgreements" message="tns:IDoxService_SearchAgreements_InputMessage"/>
<wsdl:output wsaw:Action="http://www.bank.com/dox/service/v1.0.0/IDoxService/SearchAgreementsResponse" message="tns:IDoxService_SearchAgreements_OutputMessage"/>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
xsd0
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.bank.com/dox/service/v1.0.0" elementFormDefault="qualified" targetNamespace="http://www.bank.com/dox/service/v1.0.0">
<xs:element name="SearchAgreements">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="searchRequest" nillable="true">
<xs:complexType>
<xs:sequence>
<xs:any minOccurs="0" processContents="lax"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SearchAgreementsResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="SearchAgreementsResult" nillable="true">
<xs:complexType>
<xs:sequence>
<xs:any minOccurs="0" processContents="lax"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
xsd1
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/">
<xs:element name="anyType" nillable="true" type="xs:anyType"/>
<xs:element name="anyURI" nillable="true" type="xs:anyURI"/>
<xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/>
<xs:element name="boolean" nillable="true" type="xs:boolean"/>
<xs:element name="byte" nillable="true" type="xs:byte"/>
<xs:element name="dateTime" nillable="true" type="xs:dateTime"/>
<xs:element name="decimal" nillable="true" type="xs:decimal"/>
<xs:element name="double" nillable="true" type="xs:double"/>
<xs:element name="float" nillable="true" type="xs:float"/>
<xs:element name="int" nillable="true" type="xs:int"/>
<xs:element name="long" nillable="true" type="xs:long"/>
<xs:element name="QName" nillable="true" type="xs:QName"/>
<xs:element name="short" nillable="true" type="xs:short"/>
<xs:element name="string" nillable="true" type="xs:string"/>
<xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/>
<xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/>
<xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/>
<xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/>
<xs:element name="char" nillable="true" type="tns:char"/>
<xs:simpleType name="char">
<xs:restriction base="xs:int"/>
</xs:simpleType>
<xs:element name="duration" nillable="true" type="tns:duration"/>
<xs:simpleType name="duration">
<xs:restriction base="xs:duration">
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
<xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
<xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="guid" nillable="true" type="tns:guid"/>
<xs:simpleType name="guid">
<xs:restriction base="xs:string">
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
</xs:restriction>
</xs:simpleType>
<xs:attribute name="FactoryType" type="xs:QName"/>
<xs:attribute name="Id" type="xs:ID"/>
<xs:attribute name="Ref" type="xs:IDREF"/>
</xs:schema>
Input to Service..unfortunetely,team has added few things so unable to retrieve output on SOAP UI.
<AgreementSearchRequest xmlns="http://www.bank.com/dox/service/v1.0.0" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<PageNo>1</PageNo>
<PageSize>10</PageSize>
<Source>IBFD</Source>
</Header>
<SearchCriteria>
<AgreementId>10</AgreementId>
<AgreementStatus>Search Status</AgreementStatus>
<AgreementType>Search Type</AgreementType>
<AgreementVersion>Search Version</AgreementVersion>
<CompletedDate>2014-05-30T15:56:45.7533005+05:30</CompletedDate>
<ContractingEntity>Search GCRS Code</ContractingEntity>
<CounterpartyBranch>Search CP Branch</CounterpartyBranch>
<CounterpartyEMID>Search CP EMID</CounterpartyEMID>
<CounterpartyId>Search CP ID</CounterpartyId>
<CounterpartyName>Search CP Name</CounterpartyName>
<CounterpartyType>Search CP Type</CounterpartyType>
<CreditContact>Search Contact</CreditContact>
<IsOffshoreUser>true</IsOffshoreUser>
<Products>
<Product>
<ProductCode>Search Code</ProductCode>:=
<ProductName i:nil="true"/>
</Product>
</Products>
<RXM>Search RXM</RXM>
<RequestedDate>2014-05-30T15:56:45.758183+05:30</RequestedDate>
<bankLegalEntity>Search LEgal Entity</bankLegalEntity>
<bankLegalEntityCategory>Search Legal Entity Category</bankLegalEntityCategory>
<UmbrellaCounterpartyEMID>Search Agent EMID</UmbrellaCounterpartyEMID>
<UmbrellaCounterpartyName>Search Agent Name</UmbrellaCounterpartyName>
</SearchCriteria>
I tried importing xsd and replacing xml file HTTPRIO Before execute as mentioned here..
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://www.bank.com/dox/service/v1.0.0" elementFormDefault="qualified" targetNamespace="http://www.bank.com/dox/service/v1.0.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="ArrayOfProduct">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Product" nillable="true" type="tns:Product" />
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfProduct" nillable="true" type="tns:ArrayOfProduct" />
<xs:complexType name="Product">
<xs:sequence>
<xs:element minOccurs="0" name="ProductCode" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="ProductName" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="Product" nillable="true" type="tns:Product" />
<xs:complexType name="AgreementSearchRequest">
<xs:sequence>
<xs:element name="Header" nillable="true" type="tns:AgreementSearchRequestHeader" />
<xs:element name="SearchCriteria" nillable="true" type="tns:AgreementSearchCriteria" />
</xs:sequence>
</xs:complexType>
<xs:element name="AgreementSearchRequest" nillable="true" type="tns:AgreementSearchRequest" />
<xs:complexType name="AgreementSearchRequestHeader">
<xs:sequence>
<xs:element name="PageNo" type="xs:int" />
<xs:element name="PageSize" type="xs:int" />
<xs:element name="Source" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="AgreementSearchRequestHeader" nillable="true" type="tns:AgreementSearchRequestHeader" />
<xs:complexType name="AgreementSearchCriteria">
<xs:sequence>
<xs:element minOccurs="0" name="AgreementId" type="xs:int" />
<xs:element minOccurs="0" name="AgreementStatus" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="AgreementType" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="AgreementVersion" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="CompletedDate" type="xs:dateTime" />
<xs:element minOccurs="0" name="ContractingEntity" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="CounterpartyBranch" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="CounterpartyEMID" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="CounterpartyId" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="CounterpartyName" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="CounterpartyType" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="CreditContact" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Products" nillable="true" type="tns:ArrayOfProduct" />
<xs:element minOccurs="0" name="RXM" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="RequestedDate" type="xs:dateTime" />
<xs:element minOccurs="0" name="egalEntity" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="LegalEntityCategory" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="UmbrellaCounterpartyEMID" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="UmbrellaCounterpartyName" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="AgreementSearchCriteria" nillable="true" type="tns:AgreementSearchCriteria" />
</xs:schema>
There is the Web Service Toolkit.
It has a code generator that takes a wsdl and generate Pascal classes from it that interact with the web service.
Seems to be exactly what you need, but I do not know the specifics.
Then there are also my Internet Tools for FreePascal (not Delphi).
They contain interpreter for XQuery which is a general purpose XML processing language, so you can use it with every possible XML/HTML based API with far less code than using DOM methods. But it won't help you with anything WSDL specific, you need to write the XML for every request yourself.
Based on other views on vaiours forums(inc stack overflow) we have fixed the issue by fixing in 2 places.
Changed the remotable procedure generated by Delphi.Earlier it was a class of input parameter itself so we have changed to WideString
SearchAgreements = class(TRemotable)
private
FsearchRequest: WideString ;
FsearchRequest_Specified: boolean;
procedure SetsearchRequest(Index: Integer; const AsearchRequest: WideString );
function searchRequest_Specified(Index: Integer): boolean;
public
destructor Destroy; override;
published
property searchRequest: WideString Index (IS_OPTN) read FsearchRequest write SetsearchRequest stored searchRequest_Specified;
end;
And also we have modified HTTPRIO Before execute with minor modifications and we are able to send XML sucessfully to Service.
procedure HTTPRIO1SoapBeforeExecute(const MethodName: string;
SOAPRequest: TStream);
var
StrTemp,Fheader : TStringList;
StrBeg,StrEnd,StrParam,StrParam1 : TStringList;
StreamTemp : TStream;
StrLst : TStringList;
StrLstTmp: TStringList;
begin
StrBeg:=TStringList.Create();
StrEnd:=TStringList.Create();
SOAPRequest.Position := 0;
StrTemp.LoadFromStream(SOAPRequest);
StrBeg.Text := StringReplace(StrTemp.Text,'<','<',[RfReplaceAll]);
StrEnd.Text := StringReplace(StrBeg.Text,'>','>',[RfReplaceAll]);
SOAPRequest.Position:=0;
SOAPRequest.Size := 0; //Clear the Stream
StrEnd.SaveToStream(SOAPRequest); //Reinitialise the stream with right string.
SOAPRequest.Position :=0;
end;
We have done PHd on Webservices call with,so anyone facing similar issue can contact me.Thanks:)

Is WSDL binding optional?

I have a wsdl file without binding section:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<wsdl:definitions xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="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:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Engage" targetNamespace="http://tempuri.org/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<xs:element name="OtherData">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="OtherDataResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="OtherDataResult" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="MyData">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="MyDataResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="MyDataResult" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/">
<xs:element name="anyType" nillable="true" type="xs:anyType" />
<xs:element name="anyURI" nillable="true" type="xs:anyURI" />
<xs:element name="base64Binary" nillable="true" type="xs:base64Binary" />
<xs:element name="boolean" nillable="true" type="xs:boolean" />
<xs:element name="byte" nillable="true" type="xs:byte" />
<xs:element name="dateTime" nillable="true" type="xs:dateTime" />
<xs:element name="decimal" nillable="true" type="xs:decimal" />
<xs:element name="double" nillable="true" type="xs:double" />
<xs:element name="float" nillable="true" type="xs:float" />
<xs:element name="int" nillable="true" type="xs:int" />
<xs:element name="long" nillable="true" type="xs:long" />
<xs:element name="QName" nillable="true" type="xs:QName" />
<xs:element name="short" nillable="true" type="xs:short" />
<xs:element name="string" nillable="true" type="xs:string" />
<xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" />
<xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" />
<xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" />
<xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" />
<xs:element name="char" nillable="true" type="tns:char" />
<xs:simpleType name="char">
<xs:restriction base="xs:int" />
</xs:simpleType>
<xs:element name="duration" nillable="true" type="tns:duration" />
<xs:simpleType name="duration">
<xs:restriction base="xs:duration">
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" />
<xs:minInclusive value="-P10675199DT2H48M5.4775808S" />
<xs:maxInclusive value="P10675199DT2H48M5.4775807S" />
</xs:restriction>
</xs:simpleType>
<xs:element name="guid" nillable="true" type="tns:guid" />
<xs:simpleType name="guid">
<xs:restriction base="xs:string">
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" />
</xs:restriction>
</xs:simpleType>
<xs:attribute name="FactoryType" type="xs:QName" />
<xs:attribute name="Id" type="xs:ID" />
<xs:attribute name="Ref" type="xs:IDREF" />
</xs:schema>
</wsdl:types>
<wsdl:message name="IMyService_OtherData_InputMessage">
<wsdl:part element="tns:OtherData" name="parameters" />
</wsdl:message>
<wsdl:message name="IMyService_OtherData_OutputMessage">
<wsdl:part element="tns:OtherDataResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="IMyService_MyData_InputMessage">
<wsdl:part element="tns:MyData" name="parameters" />
</wsdl:message>
<wsdl:message name="IMyService_MyData_OutputMessage">
<wsdl:part element="tns:MyDataResponse" name="parameters" />
</wsdl:message>
<wsdl:portType name="IMyService">
<wsdl:operation name="OtherData">
<wsdl:input message="tns:IMyService_OtherData_InputMessage" wsaw:Action="http://tempuri.org/IMyService/OtherData" />
<wsdl:output message="tns:IMyService_OtherData_OutputMessage" wsaw:Action="http://tempuri.org/IMyService/OtherDataResponse" />
</wsdl:operation>
<wsdl:operation name="MyData">
<wsdl:input message="tns:IMyService_MyData_InputMessage" wsaw:Action="http://tempuri.org/IMyService/MyData" />
<wsdl:output message="tns:IMyService_MyData_OutputMessage" wsaw:Action="http://tempuri.org/IMyService/MyDataResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:service name="MyService">
<wsdl:port name="xmlPort">
<http:address location="http://localhost:59109/MyService.svc/xml" />
</wsdl:port>
<wsdl:port name="jsonPort">
<http:address location="http://localhost:59109/MyService.svc/json" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Is this wsdl valid? Or in other words can we have wsdl without a binding section or it is required and this wsdl is invalid? Some tools (like SoapUI) throws exception but the other (like this https://www.wsdl-analyzer.com/) says that this is valid wsdl.
According to the W3C note about WSDL 1.1:
There may be any number of bindings for a given portType
Does it mean there can be no bindings?
Well, taking look at the XML schema for WSDL 1.1, binding element can have no occurences at all.
The practical behavior probably depends on a SOAP library. Note that the binding specifies whether we use document or RFC-style call and whether we encode the data or not.

QuickBooks Webconnector Error - Django Soap Web Service - Actual error received from web service for serverVersion call

I have written a SOAP Web service in django and i have installed the following components
soaplib-0.8.1 in my system
Quickbooks Pro
QBWC version 2.1.0.30 - Intuit
When i try to add an application(.qwc file) to QBWC(Quick Books Web Connector), it is calling my web service. It is giving me the below error
Error:
20130807.09:03:28 UTC : QBWebConnector.WebServiceManager.DoUpdateSelected() : updateWS() for application = 'Quick Books Integration' has STARTED
20130807.09:03:28 UTC : QBWebConnector.RegistryManager.getUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock = FALSE
20130807.09:03:28 UTC : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to True
20130807.09:03:28 UTC : QBWebConnector.RegistryManager.setUpdateLock() : ********** Update session locked **********
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.instantiateWebService() : Initiated connection to the following application.
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.instantiateWebService() : AppName: Cognam Technologies Pvt Ltd Quick Books Integration
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.instantiateWebService() : AppUniqueName (if available): Quick Books Integration
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.instantiateWebService() : AppURL: http://test:8000/qwc/qwcintegration/service.wsdl
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.do_serverVersion() : * Calling serverVersion().
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.do_serverVersion() : Actual error received from web service for serverVersion call: . For backward compatibility of all webservers, QBWC will catch all errors under app-not-supporting-serverVersion.
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.do_serverVersion() : This application does not contain support for serverVersion. Allowing update operation for backward compatibility.
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.do_clientVersion() : * Calling clientVersion() with following parameter:
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.updateWS() : Actual error received from web service for clientVersion call: . For backward compatibility of all webservers, QBWC will catch all errors under app-not-supporting-clientVersion.
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.do_clientVersion() : This application does not contain support for clientVersion. Allowing update operation for backward compatibility.
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.do_authenticate() : Authenticating to application 'Quick Books Integration', username = 'anil'
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.do_authenticate() : * Calling authenticate() with following parameters:
20130807.09:03:28 UTC : QBWebConnector.SOAPWebService.do_authenticate() : QBWC1012: Authentication failed due to following error message.
The underlying connection was closed: An unexpected error occurred on a receive.
More info:
StackTrace = at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at QBWebConnector.localhost.WCWebServiceDoc.authenticate(String strUserName, String strPassword)
at QBWebConnector.localhost.WCWebService.authenticate(String strUserName, String strPassword)
at QBWebConnector.SOAPWebService.authenticate(String UserName, String Password)
at QBWebConnector.WebService.do_authenticate(String& ticket, String& companyFileName)
Source = System.Web.Services
20130807.09:03:28 UTC : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to False
20130807.09:03:28 UTC : QBWebConnector.RegistryManager.setUpdateLock() : *********** Update session unlocked ***********
20130807.09:03:28 UTC : QBWebConnector.WebServiceManager.DoUpdateSelected() : Update completed with errors. See log (QWClog.txt) for details.
The url for Webservice contains localhost instead of test.When posting the issue, it didnt allow me to provide a link with localhost , i changed it to test. Actual link in qwc file contains localhost and not test.
Please help me out.
I guess the SOAP version that QBWC is using and which i have installed are not compatible
I really dont know where i am going wrong. Please help me out to solve this issue.
Thanks in advance
Code is below:
views.py
from soaplib_handler import Array, String, Integer
from soaplib import soap
from soaplib.service import soapmethod
from soaplib_handler import DjangoSoapApp, soapmethod, soap_types
class QuickBooksService(DjangoSoapApp):
__tns__ = 'http://developer.intuit.com/'
#soapmethod(soap_types.String, _returns=soap_types.String)
def serverVersion(self, ticket):
print 'serverVersion()'
print ticket
return '2.1'
#soapmethod(soap_types.String,
soap_types.String,
_returns=Array(String),
_outMessage='{http://developer.intuit.com/}authenticateResponse',
_outVariableName='authenticateResult',
)
def authenticate(self, strUserName, strPassword):
print 'authenticate()'
results = []
results.append('{85B41BEE-5CD9-427a-A61B-83964F1EB426}')
results.append('')
results.append('')
print strUserName
print strPassword
print results
return results
#soapmethod(soap_types.String, _returns=soap_types.String)
def clientVersion(self, strVersion):
print 'clientVersion()'
print strVersion
return ""
#soapmethod(soap_types.String, _returns=soap_types.String)
def closeConnection(self, ticket):
print 'closeConnection()'
print ticket
return 'closeConnection() called on WS'
#soapmethod(soap_types.String,
soap_types.String,
soap_types.String,
_returns=soap_types.String)
def connectionError(self, ticket, hresult, message):
print 'connectionError'
print ticket
print hresult
print message
return 'done'
#soapmethod(soap_types.String, _returns=soap_types.String)
def getLastError(self, ticket):
print 'lastError()'
print ticket
return 'Problems foo bar'
#soapmethod(soap_types.String,
soap_types.String,
soap_types.String,
soap_types.String,
_returns=Integer,
_outMessage='{http://developer.intuit.com/}receiveResponseXMLResponse',
_outVariableName='receiveResponseXMLResult',)
def receiveResponseXML(self, ticket, response, hresult, message):
print 'receiveResponseXML()'
print "ticket=" + ticket
print "response=" + response
if hresult:
print "hresult=" + hresult
print "message=" + message
return 100
#soapmethod(soap_types.String,
soap_types.String,
soap_types.String,
soap_types.String,
soap_types.Integer,
soap_types.Integer,
_returns=String,
_outMessage='{http://developer.intuit.com/}sendRequestXMLResponse',
_outVariableName='sendRequestXMLResult',)
def sendRequestXML(self, ticket, strHCPResponse, strCompanyFileName, qbXMLCountry, qbXMLMajorVers, qbXMLMinorVers ):
print 'sendRequestXML()'
print strHCPResponse
xml = "<?xml version=\"1.0\" ?>" + \
"<?qbxml version=\"2.0\"?>" + \
"<QBXML>" + \
"<QBXMLMsgsRq onError=\"stopOnError\">" + \
"<ItemQueryRq></ItemQueryRq>" + \
"</QBXMLMsgsRq>" + \
"</QBXML>"
return xml
#soapmethod(soap_types.String,
soap_types.String,
_returns=soap_types.String)
def interactiveUrl(self, ticket, sessionID):
print 'interactiveUrl'
print ticket
print sessionID
return 'http://localhost/test'
#soapmethod(soap_types.String, _returns=soap_types.String)
def interactiveDone(self, ticket):
print 'interactiveDone()'
print ticket
return 'Done'
#soapmethod(soap_types.String,
soap_types.String,
_returns=soap_types.String)
def interactiveRejected(self, ticket, reason):
print 'interactiveRejected()'
print ticket
print reason
return 'Message to show'
quickbooks_service = QuickBooksService()
Soaplib_handler.py
from django.http import HttpResponse
from soaplib.serializers import primitive as soap_types
from soaplib.serializers.primitive import _element_to_unicode, Null, _element_to_integer
from soaplib.service import soapmethod
from soaplib.wsgi_soap import SimpleWSGISoapApp
class DjangoSoapApp(SimpleWSGISoapApp):
def __call__(self, request):
print "inside call method"
django_response = HttpResponse()
def start_response(status, headers):
print "initial"
print status
print headers
status, reason = status.split(' ', 1)
# try:
# status, reason = status.split(' ', 1)
# except:
# status = status.split(' ')
# reason = ''
print "status"
print status
# s1 = status[0]
django_response.status_code = int(status)
for header, value in headers:
django_response[header] = value
print "Over"
response = super(DjangoSoapApp, self).__call__(request.META, start_response)
django_response.content = "\n".join(response)
return django_response
urls.py
urlpatterns = patterns('',
url(r'^hello_world/', views.quickbooks_service, name='service'),
url(r'^hello_world/service.wsdl', views.quickbooks_service, name='service2'),
)
Soap Response when i hit the browser:
----------------------------------------->
<definitions xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:tns="http://developer.intuit.com/" xmlns:typens="http://developer.intuit.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://developer.intuit.com/" name="QuickBooksService">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://developer.intuit.com/">
<xs:element name="interactiveUrlResponse" type="tns:interactiveUrlResponse"/>
<xs:complexType name="connectionError">
<xs:sequence>
<xs:element name="ticket" type="xs:string"/>
<xs:element name="hresult" type="xs:string"/>
<xs:element name="message" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="getLastErrorResponse">
<xs:sequence>
<xs:element name="getLastErrorResult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="interactiveRejected">
<xs:sequence>
<xs:element name="ticket" type="xs:string"/>
<xs:element name="reason" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="clientVersion" type="tns:clientVersion"/>
<xs:element name="receiveResponseXML" type="tns:receiveResponseXML"/>
<xs:complexType name="interactiveRejectedResponse">
<xs:sequence>
<xs:element name="interactiveRejectedResult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="interactiveRejectedResponse" type="tns:interactiveRejectedResponse"/>
<xs:complexType name="connectionErrorResponse">
<xs:sequence>
<xs:element name="connectionErrorResult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="getLastErrorResponse" type="tns:getLastErrorResponse"/>
<xs:element name="interactiveRejected" type="tns:interactiveRejected"/>
<xs:complexType name="getLastError">
<xs:sequence>
<xs:element name="ticket" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="authenticate">
<xs:sequence>
<xs:element name="strUserName" type="xs:string"/>
<xs:element name="strPassword" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="clientVersion">
<xs:sequence>
<xs:element name="strVersion" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="interactiveUrl" type="tns:interactiveUrl"/>
<xs:complexType name="interactiveUrlResponse">
<xs:sequence>
<xs:element name="interactiveUrlResult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="connectionError" type="tns:connectionError"/>
<xs:element name="getLastError" type="tns:getLastError"/>
<xs:element name="{http://developer.intuit.com/}sendRequestXMLResponse" type="tns:{http://developer.intuit.com/}sendRequestXMLResponse"/>
<xs:element name="{http://developer.intuit.com/}authenticateResponse" type="tns:{http://developer.intuit.com/}authenticateResponse"/>
<xs:complexType name="interactiveDone">
<xs:sequence>
<xs:element name="ticket" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="serverVersion">
<xs:sequence>
<xs:element name="ticket" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="connectionErrorResponse" type="tns:connectionErrorResponse"/>
<xs:element name="sendRequestXML" type="tns:sendRequestXML"/>
<xs:element name="authenticate" type="tns:authenticate"/>
<xs:element name="closeConnectionResponse" type="tns:closeConnectionResponse"/>
<xs:element name="interactiveDone" type="tns:interactiveDone"/>
<xs:element name="serverVersionResponse" type="tns:serverVersionResponse"/>
<xs:element name="{http://developer.intuit.com/}receiveResponseXMLResponse" type="tns:{http://developer.intuit.com/}receiveResponseXMLResponse"/>
<xs:element name="serverVersion" type="tns:serverVersion"/>
<xs:complexType name="interactiveUrl">
<xs:sequence>
<xs:element name="ticket" type="xs:string"/>
<xs:element name="sessionID" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="stringArray">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" type="tns:string" name="string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="interactiveDoneResponse">
<xs:sequence>
<xs:element name="interactiveDoneResult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="receiveResponseXML">
<xs:sequence>
<xs:element name="ticket" type="xs:string"/>
<xs:element name="response" type="xs:string"/>
<xs:element name="hresult" type="xs:string"/>
<xs:element name="message" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="sendRequestXML">
<xs:sequence>
<xs:element name="ticket" type="xs:string"/>
<xs:element name="strHCPResponse" type="xs:string"/>
<xs:element name="strCompanyFileName" type="xs:string"/>
<xs:element name="qbXMLCountry" type="xs:string"/>
<xs:element name="qbXMLMajorVers" type="xs:int"/>
<xs:element name="qbXMLMinorVers" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="closeConnectionResponse">
<xs:sequence>
<xs:element name="closeConnectionResult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="{http://developer.intuit.com/}receiveResponseXMLResponse">
<xs:sequence>
<xs:element name="receiveResponseXMLResult" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="{http://developer.intuit.com/}sendRequestXMLResponse">
<xs:sequence>
<xs:element name="sendRequestXMLResult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="serverVersionResponse">
<xs:sequence>
<xs:element name="serverVersionResult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="interactiveDoneResponse" type="tns:interactiveDoneResponse"/>
<xs:element name="closeConnection" type="tns:closeConnection"/>
<xs:complexType name="closeConnection">
<xs:sequence>
<xs:element name="ticket" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="stringArray" type="tns:stringArray"/>
<xs:element name="clientVersionResponse" type="tns:clientVersionResponse"/>
<xs:complexType name="clientVersionResponse">
<xs:sequence>
<xs:element name="clientVersionResult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="{http://developer.intuit.com/}authenticateResponse">
<xs:sequence>
<xs:element name="authenticateResult" type="tns:stringArray"/>
</xs:sequence>
</xs:complexType>
</schema>
</types>
<message name="authenticate">
<part name="authenticate" element="tns:authenticate"/>
</message>
<message name="{http://developer.intuit.com/}authenticateResponse">
<part name="{http://developer.intuit.com/}authenticateResponse" element="tns:{http://developer.intuit.com/}authenticateResponse"/>
</message>
<message name="clientVersion">
<part name="clientVersion" element="tns:clientVersion"/>
</message>
<message name="clientVersionResponse">
<part name="clientVersionResponse" element="tns:clientVersionResponse"/>
</message>
<message name="closeConnection">
<part name="closeConnection" element="tns:closeConnection"/>
</message>
<message name="closeConnectionResponse">
<part name="closeConnectionResponse" element="tns:closeConnectionResponse"/>
</message>
<message name="connectionError">
<part name="connectionError" element="tns:connectionError"/>
</message>
<message name="connectionErrorResponse">
<part name="connectionErrorResponse" element="tns:connectionErrorResponse"/>
</message>
<message name="getLastError">
<part name="getLastError" element="tns:getLastError"/>
</message>
<message name="getLastErrorResponse">
<part name="getLastErrorResponse" element="tns:getLastErrorResponse"/>
</message>
<message name="interactiveDone">
<part name="interactiveDone" element="tns:interactiveDone"/>
</message>
<message name="interactiveDoneResponse">
<part name="interactiveDoneResponse" element="tns:interactiveDoneResponse"/>
</message>
<message name="interactiveRejected">
<part name="interactiveRejected" element="tns:interactiveRejected"/>
</message>
<message name="interactiveRejectedResponse">
<part name="interactiveRejectedResponse" element="tns:interactiveRejectedResponse"/>
</message>
<message name="interactiveUrl">
<part name="interactiveUrl" element="tns:interactiveUrl"/>
</message>
<message name="interactiveUrlResponse">
<part name="interactiveUrlResponse" element="tns:interactiveUrlResponse"/>
</message>
<message name="receiveResponseXML">
<part name="receiveResponseXML" element="tns:receiveResponseXML"/>
</message>
<message name="{http://developer.intuit.com/}receiveResponseXMLResponse">
<part name="{http://developer.intuit.com/}receiveResponseXMLResponse" element="tns:{http://developer.intuit.com/}receiveResponseXMLResponse"/>
</message>
<message name="sendRequestXML">
<part name="sendRequestXML" element="tns:sendRequestXML"/>
</message>
<message name="{http://developer.intuit.com/}sendRequestXMLResponse">
<part name="{http://developer.intuit.com/}sendRequestXMLResponse" element="tns:{http://developer.intuit.com/}sendRequestXMLResponse"/>
</message>
<message name="serverVersion">
<part name="serverVersion" element="tns:serverVersion"/>
</message>
<message name="serverVersionResponse">
<part name="serverVersionResponse" element="tns:serverVersionResponse"/>
</message>
<portType name="QuickBooksService">
<operation name="authenticate" parameterOrder="authenticate">
<documentation/>
<input name="authenticate" message="tns:authenticate"/>
<output name="{http://developer.intuit.com/}authenticateResponse" message="tns:{http://developer.intuit.com/}authenticateResponse"/>
</operation>
<operation name="clientVersion" parameterOrder="clientVersion">
<documentation/>
<input name="clientVersion" message="tns:clientVersion"/>
<output name="clientVersionResponse" message="tns:clientVersionResponse"/>
</operation>
<operation name="closeConnection" parameterOrder="closeConnection">
<documentation/>
<input name="closeConnection" message="tns:closeConnection"/>
<output name="closeConnectionResponse" message="tns:closeConnectionResponse"/>
</operation>
<operation name="connectionError" parameterOrder="connectionError">
<documentation/>
<input name="connectionError" message="tns:connectionError"/>
<output name="connectionErrorResponse" message="tns:connectionErrorResponse"/>
</operation>
<operation name="getLastError" parameterOrder="getLastError">
<documentation/>
<input name="getLastError" message="tns:getLastError"/>
<output name="getLastErrorResponse" message="tns:getLastErrorResponse"/>
</operation>
<operation name="interactiveDone" parameterOrder="interactiveDone">
<documentation/>
<input name="interactiveDone" message="tns:interactiveDone"/>
<output name="interactiveDoneResponse" message="tns:interactiveDoneResponse"/>
</operation>
<operation name="interactiveRejected" parameterOrder="interactiveRejected">
<documentation/>
<input name="interactiveRejected" message="tns:interactiveRejected"/>
<output name="interactiveRejectedResponse" message="tns:interactiveRejectedResponse"/>
</operation>
<operation name="interactiveUrl" parameterOrder="interactiveUrl">
<documentation/>
<input name="interactiveUrl" message="tns:interactiveUrl"/>
<output name="interactiveUrlResponse" message="tns:interactiveUrlResponse"/>
</operation>
<operation name="receiveResponseXML" parameterOrder="receiveResponseXML">
<documentation/>
<input name="receiveResponseXML" message="tns:receiveResponseXML"/>
<output name="{http://developer.intuit.com/}receiveResponseXMLResponse" message="tns:{http://developer.intuit.com/}receiveResponseXMLResponse"/>
</operation>
<operation name="sendRequestXML" parameterOrder="sendRequestXML">
<documentation/>
<input name="sendRequestXML" message="tns:sendRequestXML"/>
<output name="{http://developer.intuit.com/}sendRequestXMLResponse" message="tns:{http://developer.intuit.com/}sendRequestXMLResponse"/>
</operation>
<operation name="serverVersion" parameterOrder="serverVersion">
<documentation/>
<input name="serverVersion" message="tns:serverVersion"/>
<output name="serverVersionResponse" message="tns:serverVersionResponse"/>
</operation>
</portType>
<plnk:partnerLinkType name="QuickBooksService">
<plnk:role name="QuickBooksService">
<plnk:portType name="tns:QuickBooksService"/>
</plnk:role>
</plnk:partnerLinkType>
<binding name="QuickBooksService" type="tns:QuickBooksService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="authenticate">
<soap:operation soapAction="authenticate" style="document"/>
<input name="authenticate">
<soap:body use="literal"/>
</input>
<output name="{http://developer.intuit.com/}authenticateResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="clientVersion">
<soap:operation soapAction="clientVersion" style="document"/>
<input name="clientVersion">
<soap:body use="literal"/>
</input>
<output name="clientVersionResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="closeConnection">
<soap:operation soapAction="closeConnection" style="document"/>
<input name="closeConnection">
<soap:body use="literal"/>
</input>
<output name="closeConnectionResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="connectionError">
<soap:operation soapAction="connectionError" style="document"/>
<input name="connectionError">
<soap:body use="literal"/>
</input>
<output name="connectionErrorResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="getLastError">
<soap:operation soapAction="getLastError" style="document"/>
<input name="getLastError">
<soap:body use="literal"/>
</input>
<output name="getLastErrorResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="interactiveDone">
<soap:operation soapAction="interactiveDone" style="document"/>
<input name="interactiveDone">
<soap:body use="literal"/>
</input>
<output name="interactiveDoneResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="interactiveRejected">
<soap:operation soapAction="interactiveRejected" style="document"/>
<input name="interactiveRejected">
<soap:body use="literal"/>
</input>
<output name="interactiveRejectedResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="interactiveUrl">
<soap:operation soapAction="interactiveUrl" style="document"/>
<input name="interactiveUrl">
<soap:body use="literal"/>
</input>
<output name="interactiveUrlResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="receiveResponseXML">
<soap:operation soapAction="receiveResponseXML" style="document"/>
<input name="receiveResponseXML">
<soap:body use="literal"/>
</input>
<output name="{http://developer.intuit.com/}receiveResponseXMLResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="sendRequestXML">
<soap:operation soapAction="sendRequestXML" style="document"/>
<input name="sendRequestXML">
<soap:body use="literal"/>
</input>
<output name="{http://developer.intuit.com/}sendRequestXMLResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="serverVersion">
<soap:operation soapAction="serverVersion" style="document"/>
<input name="serverVersion">
<soap:body use="literal"/>
</input>
<output name="serverVersionResponse">
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="QuickBooksService">
<port name="QuickBooksService" binding="tns:QuickBooksService">
<soap:address location="http://localhost:8000/qwc/hello_world/service"/>
</port>
</service>
</definitions>
It looks like your web server is closing the connection, when it shouldn't be:
The underlying connection was closed: An unexpected error occurred on
a receive.
Are you sure your SOAP service actually works, and that your web server isn't crashing, throwing an error, or closing the connection for no reason?
Another thing I wonder about - you have the Web Connector pointed to your WSDL. Shouldn't it be pointed as the actual web service, not at the WSDL definition?
AppURL: http://test:8000/qwc/qwcintegration/service.wsdl