Highlighted
Contributor.
Contributor.
173 views

Can SV replace soap schema string before virtual service bring to process?

Let say that frontend library has generate fault schema as below

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ " >

<soapenv:Header></soapenv:Header><soapenv:Body>

.....

</soapenv:Body></soapenv:Envelope>

On first line, there is one blank string after 'envelope/'. This will make message couldn't be import unless we delete that character. 

If i remove that blank, it is ok to import but message from frontend that automatic generated could not be process correctly. 

The response as well.

Any suggestion that would be better than using binary over http please?

Labels (1)
0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

You can try to virtualize this using XML instead of SOAP based protocol and strip the Envelope, Header and Body from beginning/end to make it valid XML again. Stripping can be done in Service Description Editor in Message Header/Footer configuration.

Space is an unsafe character and should be URL encoded, but SV XML parser could be more robust and deal with it, so you can as well raise an enhancement request for this. If it would be implemented, no stripping described above would be needed.

Thirst option is to modify the protocol/create custom one.

---
Service Virtualization R&D
0 Likes
Highlighted
Contributor.
Contributor.

Hi Jakub

 

Thanks to answer.

I couldn't find manual for this section.

So, Is this what you mean?

I still stuck on this, please refer to attached image and log..

 

Regards

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Yes, this is what I mean. What's crucial is header/footer must be exact. If you use text editor to copy/paste things it might get modified (e.g. new lines). Even one missing/additional/changed byte in that header/footer and it won't work. When I was testing this I used a hex editor and copied data in hexadecimal representation and used this option in the configuration field.

Feel free to post your virtual service and sample messages or PM me that.

---
Service Virtualization R&D
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.