Quantcast
Channel: SCN : Popular Discussions - RESTful Web Services SDK
Viewing all articles
Browse latest Browse all 1088

RESTful service Request representation with a XSD

$
0
0

I am using a RESTful service to create a record to a legacy system. I use SUP 2.2 to create the MBO and the corresponding operation. When I got trough the wizard in the Workspace, I need to specify a XSD that will represent the Request body that SUP will use to make the operation create something. The Web service expect some precise namespace but the Workspace is not adding it to the Request part. Here's the XSD file and the resulting Request in XML sent to the web services:

 

XSD:

<?xml version="1.0" encoding="utf-8"?><xs:schema xmlns:i="http://www.w3.org/2001/XMLSchema-instance" elementFormDefault="unqualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">  <xs:element name="ArrayOfPOSR_AUDIT_DTL_V">    <xs:complexType>      <xs:sequence>        <xs:element maxOccurs="unbounded" name="POSR_AUDIT_DTL_V">                              <xs:complexType>                                        <xs:sequence>                                          <xs:element name="BU_Partner" type="xs:string"" />                                        </xs:sequence>                              </xs:complexType>                    </xs:element>      </xs:sequence>    </xs:complexType>  </xs:element></xs:schema>

 

The resulting XML request is like this:

<ArrayOfPOSR_AUDIT_DTL_V >  <POSR_AUDIT_DTL_V><BU_Partner>1</BU_Partner>  </POSR_AUDIT_DTL_V></ArrayOfPOSR_AUDIT_DTL_V >

 

How can I add the xmlns namespace on the first line to get something like this:

<ArrayOfPOSR_AUDIT_DTL_V  xmlns="http://schemas.datacontract.org/2004/07/MyNamespace">

 

Thanks for your help


Viewing all articles
Browse latest Browse all 1088

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>