Skip to Content
author's profile photo Former Member
Former Member

replace Namespace in SOAP Receiver Payload

Hi Experts ,

I have a requirement to replace the namespace prefix in the below XML., before calling the webservice using SOAP Receiver.

Input :

<ns1:updatecustomer xmlns:ns1="http://www.examples.com/wsdl/cust.wsdl">

<field1>1</field1>

<field2>2</field2>

</ns1:updatecustomer>

Expected Output :

<urn:updatecustomer xmlns:urn="http://www.examples.com/wsdl/cust.wsdl">

<field1>1</field1>

<field2>2</field2>

</urn:updatecustomer>

I have tried using XMLAnonymizerBean and it has not worked . Please suggest how this requirement can be achieved.

Regards,

Nick

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jul 21, 2016 at 06:40 AM

    Hi Nick,

    xmlns:ns1="http://www.examples.com/wsdl/cust.wsdl"

    and

    xmlns:urn="http://www.examples.com/wsdl/cust.wsdl">

    are semantically equal by W3C XML standards. Is the webservice rejecting the ns1? If that is the case, a simple xlst/java mapping can do the trick.

    Regards,

    Mark

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 21, 2016 at 06:44 AM

    Hi Nick!

    As far as I can see there is no difference between your messages. You can use any prefix when describing namespace (unless it's preserved or contains invalid characters).

    Regards, Evgeniy.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Evgeniy,

      Yes ...The webservice is rejecting the namespace with prefix ns1 , but accepts the prefix urn.

      Code(-9038) Element &lt;ns1:updatecustomer> found under &lt;input> is not allowed.

      Regards,

      Nick

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.