Service Virtualization

Expand all | Collapse all

Getting Error in SoapUI while importing VS wsdl !!!

monika_mehta

monika_mehtaApr 19, 2016 06:00 AM

  • 1.  Getting Error in SoapUI while importing VS wsdl !!!

    Posted Apr 19, 2016 02:17 AM
      |   view attached

    Hi All,

     

    I tried creating a VS by using RR pair, and created an end point for the same. I am able to open the endpoint for the service as well as the wsdl in IE browser, but when i am trying to test my service using SoapUI, I am getting an exception "com.eviware.soapui.support.SoapUIException: Error importing wsdl". I am getting a proper response for the same service while testing through Web Service Execution step in CA DevTest 8.4.

    I have attached a screenshot to support my query.

    Kindly guide me in resolving this.

     

    Thanks,

    Aman Saeed.

    Attachment(s)

    docx
    SOAPUI_Error.docx   57 KB 1 version


  • 2.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted Apr 19, 2016 06:00 AM

    Can you try turning off the Proxy?



  • 3.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted Apr 19, 2016 06:35 AM

    I set the proxy as "None", but still i am facing this issue.



  • 4.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted Apr 19, 2016 07:26 AM

    Can you share the url you are using to import wsdl.



  • 5.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted Apr 19, 2016 09:31 AM

    I am not a SoapUI guru, but, does your WSDL specify any XSD locations that SoapUI cannot access?  Keep in mind that Virtual Services send the responses exactly As-Is and do not perform validations (unless you add custom behavior).  Perhaps, this is why your Webservice XML step works but SoapUI does not.  SoapUI may be performing additional validations that a test step does not.



  • 6.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted Apr 19, 2016 09:38 AM

    Maybe this link helps:  Error importing wsdl - SmartBear Community     Folks in this thread reported things like bad namespaces and malformed UTF-8 characters in the WSDL.  Not sure if this gets you closer to solving the issue or not.



  • 7.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted Apr 19, 2016 12:43 PM

    hey.. is it possible for you to create a webex session. Let's see where it is failing.

    mail me @ monika.mehta08@gmail.com



  • 8.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted Apr 20, 2016 05:10 AM

    Hi Monika,

     

    Thanks for your prompt support. Could you please check your monika.mehta08@gmail.com  account.

     

    Thanks,

    Aman Saeed.



  • 9.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted May 12, 2016 10:58 AM

    Hi lisa_user1,

     

    Did any of these responses answer your question? If so, please be sure to mark this question as answered.

     

    Thanks!

    Melanie



  • 10.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted May 12, 2016 02:38 PM

    This issue was because of the mismatch between WSDL and RR pairs. The wsdl was getting configured with Rest data protocol whre RR pairs were getting configured with SOAP protocol. So I created 2 VSMs, one for wsdl & the other for RR pairs. But I am still not sure, why protocol mismatch occured.

     

    Thanks,

    Aman Saeed



  • 11.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted May 12, 2016 03:22 PM

    Hi Aman, on the basis of what you just said in your last reply.  It sounds like you a) want one VSM, b) The VSM will support SOAP/HTTP calls so you can virtualize the operations, c) you want to be able to call the exact same service and retrieve the WSDL.  If this is not correct, no need to go further.

    If yes, then your high level Use Case scenarios are:

    Scenario 1:   Call for the WSDL using a rest call   For Example:   http://localhost:8001/someService/endpoint/path?wsdl

    Scenario 2:   Call the same endpoint passing a SOAP message:  http://localhost:8001/someService/endpoint/path  (with a SOAP Envelope containing operation and arguments)

     

    To do these scenarios, open your VSI: 

    - Create one operation with an operation name of:  GET /someService/endpoint/path (there is a space between GET and "/")

    - In the META transaction for this operation, add one argument named: wsdl.  

    - In the response for this operation, place the WSDL that you want returned to the caller.  

    - The remainder of the operations in your VSI follow SOAP conventions and contain whatever their respective operation and argument signatures are.

    - In your VSM, include the SOAP DPH and leave off the REST DPH.

    Some customers have done this with success.  Their apps can ask for the WSDL and then make a call for an operation. 

    I cannot vouch for SoapUI or whether or not issues will still exist using that tool.



  • 12.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted May 14, 2016 05:29 AM

    Hi J_NeSmith,

     

    You got me right. I would love to try this approach and let you know in case I face any issues with SoapUI tool...:)

     

    Thanks,

    Aman Saeed.



  • 13.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted May 12, 2017 08:48 AM

    Hi Joel,

     

    I have a similar requirement for virtualizing the wsdl calls as well as soap services. The front end application calls the wsdl url and wsdl is configured to call the service endpoints. We are able to record the wsdl response using browser but when the application calls the virtual service, it has sent the response successfully but at the application end they are getting a parsing error because of which web service calls are not happening. We used the same wsdl which they shared and we updated only the service endpoints but they are getting the error which I have copied at the bottom.I tried copying the xsd files in data folder but they still get this error. Can you please help us identify what could be the issue?

     

    Note: I didn't add the wsdl argument in the meta transaction as wsdl is already added in the resource path.

     

    Error Message:

    Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://server-url:13001/fncmis/wsdl'.: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2315)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2390)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2356)
    at org.apache.axis2.jaxws.util.WSDL4JWrapper$13.run(WSDL4JWrapper.java:746)
    at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132)
    at org.apache.axis2.jaxws.util.WSDL4JWrapper.loadDefinition(WSDL4JWrapper.java:743)
    ... 237 more
    Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2305)
    ... 242 more 

     

    Thanks,

    Siva



  • 14.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted May 16, 2017 09:43 AM

    I know this may seem like a non-answer, but something in the WSDL is not passing the parser. The exception (org.xml.sax.SAXParseException: Content is not allowed in prolog) appears to be occurring in your client application not the virtual service, correct?  Are you able to print the service response bytes to see if there are extra leading bytes or whitespace?    

     

    In the future, it might be best to open a new discussion and link to this one if necessary. 



  • 15.  Re: Getting Error in SoapUI while importing VS wsdl !!!

    Posted May 16, 2017 12:18 PM

    Hi Joel,

     

    Yes. The error was thrown at application end. Initially we assumed that something wrong with response format or meta data but we were unable to figure out the root cause. After couple of days of debugging, we identified that content-encoding meta data was causing the problem. These values were captured when we recorded the wsdl using browser but this value was not captured when we did recording by triggering the request from the application. Now, the front end application is able to consume the virtual response after removing content-encoding.

     

    Thanks,

    Siva