WebMethods 10.5 - How to have the SOAP Response content with the same namespace prefix as the root node?

Hi,
I’m trying to understand how I can configure a WSD provider and services so my SOAP response can be consistent in terms of namespace prefixes.
This is the type of result I get :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ser-root:serviceResponse xmlns:ser-root="webmethods.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <tns:idClientCLM xmlns:tns="webmethods.namespace">999</tns:idClientCLM>
         <tns:soldePoints xmlns:tns="webmethods.namespace">50</tns:soldePoints>
         <tns:soldePointsDollars xmlns:tns="webmethods.namespace">0.05</tns:soldePointsDollars>
         <tns:codeRetour xmlns:tns="webmethods.namespace">32</tns:codeRetour>
         <tns:messageRetour xmlns:tns="webmethods.namespace">La carte saisie est inactive. Veuillez balayer une carte différente ou inviter le client à contacter le CRC . Statut carte =</tns:messageRetour>
      </ser-root:serviceResponse>
   </soapenv:Body>
</soapenv:Envelope>

Is there a way to make it this way ? :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ser-root:serviceResponse xmlns:ser-root="webmethods.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <ser-root:idClientCLM>999</ser-root:idClientCLM>
         <ser-root:soldePoints>50</ser-root:soldePoints>
         <ser-root:soldePointsDollars>0.05</ser-root:soldePointsDollars>
         <ser-root:codeRetour>32</ser-root:codeRetour>
         <ser-root:messageRetour>La carte saisie est inactive. Veuillez balayer une carte différente ou inviter le client à contacter le CRC . Statut carte =</ser-root:messageRetour>
      </ser-root:serviceResponse>
   </soapenv:Body>
</soapenv:Envelope>

Hi,

please clarify how your webservice is intended to work: either rpc/encoded or document/literal?

Most common used is document/literal, rpc/encoded is considered outdated and deprecated.

ser-root prefix is mostly used in rpc/encoded variants.

It might be a good idea to switch to contract first WS, so first create WSDL (and XSD if neccessary) and then create the WSD in Designer from this WSDL. Then you can invoke your service within the created WSD services.

See WS Developers Guide for further informations.

Regards,
Holger

I’m using document/literal for the webService…
I’ve also tried going from the WSDL to the WSD in Designer to the same result… Root node got its own namespace prefix (ser-root), and content got all theirs (tns) defined for each node, even if all the namespaces are the same…

Hi Julien,

Did you try setting the namespace prefix to a name of your choice in “Assign Prefix” window in Designer, while importing the WSDL? If this does not work for you, could you share the WSDL in question?

Regards,
Arpitha

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.