Forum Discussion
Elsevier_-_OH_S
12 years agoContributor
sorry I cant send my project file as it wont work outside the domain....I can explain here...
We have REST services that has multiple Mime Parts for example below 4 mime parts.
Soapui doesn't throw all the Mime part in the outline and overview tab just in the raw tab u can see 4 mime parts and in other view only first one(we have created ticket for this , soapui team said it wont work in soapui so u have to modify response in one string so develop the above script to do that. With this script we were successfully able to see our modifiy response in the outline tab). So we have setup that script at project level RequestFilter.afterRequest event.Now I need some soap data to these request, so I import my WSDL to the same project as this Soap WSDL doesn't have multiple MIme parts, only just a single xml response, I am not able to see this the response from this SOAp request in the outline view I can jut only see in raw tab.So I want something that this script should work for my REST multiple Mime part response but should not modify responses from soap requests.
Multiple Mime part Response from REST services.
--simple_boundary
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><field id="emailSubject">Remote access activation</field></abc_response>
--simple_boundary
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><cde xmlns="http://cde-services.lmn.com/vde/client"><display_model></cde>
--simple_boundary
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><cde_response xmlns="http://cde-services.cde.com/vde/server"><model><instance id="resourceBundle"></cde_response>
--simple_boundary--
Soap Services response
<?xml version="1.0" encoding="UTF-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
-<soapenv:Header>
-<Q1:EASIResp xmlns:Q1="http://webservices.elve.com/schemas/easi/headers/types/v1">
<RespId>8a2ca342</RespId>
<ServerId>2c748.Service_cert_001</ServerId>
</Q1:EASIResp>
</soapenv:Header>
-<soapenv:Body>
-<ns2:getAllListResponse xmlns:ns4="http://webservices.elve.com/schemas/easi/headers/types/v1" xmlns:ns3="http://webservices.elve.com/schemas/CBNM/headers/types/v12000" xmlns:ns2="http://webservices.elve.com/schemas/CBNM/types/v12000">
-<ns2:getAllRespPayload>
-<ns2:status>
<ns2:statusCode>OK</ns2:statusCode>
<ns2:statusText>success</ns2:statusText>
</ns2:status>
-<ns2:entitsList>
<ns2:contentTypeCode>J\</ns2:contentTypeCode>
<ns2:keyName>ID</ns2:keyName>
<ns2:id>277417</ns2:id>
<ns2:id>287716</ns2:id>
<ns2:id>277418</ns2:id>
<ns2:id>287714</ns2:id>
<ns2:id>277410</ns2:id>
<ns2:id>277412</ns2:id>
<ns2:id>277413</ns2:id>
<ns2:id>277415</ns2:id>
<ns2:id>277416</ns2:id>
<ns2:id>277422</ns2:id>
<ns2:id>277423</ns2:id>
<ns2:id>277420</ns2:id>
<ns2:id>277421</ns2:id>
<ns2:id>277424</ns2:id>
<ns2:id>271704</ns2:id>
<ns2:id>271703</ns2:id>
<ns2:id>271702</ns2:id>
<ns2:id>271701</ns2:id>
<ns2:id>271700</ns2:id>
<ns2:id>271709</ns2:id>
<ns2:id>271707</ns2:id>
<ns2:id>271708</ns2:id>
<ns2:id>271705</ns2:id>
<ns2:id>271706</ns2:id>
<ns2:id>271721</ns2:id>
<ns2:id>271722</ns2:id>
<ns2:id>271720</ns2:id>
<ns2:id>271725</ns2:id>
<ns2:id>271726</ns2:id>
<ns2:id>271723</ns2:id>
<ns2:id>271724</ns2:id>
<ns2:id>271729</ns2:id>
<ns2:id>271728</ns2:id>
</ns2:elementsList>
<ns2:pdateDate>16-Dec-2013 00:38:48</ns2:pdateDate>
</ns2:AllRespPayload>
</ns2:AllResponse>
</soapenv:Body>
</soapenv:Envelope>
We have REST services that has multiple Mime Parts for example below 4 mime parts.
Soapui doesn't throw all the Mime part in the outline and overview tab just in the raw tab u can see 4 mime parts and in other view only first one(we have created ticket for this , soapui team said it wont work in soapui so u have to modify response in one string so develop the above script to do that. With this script we were successfully able to see our modifiy response in the outline tab). So we have setup that script at project level RequestFilter.afterRequest event.Now I need some soap data to these request, so I import my WSDL to the same project as this Soap WSDL doesn't have multiple MIme parts, only just a single xml response, I am not able to see this the response from this SOAp request in the outline view I can jut only see in raw tab.So I want something that this script should work for my REST multiple Mime part response but should not modify responses from soap requests.
Multiple Mime part Response from REST services.
--simple_boundary
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><field id="emailSubject">Remote access activation</field></abc_response>
--simple_boundary
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><cde xmlns="http://cde-services.lmn.com/vde/client"><display_model></cde>
--simple_boundary
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><cde_response xmlns="http://cde-services.cde.com/vde/server"><model><instance id="resourceBundle"></cde_response>
--simple_boundary--
Soap Services response
<?xml version="1.0" encoding="UTF-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
-<soapenv:Header>
-<Q1:EASIResp xmlns:Q1="http://webservices.elve.com/schemas/easi/headers/types/v1">
<RespId>8a2ca342</RespId>
<ServerId>2c748.Service_cert_001</ServerId>
</Q1:EASIResp>
</soapenv:Header>
-<soapenv:Body>
-<ns2:getAllListResponse xmlns:ns4="http://webservices.elve.com/schemas/easi/headers/types/v1" xmlns:ns3="http://webservices.elve.com/schemas/CBNM/headers/types/v12000" xmlns:ns2="http://webservices.elve.com/schemas/CBNM/types/v12000">
-<ns2:getAllRespPayload>
-<ns2:status>
<ns2:statusCode>OK</ns2:statusCode>
<ns2:statusText>success</ns2:statusText>
</ns2:status>
-<ns2:entitsList>
<ns2:contentTypeCode>J\</ns2:contentTypeCode>
<ns2:keyName>ID</ns2:keyName>
<ns2:id>277417</ns2:id>
<ns2:id>287716</ns2:id>
<ns2:id>277418</ns2:id>
<ns2:id>287714</ns2:id>
<ns2:id>277410</ns2:id>
<ns2:id>277412</ns2:id>
<ns2:id>277413</ns2:id>
<ns2:id>277415</ns2:id>
<ns2:id>277416</ns2:id>
<ns2:id>277422</ns2:id>
<ns2:id>277423</ns2:id>
<ns2:id>277420</ns2:id>
<ns2:id>277421</ns2:id>
<ns2:id>277424</ns2:id>
<ns2:id>271704</ns2:id>
<ns2:id>271703</ns2:id>
<ns2:id>271702</ns2:id>
<ns2:id>271701</ns2:id>
<ns2:id>271700</ns2:id>
<ns2:id>271709</ns2:id>
<ns2:id>271707</ns2:id>
<ns2:id>271708</ns2:id>
<ns2:id>271705</ns2:id>
<ns2:id>271706</ns2:id>
<ns2:id>271721</ns2:id>
<ns2:id>271722</ns2:id>
<ns2:id>271720</ns2:id>
<ns2:id>271725</ns2:id>
<ns2:id>271726</ns2:id>
<ns2:id>271723</ns2:id>
<ns2:id>271724</ns2:id>
<ns2:id>271729</ns2:id>
<ns2:id>271728</ns2:id>
</ns2:elementsList>
<ns2:pdateDate>16-Dec-2013 00:38:48</ns2:pdateDate>
</ns2:AllRespPayload>
</ns2:AllResponse>
</soapenv:Body>
</soapenv:Envelope>