Question
Yi Zhong · Nov 12, 2020

The return message structure of the SOAP service

This XML file does not appear to have any style information associated with it. The document tree is shown below.

 
WSDL

 

The problem is shown in figure!  thank you!

0
1 345
Discussion (4)0
Log in or sign up to continue

To get rid of xmlns: attribute In your SOAPservice class you may try

Paramter NAMESPACE = "";

methodname_"Response" is hardcoded in system class %SOAP.WebService
I would warn for writing a customized version of it.

Hi.

You need to specify

Parameter ARGUMENTSTYLE = "message";

For example:

Class delme.SoapService Extends %SOAP.WebService [ Language = objectscript, ProcedureBlock ]
{

Parameter ARGUMENTSTYLE = "message";

Parameter SERVICENAME = "MyService";

Parameter NAMESPACE = "http://tempuri.org";

Method Test(x As %String) As %String(XMLNAME="Root") [ WebMethod ]
{
    Return "Test"
}

}

Then response is following:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema">
   <SOAP-ENV:Body>
      <Root xmlns="http://tempuri.org">Test</Root>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Thank you very much!