Forum Discussion

itaykaldi's avatar
itaykaldi
Contributor
12 years ago

WSDL without SOAP

Hey,
i tried to use WSDL witch not support SOAP, but use JSON format and i got nothing...
Is there any way to use WSDL witch not support SOAP?

10x.

7 Replies

  • nmrao's avatar
    nmrao
    Community Hero
    Would you clarify the use case you are trying to achive?
  • We have an actor witch communicate with WCF and JSON format.
    I got WSDL from the developer but when i tried it with SoapUI nothing happen (no error logs).
  • ChristineA's avatar
    ChristineA
    Occasional Contributor
    I suspect I have the same type of problem (maybe the original poster can add or confirm, else I will create a new post)

    I am trying to test a service that was developed in Microsoft .NET (WCF. It is in .svc format and the developer said that the underlying technology is actually JSON.

    I can access a 'flat' WSDL format of this service by using /service.mobile.myboardpack.com/BoardPack.svc?singleWsdl, which is the way to get a 'flat' wsdl format without dependencies (this is new in Windows Communication Foundation 4.5).

    When I import this wsdl into SOAPUI, the SOAPUI log says that it is loading the schemas and the last line is : Loaded Definition OK
    The HTTP Log says:
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:>> "GET /service.mobile.myboardpack.com/BoardPack.svc?singleWsdl HTTP/1.1[\r][\n]"
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:>> "Host: 196.29.140.10:8080[\r][\n]"
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:>> "[\r][\n]"
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:<< "Content-Length: 39006[\r][\n]"
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:<< "Content-Type: text/xml; charset=UTF-8[\r][\n]"
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:<< "Server: Microsoft-IIS/7.5[\r][\n]"
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:<< "X-Powered-By: ASP.NET[\r][\n]"
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:<< "Date: Tue, 27 Aug 2013 11:48:16 GMT[\r][\n]"
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:<< "[\r][\n]"
    Tue Aug 27 13:48:26 CAT 2013:DEBUG:<< "<?xml version="1.0" encoding="utf-8"?><wsdl:definitions name="BoardPack" targetNamespace="http://service.myboardpack.co.za/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:i0="http://tempuri.org/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://service.myboardpack.co.za/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"><wsdl:types><xs:schema elementFormDefault="qualified" targetNamespace="http://service.myboardpack.co.za/" xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:import namespace="http://schemas.datacontract.org/2004/07/MyBoardPack.Services.MessageContracts"/><xs:import namespace="http://schemas.microsoft.com/Message"/><xs:import namespace="http://schemas.datacontract.org/2004/07/MyBoardPack.Mobile.Services.DataObjects"/><xs:element name="SyncClientData"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="sessionId" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="userId" type="xs:long"/><xs:element minOccurs="0" name="SinceDate" type="xs:int"/></xs:sequence></xs:complexType></xs:element>

    Etc...

    But the Error log says:
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

    And nothing loads in Soap UI under the project. In other words, the WSDL does not load the services into SOAPGUI.

    Hope someone can help with this (also apologies, I am not a developer, but a tester trying to get SOAPUI working on these services, so the terminology is sometimes a bit beyond me. The fact that it is JSON internally might have nothing to do with the problem....?)

    Thanks
    Christine
  • ChristineA's avatar
    ChristineA
    Occasional Contributor
    Just to add to my previous post:

    1. The error log was misleading. There are actually no errors. Since there are not dates associated with the errors logged in the error log, I cleared the log and tried again. I got the same result - everything 'works' and the error log is empty, but the services are not added

    2. I tried to add the services as REST services - this actually worked

    I would still like to know why it doesn't work if you try to add these as normal wsdl services, seeing that there are no errors thrown out by SOAPUI. I saw a Youtube video of someone who took the svc file, viewed the WSDL version of it and added it to SOAPUI and it worked... Does the difference come in with the internal configuration of the svc file - in other words, if the underlying technology is JSON you cannot use it as a straightforward wsdl since it would not work through SOAP and you HAVE to add it as a REST service to get it to work?

    I have looked in this forum and there are quite a few of these types of questions and they are all unanswered. Is this because
    a) it is a stupid question
    b) other people have the same problem but no-one has the answer?

    Christine
  • Hey Christine,
    its the same problem i have.
    Can u please explain how did u use REST instead of soap?
  • ChristineA's avatar
    ChristineA
    Occasional Contributor
    Basically you add the project without adding the WSDL

    Then you Right-click on the project and you add a new REST service. If you are working with a svc file generated by WCF then you need to get hold of the SINGLEWSDL version of the service, not the WSDL (well, this was the case with mine). The singlewsdl will give you all the services and their parameters

    From then onwards you have to add these manually, with the base path for each service as follows:
    /service.mobile.myboardpack.com/BoardPack.svc/doLogin
    where the service is 'doLogin' for example.

    But I haven't got it working in full yet.

    For the GET methods, it is working fine, but the POST methods are returning errors, saying that I am not submitting the data in the right format. It tells me that there is a problem deserialising the content and that the data is not submitted in JSON format. I am still trying to get around this.
  • ChristineA's avatar
    ChristineA
    Occasional Contributor
    I see that there are quite a few posts on the forum relating to testing REST services with JSON POST methods. It might be worthwhile trying to work through some of these to try and figure out how to do it. Also follow the REST example on the SOAPUI site - although this example shows the GET method.

    A specific example with JSON POST would have been helpful