on 08-14-2013 3:17 PM
Hi,
I have a soap request structure created manually in PI.
The soap body starts with the following
<shipmentRequest>
<Request>
<RequestOption>4EV527680000075</RequestOption>
</ShipmentRequest>
Please note that I have created a datatype called ShipmentRequest.
The problem is that the webservice requests expects the structure to be like this.
ShipmentRequest xmlns:m="http://www.test.com/XMLSchema/Xxxxx/Ship/v1.0">
Request xmlns="http://www.test.com/XMLSchema/XOxxxS/Common/v1.0"
How do i insert these namespace at the datatype element level. I tried exporting the datatype into xsd and modifying it, but did not work.
Basically they are expecting the target structure to be like this
<shipmentRequest xmlns:m="http://www.test.com/XMLSchema/Xxxxx/Ship/v1.0">
<Request
xmlns="http://www.test.com/XMLSchema/XOxxxS/Common/v1.0">
<RequestOption>4EV527680000075</RequestOption>
</Request>
</ShipmentRequest>
Let me know how to handle this.
Regards
Anandh.B
I something that is not clear at all for me,if you want to send data to WSDL, why you didnt import the WSDL as External Definition????
I you do that you dont need to do any XSLT mapping and any other object because you use the structure of the WSDL imported.
REgards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I was able to resolve this by removing the " in the constant function. Just by giving an url, PI automatically adds double quotes.
Thanks Everyone for your inputs.
Regards
Anandh.B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i you cannot import the WSDL (i dont think so), you can change the structure of your DT
<shipmentRequest>
<Request>
---> ATTRIBUTE called xmlns
<RequestOption>
</Request>
</ShipmentRequest>
then in mapping add the value http://www.test.com/XMLSchema/XOxxxS/Common/v1.0 to the attribute.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I was able to achieve the namespace just by adding it as an attribute.
The only issue i get is the following
xmlns=""http://www.ups.com/XMLSchema/XOLTWS/Ship/v1.0"">
You can see " coming after double quotes. I have declared the attribute xmlns as string.
Let me know how i can overcome without giving this character.
Regards
Anandh
Hi, Simplest way would be to write a xslt mapping,
It'll be something like...
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="/">
<ns0:MT_Ex xmlns:ns0="yournamespace">
<xsl:copy-of select="." />
</ns0:MT_Ex>
</xsl:template>
</xsl:stylesheet>
Also Refer this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This is how the structure looks like.
I am pretty new to XSLT. The above XSLT will just add a new element with the namespace. But i need to add the namespace in existing node and element.
<shipmentRequest xmlns:m="http://www.test.com/XMLSchema/Xxxxx/Ship/v1.0">
<Request
xmlns="http://www.test.com/XMLSchema/XOxxxS/Common/v1.0">
Even a udf would be great help to do this.
Regards
Anandh.B
Alright, then the simplest way to do this to put new namespace in the message type -
This will overwrite your repository namespace.
http://help.sap.com/saphelp_banking60/helpdata/en/ba/d4c23b95c8466ce10000000a114084/frameset.htm
Thanks
Amol
Hi Anandha,
create an XSD out of the XML structure which third party expects (use Altova or other tools available) and import it as external definition in PI and use it in your mapping.
that should work.
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
i think you can handle in the message mapping.
check this.
create a string.
first concatenate this to string.
<shipmentRequest xmlns:m="http://www.test.com/XMLSchema/Xxxxx/Ship/v1.0">
then concatenate the below input xml file to string.
<shipmentRequest>
<Request>
<RequestOption>4EV527680000075</RequestOption>
</Request>
</ShipmentRequest>
finally replace <Request> with
<Request
xmlns="http://www.test.com/XMLSchema/XOxxxS/Common/v1.0">
Regards,
Muniyappan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.