Redefining namespaces

Hi there,
we have a request from a client to redefine the namespace of some elements inside the xml.
For example, the following XML:
<test xmlns="http://test">
<field1/>
<field2/>
<field2/>
</test>
must be sent like:
<test xmlns="http://test">
<field1/>
<field2 xmlns="http://test"/>
<field2 xmlns="http://test"/>
</test>
Is there any way to accomplish this using mapping (java or xslt) or some of the default modules? I'm using Soap receiver adapter.
PS: I've checked out that if I used different prefixes, like:
<test xmlns="http://test">
<field1/>
<ns0:field2 xmlns:ns0="http://test"/>
<ns0:field2 xmlns:ns0="http://test"/>
</test>
then it would be easy, using <xsl:copy-of> function in XSLT mapping. But the client also demands that the output message must have no prefixes (which, btw, I accomplished using XML Anonymizer Module). :/
Thanks in advance,
Henrique.

Hi Henrique,
<i>the .XSD file is created by the customer and I can't change it.</i> - so you mean to say your target struc is give by client and that does not have ns for inner fields in it - correct or not....... but id this is the case why you have said below:
<i>must be sent like:
<test xmlns="http://test">
<field1/>
<field2 xmlns="http://test"/>
<field2 xmlns="http://test"/>
</test></i>
i.e why you need ns for inner fields.
Could you please explain your req in more detail.
Thanks,
Rajeev Gupta
Message was edited by:
        RAJEEV GUPTA

Similar Messages

  • Namespace shenagans

    Hello,
    I'm trying to load some XML without it being modified but from what I see, no matter which way I load it (.setNamespaceAware = true|false) java is making modifications to my XML.
    Eg:
    If I have source XML
    <root xmlns:ns="http://someURI.net">
    <ns:tag1>some value</ns:tag1>
    <ns:tag2>
    <tag3>some value for tag 3</tag3>
    </ns:tag2>
    </root>
    And I load it using a DocumentBuilderFactory with .setNamespaceAware=true I get:
    <root xmlns:ns="http://someURI.net">
    <ns:tag1>some value</ns:tag1>
    <ns:tag2>
    <*ns5:*tag3 xmlns="http://test.net" xmlns:ns5="http://test.net">some value for tag 3</*ns5:*tag3>
    </ns:tag2>
    </root>
    And if I load it using .setNamespaceAware=false I get:
    <root xmlns:ns="http://someURI.net">
    <ns:tag1 xmlns:ns="">some value</ns:tag1>
    <ns:tag2 xmlns:ns="">
    <tag3>some value for tag 3</tag3>
    </ns:tag2>
    </root>
    So basicly what I'm asking is how do I load my source XML as it is without having Java modify it? I have tags that don't have namespace information, and that is by design, but if I load the XML and let java assign a random namespace to it, it's no longer the same XML. And if I tell the document builder to not be namespace aware then it starts redefining namespaces to "".

    My code is doing:
    {color:#3366ff}
    try {
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(false);
    factory.setValidating(false);
    DocumentBuilder builder;
    builder = factory.newDocumentBuilder();
    document = builder.parse(new InputSource(new StringReader(xml)));
    return document.getDocumentElement();
    }{color}
    Where "xml" is a String.

  • Send Surveys as (interactive) pdfs only works in SAP namespace?

    Hello,
    does anybody have experience with the API CL_UWS_FORM_PDF_API? it seems that you can send Surveys in pdf format but only in SAP namespace.
    In method GET_NEW_FORM_NAME the system always generates a pdf form, hardcoded named like 'QPDF...', which does not work in customer systems.
    Is there any customising possible?
    Is this a bug?
    Thanks,
    Michael

    HI,
    Inside the Method  the string  QPDF_ is concatenate to the form name.
    that is the reason why the form name is alwyas started with QPDF_.
    For this i will suggest two solutions.
    Solution 1: If you are using a custom program,
                      Create a new custom global class and inherit the class CL_UWS_FORM_PDF_API .
                      and redefine the method GET_NEW_FORM_NAME with your logic.
    Solution2: Use the Enhancement frame work.
                    1. GoTo SE24 and specify the Class  CL_UWS_FORM_PDF_API.
                     2. Goto Class in System menu click on Enhance and specify a Enhancement Implementation
                     3. Then Place the Cursor in the Method GET_NEW_FORM_NAME and goto Edit System Menu
                          Select Enhancement Operations and Add Overwrite Method.
                     4. It will add exit under Overwrite Exit Column.Click on it and Specify your logic.
                     5. Activate it  and will solve your Problem.
    Thanks.
    UmaS.

  • The name "Folder" does not exist in the namespace

     I am trying to learn Wpf and doing some of the examples on the Microsoft site. https://msdn.microsoft.com/en-us/library/vstudio/bb546972(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1
    I am using Visual studio 2013. As I work through the example I am getting the following error. 
    Error 1
    The name "Folder" does not exist in the namespace "clr-namespace:FolderExplorer".
    c:\users\hbrown\documents\visual studio 2013\Projects\FolderExplorer\FolderExplorer\MainWindow.xaml
    11 17
    FolderExplorer
    Error 2
    The name "Folder" does not exist in the namespace "clr-namespace:FolderExplorer".
    c:\users\hbrown\documents\visual studio 2013\Projects\FolderExplorer\FolderExplorer\MainWindow.xaml
    16 7
    FolderExplorer
    Here is the code:
    <Window x:Class="MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:my="clr-namespace:FolderExplorer"
        Title="Folder Explorer" Height="350" Width="525">
        <Window.Resources>
            <ObjectDataProvider x:Key="RootFolderDataProvider" >
                <ObjectDataProvider.ObjectInstance>
                    <my:Folder FullPath="C:\"/>
                </ObjectDataProvider.ObjectInstance>
            </ObjectDataProvider>
            <HierarchicalDataTemplate 
       DataType    = "{x:Type my:Folder}"
                ItemsSource = "{Binding Path=SubFolders}">
                <TextBlock Text="{Binding Path=Name}" />
            </HierarchicalDataTemplate>
        </Window.Resources>
    I have a class file named Folder.vb with this code. 
    Public Class Folder
        Private _folder As DirectoryInfo
        Private _subFolders As ObservableCollection(Of Folder)
        Private _files As ObservableCollection(Of FileInfo)
        Public Sub New()
            Me.FullPath = "c:\"
        End Sub 'New
        Public ReadOnly Property Name() As String
            Get
                Return Me._folder.Name
            End Get
        End Property
        Public Property FullPath() As String
            Get
                Return Me._folder.FullName
            End Get
            Set(value As String)
                If Directory.Exists(value) Then
                    Me._folder = New DirectoryInfo(value)
                Else
                    Throw New ArgumentException("must exist", "fullPath")
                End If
            End Set
        End Property
        ReadOnly Property Files() As ObservableCollection(Of FileInfo)
            Get
                If Me._files Is Nothing Then
                    Me._files = New ObservableCollection(Of FileInfo)
                    Dim fi As FileInfo() = Me._folder.GetFiles()
                    Dim i As Integer
                    For i = 0 To fi.Length - 1
                        Me._files.Add(fi(i))
                    Next i
                End If
                Return Me._files
            End Get
        End Property
        ReadOnly Property SubFolders() As ObservableCollection(Of Folder)
            Get
                If Me._subFolders Is Nothing Then
                    Try
                        Me._subFolders = New ObservableCollection(Of Folder)
                        Dim di As DirectoryInfo() = Me._folder.GetDirectories()
                        Dim i As Integer
                        For i = 0 To di.Length - 1
                            Dim newFolder As New Folder()
                            newFolder.FullPath = di(i).FullName
                            Me._subFolders.Add(newFolder)
                        Next i
                    Catch ex As Exception
                        System.Diagnostics.Trace.WriteLine(ex.Message)
                    End Try
                End If
                Return Me._subFolders
            End Get
        End Property
    End Class
    Can someone explain what is happening. 
    Thanks Hal

    Did you try to build the application (Project->Build in Visual Studio) ? If the error doesn't go away then and you have no other compilation errors (if you do you need to fix these first), you should replace "FolderExplorer" with the namespace
    in which the Folder class resides. If you haven't explicitly declared a namespace, you will find the name of the default namespace under Project->Properties->Root namespace. Copy the value from this text box to your XAML:
    xmlns:my="clr-namespace:FolderExplorer"
    The default namespace is usually the same as the name of the application by default so if your application is called "FolderExplorer" you should be able to build it.
    If you cannot make it work then please upload a reproducable sample of your issue to OneDrive and post the link to it here for further help.
    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question.

  • How to Get Portlet Namespace in a JSP attribute

    Hi All,
    The id of any component in a JSF application (with JSR168 portlets) takes the form
    'view'+'<portlet:namespace/>'+':'+'formname:componentidname';
    I need this id to be used for certain validations.
    Currently I am using it as below :-
    <h:intputText required="#{ ! empty param['viewns_7_CGAH47L000NAF0I04I42ND10P7_:form:login']}"/>
    Presently I have hardcoded the portlet namespace 'ns_7_CGAH47L000NAF0I04I42ND10P7_' by looking into the html source of the rendered page.
    Is there any way by which i can automatically get this portlet namespace within the param tag in the jsp.
    I know for a fact that within javascript tags, it can be used as <portlet:namespace/> as shown below :-
    <script type="text/javascript">
    function doSomething()
    buttonId= 'view' + '<portlet:namespace/>'+':'+'formName:buttonId';
    document.getElementById(buttonId).disabled = true;
    </script>
    Kindly treat this on high priority.
    Thanks and Regards,
    Darshan Shroff

    Perhaps so.
    I need to use it within param as below
    <h:inputText value="#{bean.userid}"
    required="#{!empty param['viewns_7_CGAH47L00GLRE0I0BCOUKS00I5_:form:login']}" />
    Here 'viewns_7_CGAH47L00GLRE0I0BCOUKS00I5_:form:login' is actually
    'view' + '<portlet:namespace/>'+':'+'formName:buttonId';
    I am just trying to check the presence of the client ID in the request paramameter map inorder to attain action dependent requiredness.
    Kindly tell me how i could access it within param.
    Thanks & Regards,
    Darshan Shroff

  • Adding Namespace in Sender File Adapter Scenario.

    Hi All
    I have a scenario where  XI has to Pick Up XML a file and process it. The structure of the file is as follows
    <?xml version="1.0" encoding="UTF-8" ?>
    <Header>
         <Seg1>
         </Seg1>
    </Header>
    This file does not contain any any namespace tag. I guess XI would not be able to pick up this file if there is no namespace in the XML file . The file expected by XI would be something like this.
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:MessageTypeName xmlns:ns0="...namespace...">
    <Header>
         <Seg1>
         </Seg1>
    </Header>
    </ns0:MessageTypeName>
    Is there a way this can be handled at the File Sender adapter side . I am aware about  adding adapter module. Is there any other way to add the missing two namespace tags at the top and bottom of the file .
    any help would be appreciated.
    regards
    Nilesh .
    Edited by: Nilesh Taunk on Apr 7, 2008 2:11 PM

    Hi Nilesh,
    Yes it is possible in File sender adapter to give the namespace. In FCC you can give inside Document Specification.
    Under Document Name, enter the name of the XML document.
    The document name is inserted in the message as the main XML tag. This is mandatory for the mapping.
    Under Document Namespace, enter the namespace of the document.
    The namespace is added to the name of the document. This is mandatory for the mapping
    I hope this will help you.
    Regards
    Aashish Sinha

  • J2SE adapter PI 7.1 issue with XML to flat conversion and namespace length

    Dear reader,
    We are facing an issue with J2SE Adapter PI7.1 for a number of flows.
    The flow requirements:
    [1] Namespace length for interfaces is up to 100 characters
    [2] The XML message must be converted to Flat on the adapter channel
    Our PI system is at patch level 7 and we implement J2SE adapter on patch level 7 as well.
    We found that the J2SE adapter on patch level 7 does not support long namespaces [1] (as it should since this is an PI 7.1 j2SE adapter) but no issues where found with the XML to flat conversion [2].
    Experimenting with J2SE adapter on patch level 6 we found the long namespaces [1] are supported however an issue is found with the XML to flat conversion [2] as stated in SAP note 1335527.
    An SAP Customer Message is raised on this issue however your input is highly appricated!
    With Kind Regards,
    Harald Kastelijn
    Edited by: Harald Kastelijn on Mar 6, 2010 9:17 AM
    Edited by: Harald Kastelijn on Mar 6, 2010 9:19 AM

    We found that the J2SE adapter on patch level 7 does not support long namespaces [1] (as it should since this is an PI 7.1
    j2SE adapter) but no issues where found with the XML to flat conversion [2]
    I think the restriction of namespace length still remains in design time (IR).....the same however has been extended in configuration and runtime...this SAP note has some information: https://service.sap.com/sap/support/notes/870809

  • Todos os mais de 300 dolares de aplicativos comprados anteriormente na App Store, sumiram quando tive que redefinir minha senha, tive que formatar o computador e nao tenho backup, o que fazer?

    A cerca de 1 ano adquiri um Iphone 4 e um Ipad 1, durante cerca de 8 meses comprei mais de 300 dolares de aplicativos na Apple Store.
    Ocorre que vendi este Iphone e o Ipad em questao, mas mesmo aswsim tive o cuidado de desinstalar os aplicativos para poder reinstala-los em outro equipamento caso fosse necessário.
    Neste intervalo de tempo, ocorreu um problema no meu computador pessoal e tive que formatar a maquina perdendo o backup feito por meio do Itunes, recentemente comprei um Iphone 4S desbloqueado de fabrica e fui obrigado a redefinir minha senha na Apple Store uma vez que sequer lembrava dela.
    Ao entrar no site pelo Itunes, minha surpresa foi que todos os aplicativos comprados anteriormente não constavam na sessão (minhas compras) estando apenas os adquiridos a partir de entao.
    Como devo fazer para não perder mais de 300 dolares gastos em apolicativos lá?? Como reaver os aplicativos comprados?

    Por favor, perceber que este é um usuário fórum de usuários. Estamos todos os usuários de produtos da Apple como você. Se você teve dificuldade com a Apple os serviços de tecnologia, então você precisa falar com alguém mais acima na cadeia como umrepresentante do cliente. Ter todos os seus fatos, mas ser breve. Uma história com longas tiradas é tedioso.

  • How to take back up of my XI scenraios ( namespaces and Objects )

    Hi
    I have done some scenarios on XI sytem which has been crashed. Present it is not working . J2ee Engine is not starting.
    Now we have installed new XI system. I want to take backup of my old scenarios and i need to import it into new XI system. How to take backup  from old XI system which is not working now and import it into new one.
    Could you please help me.....
    Regards
    - Ravi Shankar B

    Hi,
    You could not able to recover the data from crashed system i.e old XI system.
    For that now you have to develop all as new one in the current new XI system.
    But whatever development that you will be doing that you could create backup.
    I.e follow below steps..
    1. After development and testing select the software component and right click on it --> Export or Tools -->Export Design Objects.
    2. select transport as file system, for CMS again it will go on Java Engine that will be not as backup and give the name of file.
    2. Select the namespaces or individual object to be taken as backup.
    3. Process it and finish the wizard.
    4. This will lead you to download it to local PC that you could keep it as backup
    For Importing goto
    Tools---> Import design object.
    Similarly you can export and import Integration directory objects also
    thanks
    Swarup

  • Problem accessing /config_general/null/Default.action   Reason:There is no Action mapped for namespace/ config_general and action name default

    in use:
    vRO 5.1
    eclipse 3.7.2
    vRo plug-sdk 5.1
    steps:
    1.create a plug-in project from samples(choose solar system)
    2.find the dar package and upload it by vRo configuration
    3.vRo configuration said upload successfully,but the solar system configuration is not properly configued..
    problem:
    Problem accessing /config_general/null/Default.action   Reason:There is no Action mapped for namespace/ config_general and action name default
    How to solve it??
    Thanks so much!!

    There was problem from crm side...its working now..

  • Javax.servlet.ServletException: The name "" is not legal for JDOM/XML namespaces

    Dear all,
    First of all sorry, if this is not the right place for my question.
    I am facing some problem with the XFire Webservices. When i am trying to access the WSDL through the url. server is throwing the following exception :
    javax.servlet.ServletException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
         org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:143)
         org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    root cause
    org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
         org.jdom.Namespace.getNamespace(Namespace.java:164)
         org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.java:58)
         org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
         org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
         org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
         org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.java:403)
         org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:355)
         org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.java:509)
    cont.......
    I am not able to figure out the root cause for this. The service.xml file looks like below:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- START Service.xml -->
    <beans xmlns="http://xfire.codehaus.org/config/1.0">
    <!-- Construct the castor service factory by Spring -->
    <bean id="castorTypeRegistry" class="org.codehaus.xfire.castor.CastorTypeMappingRegistry"/>
    <bean id="bindingProvider" class="org.codehaus.xfire.aegis.AegisBindingProvider">
    <constructor-arg ref="castorTypeRegistry"/>
    </bean>
    <bean id="castorServiceFactory" class="org.codehaus.xfire.service.binding.ObjectServiceFactory">
    <constructor-arg index="0" ref="xfire.transportManager"/>
    <constructor-arg index="1" ref="bindingProvider"/>
    </bean>
    <service>
    <name>ReleaseManager</name>
    <namespace>ReleaseManager</namespace>
    <serviceClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManager</serviceClass>
    <implementationClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManagerImpl</implementationClass>
    <schemas>
    <schema>META-INF/schema/release-impact-worksheet-3.2.0.xsd</schema>
    </schemas>
    <style>document</style>
    <serviceFactory>#castorServiceFactory</serviceFactory>
    </service>
    </beans>
    <!-- END Service.xml-->
    The issue which i am facing is it due to the problem with the service.xml (Which i dont think so..), Or is it any thing to do with the XSD file which i am using.
    Can any body give me some guide lines for this ????
    Thanks in advance.
    Thanks and Regards,
    Manjunath.

    Any one any thoughts..
    I need to find out the solution for this as soon as possible; Not able to proceed further...
    Thanks and Regards,
    Manjunath.

  • SOAP web service: null parameter if namespace not declared in envelope

    Hi guys,
    We are exposing a SOAP web service on WebLogic Portal 10.0. The service has one method which takes a single parameter. The service works correctly if the namespace is declared in the envelope element, but it is unable to map the request correctly if the namespace is declared on each request element and so the single parameter is null.
    This works:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://company.com/inventory">
       <soapenv:Header/>
       <soapenv:Body>
          <inv:CheckProductReservation>
             <username>6144</username>
             <udac>GP1</udac>
             <directoryYpgCode>00903</directoryYpgCode>
             <headingCode>0000001005</headingCode>
             <validityStartDate>2009-09-01</validityStartDate>
             <validityEndDate>2010-08-31</validityEndDate>
             <reservationCode>1234</reservationCode>
          </inv:CheckProductReservation>
       </soapenv:Body>
    </soapenv:Envelope>This fails:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <SOAP-ENV:Body>
          <CheckProductReservation xmlns="http://company.com/inventory">
             <username xmlns="http://company.com/inventory">6144</username>
             <udac xmlns="http://company.com/inventory">GP1</udac>
             <directorycompanyCode xmlns="http://company.com/inventory">00903</directorycompanyCode>
             <headingCode xmlns="http://company.com/inventory">0000001005</headingCode>
             <validityStartDate xmlns="http://company.com/inventory">2009-09-01</validityStartDate>
             <validityEndDate xmlns="http://company.com/inventory">2010-08-31</validityEndDate>
             <reservationCode xmlns="http://company.com/inventory">1234</reservationCode>
          </CheckProductReservation>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>These two requests seem equivalent and syntactically correct. Interestingly enough, soapUI seems to think that the 2nd request is not valid.
    Any ideas why the 2nd request is not working?
    Thanks!

    The WSDL doesn't define the elementNameQualified attribute anywhere. The WSDL looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:im="http://company.com/inventory" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="InventoryService"
         targetNamespace="http://company.com/inventory">
         <wsdl:types>
              <xsd:schema targetNamespace="http://company.com/inventory">
                   <xsd:element name="CheckProductReservation">
                        <xsd:complexType>
                             <xsd:sequence>
                                  <xsd:element name="username" type="xsd:string" maxOccurs="1" minOccurs="1" />
                                  <xsd:element name="udac" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element>
                                  <xsd:element name="directorycompanyCode" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element>
                                  <xsd:element name="headingCode" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element>
                                  <xsd:element name="validityStartDate" type="xsd:date" maxOccurs="1" minOccurs="1"></xsd:element>
                                  <xsd:element name="validityEndDate" type="xsd:date" maxOccurs="1" minOccurs="1"></xsd:element>
                                  <xsd:element name="reservationCode" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element>
                             </xsd:sequence>
                        </xsd:complexType>
                   </xsd:element>
                   <xsd:element name="CheckProductReservationResponse">
                        <xsd:complexType>
                             <xsd:sequence>
                                  <xsd:element name="resultCode" type="im:checkProductReservationResultCode" maxOccurs="1"
                                       minOccurs="1">
                                  </xsd:element>
                                  <xsd:element name="message" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element>
                             </xsd:sequence>
                        </xsd:complexType>
                   </xsd:element>
                   <xsd:simpleType name="checkProductReservationResultCode">
                        <xsd:restriction base="xsd:int">
                             <xsd:enumeration value="0" />
                             <xsd:enumeration value="1" />
                             <xsd:enumeration value="2" />
                             <xsd:enumeration value="3" />
                             <xsd:enumeration value="99" />
                        </xsd:restriction>
                   </xsd:simpleType>
              </xsd:schema>
         </wsdl:types>
         <wsdl:message name="CheckProductReservationRequest">
              <wsdl:part name="parameters" element="im:CheckProductReservation"></wsdl:part>
         </wsdl:message>
         <wsdl:message name="CheckProductReservationResponse">
              <wsdl:part name="parameters" element="im:CheckProductReservationResponse"></wsdl:part>
         </wsdl:message>
         <wsdl:portType name="InventoryService">
              <wsdl:operation name="CheckProductReservation">
                   <wsdl:input message="im:CheckProductReservationRequest"></wsdl:input>
                   <wsdl:output message="im:CheckProductReservationResponse"></wsdl:output>
              </wsdl:operation>
         </wsdl:portType>
         <wsdl:binding name="InventoryServiceSOAP" type="im:InventoryService">
              <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
              <wsdl:operation name="CheckProductReservation">
                   <soap:operation soapAction="http://company.com/inventory/VerifyProductReservationCode" />
                   <wsdl:input>
                        <soap:body use="literal" />
                   </wsdl:input>
                   <wsdl:output>
                        <soap:body use="literal" />
                   </wsdl:output>
              </wsdl:operation>
         </wsdl:binding>
         <wsdl:service name="InventoryService">
              <wsdl:port binding="im:InventoryServiceSOAP" name="InventoryServiceSOAP">
                   <soap:address location="http://www.company.com/" />
              </wsdl:port>
         </wsdl:service>
    </wsdl:definitions>What does that tell us?

  • Read selected values from a multi choice field programatically using Microsoft.SharePoint.Client namespace.

    All examples I found refer to classes under Microsoft.SharePoint namespace. However, I have the SharePoint CSOM that only gives me the Microsoft.Sharepoint.Client namespace.
    I need to read the selected values of a multichoice field, but not sure how to do it with classes in the namespace above.
    everthing works, exept the TSQL_x0020_Reference_x0020_Numbe field.
    my code looks like this:
    Webweb = cont.Web;
                cont.Load(web);
                cont.ExecuteQuery();
    Listsstest = web.Lists.GetByTitle("T-SQL
    Code Review Tracking");
    //CamlQuery query = CamlQuery.CreateAllItemsQuery();
    CamlQueryquery =
    newCamlQuery();
                query.ViewXml =
    @"<View>
                               <ViewFields>
                                    <FieldRef Name='Category'/>
                                    <FieldRef Name='Review_x0020_Type'/>
                                    <FieldRef Name='Review_x0020_Start_x0020_Date'/>
                                    <FieldRef Name='Title'/>
                                    <FieldRef Name='Location'/>
                                    <FieldRef Name='Project'/>
                                    <FieldRef Name='Author0'/>
                                    <FieldRef Name='AssignedTo'/>
                                    <FieldRef Name='TSQL_x0020_Reference_x0020_Numbe'/>
                                </ViewFields>
                             </View>"
     ListItemCollectionitems
    = sstest.GetItems(query);
                cont.Load(items);
                cont.ExecuteQuery();
    foreach(ListItemitem
    initems)
                    Output0Buffer.AddRow();
                    Output0Buffer.ReviewStatus = item.FieldValues[
    "Category"] !=
    null? item.FieldValues["Category"].ToString()
    : String.Empty;
                    Output0Buffer.ReviewType = item.FieldValues[
    "Review_x0020_Type"] !=
    null? item.FieldValues["Review_x0020_Type"].ToString()
    : String.Empty;
                    Output0Buffer.ReviewDate =
    DateTime.Parse(item.FieldValues["Review_x0020_Start_x0020_Date"].ToString());
                    Output0Buffer.Module = item.FieldValues[
    "Title"] !=
    null? item.FieldValues["Title"].ToString()
    : String.Empty;
                    Output0Buffer.BranchLocationURL = item.FieldValues[
    "Location"] !=
    null? item.FieldValues["Location"].ToString()
    : String.Empty;
                    Output0Buffer.ProjectName = item.FieldValues[
    "Project"] !=
    null? item.FieldValues["Project"].ToString()
    : String.Empty;
                    Output0Buffer.Author = item.FieldValues[
    "Author0"] !=
    null? item.FieldValues["Author0"].ToString()
    : String.Empty;
    FieldLookupValueflvAssignedTo =
    newFieldUserValue();
                    flvAssignedTo = item.FieldValues[
    "AssignedTo"]
    asFieldLookupValue;
    if(flvAssignedTo !=
    null)
                        Output0Buffer.AssignedTo = flvAssignedTo.LookupValue;
    varv = item.FieldValues["TSQL_x0020_Reference_x0020_Numbe"];
    if(v !=
    null)
                        Output0Buffer.Reason2 = v.ToString();
                 Output0Buffer.SetEndOfRowset();           

    Hi,
    According to your description, my understanding is that you want to read the selected choice field value using Client Object Model.
    In my environment, I create a list with a mutichoice fileld named "choice" and then I used the code snippet below to get the selected value in choice field.
    ClientContext clientContext = new ClientContext("http://sp2013sps/sites/test1");
    Microsoft.SharePoint.Client.List spList = clientContext.Web.Lists.GetByTitle("list1");
    clientContext.Load(spList);
    clientContext.ExecuteQuery();
    if (spList != null && spList.ItemCount > 0)
    Microsoft.SharePoint.Client.CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXml =
    @"<View>
    <ViewFields><FieldRef Name='choice' /></ViewFields>
    </View>";
    ListItemCollection listItems = spList.GetItems(camlQuery);
    clientContext.Load(listItems);
    clientContext.ExecuteQuery();
    string value = listItems[0]["choice"].ToString();
    Console.WriteLine(value);
    Console.ReadKey();
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Does new 1402 Activity object in Cloud for Customer have wrong data type namespaces?

    I see that the individual "activity" objects (e.g., ActivityTask, AppointmentActivity, etc) are being deprecated as of 1405 and moving to a new Activity object with a TypeCode. That makes a lot of sense.
    In reviewing this new Activity object, I've noticed that many of the node elements utilize Data Types in the http://sap.com/xi/Common/DataTypes namespace instead of the http://sap.com/xi/AP/Common/GDT. For example, the root node element UUID has a data type UUID in the http://sap.com/xi/Common/DataTypes namespace, unlike all the other objects in the Public Solution Model.
    There are many more elements in this new Activity object that are mismatched like this to other common usage in other objects. Is this a new trend or a mistake?

    Hello Gregory, Alessandro,
    just for clarification:
    SAP wanted to eliminate the superflous supplementary components from the data types used in the Business Objects.
    Take the GDT Identifier as an example. It has the following supplementary components:
    SCHEME_ID
    SCHEME_VERSION_ID
    SCHEME_AGENCY_ID
    SCHEME_AGENCY_SCHEME_ID
    SCHEME_AGENCY_SCHEME_AGENCY_ID
    CONTENT
    You very seldom need the SCHEME_ID or the SCHEME_AGENCY_ID (if the ID is a GTIN or DUNS number then you need them). I never came over a situation to use the SCHEME_AGENCY_SCHEME_AGENCY_ID.
    So the data types from the "new" namespace omit those components. But SAP noticed the effort to adapt all the coding.
    Therefore it was decided that only new objects will use the data types from the new namepace.
    In the case of the ActivityTask, AppointmentActivity, etc. this wil requires - as Alessandro mentioned - some adoption effort.
    HTH,
          Horst

  • Report:"encountered the symbol of namespace....."

    My Envirement:
    CentOS 4.7||Oracle11g||pro*c
    My file of nn.pc:
    [oracle@oracle11g work2]$ more nn.pc
    #include<iostream>
    using namespace std;
    #include "sqlca.h"
    EXEC SQL BEGIN DECLARE SECTION;
    char *uid="scott/scott@wilson";
    EXEC SQL END DECLARE SECTION;
    int main()
    EXEC SQL CONNECT :uid;
    count<<sqlca.sqlerrm.sqlerrmc<<endl;
    if(sqlca.sqlcode == 0)
    cout<<"yes"<<endl;
    else
    cout<<"no"<<endl;
    [oracle@oracle11g work2]$
    my file of pcscfg.cfg:
    [oracle@oracle11g admin]$ more $ORACLE_HOME/precomp/admin/pcscfg.cfg
    sys_include=(/u01/oracle/precomp/public,/usr/include,/usr/lib/gcc/i386-redhat-linux/4.1.1/include,/usr/lib/gcc/i386-redhat-li
    nux/3.4.5/include,/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/include,/usr/lib/gcc/i586-suse-linux/4.1.0/include)
    ltype=short
    code=cpp
    cpp_suffix=cc
    parse=none
    SQLCHECK=SEMANTICS
    [oracle@oracle11g admin]$
    my file of /etc/profile:
    [oracle@oracle11g work2]$ more /etc/profile
    # /etc/profile
    # System wide environment and startup programs, for login setup
    # Functions and aliases go in /etc/bashrc
    pathmunge () {
    if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
    if [ "$2" = "after" ] ; then
    PATH=$PATH:$1
    else
    PATH=$1:$PATH
    fi
    fi
    # Path manipulation
    if [ `id -u` = 0 ]; then
    pathmunge /sbin
    pathmunge /usr/sbin
    pathmunge /usr/local/sbin
    fi
    pathmunge /usr/X11R6/bin after
    # No core files by default
    ulimit -S -c 0 > /dev/null 2>&1
    USER="`id -un`"
    LOGNAME=$USER
    MAIL="/var/spool/mail/$USER"
    HOSTNAME=`/bin/hostname`
    HISTSIZE=1000
    if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
    fi
    export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
    for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
    . $i
    fi
    done
    unset i
    unset pathmunge
    if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
    fi
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib;
    export LD_LIBRARY_PATH
    [oracle@oracle11g work2]$
    the error report:
    [oracle@oracle11g work2]$ source /etc/profile
    [oracle@oracle11g work2]$ proc nn.pc
    Pro*C/C++: Release 11.1.0.6.0 - Production on Sun Jun 21 20:15:44 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    System default option values taken from: /u01/oracle/precomp/admin/pcscfg.cfg
    Error at line 1, column 10 in file nn.pc
    #include<iostream>
    .........1
    PCC-S-02015, unable to open include file
    Syntax error at line 2, column 8, file nn.pc:
    Error at line 2, column 8 in file nn.pc
    using namespace std;
    .......1
    PCC-S-02201, Encountered the symbol "namespace" when expecting one of the follow
    ing:
    ; , = ( [
    Syntax error at line 11, column 2, file nn.pc:
    Error at line 11, column 2 in file nn.pc
    .1
    PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
    ; , = ( [
    The symbol ";" was substituted for "{" to continue.
    Syntax error at line 0, column 0, file nn.pc:
    Error at line 0, column 0 in file nn.pc
    PCC-S-02201, Encountered the symbol "<eof>" when expecting one of the following:
    ; { } ( * & + - ~ ! ^ ++ -- ... auto, break, case, char,
    const, continue, default, do, double, enum, extern, float,
    for, goto, if, int, long, ulong_varchar, OCIBFileLocator
    OCIBlobLocator, OCIClobLocator, OCIDateTime,
    OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
    OCIRaw, OCIString, register, return, short, signed, sizeof,
    sql_context, sql_cursor, static, struct, switch, typedef,
    union, unsigned, utext, uvarchar, varchar, void, volatile,
    while, an identifier, a typedef name, a precompiled header,
    a quoted string, a numeric constant, exec oracle,
    exec oracle begin, exec, exec sql, exec sql begin,
    exec sql type, exec sql var, exec sql include,
    Error at line 0, column 0 in file nn.pc
    PCC-F-02102, Fatal error while doing C preprocessing
    [oracle@oracle11g work2]$
    =======================
    what does this mean? I searched google, but there's no corresponding solution.
    Edited by: user3032370 on 2009-6-22 上午2:03

    Hi,
    I am facing simialr issue on racle 11G
    PCC-S-02201, Encountered the symbol "namespace" when expecting one of the follow
    ing:
    } auto, char, const, double, enum, extern, float, int, long,
    ulong_varchar, OCIBFileLocator OCIBlobLocator,
    OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
    OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
    short, signed, sql_context, sql_cursor, static, struct,
    typedef, union, unsigned, utext, uvarchar, varchar, void,
    volatile, a typedef name, a precompiled header, exec oracle,
    exec oracle begin, exec, exec sql, exec sql begin,
    exec sql type, exec sql var, exec sql include,
    The symbol "exec," was substituted for "namespace" to continue.
    Syntax error at line 28, column 7, file ./gen/acd_lib_ppc.i:
    Error at line 28, column 7 in file ./gen/acd_lib_ppc.i
    using std :: ptrdiff_t ;
    ......1
    PCC-S-02201, Encountered the symbol "std" when expecting one of the following:
    ; , = ( [
    Error at line 0, column 0 in file ./gen/acd_lib_ppc.i
    Did you find any solution to this please?
    proc details:
    [fnetdba@gwl09072appd194 code]$ proc
    Pro*C/C++: Release 11.1.0.7.0 - Production on Mon Feb 20 11:25:12 2012
    Copyright (c) 1982, 2007, Oracle. All rights reserved.

Maybe you are looking for