Author |
Message
|
fjb_saper |
Posted: Tue Dec 22, 2015 12:28 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And please remember: be very detailed and specific. We may be professionals who know our craft, but members of the psychic network we are not!!!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Halloween |
Posted: Tue Dec 22, 2015 12:56 pm Post subject: |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
Thanks everyone and special thanks to Vitor.
The issue is resolved.
Now, ca someone tell me how to change the name space in SOAP reply.
I am migrating JCAPS interface to IIB and they need the exact same response as in JCAPS
My response is similar to this one
Code: |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<NS1:processMessageResponse |
I want the namespace to be like
Code: |
<env:Envelope
<env:Body>
<ns1:processMessageResponse/> |
Thanks |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 22, 2015 1:02 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Halloween wrote: |
Now, ca someone tell me how to change the name space in SOAP reply. |
Do you mean change the namespace (in the sense of using something other than http://schmas.xmlsoap.org/soap/envelope inexplicably) or do you mean a namespace prefix of env rather than soapenv?
This is controlled by the prefixes you define in your code. You're only getting NS1 rather than ns1 because IIB uses NS1, NS2, etc for namespaces you've not explicitly prefixed. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 22, 2015 1:03 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Halloween wrote: |
special thanks to Vitor. |
You're welcome.
Halloween wrote: |
The issue is resolved. |
Nothing say "thank you" like posting the resolution to your problem for the benefit of future readers of this forum who need to parse a CDATA section.... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Halloween |
Posted: Tue Dec 22, 2015 1:08 pm Post subject: |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
Hello,
I meant a namespace prefix of env rather than soapenv? |
|
Back to top |
|
 |
Halloween |
Posted: Tue Dec 22, 2015 1:24 pm Post subject: |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
Hello,
Instead of the one below
Code: |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<NS1:processMessageResponse xmlns:NS1="urn:ProcessMessage"><![CDATA[<advance-person-data xmlns="http://www.bmw.com/BWMS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bmw.com/BWMS /ed/advance.xsd">
<header>
<sender>Siebel</sender>
<receiver>BWMS</receiver>
<case-id />
<crm-number>1530800001</crm-number>
<order-number>3756551</order-number>
<time-stamp>20151117091518</time-stamp>
</header>
<body>
<language>en</language>
<companions-number-of>0</companions-number-of>
<children-number-of>0</children-number-of>
<young-persons-number-of>0</young-persons-number-of>
</body>
</advance-person-data>]]></NS1:processMessageResponse>
</soapenv:Body>
</soapenv:Envelope>
|
I need
Code: |
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:SeeBeyond:soap" xmlns:ns1="urn:ProcessMessage" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<ns1:processMessageResponse xmlns:NS1="urn:ProcessMessage"><![CDATA[<advance-person-data xmlns="http://www.bmw.com/BWMS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bmw.com/BWMS /ed/advance.xsd">
<header>
<sender>Siebel</sender>
<receiver>BWMS</receiver>
<case-id />
<crm-number>1530800001</crm-number>
<order-number>3756551</order-number>
<time-stamp>20151117091518</time-stamp>
</header>
<body>
<language>en</language>
<companions-number-of>0</companions-number-of>
<children-number-of>0</children-number-of>
<young-persons-number-of>0</young-persons-number-of>
</body>
</advance-person-data>]]> </ns1:processMessageResponse>
</env:Body>
</env:Envelope>
|
|
|
Back to top |
|
 |
mqjeff |
Posted: Tue Dec 22, 2015 1:28 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
There is a NAMESPACE property of every element in a message tree.
There is an XMLNSC field type to indicate that the field is a namespace declaration.
I'm extremely positive, except for the bit that I might have forgotten, that there are samples that come with the product that are explicit on how to set both of those things. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Halloween |
Posted: Wed Dec 23, 2015 7:15 am Post subject: |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
I browse through the sample. Is not much of any help to explicitly define out own namespace prefix. Or, mask the existing namespace prefix by our own custom namespace prefix |
|
Back to top |
|
 |
Vitor |
Posted: Wed Dec 23, 2015 7:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Halloween wrote: |
I browse through the sample. |
Trying actually reading it instead of just browsing it.
Halloween wrote: |
Is not much of any help to explicitly define out own namespace prefix. Or, mask the existing namespace prefix by our own custom namespace prefix |
By which you mean that the initial skim of the code you performed didn't immediately provide exactly what you needed?
If you think the sample is inadequate, there are any number of discussions on this forum on how to do what you're looking for.
Or alternatively point out to whoever wants the prefix changed that according to the W3C standards the prefix value doesn't matter, it's the namespace the prefix relates to that matters.
Or just tell them it's too much time, trouble and reading for you to work out how to change it & this group of strangers on the Internet you expected to give you the answer are unreasonably expecting you to work it out yourself. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Halloween |
Posted: Wed Dec 23, 2015 11:15 am Post subject: |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
@Vitor
You have inspired to try this on my own and i finally ahieved it.
what would have happened without you |
|
Back to top |
|
 |
Halloween |
Posted: Wed Dec 23, 2015 11:21 am Post subject: |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
And you now what i convinced the guy who wanted to update the namespace prefix that does not really matter. It is the namespace that it relates matters |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Dec 23, 2015 11:23 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Halloween wrote: |
@Vitor
You have inspired to try this on my own and i finally ahieved it.
what would have happened without you |
Well done. Trying things for yourself before asking here is a really good plan of action.
Then when you post here you can tell us what you tried and what went wrong. This can save a lot of time in getting to a solution. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Dec 24, 2015 5:43 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Halloween wrote: |
And you now what i convinced the guy who wanted to update the namespace prefix that does not really matter. It is the namespace that it relates matters |
Congratulations! This is the best solution!
 _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|