Skip to Content

<body><p> Have you

seen the blog <a href=”http://feedproxy.google.com/%7Er/SDNWeblogs_SapExchangeInfrastructurexi/%7E3/Gemk54vqyFc/17492?utm_source=feedburner&utm_medium=email” target=”_top”>Consuming

Webservices with <ANY> tag in WSDL using ABAP</a>  where posted the ABAP solution of empty structures in .Net WEB

services? This blog shows another approach – XSLT mapping program.</p>

<p>The problem is in that fact that WSDL file generated with .Net WEB service

(MS Project server, MS SharePoint server, etc.) contains link</p><p> </p>

<table border=”0″ width=”100%” style=”background-color: #eeeeee”>

<tbody><tr> <td><pre><s:any namespace=” …  ” xmlns:s=”http://www.w3.org/2001/XMLSchema” /></pre></td></tr></tbody></table><p> </p><p>in element </p><p> </p>

<table border=”0″ width=”100%” style=”background-color: #eeeeee”>   <tbody><tr><td>

<pre><s:sequence  xmlns:s=”http://www.w3.org/2001/XMLSchema“> … </s:sequence></pre>

  </td></tr></tbody></table>

<p> </p><p>of message type definition. Here target is in “namespace”

attribute. Using this WSDL in SAP XI/PI, you will get a message without fields

in message mapping. At runtime there will be only one element with whole

message into it as its value. </p><p> </p>

<p>You can modify WSDL copying this structure in “sequence” element

of cause but to my mind it is not right way.</p><p> </p>

<p>Using

ABAP is not suitable in some cases, especially when you haven’t got OSS key.</p>

<p>I have

solved this problem using XSLT.   </p>

<p>So, I got a

response from MS Project’s WEB service like this:</p><p> </p>

<table border=”0″ width=”100%” style=”background-color: #eeeeee”>   <tbody><tr><td>

<pre> <?xml version=”1.0″ encoding=”UTF-8″?><br /> <ReadProjectListResponse xmlns=”http://schemas.microsoft.com/office/project/server/webservices/Project/“><br /> <ReadProjectListResult><br /> <xs:schema … > … </xs:schema><br /> <diffgr:diffgram xmlns:msdata=”urn:schemas-microsoft-com:xml-msdata” xmlns:diffgr=”urn:schemas-microsoft-com:xml-diffgram-v1″><br /> <ProjectDataSet xmlns=”http://schemas.microsoft.com/office/project/server/webservices/ProjectDataSet/“><br />     <Project diffgr:id=”Project1″ msdata:rowOrder=”0″ diffgr:hasChanges=”inserted”><br />        <PROJ_UID>674457db-7ff1-4e24-81b3-b41d5594f27f</PROJ_UID><br />        <PROJ_NAME>Project1</PROJ_NAME><br />     </Project><br />     <Project diffgr:id=”Project2″ msdata:rowOrder=”1″ diffgr:hasChanges=”inserted”><br />        <PROJ_UID>3dc33ef5-c796-4b01-8707-3b1f225f741c</PROJ_UID><br />        <PROJ_NAME>Project2</PROJ_NAME><br />     </Project><br /></ProjectDataSet><br /></diffgr:diffgram><br /></ReadProjectListResult><br /></ReadProjectListResponse></pre>

    </td></tr></tbody></table>

<p>          </p><p>In this

message I want to get a list of  Projects UIDs (<PROJ_UID>). </p>

<p>First step was “cut” redundant namespaces using <a href=”http://help.sap.com/saphelp_nwpi711/helpdata/en/45/d169186a29570ae10000000a114a6b/content.htm” target=”_blank”>XMLAnonymizerBean

module</a></p><p> </p>

<p><img  /></body>

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply