Forum Discussion

ShrekOrion's avatar
ShrekOrion
New Contributor
12 years ago

Creating Mock Response causes Java Heap Space to run out

Environment Details:

- 64 bit Windows 7. 8gb ram
- SoapUi 4.5.2 64bit installed

How to Reproduce:

- Navigate to soapUI-4.5.2\bin directory
- Open 'soapUI-4.5.2.vmoptions'
- Set -Xmx3000m
- Open SoapUi
- Save the following XML to a file:
<?xml version='1.0' encoding='UTF-8'?>
<wsdl:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:tns="urn:gov:hhs:fha:nhinc:entitypatientdiscovery" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:hl7="urn:hl7-org:v3" name="EntityPatientDiscovery" targetNamespace="urn:gov:hhs:fha:nhinc:entitypatientdiscovery">
<wsdl:documentation>
WSDL for Entity interface of Patient Discovery
</wsdl:documentation>
<wsdl:types>
<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:tns="urn:gov:hhs:fha:nhinc:entitypatientdiscovery" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:hl7="urn:hl7-org:v3" elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3">
<!-- Include the message schema -->
<xsd:include schemaLocation="http://badboy-nhin:8080/Gateway/PatientDiscovery/1_0/EntityPatientDiscovery?xsd=classpath:schemas/nhinc/hl7/RespondingGateway_PRPA_IN201305UV02Request.xsd"/>
<xsd:include schemaLocation="http://badboy-nhin:8080/Gateway/PatientDiscovery/1_0/EntityPatientDiscovery?xsd=classpath:schemas/nhinc/hl7/RespondingGateway_PRPA_IN201306UV02Response.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="RespondingGateway_PRPA_IN201306UV02ResponseMessage">
<wsdl:part element="hl7:RespondingGateway_PRPA_IN201306UV02Response" name="RespondingGateway_PRPA_IN201306UV02Response">
</wsdl:part>
</wsdl:message>
<wsdl:message name="RespondingGateway_PRPA_IN201305UV02RequestMessage">
<wsdl:part element="hl7:RespondingGateway_PRPA_IN201305UV02Request" name="RespondingGateway_PRPA_IN201305UV02Request">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="EntityPatientDiscoveryPortType">
<wsdl:operation name="RespondingGateway_PRPA_IN201305UV02">
<wsdl:input message="tns:RespondingGateway_PRPA_IN201305UV02RequestMessage" name="RespondingGateway_PRPA_IN201305UV02Request" wsaw:Action="urn:gov:hhs:fha:nhinc:entitypatientdiscovery:RespondingGateway_PRPA_IN201305UV02RequestMessage">
</wsdl:input>
<wsdl:output message="tns:RespondingGateway_PRPA_IN201306UV02ResponseMessage" name="RespondingGateway_PRPA_IN201306UV02Response" wsaw:Action="urn:gov:hhs:fha:nhinc:entitypatientdiscovery:RespondingGateway_PRPA_IN201306UV02ResponseMessage">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="EntityPatientDiscoveryBindingSoap" type="tns:EntityPatientDiscoveryPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsp:PolicyReference URI="#Entity_PatientDiscovery_SoapPolicy"/>
<wsdl:operation name="RespondingGateway_PRPA_IN201305UV02">
<soap:operation soapAction="urn:gov:hhs:fha:nhinc:entitypatientdiscovery:RespondingGateway_PRPA_IN201305UV02RequestMessage"/>
<wsdl:input name="RespondingGateway_PRPA_IN201305UV02Request">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="RespondingGateway_PRPA_IN201306UV02Response">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="EntityPatientDiscovery">
<wsdl:port binding="tns:EntityPatientDiscoveryBindingSoap" name="EntityPatientDiscoveryPortSoap">
<soap:address location="http://badboy-nhin:8080/Gateway/PatientDiscovery/1_0/EntityPatientDiscovery"/>
</wsdl:port>
</wsdl:service>
<wsp:Policy wsu:Id="Entity_PatientDiscovery_SoapPolicy">
<wsp:ExactlyOne>
<wsp:All>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
</wsdl:definitions>

- Open the New SoapUi Project dialogue and set the 'Initial WSDL' to the xml file saved above
- Check the 'Create MockService' box and hit 'OK'
- Continue with the Generate Mockservice dialogue

Expected Outcome:

Service is generated successfully along with a sample Mock Response.

Actual Outcome:

SoapUi freezes for some time. Watching the Windows Task Manager, its memory usage creeps up to 3GB. The Service is generated with no MockResponse, and the following error appears in 'soapui-errors.log' :
2013-08-01 11:23:03,287 ERROR [errorlog] java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
at org.apache.xmlbeans.impl.store.Xobj.ensureParent(Xobj.java:613)
at org.apache.xmlbeans.impl.store.Xobj.getNormal(Xobj.java:660)
at org.apache.xmlbeans.impl.store.Cur.moveNode(Cur.java:1956)
at org.apache.xmlbeans.impl.store.Cur.moveNode(Cur.java:1844)
at org.apache.xmlbeans.impl.store.Cursor.insertNode(Cursor.java:189)
at org.apache.xmlbeans.impl.store.Cursor._insertAttributeWithValue(Cursor.java:1765)
at org.apache.xmlbeans.impl.store.Cursor.insertAttributeWithValue(Cursor.java:4289)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processAttributes(SampleXmlUtil.java:1278)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.createSampleForType(SampleXmlUtil.java:225)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processElement(SampleXmlUtil.java:1183)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processParticle(SampleXmlUtil.java:1067)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processSequence(SampleXmlUtil.java:1288)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processParticle(SampleXmlUtil.java:1070)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.createSampleForType(SampleXmlUtil.java:250)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processElement(SampleXmlUtil.java:1183)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processParticle(SampleXmlUtil.java:1067)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processSequence(SampleXmlUtil.java:1288)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processParticle(SampleXmlUtil.java:1070)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.createSampleForType(SampleXmlUtil.java:250)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processElement(SampleXmlUtil.java:1183)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processParticle(SampleXmlUtil.java:1067)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processSequence(SampleXmlUtil.java:1288)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processParticle(SampleXmlUtil.java:1070)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.createSampleForType(SampleXmlUtil.java:250)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processElement(SampleXmlUtil.java:1183)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processParticle(SampleXmlUtil.java:1067)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processSequence(SampleXmlUtil.java:1288)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processParticle(SampleXmlUtil.java:1070)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.createSampleForType(SampleXmlUtil.java:250)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processElement(SampleXmlUtil.java:1183)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processParticle(SampleXmlUtil.java:1067)
at com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil.processChoice(SampleXmlUtil.java:1303)


Additionally:
- Under the Mock Service, right click the operation listed and select 'Show MockOperation Editor'
- Attempt to create a new Mock Response

At this point, the exact same behaviour as above is observed.

This leads me to believe there is an issue with how SoapUi generates MockResponses. The wsdl provided above should be perfectly valid, but if you think otherwise, let me know.

2 Replies

  • nmrao's avatar
    nmrao
    Icon for Champion Level 1 rankChampion Level 1
    Just wondering if the same issue was there in previous version i.e., 4.5.1 or if you had tried? looks wsdl is referring to your hostname which could not be resolved outside of your network.
  • ShrekOrion's avatar
    ShrekOrion
    New Contributor
    Yes, I started with SoapUI 4.5.1 and the same issue occurred. The wsdl is referring to a hostname, 'nhin-badboy' that is inside my network. I can view this wsdl through my browser just fine.